HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulelens-5.3.5Haskell2010

GHC.Generics.Lens

You can use hiding or imports to mitigate this to an extent, and the following imports, represent a fair compromise for user code:

import Control.Lens hiding (Rep)
import GHC.Generics hiding (from, to)

You can use generic to replace from and to from GHC.Generics, and probably won't be explicitly referencing Control.Lens.Representable.Rep from Control.Lens in code that uses generics.

This module provides compatibility with older GHC versions by using the generic-deriving package.

  • 16 values
  • Packagelens-5.3.5
  • Exports16
  • LanguageHaskell2010
  • LicenceBSD-2-Clause
  • SourceLens.hs
valuegeneric :: (Generic a, Generic b) => Iso a b (Rep a g) (Rep b h)
#

Convert from the data type to its representation (or back)

Example1 expression
"hello"^.generic.from generic :: String"hello"