Fix some strings that were messed up by the initial Idris -> Newt perl code

This commit is contained in:
2025-06-27 21:29:12 -07:00
parent 67d1e54ffb
commit 5743eb39ea
3 changed files with 3 additions and 3 deletions

View File

@@ -260,7 +260,7 @@ expToDoc (Var nm) = jsIdent nm
expToDoc (JLam nms (JReturn exp)) = text "(" <+> commaSep (map jsIdent nms) <+> text ") =>" <+> text "(" ++ expToDoc exp ++ text ")"
expToDoc (JLam nms body) = text "(" <+> commaSep (map jsIdent nms) <+> text ") =>" <+> bracket "{" (stmtToDoc body) "}"
expToDoc JUndefined = text "null"
expToDoc (Index obj ix) = expToDoc obj ++ text "(" ++ expToDoc ix ++ text " :: Nil)"
expToDoc (Index obj ix) = expToDoc obj ++ text "[" ++ expToDoc ix ++ text "]"
expToDoc (Dot obj nm) = expToDoc obj ++ text "." ++ jsIdent nm
expToDoc (JPrimOp op t u) = parens 0 1 (expToDoc t) <+> text op <+> parens 0 1 (expToDoc u)

View File

@@ -37,7 +37,7 @@ lookupRaw raw top =
instance Show TopContext where
show (MkTop _ _ _ _ defs metas _ _ _) = "\nContext:\n (\{ joinBy "\n" $ map (show snd) $ toList defs} :: Nil)"
show (MkTop _ _ _ _ defs metas _ _ _) = "\nContext:\n [\{ joinBy "\n" $ map (show snd) $ toList defs}]"
-- TODO need to get class dependencies working
emptyTop : io. {{Monad io}} {{HasIO io}} -> io TopContext

View File

@@ -23,7 +23,7 @@ data Binder : U where
-- I don't have a show for terms without a name list
instance Show Binder where
show (MkBinder _ nm icit quant t) = "(\{show quant}\{nm} \{show icit} : ... :: Nil)"
show (MkBinder _ nm icit quant t) = "[\{show quant}\{nm} \{show icit} : ...]"
splitTele : Tm -> (Tm × List Binder)
splitTele = go Nil