on master help sign in
Switch from Types to Variables in the representation of PortIn
3b9862aEvan Czaplicki
compiler/SourceSyntax/Expression.hs+1−1
@@ -47,7 +47,7 @@ data Expr' def
47 | Record [(String, LExpr' def)]
47 | Record [(String, LExpr' def)]
48 | Markdown String String [LExpr' def]
48 | Markdown String String [LExpr' def]
49 -- for type checking and code gen only
49 -- for type checking and code gen only
50− | PortIn String SrcType.Type Type.Type (LExpr' def)
50+ | PortIn String SrcType.Type Type.Variable (LExpr' def)
51 | PortOut String SrcType.Type (LExpr' def)
51 | PortOut String SrcType.Type (LExpr' def)
52
52
53type ParseExpr = Expr' ParseDef
53type ParseExpr = Expr' ParseDef
compiler/Type/Constrain/Expression.hs+1−1
@@ -150,7 +150,7 @@ constrain env (L span expr) tipe =
150 exists $ \tIncoming ->
150 exists $ \tIncoming ->
151 exists $ \tHandler -> do
151 exists $ \tHandler -> do
152 cHandler <- constrain env handler tHandler
152 cHandler <- constrain env handler tHandler
153− return $ and [ cHandler, tHandler === (tIncoming ==> tt) ]
153+ return $ and [ cHandler, tHandler === (tIncoming ==> VarN tt) ]
154
154
155 PortOut _ _ signal ->
155 PortOut _ _ signal ->
156 constrain env signal tipe
156 constrain env signal tipe