data-has icon indicating copy to clipboard operation
data-has copied to clipboard

Consider replacing the default definition of `Has` with a generic implementation (c.f. generic-lens).

Open ocharles opened this issue 7 years ago • 0 comments

generic-lens has a generic typed lens: http://hackage.haskell.org/package/generic-lens-1.0.0.2/docs/Data-Generics-Product-Typed.html

I believe this would be a perfect fit for the default implementation of Has. This would allow one to write something like this:

data Env = Env
  { logger :: Logger
  , ...
  } deriving ( Generic, Has Logger )

and it'll just work.

ocharles avatar Sep 28 '18 13:09 ocharles