[<<][haskell][>>][..]

Fri Aug 3 16:40:33 EDT 2018

## More rank-2 madness

These fucking error messages!
test-qc-SeqLib.hs:191:12: error:
• Couldn't match expected type ‘SeqPrim.Mem s’
with actual type ‘a0’
because type variable ‘s’ would escape its scope
This (rigid, skolem) type variable is bound by
a type expected by the context:
(a0, Int, (Int, Int, Int), [Int])
-> GHC.ST.ST s (Int, (Int, Int, Int), [Int])
at test-qc-SeqLib.hs:191:12-39
• In the first argument of ‘seqMemUpdate’, namely ‘r12’
In a stmt of a 'do' block:
r13' <- seqMemUpdate r12 (r3, r6, r5, r7)
In the expression:
do { r1 <- seqSLICE (seqInt 1) r0 (seqInt 0);
r3 <- seqSLICE (seqInt 1) r2 (seqInt 0);
r5 <- seqSLICE (seqInt 8) r4 (seqInt 0);
r8 <- seqADD (seqInt 4) r6 (seqInt 1);
.... }
• Relevant bindings include
r12 :: a0 (bound at test-qc-SeqLib.hs:191:12)
EDIT: Solved it by turning tuples into lists so the type parameter was
accessible. In retrospect, it was fairly obvious. Still, it is hard
to find exactly where the error is originating.

[Reply][About]

[<<][haskell][>>][..]