Safe Haskell | None |
---|

# Documentation

A record is parameterized by a list of fields and a functor to be applied to each of those fields.

(Storable t, Storable (PlainRec rs)) => Storable (PlainRec (: * (::: sy t) rs)) | |

Storable (PlainRec ([] *)) | |

Dist (Rec rs) | Records may be distributed to accumulate the effects of their fields. |

(Eq (g t), Eq (Rec fs g)) => Eq (Rec (: * (::: s t) fs) g) | |

Eq (Rec ([] *) f) | |

(SingI Symbol sy, Show (g t), Show (Rec fs g)) => Show (Rec (: * (::: sy t) fs) g) | |

Show (Rec ([] *) f) | |

(Monoid t, Monoid (Rec fs g), Applicative g) => Monoid (Rec (: * (::: s t) fs) g) | |

Monoid (Rec ([] *) f) | |

FoldRec (Rec ([] *) f) a | |

FoldRec (Rec fs g) (g t) => FoldRec (Rec (: * (::: s t) fs) g) (g t) | |

Apply (* -> *) (~> *) (Rec rs) | Records can be applied to each other. |

(~ * y (::: sy t), IElem * y xs, <: (Rec xs f) (Rec ys f)) => (Rec xs f) <: (Rec (: * y ys) f) | |

(Rec xs f) <: (Rec ([] *) f) |

(=:) :: Applicative f => (sy ::: t) -> t -> Rec `[sy ::: t]` fSource

Shorthand for a record with a single field. Lifts the field's value into the chosen functor automatically.

fixRecord :: (forall f. Applicative f => Rec rs f) -> PlainRec rsSource

Fixes a polymorphic record into the `Identity`

functor.