joshvera / effects

An implementation of "Freer Monads, More Extensible Effects".
Other
20 stars 5 forks source link

Use -XAllowAmbiguousTypes & -XTypeApplications instead of Proxy for Apply #23

Closed robrix closed 6 years ago

robrix commented 6 years ago

-XTypeApplications has zero runtime cost, Proxy has non-zero runtime cost.

This will mean that any caller of apply & friends will need to have TypeApplications on. We could provide Proxy-using wrappers for backwards-compatibility.

robrix commented 6 years ago

If we split Union apart like is suggested in https://github.com/joshvera/effects/issues/35#issuecomment-385832845, then IMO we could 🔥 Apply altogether for the effects case and do this in the à la carte AST case instead.