[Hugs-users] Re: [Haskell] Re: new release of Hugs / preprocessor usage

Claus Reinke claus.reinke at talk21.com
Tue May 16 06:51:44 EDT 2006


> 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



More information about the Hugs-Users mailing list