Anthony Clayden wrote:
So three questions in light of the approach of abandoning FunDeps and
therefore not getting interference with overlapping:
A. Does TTypeable need to be so complicated?
B. Is TTypeable needed at all?
C. Does the 'simplistic' version of type equality testing suffer
oleg at okmij.org writes:
I think instead you should have:
- abandoned FunDeps
- embraced Overlapping more!
Well, using TypeCast to emulate all FunDeps was demonstrated three
years later after HList (or even sooner -- I don't remember when
exactly the code was written):
I think instead you should have:
- abandoned FunDeps
- embraced Overlapping more!
Well, using TypeCast to emulate all FunDeps was demonstrated three
years later after HList (or even sooner -- I don't remember when
exactly the code was written):
oleg at okmij.org writes:
I think instead you should have:
- abandoned FunDeps
- embraced Overlapping more!
Well, using TypeCast to emulate all FunDeps was demonstrated three
years later after HList (or even sooner -- I don't remember when
exactly the code was written):
did you see this, and the discussion around that time?
http://www.haskell.org/pipermail/haskell-prime/2012-May/003688.html
I implemented hDeleteMany without FunDeps -- and it works in Hugs (using
TypeCast -- but looks prettier in GHC with equality constraints).
I'm afraid I didn't see that
oleg at okmij.org writes:
I implemented hDeleteMany without FunDeps -- and it works in Hugs (using
TypeCast -- but looks prettier in GHC with equality constraints).
It is nice that hDeleteMany works on Hugs. I forgot if we tried it
back in 2004.
Thanks Oleg -- but it was only 8
Ryan Ingram wrote:
I've been seeing this pattern in a surprising number of instance
definitions lately:
instance (a ~ ar, b ~ br) = Mcomp a ar b br [1]
instance (b ~ c, CanFilterFunc b a) = CanFilter (b - c) a [2]
And here are a few more earlier instances of the same occurrence:
oleg at okmij.org writes:
[... snip]
Of course instances above are overlapping. And when we add functional
dependencies (since we really want type-functions rather type
relations), they stop working at all. We had to employ work-arounds,
which are described in detail in the HList paper
With apologies to Jim Coplien :)
I've been seeing this pattern in a surprising number of instance
definitions lately:
instance (a ~ ar, b ~ br) = Mcomp a ar b br [1]
instance (b ~ c, CanFilterFunc b a) = CanFilter (b - c) a [2]
The trick is that since instance selection is done entirely on the