How do you debug in codeworld?

221 Views Asked by At

In http://codeworld.info/, you can only draw/print/display data in types of Text and Number (and you need Show to convert Number to Text). So what can I do to let codeworld draw something that is neither a Text or Number?

1

There are 1 best solutions below

0
luqui On BEST ANSWER

Chris recently added the ability to import the Haskell base library into CodeWorld, so you can do this:

import Prelude hiding (show)
import HaskellPrelude (show)

showT(x) = fromString(show(x))

main = pictureOf(text(showT([1,2,3,4,5])))