language: Haskell (ghc-6.8.2)
date: 114 days 22 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
import Control.Monad.Trans.Reader
 
add :: (Num a) -> a -> Reader a a
add num = do
    otherNum <- ask
    return (num + otherNum)
    
main = do
    let answer = (`runReader` 5) $ do
        x <- add 10
        y <- add 6
        return (x+y)
    print answer
prog.hs:1:7:
    Could not find module `Control.Monad.Trans.Reader':
      Use -v to see a list of the files searched for.