ten-0.1.0.2: Typeclasses like Functor, etc. over arity-1 type constructors.
Safe HaskellNone
LanguageHaskell2010

Data.Ten.Internal

Description

Internal utilities used by multiple modules.

Synopsis

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.

Constructors

NewtypeIso

Zooming in on the contents of a newtype with coerce or _Wrapped.

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 PathComponents to a String, a la showsPrec.

portrayPath :: [PathComponent] -> Portrayal Source #

Pretty-print a field path.

dropUnderscore :: String -> String Source #

Guess the name of the lens corresponding to a field.

starFst :: (f :*: g) m -> f m Source #

Access the left side of a (:*:).

starSnd :: (f :*: g) m -> g m Source #

Access the right side of a (:*:).

mapStarFst :: (f m -> f m) -> (f :*: g) m -> (f :*: g) m Source #

Modify the left side of a (:*:).

mapStarSnd :: (g m -> g m) -> (f :*: g) m -> (f :*: g) m Source #

Modify the right side of a (:*:).