Closed phadej closed 7 years ago
So this is just apInjs_POP
without the final call to hcollapse
?
yes, except that apInjs_POP = map SOP . apInjs_NP . unPOP
, i.e. it loses the structure in apInjs_NP
already.
I assume you have a use case for this which doesn't involve collapsing the result?
It occurs when I need to hczipWith
a constructor info (i.e. NP SOP.ConstructorInfo (SOP.Code a)
).
It's actually a bit strange that the standard variants of apInjs
apply hcollapse
. So yes, I'm in favour of this as well. At least adding the two functions to Generics.SOP.NP
. But they should be called apInjs'_NP
and apInjs'_POP
, without the h
which is currently only used for the overloaded variants.
I'm also not opposed to adding a HApInjs
class that offers the two functions in overloaded form.
I'd appreciate a PR, but if you don't get around to it, I might try to do it myself.
I'll make a PR with apInjs'_POP
and apInjs'_NP
; let's see if I'll get HApInjs
to work too.
The
NP
variant is simplyhap injections
, butPOP
variant is:which is quite lenghty. Or, is there a shorter way to say that?