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

Modulelinear-base-0.4.0Haskell2010

Data.Unrestricted.Linear

This module provides essential tools for doing non-linear things in linear code.

Critical Definition: Restricted

In a linear function f :: a %1-> b, the argument a must be used in a linear way. Its use is restricted while an argument in a non-linear function is unrestricted.

Hence, a linear function with an argument of Ur a (Ur is short for unrestricted) can use the a in an unrestricted way. That is, we have the following equivalence:

(Ur a %1-> b) ≌ (a -> b)

Consumable, Dupable, Moveable classes

Use these classes to perform some non-linear action on linearly bound values.

If a type is Consumable, you can consume it in a linear function that doesn't need that value to produce it's result:

fst :: Consumable b => (a,b) %1-> a
fst (a,b) = withConsume (consume b) a
  where
    withConsume :: () %1-> a %1-> a
    withConsume () x = x

If a type is Dupable, you can duplicate it as much as you like.

-- checkIndex ix size_of_array
checkIndex :: Int %1-> Int %1-> Bool
checkIndex ix size = withDuplicate (dup2 ix) size
  where
    withDuplicate :: (Int, Int) %1-> Int %1-> Bool
    withDuplicate (ix,ix') size = (0 <= ix) && (ix < size)
    (<) :: Int %1-> Int %1-> Bool
    (<) = ...

    (<=) :: Int %1-> Int %1-> Bool
    (<=) = ...

    (&&) :: Bool %1-> Bool %1-> Bool
    (&&) = ...

If a type is Moveable, you can move it inside Ur and use it in any non-linear way you would like.

diverge :: Int %1-> Bool
diverge ix = fromMove (move ix)
  where
    fromMove :: Ur Int %1-> Bool
    fromMove (Ur 0) = True
    fromMove (Ur 1) = True
    fromMove (Ur x) = False
  • 2 types
  • 3 classes
  • 13 values

Unrestricted

8 declarations
datadata Ur a where
#

Ur a represents unrestricted values of type a in a linear context. The key idea is that because the contructor holds a with a regular arrow, a function that uses Ur a linearly can use a however it likes.

someLinear :: Ur a %1-> (a,a)
someLinear (Ur a) = (a,a)

Constructors

Instances24Monad, Foldable, Traversable, Functor, Applicative, Generic1, …
  • Monad UrDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Ur
  • Functor UrDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Ur
  • Applicative UrDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Ur
  • Foldable UrDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Ur
  • Traversable UrDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Ur
  • Functor UrDefined in linear-base-0.4.0 · Data.Functor.Linear.Internal.Functor
  • Applicative UrDefined in linear-base-0.4.0 · Data.Functor.Linear.Internal.Applicative
  • Generic1 UrDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Ur
  • Generic1 UrDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Ur
  • Generic (Ur a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Ur
  • Storable a => Storable (Ur a)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.Internal · orphan
  • Generic (Ur a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Ur
  • Monoid a => Monoid (Ur a)Defined in linear-base-0.4.0 · Data.Monoid.Linear.Internal.Monoid

    Useful to treat unrestricted monoids as linear ones.

  • Consumable (Ur a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Dupable (Ur a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Semigroup a => Semigroup (Ur a)Defined in linear-base-0.4.0 · Data.Monoid.Linear.Internal.Semigroup

    Useful to treat unrestricted semigroups as linear ones.

  • Movable (Ur a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Eq a => Eq (Ur a)Defined in linear-base-0.4.0 · Data.Ord.Linear.Internal.Eq
  • Ord a => Ord (Ur a)Defined in linear-base-0.4.0 · Data.Ord.Linear.Internal.Ord
  • KnownRepresentable a => KnownRepresentable (Ur a)Defined in linear-base-0.4.0 · Foreign.Marshal.Pure.Internal
  • type Rep (Ur a) = D1 ('MetaData "Ur" "Data.Unrestricted.Linear.Internal.Ur" "linear-base-0.4.0-D8wukxS5KYmLhv3s1GSepB" 'False) (C1 ('MetaCons "Ur" 'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Ur
  • type Rep1 Ur = D1 ('MetaData "Ur" "Data.Unrestricted.Linear.Internal.Ur" "linear-base-0.4.0-D8wukxS5KYmLhv3s1GSepB" 'False) (C1 ('MetaCons "Ur" 'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Ur
  • type Rep (Ur a) = FixupMetaData (Ur a) (D1 Any (C1 Any (S1 Any (MP1 'Many (Rec0 a)))))Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Ur
  • type Rep1 Ur = FixupMetaData1 Ur (D1 Any (C1 Any (S1 Any (MP1 'Many Par1))))Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Ur
valueunur :: Ur a %1 -> a
#

Get an a out of an Ur a. If you call this function on a linearly bound Ur a, then the a you get out has to be used linearly, for example:

restricted :: Ur a %1-> b
restricted x = f (unur x)
  where
    -- f __must__ be linear
    f :: a %1-> b
    f x = ...
valuelift :: (a -> b) -> Ur a %1 -> Ur b
#

Lifts a function on a linear Ur a.

valuelift2 :: (a -> b -> c) -> Ur a %1 -> Ur b %1 -> Ur c
#

Lifts a function to work on two linear Ur a.

newtypenewtype UrT (m :: Type -> Type) a
#

UrT transforms linear control monads to non-linear monads.

  • UrT (State s) a is a non-linear monad with linear state.

Constructors

Instances3Monad, Functor, Applicative
  • Monad m => Monad (UrT m)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.UrT
  • Functor m => Functor (UrT m)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.UrT
  • Applicative m => Applicative (UrT m)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.UrT
valuerunUrT :: UrT m a %1 -> m (Ur a)
#

Linearly unwrap the UrT newtype wrapper.

valueliftUrT :: (Movable a, Functor m) => m a %1 -> UrT m a
#

Lift a computation to the UrT monad, provided that the type a can be used unrestricted.

valueevalUrT :: Functor m => UrT m a %1 -> m a
#

Extract the inner computation linearly, the inverse of liftUrT.

evalUrT (liftUrT m) = m

Performing non-linear actions on linearly bound values

10 declarations
classclass Consumable a where
#

Methods

Instances55Consumable, …
  • Consumable VoidDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable AllDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable AnyDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable Int16Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Consumable Int32Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Consumable Int64Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Consumable Int8Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Consumable Word16Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Consumable Word32Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Consumable Word64Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Consumable Word8Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Consumable BoolDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable CharDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable DoubleDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable FloatDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable IntDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable OrderingDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable WordDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable PoolDefined in linear-base-0.4.0 · Foreign.Marshal.Pure.Internal
  • Consumable ()Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable (Array a)Defined in linear-base-0.4.0 · Data.Array.Mutable.Linear.Internal
  • Consumable (Replicator a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable (ReplicationStream a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable (Set a)Defined in linear-base-0.4.0 · Data.Set.Mutable.Linear.Internal
  • Consumable (Ur a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable (Vector a)Defined in linear-base-0.4.0 · Data.Vector.Mutable.Linear.Internal
  • Consumable a => Consumable (First a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable a => Consumable (Last a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable a => Consumable (Max a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable a => Consumable (Min a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable a => Consumable (WrappedMonoid a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable a => Consumable (NonEmpty a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable a => Consumable (First a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable a => Consumable (Last a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable a => Consumable (Dual a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable a => Consumable (Product a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable a => Consumable (Sum a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable a => Consumable (Maybe a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable a => Consumable (MovableNum a)Defined in linear-base-0.4.0 · Data.Num.Linear
  • Consumable a => Consumable (Vector a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable a => Consumable (a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable a => Consumable [a]Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Movable a => Consumable (AsMovable a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances
  • (Generic a, GConsumable (Rep a)) => Consumable (Generically a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable (HashMap k v)Defined in linear-base-0.4.0 · Data.HashMap.Mutable.Linear.Internal
  • Consumable (V 0 a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • (KnownNat n, Consumable a) => Consumable (V n a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • (Consumable a, Consumable b) => Consumable (Arg a b)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • (Consumable a, Consumable b) => Consumable (a, b)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • (Consumable e, Consumable a) => Consumable (Either e a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable (f a) => Consumable (Ap f a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Consumable (f a) => Consumable (Alt f a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • (Consumable a, Consumable b, Consumable c) => Consumable (a, b, c)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • (Consumable a, Consumable b, Consumable c, Consumable d) => Consumable (a, b, c, d)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • (Consumable a, Consumable b, Consumable c, Consumable d, Consumable e) => Consumable (a, b, c, d, e)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
classclass Consumable a => Dupable a where
#

The laws of Dupable are dual to those of Monoid:

  • 1. first consume (dup2 a) ≃ a ≃ second consume (dup2 a) (dup2 neutrality)

  • 2. first dup2 (dup2 a) ≃ (second dup2 (dup2 a)) (dup2 associativity)

where the (≃) sign represents equality up to type isomorphism.

  • 3. dup2 = Replicator.elim (,) . dupR (coherence between dup2 and dupR)

  • 4. consume = Replicator.elim () . dupR (coherence between consume and dupR)

  • 5. Replicator.extract . dupR = id (dupR identity)

  • 6. dupR . dupR = (Replicator.map dupR) . dupR (dupR interchange)

(Laws 1-2 and 5-6 are equivalent)

Implementation of Dupable for Data.Unrestricted.Movable types should be done with deriving via Data.Unrestricted.AsMovable.

Implementation of Dupable for other types can be done with deriving via Generically. Note that at present this mechanism can have performance problems for recursive parameterized types. Specifically, the methods will not specialize to underlying Dupable instances. See this GHC issue.

Methods

  • dupR :: a %1 -> Replicator a

    Creates a Replicator for the given a.

    You usually want to define this method using Replicator's Applicative instance. For instance, here is an implementation of Dupable [a]:

    instance Dupable a => Dupable [a] where
      dupR [] = pure []
      dupR (a : as) = (:) <$> dupR a <*> dupR as
  • dup2 :: a %1 -> (a, a)

    Creates two as from a Dupable a, in a linear fashion.

Instances41Dupable, …
  • Dupable AllDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable AnyDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable Int16Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Dupable Int32Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Dupable Int64Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Dupable Int8Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Dupable Word16Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Dupable Word32Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Dupable Word64Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Dupable Word8Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Dupable BoolDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable CharDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable DoubleDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable FloatDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable IntDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable OrderingDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable WordDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable PoolDefined in linear-base-0.4.0 · Foreign.Marshal.Pure.Internal
  • Dupable ()Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable (Array a)Defined in linear-base-0.4.0 · Data.Array.Mutable.Linear.Internal
  • Dupable (Replicator a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable (ReplicationStream a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable (Set a)Defined in linear-base-0.4.0 · Data.Set.Mutable.Linear.Internal
  • Dupable (Ur a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable (Vector a)Defined in linear-base-0.4.0 · Data.Vector.Mutable.Linear.Internal
  • Dupable a => Dupable (NonEmpty a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable a => Dupable (Product a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable a => Dupable (Sum a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable a => Dupable (Maybe a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable a => Dupable (MovableNum a)Defined in linear-base-0.4.0 · Data.Num.Linear
  • Dupable a => Dupable (a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable a => Dupable [a]Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Movable a => Dupable (AsMovable a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances
  • (Generic a, GDupable (Rep a)) => Dupable (Generically a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Dupable (HashMap k v)Defined in linear-base-0.4.0 · Data.HashMap.Mutable.Linear.Internal
  • (KnownNat n, Dupable a) => Dupable (V n a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • (Dupable a, Dupable b) => Dupable (Either a b)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • (Dupable a, Dupable b) => Dupable (a, b)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • (Dupable a, Dupable b, Dupable c) => Dupable (a, b, c)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • (Dupable a, Dupable b, Dupable c, Dupable d) => Dupable (a, b, c, d)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • (Dupable a, Dupable b, Dupable c, Dupable d, Dupable e) => Dupable (a, b, c, d, e)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
classclass Dupable a => Movable a where
#

Use Movable a to represent a type which can be used many times even when given linearly. Simple data types such as Bool or [] are Movable. Though, bear in mind that this typically induces a deep copy of the value.

Formally, Movable a is the class of coalgebras of the Ur comonad. That is

  • unur (move x) = x
  • move @(Ur a) (move @a x) = fmap (move @a) $ move @a x

Additionally, a Movable instance must be compatible with its Dupable parent instance. That is:

  • case move x of {Ur _ -> ()} = consume x
  • case move x of {Ur x -> (x, x)} = dup2 x

Methods

Instances33Movable, …
  • Movable AllDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable AnyDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable Int16Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Movable Int32Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Movable Int64Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Movable Int8Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Movable Word16Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Movable Word32Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Movable Word64Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Movable Word8Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances · orphan
  • Movable BoolDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable CharDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable DoubleDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable FloatDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable IntDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable OrderingDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable WordDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable ()Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable (Ur a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable a => Movable (NonEmpty a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable a => Movable (Product a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable a => Movable (Sum a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable a => Movable (Maybe a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable a => Movable (MovableNum a)Defined in linear-base-0.4.0 · Data.Num.Linear
  • Movable a => Movable (AsMovable a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Instances
  • Movable a => Movable (a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Movable a => Movable [a]Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • (Generic a, GMovable (Rep a)) => Movable (Generically a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • (Movable a, Movable b) => Movable (Either a b)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • (Movable a, Movable b) => Movable (a, b)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • (Movable a, Movable b, Movable c) => Movable (a, b, c)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • (Movable a, Movable b, Movable c, Movable d) => Movable (a, b, c, d)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • (Movable a, Movable b, Movable c, Movable d, Movable e) => Movable (a, b, c, d, e)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
valuelseq :: Consumable a => a %1 -> b %1 -> b
#

Consume the first argument and return the second argument. This is like seq but the first argument is restricted to be Consumable.

valuedup3 :: Dupable a => a %1 -> (a, a, a)
#

Creates 3 as from a Dupable a, in a linear fashion.

valuedup4 :: Dupable a => a %1 -> (a, a, a, a)
#

Creates 4 as from a Dupable a, in a linear fashion.

valuedup5 :: Dupable a => a %1 -> (a, a, a, a, a)
#

Creates 5 as from a Dupable a, in a linear fashion.

valuedup6 :: Dupable a => a %1 -> (a, a, a, a, a, a)
#

Creates 6 as from a Dupable a, in a linear fashion.

valuedup7 :: Dupable a => a %1 -> (a, a, a, a, a, a, a)
#

Creates 7 as from a Dupable a, in a linear fashion.