Data.Row

row-types-1.0.1.2: Open Records and Variants

Safe Haskell | None
Language | Haskell2010

Data.Row

Contents

- Types and constraints
- Record Construction
  - Restriction
  - Query
  - Union
- Variant construction
  - Expansion
  - Destruction
- Labels

Description

This module includes a set of common functions for Records and Variants. It includes:

- Common constructors, destructors, and querying functions

It specifically excludes:

- Functions that have the same name for Records and Variants (e.g. `focus`, `update`, `fromLabels`, etc.)
- Common clashes with the standard Prelude or other modules (e.g. `map`, `sequence`, `zip`, `Map`, etc.)

If these particular functions are needed, they should be brought in qualified from one of the Data.Row.*** modules directly.

Synopsis

- data Label (s :: Symbol) = Label
- class KnownSymbol (n :: Symbol)
- type family AllUniqueLabels (r :: Row k) where ...
- type WellBehaved (ρ :: Row k) = (Forall ρ (Unconstrained1 :: k -> Constraint), AllUniqueLabels ρ)
- data Var (r :: Row Type)
- data Rec (r :: Row Type)
- data Row a
- type Empty = 'R ('[] :: [LT a])
- type (≈) (a :: k) (b :: k) = a ~ b
- class (r .! l) ≈ a => HasType (l :: Symbol) (a :: k) (r :: Row k)
- type family Subset (r1 :: Row k) (r2 :: Row k) where ...
- class Lacks (l :: Symbol) (r :: Row Type)
- type family (r :: Row k) .\ (l :: Symbol) where ...
- type family (l :: Row k) .+ (r :: Row k) :: Row k where ...
- type family (l :: Row k) .\/ (r :: Row k) :: Row k where ...
- type family (l :: Row k) .\\ (r :: Row k) :: Row k where ...
- type family (l :: Row k) .// (r :: Row k) :: Row k where ...
- class BiForall (r1 :: Row k1) (r2 :: Row k2) (c :: k1 -> k2 -> Constraint)
- class Forall (r :: Row k) (c :: k -> Constraint)
- type FreeForall (r :: Row k) = Forall r (Unconstrained1 :: k -> Constraint)
- type FreeBiForall (r1 :: Row k1) (r2 :: Row k2) = BiForall r1 r2 (Unconstrained2 :: k1 -> k2 -> Constraint)
- switch :: forall (v :: Row Type) (r :: Row Type) x. BiForall r v (AppliesTo x) => Var v -> Rec r -> x
- caseon :: forall (v :: Row Type) (r :: Row Type) x. BiForall r v (AppliesTo x) => Rec r -> Var v -> x
- empty :: Rec (Empty :: Row Type)
- type (.==) (l :: Symbol) (a :: k) = Extend l a (Empty :: Row k)
- (.==) :: forall (l :: Symbol) a. KnownSymbol l => Label l -> a -> Rec (l .== a)
- pattern (:==) :: forall (l :: Symbol) a. KnownSymbol l => Label l -> a -> Rec (l .== a)
- type family (r :: Row k) .- (s :: Symbol) :: Row k where ...
- (.-) :: forall (l :: Symbol) (r :: Row Type). KnownSymbol l => Rec r -> Label l -> Rec (r .- l)
- type family (r :: Row k) .! (t :: Symbol) :: k where ...
- (.!) :: forall (l :: Symbol) (r :: Row Type). KnownSymbol l => Rec r -> Label l -> r .! l
- (.+) :: forall (l :: Row Type) (r :: Row Type). FreeForall l => Rec l -> Rec r -> Rec (l .+ r)
- type Disjoint (l :: Row k) (r :: Row k) = (WellBehaved l, WellBehaved r, Subset l (l .+ r), Subset r (l .+ r), ((l .+ r) .\\ l) ≈ r, ((l .+ r) .\\ r) ≈ l)
- pattern (:+) :: Disjoint l r => Rec l -> Rec r -> Rec (l .+ r)
- (.//) :: forall (r :: Row Type) (r' :: Row Type). Rec r -> Rec r' -> Rec (r .// r')
- pattern IsJust :: forall (l :: Symbol) r. (AllUniqueLabels r, KnownSymbol l) => Label l -> (r .! l) -> Var r
- diversify :: forall (r' :: Row Type) (r :: Row Type). Var r -> Var (r .\/ r')
- impossible :: Var (Empty :: Row Type) -> a
- trial :: forall (l :: Symbol) (r :: Row Type). KnownSymbol l => Var r -> Label l -> Either (Var (r .- l)) (r .! l)
- trial' :: forall (l :: Symbol) (r :: Row Type). KnownSymbol l => Var r -> Label l -> Maybe (r .! l)
- multiTrial :: forall (x :: Row Type) (y :: Row Type). (AllUniqueLabels x, FreeForall x) => Var y -> Either (Var (y .\\ x)) (Var x)
- labels :: forall {k} (ρ :: Row k) (c :: k -> Constraint) s. (IsString s, Forall ρ c) => [s]

# Types and constraints

data Label (s :: Symbol) #

A label

Constructors

Label |

#### Instances

Instances details

x ≈ y => IsLabel x (Label y) # |
Instance details Defined in Data.Row.Internal Methods fromLabel :: Label y #
KnownSymbol s => Show (Label s) # |
Instance details Defined in Data.Row.Internal Methods showsPrec :: Int -> Label s -> ShowS # show :: Label s -> String # showList :: [Label s] -> ShowS #
Eq (Label s) # |
Instance details Defined in Data.Row.Internal Methods (==) :: Label s -> Label s -> Bool # (/=) :: Label s -> Label s -> Bool #

class KnownSymbol (n :: Symbol) #

This class gives the string associated with a type-level symbol. There are instances of the class for every concrete literal: "hello", etc.

@since base-4.7.0.0

Minimal complete definition

symbolSing

type family AllUniqueLabels (r :: Row k) where ... #

Are all of the labels in this Row unique?

Equations

AllUniqueLabels ('R r :: Row k) = AllUniqueLabelsR r |

type WellBehaved (ρ :: Row k) = (Forall ρ (Unconstrained1 :: k -> Constraint), AllUniqueLabels ρ) #

A convenient way to provide common, easy constraints

data Var (r :: Row Type) #

The variant type.

#### Instances

Instances details

(AllUniqueLabels r, KnownSymbol name, (r .! name) ≈ a, r ≈ ((r .- name) .\/ (name .== a))) => AsConstructor' name (Var r) a # |
Instance details Defined in Data.Row.Variants Methods _Ctor' :: Prism (Var r) (Var r) a a #
(AllUniqueLabels r, AllUniqueLabels r', KnownSymbol name, (r .! name) ≈ a, (r' .! name) ≈ b, r' ≈ ((r .- name) .\/ (name .== b))) => AsConstructor name (Var r) (Var r') a b # | Every possibility of a row-types based variant has an `AsConstructor` instance.
Instance details Defined in Data.Row.Variants Methods _Ctor :: Prism (Var r) (Var r') a b #
Forall r NFData => NFData (Var r) # |
Instance details Defined in Data.Row.Variants Methods rnf :: Var r -> () #
GenericVar r => Generic (Var r) # |
Instance details Defined in Data.Row.Variants Associated Types
type Rep (Var r) |
Instance details Defined in Data.Row.Variants type Rep (Var r)
Methods from :: Var r -> Rep (Var r) x # to :: Rep (Var r) x -> Var r #
Forall r Show => Show (Var r) # |
Instance details Defined in Data.Row.Variants Methods showsPrec :: Int -> Var r -> ShowS # show :: Var r -> String # showList :: [Var r] -> ShowS #
Forall r Eq => Eq (Var r) # |
Instance details Defined in Data.Row.Variants Methods (==) :: Var r -> Var r -> Bool # (/=) :: Var r -> Var r -> Bool #
(Forall r Eq, Forall r Ord) => Ord (Var r) # |
Instance details Defined in Data.Row.Variants Methods compare :: Var r -> Var r -> Ordering # (<) :: Var r -> Var r -> Bool # (<=) :: Var r -> Var r -> Bool # (>) :: Var r -> Var r -> Bool # (>=) :: Var r -> Var r -> Bool # max :: Var r -> Var r -> Var r # min :: Var r -> Var r -> Var r #
type Rep (Var r) # |
Instance details Defined in Data.Row.Variants type Rep (Var r)

data Rec (r :: Row Type) #

A record with row r.

#### Instances

Instances details

(KnownSymbol name, (r .! name) ≈ a, r ~ Modify name a r) => HasField' name (Rec r) a # |
Instance details Defined in Data.Row.Records Methods field' :: Lens (Rec r) (Rec r) a a #
(KnownSymbol name, (r' .! name) ≈ b, (r .! name) ≈ a, r' ~ Modify name b r, r ~ Modify name a r') => HasField name (Rec r) (Rec r') a b # | Every field in a row-types based record has a `HasField` instance.
Instance details Defined in Data.Row.Records Methods field :: Lens (Rec r) (Rec r') a b #
Forall r NFData => NFData (Rec r) # |
Instance details Defined in Data.Row.Records Methods rnf :: Rec r -> () #
(Forall r Bounded, AllUniqueLabels r) => Bounded (Rec r) # |
Instance details Defined in Data.Row.Records Methods minBound :: Rec r # maxBound :: Rec r #
GenericRec r => Generic (Rec r) # |
Instance details Defined in Data.Row.Records Associated Types
type Rep (Rec r) |
Instance details Defined in Data.Row.Records type Rep (Rec r)
Methods from :: Rec r -> Rep (Rec r) x # to :: Rep (Rec r) x -> Rec r #
Forall r Show => Show (Rec r) # |
Instance details Defined in Data.Row.Records Methods showsPrec :: Int -> Rec r -> ShowS # show :: Rec r -> String # showList :: [Rec r] -> ShowS #
Forall r Eq => Eq (Rec r) # |
Instance details Defined in Data.Row.Records Methods (==) :: Rec r -> Rec r -> Bool # (/=) :: Rec r -> Rec r -> Bool #
(Forall r Eq, Forall r Ord) => Ord (Rec r) # |
Instance details Defined in Data.Row.Records Methods compare :: Rec r -> Rec r -> Ordering # (<) :: Rec r -> Rec r -> Bool # (<=) :: Rec r -> Rec r -> Bool # (>) :: Rec r -> Rec r -> Bool # (>=) :: Rec r -> Rec r -> Bool # max :: Rec r -> Rec r -> Rec r # min :: Rec r -> Rec r -> Rec r #
type Rep (Rec r) # |
Instance details Defined in Data.Row.Records type Rep (Rec r)

data Row a #

The kind of rows. This type is only used as a datakind. A row is a typelevel entity telling us which symbols are associated with which types.

type Empty = 'R ('[] :: [LT a]) #

Type level version of `empty`

type (≈) (a :: k) (b :: k) = a ~ b infix 4 #

A lower fixity operator for type equality

class (r .! l) ≈ a => HasType (l :: Symbol) (a :: k) (r :: Row k) #

Alias for `(r .! l) ≈ a`. It is a class rather than an alias, so that it can be partially applied.

#### Instances

Instances details

(r .! l) ≈ a => HasType l (a :: k) (r :: Row k) # |
Instance details Defined in Data.Row.Internal

type family Subset (r1 :: Row k) (r2 :: Row k) where ... #

Is the first row a subset of the second? Or, does the second row contain every binding that the first one does?

Equations

Subset ('R ('[] :: [LT k]) :: Row k) (r :: Row k) = Unconstrained |
Subset ('R ((l ':-> a) ': x) :: Row k) (r :: Row k) = ((r .! l) ≈ a, Subset ('R x) r) |

