HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulelinear-base-0.4.0Haskell2010

Prelude.Linear.Internal

This is a very very simple prelude, which doesn't depend on anything else in the linear-base library.

  • 12 values
value(.) :: (b %1 -> c) %q -> (a %1 -> b) %m -> a %n -> c
#

Beware: (.) is not compatible with the standard one because it is higher-order and we don't have sufficient multiplicity polymorphism yet.

valuerunIdentity' :: Identity a %p -> a
#
value($) :: (a %p -> b) %q -> a %p -> b
#
valueforget :: (a %1 -> b) %1 -> a -> b
#

Convenience operator when a higher-order function expects a non-linear arrow but we have a linear arrow.

value(&) :: a %p -> (a %p -> b) %q -> b
#
valuecurry :: ((a, b) %p -> c) %q -> a %p -> b %p -> c
#
valueuncurry :: (a %p -> b %p -> c) %q -> (a, b) %p -> c
#
valueid :: a %q -> a
#
valueconst :: a %q -> b -> a
#
valueseq :: a -> b %q -> b
#

seq x y only forces x to head normal form, therefore is not guaranteed to consume x when the resulting computation is consumed. Therefore, seq cannot be linear in it's first argument.

value($!) :: (a %p -> b) %q -> a %p -> b
#