Hi Andy,
I think you may have misunderstood the error message i was referring to
here's a screen dump...
Prelude>
Prelude>
Prelude> f' [1..3] where f' ~[x] = [x]
[
Program error: {v1889 [1,2] ++ takeWhile (flip (Ord_class.Ord_v1797
(Make.Ord instEq_v32 primCmpInteger (Ord_class.Ord_v1796 (Make.Ord
instEq_v32 primCmpInteger (Ord_class.Ord_v1796 (Make.Ord instEq_v32
primCmpInteger (Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class.Ord_v1796 (Make.Ord instEq_v32 primCmpInteger
(Ord_class{Interrupted!}
On Mon, 6 Sep 1999, Andy Gill wrote:
>
> ASH HAFEZ wrote:
> >
> > during testing of an interpreter i'm currently working on, i uncovered the
> > following bug in Hugs98.
> >
> > define and load the following function :
> >
> > f ~[x] = [x]
> >
> > the application of f to such things as [i, j .. k], enumFromTo i j, or
> > list comprehensions have failed to produce the correct result --- a
> > program error. Instead, some sort of infinite dump is thrown to screen.
>
> You are stating that f's argument will always have
> one (and only one) argument. Is this what you intended?
>
> (I believe that using f ~[x] is the same as using f ~(x:~[]))
>
> Under these conditions it is correct for the interpreter
> to give an error for the likes of
>
> f [1,2]
>
> For our part, the error message we give could
> be clearer, though. GHC gives the message:
>
> Fail: bug.hs:2: Irrefutable pattern failed for pattern [x]
>
> Hope this helps. If not, can you e-mail Hugs-bugs with
> a specific example of failure, and why you think its
> a problem.
>
> Andy
>