The following classes are currently defined inside typelevel-prelude, but since they are solved by the compiler and also since, afaik, they do not exist at runtime (because they have no methods), I think it is worth considering moving them into submodules of Prim:
RowToList
AppendSymbol
CompareSymbol
- (
ConsSymbol? it's in the compiler but not in typelevel-prelude yet)
If we do this, we should re-export these classes from the modules they exist in now to avoid unnecessary breakage or confusion. Note that we were previously discussing moving RowToList into Prelude in #3116; I'm suggesting going a little further here.
The benefit of this is that:
- compiler magic should be as close to the compiler as possible; putting classes like this into
Prim makes it easier to keep docs and things up to date if/when we want to change them, and means we don't have to worry about getting confusing errors when the installed versions of supporting libraries don't quite match what the compiler expects.
- it means we don't have do any rearranging of the dependency hierarchy of libraries if we want to take advantage of new compiler magic in libraries which are low-down in the hierarchy. For example, the case of giving
Record a its long-awaited Show instance by using RowToList; moving classes into submodules of Prim where possible should reduce the likelihood of similar issues arising in the future.
The following classes are currently defined inside
typelevel-prelude, but since they are solved by the compiler and also since, afaik, they do not exist at runtime (because they have no methods), I think it is worth considering moving them into submodules ofPrim:RowToListAppendSymbolCompareSymbolConsSymbol? it's in the compiler but not intypelevel-preludeyet)If we do this, we should re-export these classes from the modules they exist in now to avoid unnecessary breakage or confusion. Note that we were previously discussing moving
RowToListintoPreludein #3116; I'm suggesting going a little further here.The benefit of this is that:
Primmakes it easier to keep docs and things up to date if/when we want to change them, and means we don't have to worry about getting confusing errors when the installed versions of supporting libraries don't quite match what the compiler expects.Record aits long-awaitedShowinstance by usingRowToList; moving classes into submodules ofPrimwhere possible should reduce the likelihood of similar issues arising in the future.