Hi,

the following code causes Hugs (June'98) to complain

    module Foo where

    data A = A1 |  .... | A101

    aToInt :: A -> Int
    aToInt x = 
      case x of { A1 -> 1 ; .. ; An -> n ; ... A101 -> 101 }

with

    ERROR "foo.hs": Compiled code too complex

(This problem is a "Real" one - it shows up in a Haskell Office'97 library.)

i.e., the compile-time constant NUM_FIXUPS is exceeded. Working around
this isn't hard, but it'd be nice if there was no hard-wired fixup
limit, since it requires non-local users of Foo to also have to
recompile Hugs with a bigger setting of said constant. [ Yes, I know I
can work around the problem on the Haskell side by splitting up a big
case statement into smaller ones, but I'd prefer not to. ]

Consider this a feature request for Hugs to make use of a growable
array abstraction internally instead of fixed sized arrays wherever
practically useful/possible. Alternatively, provide command-line
options to override compile-time settings.

--Sigbjorn

Reply via email to