Skip to content

Commit

Permalink
compiler: pull in dependencies in more finely grained way (fixes #181).
Browse files Browse the repository at this point in the history
whitequark committed Nov 24, 2015
1 parent bda1114 commit e1cd2cc
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions artiq/compiler/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
from .module import Module, Source
from .embedding import Stitcher
3 changes: 2 additions & 1 deletion artiq/compiler/types.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@

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)
3 changes: 2 additions & 1 deletion artiq/coredevice/core.py
Original file line number Diff line number Diff line change
@@ -6,7 +6,8 @@
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).

0 comments on commit e1cd2cc

Please sign in to comment.