Bug in CorePrep.lhs
Simon Peyton-Jones
simonpj at microsoft.com
Mon May 27 06:33:07 EDT 2002
Aha. Try now. I think I've fixed it.
Simon
| -----Original Message-----
| From: Kirsten Chevalier [mailto:krc at uclink.berkeley.edu]
| Sent: 24 May 2002 12:00
| To: Simon Peyton-Jones
| Cc: GHC bugs (GHC bugs)
| Subject: Re: Bug in CorePrep.lhs
|
|
| On Fri, May 24, 2002 at 03:33:45AM -0700, Simon Peyton-Jones wrote:
| > Strange. You fix definitely isn't the Right Thing, but
| there's clearly
| > something wrong going on.
| >
| > Can you give more details please? I.e. give source code and what
| > commands you executed to show up the bug?
| >
|
| I should have been more specific... the bug doesn't manifest
| itself when I compile a Haskell file directly, but does if I
| compile it to Core and then compile the .hcr file. For example:
|
|
| $ ghc -fext-core -fno-code hello.hs
| $ ghc hello.hcr
| /tmp/ghc21711.s: Assembler messages:
| /tmp/ghc21711.s:1332: Error: Symbol Main_Foo_closure already defined.
| /tmp/ghc21711.s:1339: Error: Symbol Main_Foo_info already defined.
| /tmp/ghc21711.s:1341: Error: Symbol Main_Foo_entry already defined.
| /tmp/ghc21711.s:1351: Error: Symbol Main_Foo_fast1 already defined.
| /tmp/ghc21711.s:1402: Error: Symbol Main_Bazz_closure already defined.
| /tmp/ghc21711.s:1409: Error: Symbol Main_Bazz_info already defined.
| /tmp/ghc21711.s:1411: Error: Symbol Main_Bazz_entry already defined.
| /tmp/ghc21711.s:1421: Error: Symbol Main_Bazz_fast1 already defined.
|
| where hello.hs is:
|
| main = putStr $ "Hello world!" ++ (show (foo 2)) ++ (show (foo 0))
|
| data Bar = Foo String | Baz Int
| deriving Show
|
| foo x = if (x == 0) then
| Foo "zero"
| else
| Baz x
|
|
| --
| Kirsten Chevalier * krc at uclink.berkeley.edu * Often in error,
| never in doubt
|
More information about the Glasgow-haskell-bugs
mailing list