IxpertaSolutions / freer-effects

An implementation of "Freer Monads, More Extensible Effects".
BSD 3-Clause "New" or "Revised" License
65 stars 12 forks source link

Add categorical functors over effects #32

Closed isovector closed 5 years ago

isovector commented 7 years ago

This PR represents the work @shlevy and I did during BayHac. It adds typeclasses to represent categorical {co,contra,in}-variant functors for effects, giving us common functions to map over effects.

For example,

eg :: Eff '[Writer String] ()
eg = effmap show $ tell True

Instances are provided for all effects which have meaningful type parameters.