Switch from Types to Variables in the representation of PortIn
commit3b9862ab4eafac10f1197285a499c10c198b21d5
authorEvan Czaplicki <info@elm-lang.org>
dateSun 5 Jan 2014, 09:29 (13 years ago)
parent39eb4c6
compiler/SourceSyntax/Expression.hs+1−1
@@ -47,7 +47,7 @@ data Expr' def
4747 | Record [(String, LExpr' def)]
4848 | Markdown String String [LExpr' def]
4949 -- 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)
5151 | PortOut String SrcType.Type (LExpr' def)
5252
5353type ParseExpr = Expr' ParseDef
compiler/Type/Constrain/Expression.hs+1−1
@@ -150,7 +150,7 @@ constrain env (L span expr) tipe =
150150 exists $ \tIncoming ->
151151 exists $ \tHandler -> do
152152 cHandler <- constrain env handler tHandler
153− return $ and [ cHandler, tHandler === (tIncoming ==> tt) ]
153+ return $ and [ cHandler, tHandler === (tIncoming ==> VarN tt) ]
154154
155155 PortOut _ _ signal ->
156156 constrain env signal tipe