With the new Union typeclass which exists purely for proof at compile time as it has no functions, it would be nice if when it was used as a constraint the runtime didn't have to pass a dictionary in for it.
I understand that might be a difficult thing to change but what might be more feasible is to remove the overhead of creating blank dictionaries from the dictionaries of other constraints. E.g.
class MergeDefaults (o :: # Type) (mr :: # Type) (mo :: # Type)
instance mergeInstance :: (Union o m mo, Union m r mr, Subrow r o) => MergeDefaults o mr mo
Currently whenever it's used generate something along the lines of:
Data_Record.mergeInstance({})({})(Data_Record.subrow({}))
which could be optimised simply to {}
With the new
Uniontypeclass which exists purely for proof at compile time as it has no functions, it would be nice if when it was used as a constraint the runtime didn't have to pass a dictionary in for it.I understand that might be a difficult thing to change but what might be more feasible is to remove the overhead of creating blank dictionaries from the dictionaries of other constraints. E.g.
Currently whenever it's used generate something along the lines of:
which could be optimised simply to
{}