Skip to content

Commit 5743eb3

Browse files
committed
Fix some strings that were messed up by the initial Idris -> Newt perl code
1 parent 67d1e54 commit 5743eb3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Lib/Compile.newt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ expToDoc (Var nm) = jsIdent nm
260260
expToDoc (JLam nms (JReturn exp)) = text "(" <+> commaSep (map jsIdent nms) <+> text ") =>" <+> text "(" ++ expToDoc exp ++ text ")"
261261
expToDoc (JLam nms body) = text "(" <+> commaSep (map jsIdent nms) <+> text ") =>" <+> bracket "{" (stmtToDoc body) "}"
262262
expToDoc JUndefined = text "null"
263-
expToDoc (Index obj ix) = expToDoc obj ++ text "(" ++ expToDoc ix ++ text " :: Nil)"
263+
expToDoc (Index obj ix) = expToDoc obj ++ text "[" ++ expToDoc ix ++ text "]"
264264
expToDoc (Dot obj nm) = expToDoc obj ++ text "." ++ jsIdent nm
265265
expToDoc (JPrimOp op t u) = parens 0 1 (expToDoc t) <+> text op <+> parens 0 1 (expToDoc u)
266266

src/Lib/TopContext.newt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ lookupRaw raw top =
3737

3838

3939
instance Show TopContext where
40-
show (MkTop _ _ _ _ defs metas _ _ _) = "\nContext:\n (\{ joinBy "\n" $ map (show ∘ snd) $ toList defs} :: Nil)"
40+
show (MkTop _ _ _ _ defs metas _ _ _) = "\nContext:\n [\{ joinBy "\n" $ map (show ∘ snd) $ toList defs}]"
4141

4242
-- TODO need to get class dependencies working
4343
emptyTop : ∀ io. {{Monad io}} {{HasIO io}} -> io TopContext

src/Lib/Util.newt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ data Binder : U where
2323
-- I don't have a show for terms without a name list
2424

2525
instance Show Binder where
26-
show (MkBinder _ nm icit quant t) = "(\{show quant}\{nm} \{show icit} : ... :: Nil)"
26+
show (MkBinder _ nm icit quant t) = "[\{show quant}\{nm} \{show icit} : ...]"
2727

2828
splitTele : Tm -> (Tm × List Binder)
2929
splitTele = go Nil

0 commit comments

Comments
 (0)