[GHC] #933: Separate compilation fails with existential records
GHC
trac at galois.com
Wed Oct 11 07:30:46 EDT 2006
#933: Separate compilation fails with existential records
-------------------------+--------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.5
Severity: normal | Keywords:
Os: Unknown | Difficulty: Unknown
Architecture: Unknown |
-------------------------+--------------------------------------------------
Consider M.hs:
> {-# OPTIONS_GHC -fglasgow-exts #-}
> module M where data D = forall a. C { l :: a }
Then consider Main.hs:
> import M
> main = print () where x = C { l = () }
A normal compilation works:
$ ghc --make Main.hs
[1 of 2] Compiling M ( M.hs, M.o )
[2 of 2] Compiling Main ( Main.hs, Main.o )
Linking Main ...
However, separate compilation does not:
$ touch Main.hs
$ ghc --make Main.hs
[2 of 2] Compiling Main ( Main.hs, Main.o )
Main.hs:2:26:
Constructor `C' does not have field `l'
In the expression: C {l = ()}
In the definition of `x': x = C {l = ()}
In the definition of `main':
main = print ()
where
x = C {l = ()}
Where should I start looking to fix this? :-)
Thanks,
Audrey
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/933>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list