on master help sign in
changed it back since the types were wrong
d583bfeIzaak Meckler
src/CheckMatch.hs+2−2
@@ -51,7 +51,7 @@ fromPattern p = case p of
51data ErrorType = ConstructorNotFound Var.Canonical
51data ErrorType = ConstructorNotFound Var.Canonical
52
52
53checkModule :: [CanonicalAdt] -> Module exports CanonicalBody -> [(Either ErrorType MatchResult, Annotation.Region)]
53checkModule :: [CanonicalAdt] -> Module exports CanonicalBody -> [(Either ErrorType MatchResult, Annotation.Region)]
54−checkModule (Module {body, datatypes}) = checkBody body where
54+checkModule adts (Module {body}) = checkBody body where
55 checkBody :: CanonicalBody -> [(Either ErrorType MatchResult, Annotation.Region)]
55 checkBody :: CanonicalBody -> [(Either ErrorType MatchResult, Annotation.Region)]
56 checkBody (CanonicalBody {program}) = checkExpr program
56 checkBody (CanonicalBody {program}) = checkExpr program
57
57
@@ -86,7 +86,7 @@ checkModule (Module {body, datatypes}) = checkBody body where
86 m =
86 m =
87 Map.fromList $ concatMap (\adt@(_adtName, (_tyVars, ctors)) ->
87 Map.fromList $ concatMap (\adt@(_adtName, (_tyVars, ctors)) ->
88 map (\(ctor,_args) -> (ctor, adt)) ctors)
88 map (\(ctor,_args) -> (ctor, adt)) ctors)
89− datatypes
89+ adts
90
90
91 ctorToAdtExn :: Var.Canonical -> Either ErrorType CanonicalAdt
91 ctorToAdtExn :: Var.Canonical -> Either ErrorType CanonicalAdt
92 ctorToAdtExn c = case ctorToAdt c of
92 ctorToAdtExn c = case ctorToAdt c of