[Haskell-cafe] type class constraints headache
muneson
marcus.uneson at gmail.com
Thu Mar 4 01:07:07 EST 2010
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.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
More information about the Haskell-Cafe
mailing list