Closed VictorCMiraldo closed 2 years ago
Simplifies the monomorphizer, which should help the defunctionalizer later by not having to deal with those nasty Just @(Bool -> Bool) cases: those will have been replaced by Just!BoolToBool and will be of type:
Just @(Bool -> Bool)
Just!BoolToBool
Just!BoolToBool : (Bool -> Bool) -> Maybe (Bool -> Bool)
Hence, it's obviously a higher-order constructor for the defunctionalizer!
Still incomplete: understand and decide how to deal with constructors of types that should be defunctionalized.
I'll merge this on my branch then I'll simplify defunctionalization, with a little luck we solve everything!
Simplifies the monomorphizer, which should help the defunctionalizer later by not having to deal with those nasty
Just @(Bool -> Bool)
cases: those will have been replaced byJust!BoolToBool
and will be of type:Just!BoolToBool : (Bool -> Bool) -> Maybe (Bool -> Bool)
Hence, it's obviously a higher-order constructor for the defunctionalizer!
Still incomplete: understand and decide how to deal with constructors of types that should be defunctionalized.