Port Prettier.idr to newt

This commit is contained in:
2024-11-16 12:01:48 -08:00
parent 26119be8b6
commit b185065fb0
7 changed files with 654 additions and 47 deletions

19
port/TestPrettier.newt Normal file
View File

@@ -0,0 +1,19 @@
module TestPrettier
import Prettier
five : Nat
five = S (S (S (S (S Z))))
fifty : Nat
fifty = five * five * S (S Z)
doc : Doc
doc = text "x" <+> text "+" <+> text "y"
foo : String
foo = render fifty doc
main : IO Unit
main = do
putStrLn foo