forked from M-Labs/artiq
1
0
Fork 0

compiler: pull in dependencies in more finely grained way (fixes #181).

This commit is contained in:
whitequark 2015-11-24 17:32:04 +08:00
parent bda11149df
commit e1cd2ccd40
3 changed files with 4 additions and 4 deletions

View File

@ -1,2 +0,0 @@
from .module import Module, Source
from .embedding import Stitcher

View File

@ -5,7 +5,6 @@ in :mod:`asttyped`.
import string
from collections import OrderedDict
from pythonparser import diagnostic
from . import iodelay
@ -426,6 +425,8 @@ class TDelay(Type):
"""
def __init__(self, duration, cause):
# Avoid pulling in too many dependencies with `artiq.language`.
from pythonparser import diagnostic
assert duration is None or isinstance(duration, iodelay.Expr)
assert cause is None or isinstance(cause, diagnostic.Diagnostic)
assert (not (duration and cause)) and (duration or cause)

View File

@ -6,7 +6,8 @@ from artiq.language.core import *
from artiq.language.types import *
from artiq.language.units import *
from artiq.compiler import Stitcher, Module
from artiq.compiler.module import Module
from artiq.compiler.embedding import Stitcher
from artiq.compiler.targets import OR1KTarget
# Import for side effects (creating the exception classes).