kmels/dart-haskell

Pretty print data instead of showing TyConApps

Closed this issue · 0 comments

In examples/interpreter/List.hs we define

 data List a = Nil | Cons a (List a)
 myList = Cons 1000 (Cons 2000 Nil) 

We'd like myList to be pretty printed, but:

dart-haskell -f examples/interpreter/Lists.hs -e myList prints:

 Cons Thunk(exp=arIt) Thunk(exp=a2rIv)  ; 

and dart-haskell -f examples/interpreter/Lists.hs prints (within)

  main:Lists.myList => Cons 1000 (TyConApp(Cons :: aafe -> main:Lists.List aafe -> , [MkPointer {ptr_address = 842},MkPointer {ptr_address = 843}]))

We expect "Cons 1000 (Cons 2000 Nil)" to be the output in both cases!