[Haskell-cafe] Basic question....

Chaddaï Fouché chaddai.fouche at gmail.com
Fri Aug 17 09:19:07 EDT 2007


Not only does you lack some parens around your patterns, your function
types are wrong :

type Key = String

data EnvItem a = EnvItem (Key, a)

envKey :: EnvItem a -> String
envKey (EnvItem (key, value)) = key

envValue :: EnvItem a -> a
envValue (EnvItem (key, value)) = value

-- 
Jedaï


More information about the Haskell-Cafe mailing list