artiq/artiq/language/types.py

28 lines
832 B
Python
Raw Normal View History

"""
Values representing ARTIQ types, to be used in function type
annotations.
"""
from artiq.compiler import types, builtins
__all__ = ["TNone", "TTuple",
"TBool", "TInt32", "TInt64", "TFloat",
"TStr", "TBytes", "TByteArray",
2020-07-28 06:34:37 +08:00
"TList", "TArray", "TRange32", "TRange64",
"TVar"]
TNone = builtins.TNone()
TBool = builtins.TBool()
TInt32 = builtins.TInt(types.TValue(32))
TInt64 = builtins.TInt(types.TValue(64))
TFloat = builtins.TFloat()
TStr = builtins.TStr()
TBytes = builtins.TBytes()
TByteArray = builtins.TByteArray()
2016-10-06 18:55:33 +08:00
TTuple = types.TTuple
TList = builtins.TList
2020-07-28 06:34:37 +08:00
TArray = builtins.TArray
TRange32 = builtins.TRange(builtins.TInt(types.TValue(32)))
TRange64 = builtins.TRange(builtins.TInt(types.TValue(64)))
TVar = types.TVar