linear-base-0.1.0: Standard library for linear types.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Unrestricted.Internal.Instances

Description

This module exports instances of Consumable, Dupable and Movable

We export instances in this module to avoid a circular dependence and keep things clean. Movable depends on the defintion of Ur yet many instances of Movable which we might have put in the module with Movable depend on Ur. So, we just put the instances of Movable and the other classes (for cleanness) in this module to avoid this dependence.

Documentation

Orphan instances

Functor Ur Source # 
Instance details

Methods

fmap :: (a -> b) -> Ur a -> Ur b #

(<$) :: a -> Ur b -> Ur a #

Applicative Ur Source # 
Instance details

Methods

pure :: a -> Ur a #

(<*>) :: Ur (a -> b) -> Ur a -> Ur b #

liftA2 :: (a -> b -> c) -> Ur a -> Ur b -> Ur c #

(*>) :: Ur a -> Ur b -> Ur b #

(<*) :: Ur a -> Ur b -> Ur a #

Foldable Ur Source # 
Instance details

Methods

fold :: Monoid m => Ur m -> m #

foldMap :: Monoid m => (a -> m) -> Ur a -> m #

foldMap' :: Monoid m => (a -> m) -> Ur a -> m #

foldr :: (a -> b -> b) -> b -> Ur a -> b #

foldr' :: (a -> b -> b) -> b -> Ur a -> b #

foldl :: (b -> a -> b) -> b -> Ur a -> b #

foldl' :: (b -> a -> b) -> b -> Ur a -> b #

foldr1 :: (a -> a -> a) -> Ur a -> a #

foldl1 :: (a -> a -> a) -> Ur a -> a #

toList :: Ur a -> [a] #

null :: Ur a -> Bool #

length :: Ur a -> Int #

elem :: Eq a => a -> Ur a -> Bool #

maximum :: Ord a => Ur a -> a #

minimum :: Ord a => Ur a -> a #

sum :: Num a => Ur a -> a #

product :: Num a => Ur a -> a #

Traversable Ur Source # 
Instance details

Methods

traverse :: Applicative f => (a -> f b) -> Ur a -> f (Ur b) #

sequenceA :: Applicative f => Ur (f a) -> f (Ur a) #

mapM :: Monad m => (a -> m b) -> Ur a -> m (Ur b) #

sequence :: Monad m => Ur (m a) -> m (Ur a) #

Consumable Bool Source # 
Instance details

Methods

consume :: Bool %1 -> () Source #

Consumable Char Source # 
Instance details

Methods

consume :: Char %1 -> () Source #

Consumable Double Source # 
Instance details

Methods

consume :: Double %1 -> () Source #

Consumable Int Source # 
Instance details

Methods

consume :: Int %1 -> () Source #

Consumable Ordering Source # 
Instance details

Methods

consume :: Ordering %1 -> () Source #

Consumable () Source # 
Instance details

Methods

consume :: () %1 -> () Source #

Consumable Any Source # 
Instance details

Methods

consume :: Any %1 -> () Source #

Consumable All Source # 
Instance details

Methods

consume :: All %1 -> () Source #

Functor Ur Source # 
Instance details

Methods

fmap :: (a %1 -> b) -> Ur a %1 -> Ur b Source #

Applicative Ur Source # 
Instance details

Methods

pure :: a -> Ur a Source #

(<*>) :: Ur (a %1 -> b) %1 -> Ur a %1 -> Ur b Source #

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

Dupable Bool Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => Bool %1 -> V n Bool Source #

dup2 :: Bool %1 -> (Bool, Bool) Source #

Dupable Char Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => Char %1 -> V n Char Source #

dup2 :: Char %1 -> (Char, Char) Source #

Dupable Double Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => Double %1 -> V n Double Source #

dup2 :: Double %1 -> (Double, Double) Source #

Dupable Int Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => Int %1 -> V n Int Source #

dup2 :: Int %1 -> (Int, Int) Source #

Dupable Ordering Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => Ordering %1 -> V n Ordering Source #

dup2 :: Ordering %1 -> (Ordering, Ordering) Source #

Dupable () Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => () %1 -> V n () Source #

dup2 :: () %1 -> ((), ()) Source #

Dupable Any Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => Any %1 -> V n Any Source #

dup2 :: Any %1 -> (Any, Any) Source #

Dupable All Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => All %1 -> V n All Source #

dup2 :: All %1 -> (All, All) Source #

Movable Bool Source # 
Instance details

Methods

move :: Bool %1 -> Ur Bool Source #

Movable Char Source # 
Instance details

Methods

move :: Char %1 -> Ur Char Source #

Movable Double Source # 
Instance details

Methods

move :: Double %1 -> Ur Double Source #

Movable Int Source # 
Instance details

Methods

move :: Int %1 -> Ur Int Source #

Movable Ordering Source # 
Instance details

Methods

move :: Ordering %1 -> Ur Ordering Source #

Movable () Source # 
Instance details

Methods

move :: () %1 -> Ur () Source #

Movable Any Source # 
Instance details

Methods

move :: Any %1 -> Ur Any Source #

Movable All Source # 
Instance details

Methods

move :: All %1 -> Ur All Source #

Consumable a => Consumable [a] Source # 
Instance details

Methods

consume :: [a] %1 -> () Source #

Consumable a => Consumable (Maybe a) Source # 
Instance details

Methods

consume :: Maybe a %1 -> () Source #

Consumable a => Consumable (Sum a) Source # 
Instance details

Methods

consume :: Sum a %1 -> () Source #

Consumable a => Consumable (Product a) Source # 
Instance details

Methods

consume :: Product a %1 -> () Source #

Consumable a => Consumable (NonEmpty a) Source # 
Instance details

Methods

consume :: NonEmpty a %1 -> () Source #

Consumable (Ur a) Source # 
Instance details

Methods

consume :: Ur a %1 -> () Source #

Dupable a => Dupable [a] Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => [a] %1 -> V n [a] Source #

dup2 :: [a] %1 -> ([a], [a]) Source #

Dupable a => Dupable (Maybe a) Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => Maybe a %1 -> V n (Maybe a) Source #

dup2 :: Maybe a %1 -> (Maybe a, Maybe a) Source #

Dupable a => Dupable (Sum a) Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => Sum a %1 -> V n (Sum a) Source #

dup2 :: Sum a %1 -> (Sum a, Sum a) Source #

Dupable a => Dupable (Product a) Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => Product a %1 -> V n (Product a) Source #

dup2 :: Product a %1 -> (Product a, Product a) Source #

Dupable a => Dupable (NonEmpty a) Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => NonEmpty a %1 -> V n (NonEmpty a) Source #

dup2 :: NonEmpty a %1 -> (NonEmpty a, NonEmpty a) Source #

Dupable (Ur a) Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => Ur a %1 -> V n (Ur a) Source #

dup2 :: Ur a %1 -> (Ur a, Ur a) Source #

Movable a => Movable [a] Source # 
Instance details

Methods

move :: [a] %1 -> Ur [a] Source #

Movable a => Movable (Maybe a) Source # 
Instance details

Methods

move :: Maybe a %1 -> Ur (Maybe a) Source #

Movable a => Movable (Sum a) Source # 
Instance details

Methods

move :: Sum a %1 -> Ur (Sum a) Source #

Movable a => Movable (Product a) Source # 
Instance details

Methods

move :: Product a %1 -> Ur (Product a) Source #

Movable a => Movable (NonEmpty a) Source # 
Instance details

Methods

move :: NonEmpty a %1 -> Ur (NonEmpty a) Source #

Movable (Ur a) Source # 
Instance details

Methods

move :: Ur a %1 -> Ur (Ur a) Source #

(Consumable a, Consumable b) => Consumable (Either a b) Source # 
Instance details

Methods

consume :: Either a b %1 -> () Source #

(Consumable a, Consumable b) => Consumable (a, b) Source # 
Instance details

Methods

consume :: (a, b) %1 -> () Source #

(Dupable a, Dupable b) => Dupable (Either a b) Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => Either a b %1 -> V n (Either a b) Source #

dup2 :: Either a b %1 -> (Either a b, Either a b) Source #

(Dupable a, Dupable b) => Dupable (a, b) Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => (a, b) %1 -> V n (a, b) Source #

dup2 :: (a, b) %1 -> ((a, b), (a, b)) Source #

(Movable a, Movable b) => Movable (Either a b) Source # 
Instance details

Methods

move :: Either a b %1 -> Ur (Either a b) Source #

(Movable a, Movable b) => Movable (a, b) Source # 
Instance details

Methods

move :: (a, b) %1 -> Ur (a, b) Source #

(Consumable a, Consumable b, Consumable c) => Consumable (a, b, c) Source # 
Instance details

Methods

consume :: (a, b, c) %1 -> () Source #

(Dupable a, Dupable b, Dupable c) => Dupable (a, b, c) Source # 
Instance details

Methods

dupV :: forall (n :: Nat). KnownNat n => (a, b, c) %1 -> V n (a, b, c) Source #

dup2 :: (a, b, c) %1 -> ((a, b, c), (a, b, c)) Source #

(Movable a, Movable b, Movable c) => Movable (a, b, c) Source # 
Instance details

Methods

move :: (a, b, c) %1 -> Ur (a, b, c) Source #