[Haskell-cafe] Type error depending on scope of pattern matching
goodingm at gmail.com
Sun Aug 2 00:05:24 UTC 2015
Alright. The first two examples show the issue and a fix for it; the last two
have the same issue but existential quantification prevents the fix.
grad has type "(Num a, Traversable t) => (forall s. Reifies s Tape => t
(Reverse s a) -> Reverse s a) -> t a -> t a", and I'm basically trying to
supply a function to it, either by being polymorphic over all Num (of which
Reverse s a is an instance), or by providing the specific 'Reifies s Tape =>
...' type, neither of which are working.
> You'll probably get more responses if you paste the code inline.
> El Aug 1, 2015, a las 11:25, htebalaka <
> > escribió:
>> I'm curious if anyone can tell me why moving the pattern matching in
>> two examples makes it fail to compile, and what can be done to resolve
>> same issue in either of the latter two examples. As far as I can tell
>> should be equivalent. Unfortunately the solution used in the first
>> won't work in the later ones due to the existential quantification. I've
>> been asking on #haskell for a few days but haven't been able to find
>> who knows what the issue is.
>> Code is available here: http://lpaste.net/137586
>> View this message in context:
>> Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
>> Haskell-Cafe mailing list
> Haskell-Cafe mailing list
View this message in context: http://haskell.1045720.n5.nabble.com/Type-error-depending-on-scope-of-pattern-matching-tp5814762p5814778.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
More information about the Haskell-Cafe