Boot file problem
Here are two modules and a boot file. Compile by
ghc -c Foo.hs-boot; ghc -c Bar.hs; ghc -c Foo.hs
and observe this error message
Foo.hs:12:1:
Type constructor `Foo' has conflicting definitions in the module
and its hs-boot file
Main module: data Foo = Foo {x :: {-# UNPACK #-} !Int}
Boot file: data Foo = Foo {x :: !Int}
But the definitions are not conflicting, they are identical.
Foo.hs-boot:
module Foo where
data Foo = Foo { x :: {-# UNPACK #-} !Int }
Foo.hs:
module Foo where
import Bar
data Foo = Foo { x :: {-# UNPACK #-} !Int }
Bar.hs:
module Bar where
import {-# SOURCE #-} Foo
Removing the unbox pragma gives the even more perplexing:
Foo.hs:3:1:
Type constructor `Foo' has conflicting definitions in the module
and its hs-boot file
Main module: data Foo = Foo {x :: !Int}
Boot file: data Foo = Foo {x :: !Int}
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.8.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |