generic-lens-labels alternatives and similar packages
Based on the "generic" category.
Alternatively, view generic-lens-labels alternatives based on common mentions on social networks and blogs.
-
generic-lens
Generically derive traversals, lenses, and prisms. -
generic-records
Generically derive traversals, lenses, and prisms. -
generic-deriving
Generic programming library for generalised deriving. -
generic-override-aeson
Override instances used by Haskell's generic derivation -
generic-lens-lite
Monomorphic field lens like with generic-lens -
generic-optics-lite
Monomorphic field opics like with generic-lens
Static code analysis for 29 languages.
Do you think we are missing an alternative of generic-lens-labels or a related project?
README
develop branch
I may rebase develop from time to time, let me know if that's causing you problems.
Summary
This package provides the module Data.Generic.Labels
, which provides an IsLabel
instance
allowing one to use OverloadedLabels
to access field lenses from the generic-lens library.
As the IsLabel
instance provided is necessarily orphan, your code will break if you depend on
this library and any other library that provides an orphan IsLabel
instance at the same
time. As such, this should be considered a toy.
Example:
{-# LANGUAGE OverloadedLabels, DeriveGeneric #- }
module Example
import Data.Generics.Labels()
import GHC.Generics
import Control.Lens
data Foo = Foo {bar :: Int} deriving (Generic)
_bar :: Lens' Foo Int
_bar = #bar