Added test of multiple instanciations of same polymorphic function

This commit is contained in:
Rakarake 2023-03-10 17:20:23 +01:00
parent 224a165715
commit 96c4a2bddf
4 changed files with 64 additions and 16 deletions

View file

@ -83,6 +83,7 @@ instance Print Exp where
prt i = \case
EId n -> prPrec i 3 $ concatD [prtId 0 n]
ELit _ (LInt i1) -> prPrec i 3 $ concatD [prt 0 i1]
ELit _ LBool -> prPrec i 0 (concatD [doc (showString "Ture")])
ELet bs e -> prPrec i 3 $ concatD
[ doc $ showString "let"
, prt 0 bs

View file

@ -69,6 +69,7 @@ instance Print Exp where
prt i = \case
EId n -> prPrec i 3 $ concatD [prtId 0 n]
ELit _ (LInt i1) -> prPrec i 3 $ concatD [prt 0 i1]
ELit _ LBool -> prPrec i 0 (concatD [doc (showString "Ture")])
ELet bs e -> prPrec i 3 $ concatD
[ doc $ showString "let"
, prt 0 bs