haskell-gi-base-0.26.9: Foundation for libraries generated by haskell-gi

Safe Haskell | None
Language | Haskell2010

Data.GI.Base.Internal.PathFieldAccess

Description

Support for creating lenses from overloaded labels of the type `#fieldName`, or `#"fieldName.subfield"`.

Synopsis

- type family Components (s :: Symbol) :: [Symbol] where ...
- class PathFieldAccess (path :: [Symbol]) model val | path model -> val where
  - pathFieldAccess :: Proxy path -> Proxy model -> (Lens' model val, [Text])

# Documentation

type family Components (s :: Symbol) :: [Symbol] where ... Source #

Equations

Components s = SplitByChar '.' s |

class PathFieldAccess (path :: [Symbol]) model val | path model -> val where Source #

Create a lens for the given path, and return it together with the path split into components.

Methods

pathFieldAccess :: Proxy path -> Proxy model -> (Lens' model val, [Text]) Source #

#### Instances

Instances details

(GFieldImpl fieldName model model val val, NonEmpty fieldName ('Text "Field names cannot be empty"), KnownSymbol fieldName) => PathFieldAccess '[fieldName] model val Source # |
Instance details Defined in Data.GI.Base.Internal.PathFieldAccess Methods pathFieldAccess :: Proxy '[fieldName] -> Proxy model -> (Lens' model val, [Text]) Source #
(GFieldImpl fieldName model model val val, KnownSymbol fieldName, PathFieldAccess rest val inner) => PathFieldAccess (fieldName ': rest) model inner Source # |
Instance details Defined in Data.GI.Base.Internal.PathFieldAccess Methods pathFieldAccess :: Proxy (fieldName ': rest) -> Proxy model -> (Lens' model inner, [Text]) Source #