Export (~) from Data.Type.Equality
(~) type operator is currently considered built-in syntax, with the following consequences:
The user is not allowed to define their own type constructors with this name:
ghci> class a ~ b <interactive>:1:1: error: Illegal binding of built-in syntax: ~
a ~ bdoes not require enabling
~type operator is always in scope.
I created GHC Proposal #371 to discuss making it an entirely ordinary type operator. However, that would be a breaking change.
This ticket is to discuss a less intrusive change: export the
Data.Type.Equality, but also let the user define their own. In the implementation, this just means that if we failed to look up
~, default to
As the result:
- Users can define their own, entirely ordinary
~, while the built-in
- Haddock can display the documentation for the built-in
~(currently it is unable to do so).