Ticket #933 (closed bug: fixed)
Separate compilation fails with existential records
| Reported by: | guest | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.6.1 |
| Component: | Compiler | Version: | 6.5 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description (last modified by simonpj) (diff)
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
Change History
Note: See
TracTickets for help on using
tickets.
