case statement fixes

This commit is contained in:
2024-09-07 10:55:51 -07:00
parent 1d1dd678c3
commit 26ed1355f5
4 changed files with 35 additions and 60 deletions

View File

@@ -147,8 +147,8 @@ Eq (Tm) where
(Pi _ n icit t u) == (Pi _ n' icit' t' u') = icit == icit' && t == t' && u == u'
_ == _ = False
-- FIXME prec
||| Pretty printer for Tm.
export
pprint : List String -> Tm -> String
pprint names tm = render 80 $ go names tm
@@ -176,19 +176,6 @@ pprint names tm = render 80 $ go names tm
go names (Lit _ lit) = text "\{show lit}"
go names (Let _ nm t u) = text "let" <+> text nm <+> ":=" <+> go names t </> (nest 2 $ go names u)
public export
Pretty Tm where
pretty (Bnd _ k) = ?rhs_0
pretty (Ref _ str mt) = text str
pretty (Meta _ k) = text "?m\{show k}"
pretty (Lam _ str t) = text "(\\ \{str} => " <+> pretty t <+> ")"
pretty (App _ t u) = text "(" <+> pretty t <+> pretty u <+> ")"
pretty (U _) = "U"
pretty (Pi _ str icit t u) = text "(" <+> text str <+> ":" <+> pretty t <+> ")" <+> "=>" <+> pretty u <+> ")"
pretty (Case _ _ _) = text "FIXME PRETTY CASE"
pretty (Lit _ lit) = text (show lit)
pretty (Let _ _ _ _) = text "LET"
-- public export
-- data Closure : Nat -> Type
data Val : Type