HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulevinyl-0.14.3Haskell2010

Data.Vinyl.ARec

Constant-time field accessors for extensible records. The trade-off is the usual lists vs arrays one: it is fast to add an element to the head of a list, but element access is linear time; array access time is uniform, but extending the array is more slower.

  • 1 type
  • 2 classes
  • 7 values
  • Packagevinyl-0.14.3
  • Exports10
  • LanguageHaskell2010
  • LicenceMIT
  • SourceARec.hs
newtypenewtype ARec (f :: k -> Type) (ts :: [k])
#

An array-backed extensible record with constant-time field access.

Instances9RecSubset, RecElem, Eq, Ord, Show, RecElemFCtx, …
classclass ToARec (us :: [k]) where
#
Instances2ToARec
  • ToARec '[]Defined in vinyl-0.14.3 · Data.Vinyl.ARec.Internal
  • ToARec us => ToARec (u ': us)Defined in vinyl-0.14.3 · Data.Vinyl.ARec.Internal
valuearecConsMatchCoercion :: (forall (x :: k). Coercible (f x) (g x)) => Coercion (ARec f xs) (ARec g xs)
#

Given that forall x. Coercible (f x) (g x), produce a coercion from ARec f xs to ARec g xs. While the constraint looks a lot like Coercible f g, it is actually weaker.