more symbols and changed err msg

This commit is contained in:
sebastian 2023-05-04 23:00:51 +02:00
parent 0dc06eaf80
commit 4f21a58200
2 changed files with 2 additions and 2 deletions

View file

@ -104,7 +104,7 @@ coercions Type 3 ;
token UIdent (upper (letter | digit | '_')*) ; token UIdent (upper (letter | digit | '_')*) ;
token LIdent (lower (letter | digit | '_')*) ; token LIdent (lower (letter | digit | '_')*) ;
token Symbol (["@#%^&*_-+=|?/<>,"]+) ; token Symbol (["@#%^&*_-+=|?/<>,:[]"]+) ;
comment "--"; comment "--";
comment "{-" "-}"; comment "{-" "-}";

View file

@ -48,7 +48,7 @@ desugarType = \case
let (name : tvars) = flatten t1 ++ [t2] let (name : tvars) = flatten t1 ++ [t2]
in case name of in case name of
TIdent ident -> TData ident (map desugarType tvars) TIdent ident -> TData ident (map desugarType tvars)
_ -> error "desugarType in Desugar.hs is not implemented correctly" _ -> error "desugarType is not implemented correctly"
TLit l -> TLit l TLit l -> TLit l
TVar v -> TVar v TVar v -> TVar v
(TAll i t) -> TAll i (desugarType t) (TAll i t) -> TAll i (desugarType t)