It's a bug.  It should be the case that if you pass Core Lint you can't 
segfault.  #1496 is an embarrassing flaw, but the only solutions I've thought 
of so far involve making the system more complicated, so I'm making haste 
slowly to fix it.

The other deliberate loophole is unsafeCoerce which lets you do anything of 
course.

Simon

| -----Original Message-----
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Chevalier
| Sent: 27 February 2008 01:43
| To: Stefan O'Rear
| Cc: [email protected]
| Subject: Re: Core Lint = complete typechecker?
|
| On 2/26/08, Stefan O'Rear <[EMAIL PROTECTED]> wrote:
| > On Tue, Feb 26, 2008 at 10:50:56AM -0800, Tim Chevalier wrote:
| >  > Hi all,
| >  >
| >  > I've been wondering whether the Core Lint pass  (that is, what gets
| >  > invoked when you run GHC with -dcore-lint) is a complete typechecker
| >  > for Core. That is, as far as you know, is it possible to construct a
| >  > Core AST that will pass Core Lint but segfault at runtime? I was
| >  > fairly sure I had been able to do this in the past and that the Core
| >  > Lint pass was not meant to be complete, but I'm not sure and can't
| >  > find documentation either way.
| >
| >
| > You can write Haskell that passes core lint and crashes at runtime.
| >
| >  http://hackage.haskell.org/trac/ghc/ticket/1496
| >
|
| Good point, but that is a known bug rather than an intentional aspect
| of the design of Core Lint, am I right? I'm more so trying to figure
| out whether Core Lint was *intended* to be a real typechecker or just
| a sanity pass, or not.
|
| Cheers,
| Tim
|
| --
| Tim Chevalier * http://cs.pdx.edu/~tjc * Often in error, never in doubt
| "Of the seven deadly sins, lust is definitely the pick of the litter."
|  -- Tom Robbins
|
| _______________________________________________
| Cvs-ghc mailing list
| [email protected]
| http://www.haskell.org/mailman/listinfo/cvs-ghc

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to