Created
February 16, 2014 00:55
-
-
Save richo/9027624 to your computer and use it in GitHub Desktop.
Haskell Error
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
src/sc.hs:78:35: | |
Couldn't match type `M.Map String LispVal' with `[(String, b0)]' | |
Expected type: [(String, b0)] | |
Actual type: Env | |
In the second argument of `lookup', namely `env' | |
In the expression: lookup var env | |
In the expression: | |
case lookup var env of { | |
Just value -> True | |
Nothing -> False } |
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
23 type Env = M.Map String LispVal | |
76 -- Naive implementation, no need to lookup value | |
77 isBound :: Env -> String -> Bool | |
78 isBound env var = case lookup var env of | |
79 Just value -> True | |
80 Nothing -> False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment