You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Type constructor has conflicting definitions in the module and its hs-boot/hsig file
3
+
summary: The type constructor in the module and the signature in the boot module differ
4
+
severity: error
5
+
introduced: 9.6.1
6
+
---
7
+
8
+
The type constructor definitions in modules must agree with the cycle-breaking
9
+
`hs-boot` modules as well as with the Backpack `hsig` module interface files, if
10
+
any of the two exist.
11
+
12
+
Type constructor definitions in [`hs-boot` modules](https://downloads.haskell.org/ghc/9.12.1/docs/users_guide/separate_compilation.html#mutually-recursive-modules-and-hs-boot-files)
13
+
and [`hsig` files](https://downloads.haskell.org/ghc/9.12.1/docs/users_guide/separate_compilation.html#module-signatures) are typically
14
+
given by forward data declarations (data declarations without any data
15
+
constructors, only the type constructor is declared), as that is the whole
16
+
purpose of those two "interface-like modules".
17
+
18
+
Therefore, this error message likely comes up in one of two situations:
19
+
20
+
1. The kinds of type constructors differ in the interface module and in the
21
+
actual module.
22
+
2. The type constructor kinds match, but the *roles* of some of the type
23
+
arguments don't match.
24
+
25
+
The first situation can be typically be easily fixed by making sure the type
26
+
declaration in the boot/sig module has the same number of type arguments as the
27
+
declaration in the module and making sure any kind declarations are equal. The
28
+
second situation can normally be solved by given a type role declaration to the
0 commit comments