io-sim-1.2.0.0: A pure simulator for monadic concurrency with STM.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.List.Trace

Synopsis

Documentation

data Trace a b Source #

A cons list with polymorphic nil.

  • Trace Void a is an infinite stream
  • Trace () a is isomorphic to [a]

Usually used with a being a non empty sum type.

Constructors

Cons b (Trace a b) 
Nil a 

Instances

Instances details
Bifoldable Trace Source # 
Instance details

Defined in Data.List.Trace

Methods

bifold :: Monoid m => Trace m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Trace a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Trace a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Trace a b -> c #

Bifunctor Trace Source # 
Instance details

Defined in Data.List.Trace

Methods

bimap :: (a -> b) -> (c -> d) -> Trace a c -> Trace b d #

first :: (a -> b) -> Trace a c -> Trace b c #

second :: (b -> c) -> Trace a b -> Trace a c #

Bitraversable Trace Source # 
Instance details

Defined in Data.List.Trace

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Trace a b -> f (Trace c d) #

Monoid a => MonadFail (Trace a) Source # 
Instance details

Defined in Data.List.Trace

Methods

fail :: String -> Trace a a0 #

Monoid a => MonadFix (Trace a) Source # 
Instance details

Defined in Data.List.Trace

Methods

mfix :: (a0 -> Trace a a0) -> Trace a a0 #

Eq a => Eq1 (Trace a) Source # 
Instance details

Defined in Data.List.Trace

Methods

liftEq :: (a0 -> b -> Bool) -> Trace a a0 -> Trace a b -> Bool #

Ord a => Ord1 (Trace a) Source # 
Instance details

Defined in Data.List.Trace

Methods

liftCompare :: (a0 -> b -> Ordering) -> Trace a a0 -> Trace a b -> Ordering #

Show a => Show1 (Trace a) Source # 
Instance details

Defined in Data.List.Trace

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Trace a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Trace a a0] -> ShowS #

Monoid a => Alternative (Trace a) Source # 
Instance details

Defined in Data.List.Trace

Methods

empty :: Trace a a0 #

(<|>) :: Trace a a0 -> Trace a a0 -> Trace a a0 #

some :: Trace a a0 -> Trace a [a0] #

many :: Trace a a0 -> Trace a [a0] #

Monoid a => Applicative (Trace a) Source # 
Instance details

Defined in Data.List.Trace

Methods

pure :: a0 -> Trace a a0 #

(<*>) :: Trace a (a0 -> b) -> Trace a a0 -> Trace a b #

liftA2 :: (a0 -> b -> c) -> Trace a a0 -> Trace a b -> Trace a c #

(*>) :: Trace a a0 -> Trace a b -> Trace a b #

(<*) :: Trace a a0 -> Trace a b -> Trace a a0 #

Functor (Trace a) Source # 
Instance details

Defined in Data.List.Trace

Methods

fmap :: (a0 -> b) -> Trace a a0 -> Trace a b #

(<$) :: a0 -> Trace a b -> Trace a a0 #

Monoid a => Monad (Trace a) Source # 
Instance details

Defined in Data.List.Trace

Methods

(>>=) :: Trace a a0 -> (a0 -> Trace a b) -> Trace a b #

(>>) :: Trace a a0 -> Trace a b -> Trace a b #

return :: a0 -> Trace a a0 #

Monoid a => MonadPlus (Trace a) Source # 
Instance details

Defined in Data.List.Trace

Methods

mzero :: Trace a a0 #

mplus :: Trace a a0 -> Trace a a0 -> Trace a a0 #

Monoid a => Monoid (Trace a b) Source # 
Instance details

Defined in Data.List.Trace

Methods

mempty :: Trace a b #

mappend :: Trace a b -> Trace a b -> Trace a b #

mconcat :: [Trace a b] -> Trace a b #

Semigroup a => Semigroup (Trace a b) Source # 
Instance details

Defined in Data.List.Trace

Methods

(<>) :: Trace a b -> Trace a b -> Trace a b #

sconcat :: NonEmpty (Trace a b) -> Trace a b #

stimes :: Integral b0 => b0 -> Trace a b -> Trace a b #

(Show b, Show a) => Show (Trace a b) Source # 
Instance details

Defined in Data.List.Trace

Methods

showsPrec :: Int -> Trace a b -> ShowS #

show :: Trace a b -> String #

showList :: [Trace a b] -> ShowS #

(Eq b, Eq a) => Eq (Trace a b) Source # 
Instance details

Defined in Data.List.Trace

Methods

(==) :: Trace a b -> Trace a b -> Bool #

(/=) :: Trace a b -> Trace a b -> Bool #

(Ord b, Ord a) => Ord (Trace a b) Source # 
Instance details

Defined in Data.List.Trace

Methods

compare :: Trace a b -> Trace a b -> Ordering #

(<) :: Trace a b -> Trace a b -> Bool #

(<=) :: Trace a b -> Trace a b -> Bool #

(>) :: Trace a b -> Trace a b -> Bool #

(>=) :: Trace a b -> Trace a b -> Bool #

max :: Trace a b -> Trace a b -> Trace a b #

min :: Trace a b -> Trace a b -> Trace a b #

ppTrace :: (a -> String) -> (b -> String) -> Trace a b -> String Source #

Pretty print a Trace.

toList :: Trace a b -> [b] Source #

fromList :: a -> [b] -> Trace a b Source #

head :: Trace a b -> b Source #

tail :: Trace a b -> Trace a b Source #

filter :: (b -> Bool) -> Trace a b -> Trace a b Source #

length :: Trace a b -> Int Source #