compiling-to-categories / concat

Compiling to Categories
http://conal.net/papers/compiling-to-categories
BSD 3-Clause "New" or "Revised" License
431 stars 49 forks source link

Remove unnecessary Functor constraint. #64

Closed sellout closed 2 years ago

sellout commented 3 years ago

We have categories where non-Hask functors can be functors. Here's a trivial case,

data TerminalCategory a b = ZeroId

instance FunctorCat f where
  fmapC ZeroId = ZeroId

I don't think there's any way for the plugin to introduce calls to fmapC that apply to a non-Functor, but the constraint seems superfluous.