{-# LANGUAGE LinearTypes #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Data.Tuple.Linear
(
fst
, snd
, swap
, curry
, uncurry
)
where
import Prelude.Linear.Internal
import Data.Unrestricted.Linear
fst :: Consumable b => (a,b) %1-> a
fst :: forall b a. Consumable b => (a, b) %1 -> a
fst (a
a,b
b) = b %1 -> a %1 -> a
forall a b. Consumable a => a %1 -> b %1 -> b
lseq b
b a
a
snd :: Consumable a => (a,b) %1-> b
snd :: forall a b. Consumable a => (a, b) %1 -> b
snd (a
a,b
b) = a %1 -> b %1 -> b
forall a b. Consumable a => a %1 -> b %1 -> b
lseq a
a b
b
swap :: (a,b) %1-> (b,a)
swap :: forall a b. (a, b) %1 -> (b, a)
swap (a
a,b
b) = (b
b,a
a)