Skip to content

Instantly share code, notes, and snippets.

Authors: Merijn Verstraaten
Date: 2014/11/22

So You Want to Be a Super Cool GHC Hacker?

So you have a pet peeve/bug/feature request that you'd like to see added to GHC. You made sure there was a Trac_ ticket for it, but despite your patient waiting no one is solving your problem. Those selfish GHC hackers!

import Data.Tree hiding (unfoldTreeM_BF, unfoldForestM_BF)
import Data.Traversable
import Prelude hiding (sequence)
import Control.Monad.Free
import Data.Functor.Identity
unfoldTreeM_BF :: Monad m => (b->m (a, [b])) -> b -> m (Tree a)