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

Modulefoundation-0.0.30Haskell2010

Foundation.Primitive

  • 7 types
  • 6 classes
  • 6 values
  • Packagefoundation-0.0.30
  • Exports19
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourcePrimType.hs
classclass Eq ty => PrimType ty where
#

Represent the accessor for types that can be stored in the UArray and MUArray.

Types need to be a instance of storable and have fixed sized.

Associated types

  • type family PrimSize ty :: Nat

    type level size of the given ty

Methods

Instances22PrimType, …
classclass (Functor m, Applicative m, Monad m) => PrimMonad (m :: Type -> Type) where
#

Primitive monad that can handle mutation.

For example: IO and ST.

Associated types

Methods

Instances2PrimMonad
  • PrimMonad IODefined in basement-0.0.16 · Basement.Monad
  • PrimMonad (ST s)Defined in basement-0.0.16 · Basement.Monad

endianess

7 declarations
classclass ByteSwap a where
#

Class of types that can be byte-swapped.

e.g. Word16, Word32, Word64

Instances3ByteSwap
newtypenewtype LE a
#

Little Endian value

Constructors

Instances18Eq, Ord, Show, Bits, PrimType, NormalForm, …
valuetoLE :: ByteSwap a => a -> LE a
#

Convert a value in cpu endianess to little endian

valuefromLE :: ByteSwap a => LE a -> a
#

Convert from a little endian value to the cpu endianness

newtypenewtype BE a
#

Big Endian value

Constructors

Instances18Eq, Ord, Show, Bits, PrimType, NormalForm, …
valuetoBE :: ByteSwap a => a -> BE a
#

Convert a value in cpu endianess to big endian

valuefromBE :: ByteSwap a => BE a -> a
#

Convert from a big endian value to the cpu endianness

Integral convertion

2 declarations
classclass IntegralUpsize a b where
#

Upsize an integral value

The destination type b size need to be greater or equal than the size type of a

Methods

Instances26IntegralUpsize, …
classclass IntegralDownsize a b where
#

Downsize an integral value

Methods

Instances29IntegralDownsize, …

Evaluation

3 declarations
classclass NormalForm a where
#

Data that can be fully evaluated in Normal Form

Methods

Instances70NormalForm, …

These

1 declaration
datadata These a b
#

Either a or b or both.

Constructors

Instances5Eq, Ord, Show, NormalForm, From

Block of memory

2 declarations
datadata Block ty
#

A block of memory containing unpacked bytes representing values of type ty

Instances24IsList, Eq, Data, Ord, Show, Semigroup, …
datadata MutableBlock ty st
#

A Mutable block of memory containing unpacked bytes representing values of type ty

Instances5MutableCollection, RandomAccess, MutableFreezed, MutableKey, MutableValue

Ascii

2 declarations
newtypenewtype Char7
#

ASCII value between 0x0 and 0x7f

Instances8Eq, Ord, Show, PrimType, NormalForm, Arbitrary, …
  • Eq Char7Defined in basement-0.0.16 · Basement.Types.Char7
  • Ord Char7Defined in basement-0.0.16 · Basement.Types.Char7
  • Show Char7Defined in basement-0.0.16 · Basement.Types.Char7
  • PrimType Char7Defined in basement-0.0.16 · Basement.PrimType
  • NormalForm Char7Defined in basement-0.0.16 · Basement.NormalForm
  • Arbitrary Char7Defined in foundation-0.0.30 · Foundation.Check.Arbitrary
  • type NatNumMaxBound Char7 = 127Defined in basement-0.0.16 · Basement.Nat
  • type PrimSize Char7 = 1Defined in basement-0.0.16 · Basement.PrimType
newtypenewtype AsciiString
#

Opaque packed array of characters in the ASCII encoding

Instances15IsList, Eq, Ord, Show, IsString, Semigroup, …