Skip to content

Instantly share code, notes, and snippets.

@tokiwoousaka
Created August 5, 2015 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tokiwoousaka/36b00651a96679dc8014 to your computer and use it in GitHub Desktop.
Save tokiwoousaka/36b00651a96679dc8014 to your computer and use it in GitHub Desktop.
module Main where
data Nop a
instance Monad Nop where
(>>=) = undefined
return = undefined
runNop :: Nop a -> ()
runNop _ = ()
main :: IO ()
main = return $ runNop (add 10 20)
add :: Monad m => Int -> Int -> m Int
add x y = return $ x + y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment