kkwweett
2008-12-18 19:19:22 UTC
Hi,
Can anyone help me get the right output from the program described in
http://www.haskell.org/sitewiki/images/d/dd/TMR-Issue8.pdf
from page 21 and downloadable at
http://www.e-pig.org/darcs/TMR/Issue8/instant-insanity.lhs
? I tried on GHCi 6.6 with options "-fglasgow-exts
-fallow-undecidable-instances" and on GHCi 6.10.1 with options
"-fglasgow-exts -XUndecidableInstances".
All the tests give the expected results except the last (and more
important) one :
:t solutions (u::Cubes)
This one throws an error I can't paste (too many lines for the capacity
of my xterm) but it ends with ..."((Cube G W W B G R ::: Nil) ::: as)
as}' arising from a use of 'solutions' at <interactive>:1:0-19"
This error arises with the initial problem
type Cubes=(Cube1:::Cube2:::Cube3:::Cube4:::Nil)
but it occurs also with the reduced problem
type Cubes=(Cube1:::Cube2:::Nil)
Nevertheless, the minimal problem
type Cubes=(Cube1:::Nil)
works fine.
Thank you for any help.
Can anyone help me get the right output from the program described in
http://www.haskell.org/sitewiki/images/d/dd/TMR-Issue8.pdf
from page 21 and downloadable at
http://www.e-pig.org/darcs/TMR/Issue8/instant-insanity.lhs
? I tried on GHCi 6.6 with options "-fglasgow-exts
-fallow-undecidable-instances" and on GHCi 6.10.1 with options
"-fglasgow-exts -XUndecidableInstances".
All the tests give the expected results except the last (and more
important) one :
:t solutions (u::Cubes)
This one throws an error I can't paste (too many lines for the capacity
of my xterm) but it ends with ..."((Cube G W W B G R ::: Nil) ::: as)
as}' arising from a use of 'solutions' at <interactive>:1:0-19"
This error arises with the initial problem
type Cubes=(Cube1:::Cube2:::Cube3:::Cube4:::Nil)
but it occurs also with the reduced problem
type Cubes=(Cube1:::Cube2:::Nil)
Nevertheless, the minimal problem
type Cubes=(Cube1:::Nil)
works fine.
Thank you for any help.