
Hi all, I am trying out the awesome Vacuum Cairo package on GHC 6.10.3 but I am getting some interesting errors. The following works in GHCI:
view [1 .. 3]
But the following does not work in GHCI:
let x = [1 .. 3] view x
or,
x <- return [1 .. 3] view x
For the last two I get: context: "(:)|0" -> >>> {"1|1", <<< "(:)|2"} ghc: ../../src/xcb_lock.c:77: _XGetXCBBuffer: Assertion `((int) ((xcb_req) - (dpy->request)) >= 0)' failed. Aborted and GHCI quits. Any ideas? thanks ... deech

Am Montag 21 September 2009 16:21:10 schrieb aditya siram:
Hi all, I am trying out the awesome Vacuum Cairo package on GHC 6.10.3 but I am
getting some interesting errors. The following works in GHCI:
view [1 .. 3]
But the following does not work in GHCI:
let x = [1 .. 3] view x
or,
x <- return [1 .. 3] view x
For the last two I get: context: "(:)|0" -> >>> {"1|1", <<< "(:)|2"} ghc: ../../src/xcb_lock.c:77: _XGetXCBBuffer: Assertion `((int) ((xcb_req) - (dpy->request)) >= 0)' failed. Aborted
and GHCI quits.
Any ideas? thanks ... deech
Probably it's that in the last two, x is given the type [Integer] by ghci (see http://www.haskell.org/haskellwiki/Monomorphism_Restriction ) while view expects an [Int]. Do let x = [1 .. 3] :: [Int] view x and x <- return ([1 .. 3] :: [Int]) view x work?
participants (2)
-
aditya siram
-
Daniel Fischer