errors/DeclConflict.md
DeclConflict ErrorEach of these pairs will fail with a DeclConflict error.
module Main where
data T = Fail | Fail
data T1 = Fail1
data T2 = Fail1
class Fail2
data T3 = Fail2
This error occurs when a data constructor, type, or type class conflicts with another data constructor, type, or type class.
This can be fixed by using non-conflicting names or by putting conflicting names into a separate module. Then, if the names are later used together in a module they can be distinguished via a qualified import:
module Main where
import Module1 as Module1 -- includes: data Works = Works
import Module2 as Module2 -- includes: data Works = Works
x :: Module1.Works
x = Module1.Works
y :: Module2.Works
y = Module2.Works