on master help sign in
Expose Type.Type.SuperType since it moved from AST.Type
commitadb93faf09ee48e5593d9021e07b887af1ebcbb3 authorEvan Czaplicki <evancz@users.noreply.github.com> dateThu 16 Nov 2017, 14:22 (9 years ago) parentafafd36
2 files changed+5−3
src/Type/Constrain/Expression.hs+3−3 src/Type/Type.hs+2
src/Type/Constrain/Expression.hs+3−3
@@ -14,7 +14,7 @@ import qualified Data.Index as Index
1414import qualified Elm.Name as N
1515import qualified Reporting.Annotation as A
1616import qualified Reporting.Region as R
17−import Type.Constraint
17+import Type.Constraint as C
1818import qualified Type.Constrain.Pattern as Pattern
1919import qualified Type.Instantiate as Instantiate
2020import Type.Type as Type hiding (Descriptor(..))
@@ -61,7 +61,7 @@ constrain rtv (A.A region expression) expectation =
6161
6262 Can.Int _ ->
6363 do var <- mkFlexNumber
64− return $ exists [var] $ CEqual region Number (VarN var) expectation
64+ return $ exists [var] $ CEqual region C.Number (VarN var) expectation
6565
6666 Can.Float _ ->
6767 return $ CEqual region Float Type.float expectation
@@ -73,7 +73,7 @@ constrain rtv (A.A region expression) expectation =
7373 do numberVar <- mkFlexNumber
7474 let numberType = VarN numberVar
7575 numberCon <- constrain rtv expr (FromContext region Negate numberType)
76− let negateCon = CEqual region Number numberType expectation
76+ let negateCon = CEqual region C.Number numberType expectation
7777 return $ exists [numberVar] $ CAnd [ numberCon, negateCon ]
7878
7979 Can.Binop op _ _ annotation leftExpr rightExpr ->
src/Type/Type.hs+2
@@ -6,6 +6,7 @@ module Type.Type
66 , Type(..)
77 , Descriptor(Descriptor)
88 , Content(..)
9+ , SuperType(..)
910 , noRank
1011 , outermostRank
1112 , Mark
@@ -99,6 +100,7 @@ data SuperType
99100 | Comparable
100101 | Appendable
101102 | CompAppend
103+ deriving (Eq)
102104
103105
104106makeDescriptor :: Content -> Descriptor