HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulebasement-0.0.16Haskell2010

Basement.Compat.Primitive

  • 8 types
  • 43 values
  • Packagebasement-0.0.16
  • Exports51
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourcePrimitive.hs
valuecompatMkWeak#
  1. :: o
  2. -> b
  3. -> IO ()
  4. -> State# RealWorld
  5. -> (# State# RealWorld, Weak# b #)
#

A mkWeak# version that keep working on 8.0

signature change in ghc-prim: * 0.4: mkWeak# :: o -> b -> c -> State# RealWorld -> ( RealWorld, Weak# b#) * 0.5 :mkWeak# :: o -> b -> (State# RealWorld -> ( RealWorld, c#)) -> State# RealWorld -> ( RealWorld, Weak# b#)

valueunsafeCoerce# :: a -> b
#

Highly, terribly dangerous coercion from one representation type to another. Misuse of this function can invite the garbage collector to trounce upon your data and then laugh in your face. You don't want this function. Really.

This becomes more obvious when looking at its actual type: forall (r1 :: RuntimeRep) (r2 :: RuntimeRep) (a :: TYPE r1) (b :: TYPE r2). a -> b Which often get's rendered as a -> b in haddock for technical reasons.

datadata Word
#

A Word is an unsigned integral type, with the same size as Int.

Constructors

Instances63Bounded, Enum, Data, Num, Read, Real, …