HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Modulefoundation-0.0.30Haskell2010

Foundation.Primitive

Contents
  1. endianess
  2. Integral convertion
  3. Evaluation
  4. These
  5. Block of memory
  6. Ascii
Synopsis
  • 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

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, …
newtypenewtype BE a

Big Endian value

Constructors

Instances18Eq, Ord, Show, Bits, PrimType, NormalForm, …

Integral convertion

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

classclass NormalForm a where

Data that can be fully evaluated in Normal Form

Methods

Instances70NormalForm, …

These

datadata These a b

Either a or b or both.

Constructors

Instances5Eq, Ord, Show, NormalForm, From

Block of memory

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

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 PrimSize Char7 = 1Defined in basement-0.0.16 · Basement.PrimType
  • type NatNumMaxBound Char7 = 127Defined in basement-0.0.16 · Basement.Nat
newtypenewtype AsciiString

Opaque packed array of characters in the ASCII encoding

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