Created
August 5, 2015 12:20
-
-
Save tokiwoousaka/36b00651a96679dc8014 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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