debugging - output a value in Haskell, with a default in case its type is not an instance of Show -


this question has answer here:

i tried debug arrows , hard. end sticking trace here , there, wants show instance argument, limits uses. there way show if instance of show, , use kind of default output value if it's not? promise use debugging ;-)

how people debug arrows anyway...

your best bet compose trace arrow:

strace x = trace (show x) x  :: (num c, show c, arrow cat) => cat c c = arr (+1) <<< arr strace  -- > 1 -- 1 -- 2 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -