[Hugs] #69: Pattern match error can be arbitrarily long
Hugs
trac at galois.com
Fri May 11 15:23:14 EDT 2007
#69: Pattern match error can be arbitrarily long
---------------------+------------------------------------------------------
Reporter: neil | Owner: nobody
Type: defect | Status: new
Priority: major | Milestone:
Component: hugs | Version: 200609
Resolution: | Keywords:
---------------------+------------------------------------------------------
Old description:
> Given the program:
>
> test n = length val `seq` f val
> where val = replicate n (toEnum 12)
>
> f "" = ""
>
> > test 3
> Program error: pattern match failure: f [toEnum 12,toEnum 12,toEnum 12]
>
> Unfortunately, as you bump up n (try 10,000) Hugs spits and more and more
> information - when the most important bit of this message is "f" - which
> you end up loosing.
>
> I suggest truncating pattern match errors at (say) 500 characters, or
> perhaps 500 characters per argument.
New description:
Given the program:
{{{
test n = length val `seq` f val
where val = replicate n (toEnum 12)
f "" = ""
> test 3
Program error: pattern match failure: f [toEnum 12,toEnum 12,toEnum 12]
}}}
Unfortunately, as you bump up n (try 10,000) Hugs spits and more and more
information - when the most important bit of this message is "f" - which
you end up loosing.
I suggest truncating pattern match errors at (say) 500 characters, or
perhaps 500 characters per argument.
--
Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/69>
Hugs <http://www.haskell.org/hugs/>
Hugs 98, an interpreter for Haskell
More information about the Hugs-Bugs
mailing list