-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow type annotations on remotely called functions.
whitequark
committed
Aug 10, 2015
1 parent
b28a874
commit 435559f
Showing
3 changed files
with
57 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
from artiq.language import core, environment, units, scan | ||
from artiq.language import core, types, environment, units, scan | ||
from artiq.language.core import * | ||
from artiq.language.types import * | ||
from artiq.language.environment import * | ||
from artiq.language.units import * | ||
from artiq.language.scan import * | ||
|
||
|
||
__all__ = [] | ||
__all__.extend(core.__all__) | ||
__all__.extend(types.__all__) | ||
__all__.extend(environment.__all__) | ||
__all__.extend(units.__all__) | ||
__all__.extend(scan.__all__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
""" | ||
Values representing ARTIQ types, to be used in function type | ||
annotations. | ||
""" | ||
|
||
from artiq.compiler import types, builtins | ||
|
||
__all__ = ["TNone", "TBool", "TInt32", "TInt64", "TFloat", | ||
"TStr", "TList", "TRange32", "TRange64"] | ||
|
||
TNone = builtins.TNone() | ||
TBool = builtins.TBool() | ||
TInt32 = builtins.TInt(types.TValue(32)) | ||
TInt64 = builtins.TInt(types.TValue(64)) | ||
TFloat = builtins.TFloat() | ||
TStr = builtins.TStr() | ||
TList = builtins.TList | ||
TRange32 = builtins.TRange(builtins.TInt(types.TValue(32))) | ||
TRange64 = builtins.TRange(builtins.TInt(types.TValue(64))) |