on master help sign in
updated to use the datatypes field of the argument module
commit34ba6feb84fbb005b21ec0e8a44e8e07d1d0eac3 authorIzaak Meckler <ihmeckler@gmail.com> dateSat 25 Apr 2015, 12:59 (12 years ago) parent7222e6e
1 file changed+2−2
src/CheckMatch.hs+2−2
src/CheckMatch.hs+2−2
@@ -51,7 +51,7 @@ fromPattern p = case p of
5151data ErrorType = ConstructorNotFound Var.Canonical
5252
5353checkModule :: [CanonicalAdt] -> Module exports CanonicalBody -> [(Either ErrorType MatchResult, Annotation.Region)]
54−checkModule adts (Module {body}) = checkBody body where
54+checkModule (Module {body, datatypes}) = checkBody body where
5555 checkBody :: CanonicalBody -> [(Either ErrorType MatchResult, Annotation.Region)]
5656 checkBody (CanonicalBody {program}) = checkExpr program
5757
@@ -86,7 +86,7 @@ checkModule adts (Module {body}) = checkBody body where
8686 m =
8787 Map.fromList $ concatMap (\adt@(_adtName, (_tyVars, ctors)) ->
8888 map (\(ctor,_args) -> (ctor, adt)) ctors)
89− adts
89+ datatypes
9090
9191 ctorToAdtExn :: Var.Canonical -> Either ErrorType CanonicalAdt
9292 ctorToAdtExn c = case ctorToAdt c of