[Haskell-cafe] Re: checking types with type families
Simon Peyton-Jones
simonpj at microsoft.com
Wed Jul 7 17:14:32 EDT 2010
| >> -- Does this typecheck?
| >> f :: C a b => T a -> Bool
| >> f T1 = True
| >> f T2 = op 3
| >
| >> The function f "should" typecheck because inside the T2 branch we know
| >> that (a~Int), and hence by the fundep (b~Bool).
|
| Perhaps I'm confused, but there seems to be no link between
| the call 'op 3' and 'a' in this example. While the 'desugaring'
| introduces just such a connection.
You're right, I made a mistake here. Sorry! I hope you could see what I was after though. I've written a long email about fundeps and overlap that should clarify further.
Simon
More information about the Haskell-Cafe
mailing list