Debugging without a “real” debugger (in Haskell and PureScript)

Ғылым және технология

Hate watching videos? Check out the complementary article, which covers the same content: dev.to/zelenya/debugging-with...
If you're wondering how to debug in Haskell without a "real" debugger, this tutorial is for you. Especially if someone convinced you that “Haskell is pure, so you can’t print anything”.
💡 Useful links:
* The GHCi Debugger: downloads.haskell.org/~ghc/7....
#fp #haskell #purescript
Subscribe to Impure Pics: bit.ly/impure-youtube
More Impure Pics
🐣 / impurepics
📦 impurepics.com
👕 merch.impurepics.com
Functional Alphabet book
📗 Softcover: bit.ly/fp-abc-soft-cover
📘 Hardcover: bit.ly/fp-abc-hard-cover
Watch more Impure Pics
• Debunking Haskell Myth...
About Impure Pics
FP Advocat. Distilling functional programming for the good of all
Get in touch: zelenya.com
0:00 Intro
0:42 This program 🐞 you
1:24 print “Hello, world”
3:11 trace “pls hlp”
4:37 [PureScript] spy “dupa”
5:11 Next steps
6:02 Use REPL
6:26 Write tests
6:41 EOF

Пікірлер: 5

  • @beauteetmusculation8191
    @beauteetmusculation819111 ай бұрын

    Nice! Never actually tried to debug stuff with these tools. Almost all my errors so far were caught at compilation.

  • @emszamot
    @emszamot11 ай бұрын

    Another trick is to use `recover-rtti` library to print without `Show` instances, which makes it much easier if a `Show` instance is not available.

  • @TaranovskiAlex
    @TaranovskiAlex2 ай бұрын

    wow... that's... special...

  • @mohsen744
    @mohsen74410 ай бұрын

    Fantastic

  • @i-am-the-slime
    @i-am-the-slime11 ай бұрын

    Dupa

Келесі