Skip to content

Commit

Permalink
fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
inariksit committed Sep 19, 2024
1 parent 91d1b5f commit 75423a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lam4-backend/src/Lam4/Expr/Printer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ instance Print DataDecl where
-/
-}
prt i = \case
decl@(RecordDecl [] _ _) -> error [I.i|Trying to print DataDecl without a name: #{decl}|]
RecordDecl (recname:rowtypedecls) [] metadata ->
prPrec i 0 (concatD [
prt 0 metadata
Expand Down Expand Up @@ -282,6 +283,7 @@ instance Print Expr where
Let decl expr -> prPrec i 0 (concatD [doc (showString "LET"), doc (showString "{"), prt 0 decl, doc (showString "}"), doc (showString "IN"), doc (showString "{"), prt 0 expr, doc (showString "}")])
StatementBlock (st :| sts) -> prPrec i 0 (concatD [prt 0 (st:sts)])
NormIsInfringed name -> prPrec i 0 (concatD [prt 0 name, doc (showString "IS_INFRINGED")])
p@(Predicate _mdata [] _expr) -> error [I.i|Trying to print Predicate without a name: #{p}|]
Predicate metadata [funname] expr ->
prPrec i 0 (concatD [
prt 0 metadata
Expand Down Expand Up @@ -313,7 +315,6 @@ instance Print Expr where
, prt 0 right
])
PredApp f args -> prPrec i 0 (concatD [prt 0 f, prt 0 args])
List exprs -> prt i exprs
Sig{} -> error "not yet implemented: Sig"
Relation{} -> error "not yet implemented: Relation"

Expand Down Expand Up @@ -385,6 +386,7 @@ instance Print TypeExpr where
prt i = \case
TyCustom name -> prPrec i 0 (concatD [prt 0 name])
TyBuiltin builtintype -> prPrec i 0 (concatD [prt 0 builtintype])
TyFun arg ret -> prPrec i 0 (concatD [prt 0 arg, doc (showString "=>"), prt 0 ret])

instance Print TyBuiltin where
prt i = \case
Expand Down

0 comments on commit 75423a0

Please sign in to comment.