
4 Mar
2010
4 Mar
'10
1:07 a.m.
When writing a command-line interface I ran into type class conflicts I don't understand. Could anyone explain why ghc 6.10.4 compiles this
methods :: (Eq a) => [(String, a)] methods = [ ("method1", undefined ) , ("method2", undefined) ]
but not the following?
methods :: (Eq a) => [(String, a)] methods = [ ("method1", undefined ) , ("method2", undefined) ]
enumerateMethodNames :: [String] enumerateMethodNames = map fst methods
thanks, Marcus -- View this message in context: http://old.nabble.com/type-class-constraints-headache-tp27752745p27752745.ht... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.