Frank A. Christoph gave examples for unintended non-linear patterns,
among them:
Or, even more more common:
f (x@(x,y)) = ... --- oops!
If I don't oversee something obvious, this just would fail to
type-check, so this shouldn't be a problem.
Christian Sievers
I am for sure going to read the paper of Ariola Arvind, but
Without optimizations this program will produce _|_ but
with optimizations it will produce 3.
wouldn't such an optimisation be called "a bug in the compiler" ?
Bart Demoen
On Thu, May 06, 1999 at 09:33:15PM +0200, Bart Demoen wrote:
Without optimizations this program will produce _|_ but
with optimizations it will produce 3.
wouldn't such an optimisation be called "a bug in the compiler" ?
or a bug in the language design if it allows such things, It is my
In addition to the other arguments mentioned, there is the practical concern
that it becomes quite easy to introduce non-termination by a simple typo:
f [1...] [2..] where f x x = x --- oops!
versus, say, the intended
f [1..] [2..] where f x y = x .
Or, even more more common:
f
D. Tweed wrote:
I'm as excited about the possibility of a limited form of compile time
evaluation via rewrite rules but I'm a getting a bit worried that no-one
has made any examples where there's an laziness to consider: I really
wouldn't want semantic differences depending on the degree of
I sent this earllier. Did it arrive this time?
-Alex-
___
S. Alexander Jacobson Shop.Com
1-212-697-0184 voiceThe Easiest Way To Shop
-- Forwarded message --
Date: Wed, 5 May
On Thu, 6 May 1999 17:14:34 John Meacham wrote:
On Thu, May 06, 1999 at 09:33:15PM +0200, Bart Demoen wrote:
Without optimizations this program will produce _|_ but
with optimizations it will produce 3.
wouldn't such an optimisation be called "a bug in the compiler" ?
or a bug in the
Probably not repeatable, but in case someone recognises it:
In the latest GHC 4.03 from CVS, compiling using ghc-4.02, and with
GhcLibHcOpts=-DDEBUG -fno-prune-tydecls -O -fno-specialise, when it
gets to lib/exts/Word.lhs it dies with no error message: