Safe Haskell | None |
---|---|
Language | Haskell2010 |
Internal utilities used by multiple modules.
Synopsis
- data PathComponent
- = NewtypeIso
- | NamedField !Text !Text
- showPathComponent :: PathComponent -> ShowS
- showsPath :: Int -> [PathComponent] -> ShowS
- portrayPathComponent :: PathComponent -> Portrayal
- portrayPath :: [PathComponent] -> Portrayal
- dropUnderscore :: String -> String
- starFst :: (f :*: g) m -> f m
- starSnd :: (f :*: g) m -> g m
- mapStarFst :: (f m -> f m) -> (f :*: g) m -> (f :*: g) m
- mapStarSnd :: (g m -> g m) -> (f :*: g) m -> (f :*: g) m
Documentation
data PathComponent Source #
The names of a lens and field selector, or coerce
/_Wrapped
.
Used in deriving Show
/Pretty
instances
for field selector newtypes.
NewtypeIso | Zooming in on the contents of a newtype with |
NamedField !Text !Text | Zooming in on a record field with the given named selector/lens. |
showPathComponent :: PathComponent -> ShowS Source #
Convert a PathComponent
to a String
, with a suffix.
showsPath :: Int -> [PathComponent] -> ShowS Source #
Convert a list of PathComponent
s to a String
, a la showsPrec
.
portrayPathComponent :: PathComponent -> Portrayal Source #
Pretty-print a PathComponent
.
portrayPath :: [PathComponent] -> Portrayal Source #
Pretty-print a field path.
dropUnderscore :: String -> String Source #
Guess the name of the lens corresponding to a field.