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

Modulelinear-1.22Haskell2010

Linear.V

n-D Vectors

  • 1 type
  • 2 classes
  • 9 values
  • Packagelinear-1.22
  • Exports12
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceV.hs
newtypenewtype V (n :: k) a
#

Constructors

Instances80Generic1, FoldableWithIndex, FunctorWithIndex, TraversableWithIndex, Dim, Monad, …
valueint :: Int -> TypeQ
#

This can be used to generate a template haskell splice for a type level version of a given int.

This does not use GHC TypeLits, instead it generates a numeric type by hand similar to the ones used in the "Functional Pearl: Implicit Configurations" paper by Oleg Kiselyov and Chung-Chieh Shan.

instance Num (Q Exp) provided in this package allows writing $(3) instead of $(int 3).

classclass Dim (n :: k) where
#

Methods

Instances3Dim
  • KnownNat n => Dim nDefined in linear-1.22 · Linear.V
  • Reifies s Int => Dim (ReifiedDim s)Defined in linear-1.22 · Linear.V
  • Dim n => Dim (V n a)Defined in linear-1.22 · Linear.V
classclass Finite (v :: Type -> Type) where
#

Associated types

Methods

Instances10Finite, …