Backpack: poor error message implementing abstract data with a forall type
Backpack currently accepts an abstract data type to be implemented as a forall or quantified type:
unit p where
signature H where
data T1
data T2
data T3
unit q where
module H where
class C a where {}
data S
type T1 = forall a. a -> a
type T2 = forall a. C a => a
type T3 = C S => S -> S
unit r where
dependency q
dependency p[H=q:H]
We get errors like the following:
* Type constructor `T3' has conflicting definitions in the module
and its hsig file
Main module: type T3 :: *
type T3 = C S => S -> S
Hsig file: type T3 :: *
data T3
It doesn't specify what the issue is (that a quantified type is not allowed in the RHS of the type synonym implementing the abstract datatype).