danidiaz / dep-t

Dependency injection for records-of-functions.
http://hackage.haskell.org/package/dep-t
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Add `depRecord` to `Dep.Has` (or `Dep.Env`?) #38

Open danidiaz opened 1 year ago

danidiaz commented 1 year ago

For constructors that take a concrete record of dependencies (a subset of the whole set of components), a depRecord function could extract the record from the set of components.

Related to the idea (#37) of ditching the use of Has in component definitions. depRecord (and dep) would only be used in the composition root, not in the component constructors.