HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

ModuleAgda-2.7.0.1Haskell2010

Agda.Utils.IndexedList

  • 3 types
  • 8 values
  • PackageAgda-2.7.0.1
  • Exports11
  • LanguageHaskell2010
  • LicenceMIT
  • SourceIndexedList.hs
datadata Some (a :: k -> Type) where
#

Existential wrapper for indexed types.

Constructors

valuewithSome :: Some b -> (forall (i :: k). b i -> a) -> a
#

Unpacking a wrapped value.

datadata All (a :: x -> Type) (b :: [x]) where
#

Lists indexed by a type-level list. A value of type All p [x₁..xₙ] is a sequence of values of types p x₁, .., p xₙ.

Constructors

valuemakeAll :: (a -> Some b) -> [a] -> Some (All b)
#

Constructing an indexed list from a plain list.

valueforgetAll :: (forall (x1 :: x). b x1 -> a) -> All b xs -> [a]
#

Turning an indexed list back into a plain list.

datadata Index (a :: [x]) (b :: x) where
#

An index into a type-level list.

Constructors

valuemapWithIndex
  1. :: forall (x1 :: x). Index xs x1 -> p x1 -> q x1
  2. -> All p xs
  3. -> All q xs
#

Mapping over an indexed list.

valuelIndex :: Index xs x2 -> Lens' (All p xs) (p x2)
#

If you have an index you can get a lens for the given element.