5 tips for better Hedgehog tests

Have some Hedgehog tests to write? Here’s five useful features you may not know about! Roundtripping If you only try one thing on the list this should be it! When you serialize something, no matter the format, you probably want to be able to...

How to define a function in GHCi that spans multiple lines

Are you wondering how to define a function in GHCi that spans multiple lines? How can you provide explicit type signatures for a function? How can you copy and paste larger chunks of Haskell into the interpreter like you can in Python? You can do...

How can I create a global variable?

What if you're trying to create a global counter? If you need some global cache and just don't want to plumb an IORef through all of your code? Is there some dirty hack you can use to get a global IORef?

jacobstanley.io

Menu