Skip to content

Instantly share code, notes, and snippets.

@richo
Created February 16, 2014 00:55
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 richo/9027624 to your computer and use it in GitHub Desktop.
Save richo/9027624 to your computer and use it in GitHub Desktop.
Haskell Error
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 }
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