Export NormaliseSteppers of GHC.Core.FamInstEnv.topNormaliseType_maybe
Currently, the function GHC.Core.FamInstEnv.topNormaliseType_maybe
is very all-or-nothing: either you use it as-is, removing exactly just newtypes and type family applications, or you have to write your own from scratch.
However, most of its work is done by the composeStepper
-ing of the two NormaliseStepper
s defined locally: unwrapNewTypeStepper'
and tyFamStepper
. The former is already available standalone via GHC.Core.Coerce
, but the latter could be useful on its own to API clients.
My particular use case is normalisation of type family applications that includes type families implemented via plugins. So I'd like to implement that as the composeStepper
of tyFamStepper
and my own from-scratch stepper for my plugins, without pulling in unwrapNewTypeStepper
. Currently the only way to achieve this is by copy-pasting tyFamStepper
into my own client code.