on master help sign in
Expose Type.Type.SuperType since it moved from AST.Type
adb93faEvan Czaplicki
src/Type/Constrain/Expression.hs+3−3
@@ -14,7 +14,7 @@ import qualified Data.Index as Index
14import qualified Elm.Name as N
14import qualified Elm.Name as N
15import qualified Reporting.Annotation as A
15import qualified Reporting.Annotation as A
16import qualified Reporting.Region as R
16import qualified Reporting.Region as R
17−import Type.Constraint
17+import Type.Constraint as C
18import qualified Type.Constrain.Pattern as Pattern
18import qualified Type.Constrain.Pattern as Pattern
19import qualified Type.Instantiate as Instantiate
19import qualified Type.Instantiate as Instantiate
20import Type.Type as Type hiding (Descriptor(..))
20import Type.Type as Type hiding (Descriptor(..))
@@ -61,7 +61,7 @@ constrain rtv (A.A region expression) expectation =
61
61
62 Can.Int _ ->
62 Can.Int _ ->
63 do var <- mkFlexNumber
63 do var <- mkFlexNumber
64− return $ exists [var] $ CEqual region Number (VarN var) expectation
64+ return $ exists [var] $ CEqual region C.Number (VarN var) expectation
65
65
66 Can.Float _ ->
66 Can.Float _ ->
67 return $ CEqual region Float Type.float expectation
67 return $ CEqual region Float Type.float expectation
@@ -73,7 +73,7 @@ constrain rtv (A.A region expression) expectation =
73 do numberVar <- mkFlexNumber
73 do numberVar <- mkFlexNumber
74 let numberType = VarN numberVar
74 let numberType = VarN numberVar
75 numberCon <- constrain rtv expr (FromContext region Negate numberType)
75 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
77 return $ exists [numberVar] $ CAnd [ numberCon, negateCon ]
77 return $ exists [numberVar] $ CAnd [ numberCon, negateCon ]
78
78
79 Can.Binop op _ _ annotation leftExpr rightExpr ->
79 Can.Binop op _ _ annotation leftExpr rightExpr ->
src/Type/Type.hs+2
@@ -6,6 +6,7 @@ module Type.Type
6 , Type(..)
6 , Type(..)
7 , Descriptor(Descriptor)
7 , Descriptor(Descriptor)
8 , Content(..)
8 , Content(..)
9+ , SuperType(..)
9 , noRank
10 , noRank
10 , outermostRank
11 , outermostRank
11 , Mark
12 , Mark
@@ -99,6 +100,7 @@ data SuperType
99 | Comparable
100 | Comparable
100 | Appendable
101 | Appendable
101 | CompAppend
102 | CompAppend
103+ deriving (Eq)
102
104
103
105
104makeDescriptor :: Content -> Descriptor
106makeDescriptor :: Content -> Descriptor