class Lacks (l :: Symbol) (r :: Row Type) #

Alias for `.\`. It is a class rather than an alias, so that it can be partially applied.

#### Instances

Instances details

r .\ l => Lacks l r # |
Instance details Defined in Data.Row.Internal

type family (r :: Row k) .\ (l :: Symbol) where ... infixl 4 #

Does the row lack (i.e. it does not have) the specified label?

Equations

('R ('[] :: [LT k]) :: Row k) .\ l = Unconstrained |
('R r :: Row k) .\ l = LacksR l r r |

type family (l :: Row k) .+ (r :: Row k) :: Row k where ... infixl 6 #

Type level Row append

Equations

(x :: Row k) .+ ('R ('[] :: [LT k]) :: Row k) = x |
('R ('[] :: [LT k]) :: Row k) .+ (y :: Row k) = y |
(x :: Row k) .+ ('R '[l ':-> a] :: Row k) = Extend l a x |
('R '[l ':-> a] :: Row k) .+ (y :: Row k) = Extend l a y |
('R l :: Row a) .+ ('R r :: Row a) = 'R (Merge l r) |

type family (l :: Row k) .\/ (r :: Row k) :: Row k where ... infixl 6 #

The minimum join of the two rows.

Equations

(x :: Row k) .\/ ('R ('[] :: [LT k]) :: Row k) = x |
('R ('[] :: [LT k]) :: Row k) .\/ (y :: Row k) = y |
('R l :: Row a) .\/ ('R r :: Row a) = 'R (MinJoinR l r) |

type family (l :: Row k) .\\ (r :: Row k) :: Row k where ... infixl 6 #

Type level Row difference. That is, `l `.\\` r` is the row remaining after removing any matching elements of `r` from `l`.

Equations

('R l :: Row a) .\\ ('R r :: Row a) = 'R (Diff l r) |

type family (l :: Row k) .// (r :: Row k) :: Row k where ... infixl 6 #

The overwriting union, where the left row overwrites the types of the right row where the labels overlap.

Equations

(x :: Row k) .// ('R ('[] :: [LT k]) :: Row k) = x |
('R ('[] :: [LT k]) :: Row k) .// (y :: Row k) = y |
('R l :: Row a) .// ('R r :: Row a) = 'R (ConstUnionR l r) |

class BiForall (r1 :: Row k1) (r2 :: Row k2) (c :: k1 -> k2 -> Constraint) #

Any structure over two rows in which the elements of each row satisfy some constraints can be metamorphized into another structure over both of the rows.

Minimal complete definition

biMetamorph

#### Instances

Instances details

(KnownSymbol ℓ, c τ1 τ2, BiForall ('R ρ1) ('R ρ2) c, FrontExtends ℓ τ1 ('R ρ1), FrontExtends ℓ τ2 ('R ρ2), AllUniqueLabels (Extend ℓ τ1 ('R ρ1)), AllUniqueLabels (Extend ℓ τ2 ('R ρ2))) => BiForall ('R ((ℓ ':-> τ1) ': ρ1) :: Row k1) ('R ((ℓ ':-> τ2) ': ρ2) :: Row k2) (c :: k1 -> k2 -> Constraint) # |
Instance details Defined in Data.Row.Internal Methods biMetamorph :: forall p f g h. Bifunctor p => Proxy (Proxy h, Proxy p) -> (f (Empty :: Row k1) (Empty :: Row k2) -> g (Empty :: Row k1) (Empty :: Row k2)) -> (forall (ℓ0 :: Symbol) (τ10 :: k1) (τ20 :: k2) (ρ10 :: Row k1) (ρ20 :: Row k2). (KnownSymbol ℓ0, c τ10 τ20, HasType ℓ0 τ10 ρ10, HasType ℓ0 τ20 ρ20) => Label ℓ0 -> f ρ10 ρ20 -> p (f (ρ10 .- ℓ0) (ρ20 .- ℓ0)) (h τ10 τ20)) -> (forall (ℓ1 :: Symbol) (τ11 :: k1) (τ21 :: k2) (ρ11 :: Row k1) (ρ21 :: Row k2). (KnownSymbol ℓ1, c τ11 τ21, FrontExtends ℓ1 τ11 ρ11, FrontExtends ℓ1 τ21 ρ21, AllUniqueLabels (Extend ℓ1 τ11 ρ11), AllUniqueLabels (Extend ℓ1 τ21 ρ21)) => Label ℓ1 -> p (g ρ11 ρ21) (h τ11 τ21) -> g (Extend ℓ1 τ11 ρ11) (Extend ℓ1 τ21 ρ21)) -> f ('R ((ℓ ':-> τ1) ': ρ1)) ('R ((ℓ ':-> τ2) ': ρ2)) -> g ('R ((ℓ ':-> τ1) ': ρ1)) ('R ((ℓ ':-> τ2) ': ρ2)) #
BiForall ('R ('[] :: [LT k1]) :: Row k1) ('R ('[] :: [LT k2]) :: Row k2) (c1 :: k1 -> k2 -> Constraint) # |
Instance details Defined in Data.Row.Internal Methods biMetamorph :: forall p f g h. Bifunctor p => Proxy (Proxy h, Proxy p) -> (f (Empty :: Row k1) (Empty :: Row k2) -> g (Empty :: Row k1) (Empty :: Row k2)) -> (forall (ℓ :: Symbol) (τ1 :: k1) (τ2 :: k2) (ρ1 :: Row k1) (ρ2 :: Row k2). (KnownSymbol ℓ, c1 τ1 τ2, HasType ℓ τ1 ρ1, HasType ℓ τ2 ρ2) => Label ℓ -> f ρ1 ρ2 -> p (f (ρ1 .- ℓ) (ρ2 .- ℓ)) (h τ1 τ2)) -> (forall (ℓ :: Symbol) (τ1 :: k1) (τ2 :: k2) (ρ1 :: Row k1) (ρ2 :: Row k2). (KnownSymbol ℓ, c1 τ1 τ2, FrontExtends ℓ τ1 ρ1, FrontExtends ℓ τ2 ρ2, AllUniqueLabels (Extend ℓ τ1 ρ1), AllUniqueLabels (Extend ℓ τ2 ρ2)) => Label ℓ -> p (g ρ1 ρ2) (h τ1 τ2) -> g (Extend ℓ τ1 ρ1) (Extend ℓ τ2 ρ2)) -> f ('R ('[] :: [LT k1])) ('R ('[] :: [LT k2])) -> g ('R ('[] :: [LT k1])) ('R ('[] :: [LT k2])) #

class Forall (r :: Row k) (c :: k -> Constraint) #

Any structure over a row in which every element is similarly constrained can be metamorphized into another structure over the same row.

Minimal complete definition

metamorph

#### Instances

Instances details

(KnownSymbol ℓ, c τ, Forall ('R ρ) c, FrontExtends ℓ τ ('R ρ), AllUniqueLabels (Extend ℓ τ ('R ρ))) => Forall ('R ((ℓ ':-> τ) ': ρ) :: Row k) (c :: k -> Constraint) # |
Instance details Defined in Data.Row.Internal Methods metamorph :: forall p f g h. Bifunctor p => Proxy (Proxy h, Proxy p) -> (f (Empty :: Row k) -> g (Empty :: Row k)) -> (forall (ℓ0 :: Symbol) (τ0 :: k) (ρ0 :: Row k). (KnownSymbol ℓ0, c τ0, HasType ℓ0 τ0 ρ0) => Label ℓ0 -> f ρ0 -> p (f (ρ0 .- ℓ0)) (h τ0)) -> (forall (ℓ1 :: Symbol) (τ1 :: k) (ρ1 :: Row k). (KnownSymbol ℓ1, c τ1, FrontExtends ℓ1 τ1 ρ1, AllUniqueLabels (Extend ℓ1 τ1 ρ1)) => Label ℓ1 -> p (g ρ1) (h τ1) -> g (Extend ℓ1 τ1 ρ1)) -> f ('R ((ℓ ':-> τ) ': ρ)) -> g ('R ((ℓ ':-> τ) ': ρ)) #
Forall ('R ('[] :: [LT k]) :: Row k) (c :: k -> Constraint) # |
Instance details Defined in Data.Row.Internal Methods metamorph :: forall p f g h. Bifunctor p => Proxy (Proxy h, Proxy p) -> (f (Empty :: Row k) -> g (Empty :: Row k)) -> (forall (ℓ :: Symbol) (τ :: k) (ρ :: Row k). (KnownSymbol ℓ, c τ, HasType ℓ τ ρ) => Label ℓ -> f ρ -> p (f (ρ .- ℓ)) (h τ)) -> (forall (ℓ :: Symbol) (τ :: k) (ρ :: Row k). (KnownSymbol ℓ, c τ, FrontExtends ℓ τ ρ, AllUniqueLabels (Extend ℓ τ ρ)) => Label ℓ -> p (g ρ) (h τ) -> g (Extend ℓ τ ρ)) -> f ('R ('[] :: [LT k])) -> g ('R ('[] :: [LT k])) #

type FreeForall (r :: Row k) = Forall r (Unconstrained1 :: k -> Constraint) #

`FreeForall` can be used when a `Forall` constraint is necessary but there is no particular constraint we care about.

type FreeBiForall (r1 :: Row k1) (r2 :: Row k2) = BiForall r1 r2 (Unconstrained2 :: k1 -> k2 -> Constraint) #

`FreeForall` can be used when a `BiForall` constraint is necessary but there is no particular constraint we care about.

switch :: forall (v :: Row Type) (r :: Row Type) x. BiForall r v (AppliesTo x) => Var v -> Rec r -> x #

A `Var` and a `Rec` can combine if their rows line up properly. Given a Variant along with a Record of functions from each possible value of the variant to a single output type, apply the correct function to the value in the variant.

caseon :: forall (v :: Row Type) (r :: Row Type) x. BiForall r v (AppliesTo x) => Rec r -> Var v -> x #

The same as `switch` but with the argument order reversed

# Record Construction

empty :: Rec (Empty :: Row Type) #

The empty record

type (.==) (l :: Symbol) (a :: k) = Extend l a (Empty :: Row k) infix 7 #

A type level way to create a singleton Row.

(.==) :: forall (l :: Symbol) a. KnownSymbol l => Label l -> a -> Rec (l .== a) infix 7 #

The singleton record

pattern (:==) :: forall (l :: Symbol) a. KnownSymbol l => Label l -> a -> Rec (l .== a) infix 7 #

A pattern for the singleton record; can be used to both destruct a record when in a pattern position or construct one in an expression position.

## Restriction

type family (r :: Row k) .- (s :: Symbol) :: Row k where ... infixl 6 #

Type level Row element removal

Equations

('R r :: Row a) .- l = 'R (Remove l r) |

(.-) :: forall (l :: Symbol) (r :: Row Type). KnownSymbol l => Rec r -> Label l -> Rec (r .- l) infixl 6 #

Record restriction. Remove the label l from the record.

## Query

type family (r :: Row k) .! (t :: Symbol) :: k where ... infixl 5 #

Type level label fetching

Equations

('R r :: Row k) .! l = Get l r |

(.!) :: forall (l :: Symbol) (r :: Row Type). KnownSymbol l => Rec r -> Label l -> r .! l #

Record selection

## Union

(.+) :: forall (l :: Row Type) (r :: Row Type). FreeForall l => Rec l -> Rec r -> Rec (l .+ r) infixl 6 #

Record disjoint union (commutative)

type Disjoint (l :: Row k) (r :: Row k) = (WellBehaved l, WellBehaved r, Subset l (l .+ r), Subset r (l .+ r), ((l .+ r) .\\ l) ≈ r, ((l .+ r) .\\ r) ≈ l) #

A type synonym for disjointness.

pattern (:+) :: Disjoint l r => Rec l -> Rec r -> Rec (l .+ r) infixl 6 #

A pattern version of record union, for use in pattern matching.

(.//) :: forall (r :: Row Type) (r' :: Row Type). Rec r -> Rec r' -> Rec (r .// r') infixl 6 #

Record overwrite.

The operation `r .// r'` creates a new record such that:

- Any label that is in both `r` and `r'` is in the resulting record with the type and value given by the fields in `r`,
- Any label that is only found in `r` is in the resulting record.
- Any label that is only found in `r'` is in the resulting record.

This can be thought of as `r` "overwriting" `r'`.

# Variant construction

pattern IsJust :: forall (l :: Symbol) r. (AllUniqueLabels r, KnownSymbol l) => Label l -> (r .! l) -> Var r #

A pattern for variants; can be used to both destruct a variant when in a pattern position or construct one in an expression position.

## Expansion

diversify :: forall (r' :: Row Type) (r :: Row Type). Var r -> Var (r .\/ r') #

Make the variant arbitrarily more diverse.

## Destruction

impossible :: Var (Empty :: Row Type) -> a #

A Variant with no options is uninhabited.

trial :: forall (l :: Symbol) (r :: Row Type). KnownSymbol l => Var r -> Label l -> Either (Var (r .- l)) (r .! l) #

Convert a variant into either the value at the given label or a variant without that label. This is the basic variant destructor.

trial' :: forall (l :: Symbol) (r :: Row Type). KnownSymbol l => Var r -> Label l -> Maybe (r .! l) #

A version of `trial` that ignores the leftover variant.

multiTrial :: forall (x :: Row Type) (y :: Row Type). (AllUniqueLabels x, FreeForall x) => Var y -> Either (Var (y .\\ x)) (Var x) #

A trial over multiple types

# Labels

labels :: forall {k} (ρ :: Row k) (c :: k -> Constraint) s. (IsString s, Forall ρ c) => [s] #

Return a list of the labels in a row type.