Often when I\'m playing with Haskell code, I stub things out with a type annotation and undefined
.
foo :: String -> Int
foo = undefined
>
You can use EmptyDataDecls
to stub out a type, and with KindSignatures
you can give it a kind:
{-# LANGUAGE EmptyDataDecls, KindSignatures #-}
data Foo :: * -> *
You can also stub out the Monad
instance without warnings with this option to GHC.
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
instance Monad Foo
And then you don't need to leave any implementation for return
and >>=
.