"C.Ryder" wrote:
>
> Hi,
>
> I think I may have found a bug. The attached file should compile fine, but
> results in the error :
>
> Reading file "Bug.hs":
> Compiling
> ERROR "Bug.hs": Compiled code too complex
>
> I am using :
> Hugs 1.4 January 1998
> On Unix (Solaris 7)
>
> I have tried increasing the heap size, which has no effect.
>
> Is there some limit that prevents the code from compiling ?
Hi,
This example compiles with the following message with Hugs98:
__ __ __ __ ____ ___ _________________________________________
|| || || || || || ||__ Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__|| __|| Copyright (c) 1994-1999
||---|| ___|| World Wide Web: http://haskell.org/hugs
|| || Report bugs to: [EMAIL PROTECTED]
|| || Version: May 1999 _________________________________________
Hugs mode: Restart with command line option +98 for Haskell 98 mode
Reading file "C:\hugs98\lib\Prelude.hs":
Parsing........................................................................
Dependency
analysis............................................................
Type
checking..................................................................
Compiling......................................................................
Reading file "D:\Hugs\Bugs\tmp\Bug.hs":
Parsing........................................................................
ERROR "D:\Hugs\Bugs\tmp\Bug.hs" (line 1):
*** Cannot derive Eq AST after 40 iterations.
*** This may indicate that the problem is undecidable. However,
*** you may still try to increase the cutoff limit using the -c
*** option and then try again. (The current setting is -c40)
Prelude>
Using :s -c200 fixes the problem. This can be set from the
command line or the prompt. We are considered a different
counting mechanism, or upping the default limit.
Main> :s -c200
Main> :r
Reading file "Bug.hs":
Parsing........................................................................
Dependency
analysis............................................................
Type
checking..................................................................
Compiling......................................................................
Hugs session for:
C:\hugs98\lib\Prelude.hs
Bug.hs
Main>
So, consider upgrading to Hugs98. You can get it
from http://www.haskell.org/hugs.
Hope this helps,
Andy Gill