[<<][meta][>>][..]
Mon Dec 5 21:15:33 EST 2011
Ambiguities..
*Main> :t _lambda $ \(a,b) -> do {v <- add a b; _ret v}
<interactive>:1:1:
Couldn't match type `(,) as' with `(,) (as, bs)'
When using functional dependencies to combine
Struct s r t (r t),
arising from the dependency `r as -> ras'
in the instance declaration at Loop.hs:128:10
Struct s0 ((,) as) (as, bs) ((as, bs), (as, bs)),
arising from a use of `_lambda' at <interactive>:1:1-7
In the expression: _lambda
In the expression:
_lambda
$ \ (a, b)
-> do { v <- add a b;
_ret v }
What happens here is that r is somehow identified with the partially
applied tuple constructor. Maybe r should be more constrained?
[Reply][About][<<][meta][>>][..]