Hello dear Haskell friends.
Sometimes I have a function like this:
f a b c d e = .... h b e
But then, occasionally, in order to evaluate h
I need a type application like:
f a b c d e = .... h @blike b e
where blike
is some type that none of the other variables have.
Then I feel extreme sadness, as in order to do that I need to completely define the type of f:
f :: forall ... b. ( BLike b, ... )
occasionally, this is super annoying, because the type is really long.
it’d be so convenient if I could just somehow label the one type that I’d like to use as a type application, just like I can do for function arguments; i.e. can I curry these forall
things?
Is there a way to do this?
[ edit: I’ve updated the original question since @jaror pointed out it was a bit wrong initially. ]