String literals

John Meacham john at repetae.net
Fri Nov 10 23:27:36 EST 2006


On Fri, Nov 10, 2006 at 10:49:15PM -0500, Lennart Augustsson wrote:
> Any thoughts?

what about pattern matching?

> class IsString s where
>         fromString :: String -> s

> class IsString s => EqString s where
>         eqString :: String -> s -> Bool

another posibillity would be for pattern matching to add an Eq
constraint along with a IsString one on any pattern match of a string
constant. 

I would very strongly prefer not to make Eq a superclass of IsString in any
case. Just have a separate EqString class or pass around the Eq and
IsString contexts separately. 

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Haskell-prime mailing list