Currently, derived instances which are recursive are inefficient, because the recursive call is done via the generic Eq.eq instead of calling the function being defined directly. Thus a recursive call is compiled to a case on the instance of Eq to fetch the function to be called. This instance should be inlined and the case eliminated. It currently isn't unless the pragma inline: case is present. This situation should be detected automatically.
Currently, derived instances which are recursive are inefficient, because the recursive call is done via the generic
Eq.eq
instead of calling the function being defined directly. Thus a recursive call is compiled to a case on the instance ofEq
to fetch the function to be called. This instance should be inlined and the case eliminated. It currently isn't unless the pragmainline: case
is present. This situation should be detected automatically.