the Error type; better lexer error reporting

This commit is contained in:
aarne
2006-09-01 15:11:22 +00:00
parent 66d3c75031
commit fda42f61c4
9 changed files with 132 additions and 48 deletions

View File

@@ -31,8 +31,10 @@ typPredefined :: Ident -> Err Type
typPredefined c@(IC f) = case f of
"Int" -> return typePType
"Float" -> return typePType
"Error" -> return typeType
"Ints" -> return $ mkFunType [cnPredef "Int"] typePType
"PBool" -> return typePType
"error" -> return $ mkFunType [typeStr] (cnPredef "Error") -- non-can. of empty set
"PFalse" -> return $ cnPredef "PBool"
"PTrue" -> return $ cnPredef "PBool"
"dp" -> return $ mkFunType [cnPredef "Int",typeTok] typeTok