Where types become theorems and programs become proofs. The monsters lurk in the spaces between computation and abstraction.
import Control.Monad.Monster
GHC sees all. Every expression judged, every type inferred. There is no escape from the monstrous precision of Hindley-Milner.
ghc: Could not deduce (Monster m) arising from a use of 'unleash'
Lazy evaluation means nothing happens until it must. The monster sleeps until you demand its value -- then it devours your stack.
let monster = fix (\m -> m >>= unleash)
No side effects. No mutations. Only the cold, beautiful mathematics of lambda calculus stretching into infinity.
pure :: a -> Monster a
MonadTrans t => t (t (t IO)) a
data Monster a where { Unleash :: Monster Chaos }
type family Summon (m :: Monster) :: Type where ...
data SomeMonster = forall m. Monster m => MkMonster m
unleash :: (forall a. Monster a => a -> Chaos) -> World -> Void
$(deriveMonster ''Cthulhu)