On Thu, Nov 15, 2007 at 10:24:43PM +0100, Daniel Fischer wrote:
> Am Donnerstag, 15. November 2007 09:57 schrieb Simon Peyton-Jones:
> > Urk. Well spotted!
> >
> > I omitted a prime (writing env instead of env') in a late fix, and as a
> > result practically no top-level rules and specialisations
Am Donnerstag, 15. November 2007 09:57 schrieb Simon Peyton-Jones:
> Urk. Well spotted!
>
> I omitted a prime (writing env instead of env') in a late fix, and as a
> result practically no top-level rules and specialisations are being
> applied.
>
> What an egregious bug. The good news is that a on
6.8.1!
Simon
| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
| kenny lu
| Sent: 15 November 2007 06:49
| To: glasgow-haskell-users@haskell.org
| Subject: GHC 6.8.1 SpecConstr
|
| Hi,
|
| Recall the example from Simon's paper appearing in ICFP 2007.
Hi,
Recall the example from Simon's paper appearing in ICFP 2007.
myLast :: [a] -> a
myLast [] = error ""
myLast [x] = x
myLast (x:xs) = myLast xs
which returns the last element in a list.
Applying the idea in the paper, we should rewrite the function
as follows,
myLast :: [a] -> a
myLast [] =