Commit df4a5e21 authored by Jan Rasmus Tikovsky 's avatar Jan Rasmus Tikovsky
Browse files

Typecheck record labels after initialization of type constructor environment

parent 18f66e93
......@@ -74,12 +74,11 @@ typeCheck :: ModuleIdent -> TCEnv -> ValueEnv -> [Decl]
-> (TCEnv, ValueEnv, [Message])
typeCheck m tcEnv tyEnv decls = execTCM check initState
check = checkTypeSynonyms m tds &&> mapM_ checkFieldLabel tds
&&> checkDecls
check = checkTypeSynonyms m tds &&> checkDecls
checkDecls = do
bindTypes tds
mapM_ checkFieldLabel tds &&> bindLabels
tcDecls vds
(tds, vds) = partition isTypeDecl decls
initState = TcState m tcEnv tyEnv idSubst emptySigEnv 0 []
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment