Re: Re: new release of Hugs / preprocessor usage

"Claus Reinke" <[email protected]> Tue, 16 May 2006 11:51:44 +0100
Newsgroups gmane.comp.lang.haskell.general,gmane.comp.lang.haskell.hugs.user
Message-ID <004f01c678d6$ba1dfde0$68618351@cr3lt>
> Thanks, this works. My next problem is:
> 
>  "Maximum token length (4000) exceeded"
> 
> Which spot in the sources do I have to change in order to increase this 
> limit? (I've unsuccessfully searched the hugs mailing lists for an answer)

iirc, this comes up with long string constants, such as the equivalent
of HERE-documents in shell scripts and program generators. if that is
the case, try splitting up the string. instead of

here = "poor man's \n\
           \here document\n\
           \in haskell\n"

use

here = unlines 
    ["poor man's"
    ,"here document"
    ,"in haskell"
    ]

that way, you don't have to make your own incompatible version of
hugs, and haskell's string gaps don't buy you anything in readability 
anyway.

Ross: perhaps Hugs could use (++) internally to encode string gaps,
instead of trying and often failing to parse a monolithic string token?
(the max token length was extended in the past, but a fixed limit
will never do for all applications)

cheers,
claus