Stephen Diehl's protolude library is excellent. I highly recommend it as a default prelude for Haskell.
It's so good and so close to what I want that whenever I do come across something missing it's as obvious as a glitch in good music.
Here's what I'd like:
(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)
(<<$>>) = fmap . fmap
I do this enough that I'd like it to hand. Pi Delport suggested the syntax & that it should be in a standard library somewhere.
I want for
to be flip fmap
and forA
to be what's currently for
(protolude/protolude#19).
From the pretty-show library.
A very simple pretty printer, great for debugging data structures. Would have to be adjusted for better string types for protolude.
Like traceShow
, but pretty. Doesn't actually exist yet.
guarded :: Alternative f => (a -> Bool) -> a -> f a
guarded p x = bool empty (pure x) (p x)
Another great idea from Pi Delport.
Another thing I'd love would be UnicodeSyntax and associated modules. I have sort of a weird collection of .hs files I drag around with me from project to project...
And now that I'm working with singletons that's just going to grow...