Skip to content

Commit

Permalink
Print arrays Racket-style
Browse files Browse the repository at this point in the history
  • Loading branch information
jazullo committed Oct 4, 2023
1 parent f335418 commit 677135a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gibbon-compiler/src/Gibbon/L1/GenSML.hs
Original file line number Diff line number Diff line change
Expand Up @@ -391,18 +391,18 @@ printerTy1 ty1 d = case ty1 of
PackedTy s () -> "internal_print_" <> text s <> parens d
VectorTy ut ->
parens $ hsep
[ quotePrint "#("
[ quotePrint "#["
, toss $ hsep
[ "case length", d, "of"
, "0 -> ()"
, "1 ->", printerTy1 ut $ "ArraySlice.sub" <> parens (d <> ", 0")
, "_ ->"
, toss $ printerTy1 ut $ "ArraySlice.sub" <> parens (d <> ", 0")
, "ArraySlice.app", parens $
"fn y__ => " <> quotePrint ", " <> printerTy1 ut "y__"
"fn y__ => " <> printerTy1 ut "y__"
, "xs__"
]
, "print \")\""
, "print \"]\""
]
PDictTy _ut _ut' -> _
ListTy ut ->
Expand Down

0 comments on commit 677135a

Please sign in to comment.