[Haskell-cafe] Haskell spec vs FlexibleInstances

Brandon Allbery allbery.b at gmail.com
Tue Feb 18 20:40:39 UTC 2014


On Tue, Feb 18, 2014 at 3:11 PM, Doug McIlroy <doug at cs.dartmouth.edu> wrote:

> What potential evil motivates  the prohibition of repeated type
> parameters in an instance declaration? (Restriction removed
> by FlexibleInstances)
>

Isn't that just related to constraints not being part of instance
selection? (Assuming that `instance SomeClass a a` is interpreted as
`instance (a ~ b) => SomeClass a b`, since I don't quite see how it would
work otherwise given how instances work; the constraint is not necessarily
obvious from looking at it. Also note that standard Haskell can't therefore
describe this instance properly.)

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140218/d6dd741e/attachment.html>


More information about the Haskell-Cafe mailing list