HORIZON HASKELLDocslts/ghc-10.0.xc7d136e2026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · c7d136e · 2026-10-12

Modulevector-stream-0.1.0.1

Data.Stream.Monadic

  • 4 types
  • 113 values
datadata SPEC
#

SPEC is used by GHC in the SpecConstr pass in order to inform the compiler when to be particularly aggressive. In particular, it tells GHC to specialize regardless of size or the number of specializations. However, not all loops fall into this category.

Libraries can specify this by using SPEC data type to inform which loops should be aggressively specialized. For example, instead of

loop x where loop arg = ...

write

loop SPEC x where loop !_ arg = ...

There is no semantic difference between SPEC and SPEC2, we just need a type with two constructors lest it is optimised away before SpecConstr.

This type is reexported from GHC.Exts since GHC 9.0 and base-4.15. For compatibility with earlier releases import it from GHC.Internal.Types in ghc-internal package.

datadata Box a
#

Constructors

Instances3Monad, Functor, Applicative
  • Monad BoxDefined in vector-stream-0.1.0.1 · Data.Stream.Monadic
  • Functor BoxDefined in vector-stream-0.1.0.1 · Data.Stream.Monadic
  • Applicative BoxDefined in vector-stream-0.1.0.1 · Data.Stream.Monadic