Copyright | (c) 2011 National Institute of Aerospace / Galois Inc. |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This is a convenience module that re-exports a useful subset of modules from
copilot-library
. Not all modules are exported due to name clashes (e.g.,
in temporal logics implementations).
Synopsis
- module Copilot.Library.Clocks
- module Copilot.Library.LTL
- module Copilot.Library.PTLTL
- module Copilot.Library.Statistics
- module Copilot.Library.RegExp
- take :: (Integral a, Typed b) => a -> Stream b -> [Stream b]
- cycle :: Typed a => [a] -> Stream a
- tails :: Typed a => Stream a -> [Stream a]
- (!!!) :: (Typed a, Eq b, Num b, Typed b) => [Stream a] -> Stream b -> Stream a
- nfoldl :: (Typed a, Typed b) => Int -> (Stream a -> Stream b -> Stream a) -> Stream a -> Stream b -> Stream a
- nfoldl1 :: Typed a => Int -> (Stream a -> Stream a -> Stream a) -> Stream a -> Stream a
- nfoldr :: (Typed a, Typed b) => Int -> (Stream a -> Stream b -> Stream b) -> Stream b -> Stream a -> Stream b
- nfoldr1 :: Typed a => Int -> (Stream a -> Stream a -> Stream a) -> Stream a -> Stream a
- nscanl :: (Typed a, Typed b) => Int -> (Stream a -> Stream b -> Stream a) -> Stream a -> Stream b -> [Stream a]
- nscanr :: Typed a => Int -> (Stream a -> Stream b -> Stream b) -> Stream b -> Stream a -> [Stream b]
- nscanl1 :: Typed a => Int -> (Stream a -> Stream a -> Stream a) -> Stream a -> [Stream a]
- nscanr1 :: Typed a => Int -> (Stream a -> Stream a -> Stream a) -> Stream a -> [Stream a]
- case' :: Typed a => [Stream Bool] -> [Stream a] -> Stream a
- module Copilot.Library.Voting
- module Copilot.Library.Stacks
Documentation
module Copilot.Library.Clocks
module Copilot.Library.LTL
module Copilot.Library.PTLTL
module Copilot.Library.Statistics
module Copilot.Library.RegExp
take :: (Integral a, Typed b) => a -> Stream b -> [Stream b] Source #
Given a stream and a number, produce a finite list of streams dropping an
increasing number of elements of the given stream, up to that number. For
example, for a given stream s
, the expression take 2 s
is equal to
[ drop 0 s, drop 1 s]
.
tails :: Typed a => Stream a -> [Stream a] Source #
Given a stream, produce an infinite list of streams dropping an increasing
number of elements of the given stream. For example, for a given stream s
,
the expression tails s
is equal to [ drop 0 s, drop 1 s, drop 2 s, ...]
.
(!!!) :: (Typed a, Eq b, Num b, Typed b) => [Stream a] -> Stream b -> Stream a Source #
Index.
WARNING: Very expensive! Consider using this only for very short lists.
nfoldl :: (Typed a, Typed b) => Int -> (Stream a -> Stream b -> Stream a) -> Stream a -> Stream b -> Stream a Source #
Given a number, a function on streams, and two streams, fold from the left the function over the finite list of tails of the second stream (up to the given number).
nfoldl1 :: Typed a => Int -> (Stream a -> Stream a -> Stream a) -> Stream a -> Stream a Source #
Given a number, a function on streams, and two streams, fold from the left the function over the finite list of tails of the second stream (up to the given number).
This function differs from nfoldl
in that it does not require an initial
accumulator and it assumes the argument number n
is positive.
nfoldr :: (Typed a, Typed b) => Int -> (Stream a -> Stream b -> Stream b) -> Stream b -> Stream a -> Stream b Source #
Given a number, a function on streams, and two streams, fold from the right the function over the finite list of tails of the second stream (up to the given number).
nfoldr1 :: Typed a => Int -> (Stream a -> Stream a -> Stream a) -> Stream a -> Stream a Source #
Given a number, a function on streams, and two streams, fold from the right the function over the finite list of tails of the second stream (up to the given number).
This function differs from nfoldr
in that it does not require an initial
accumulator and it assumes the argument number n
is positive.
nscanl :: (Typed a, Typed b) => Int -> (Stream a -> Stream b -> Stream a) -> Stream a -> Stream b -> [Stream a] Source #
Given a number, a function on streams, and two streams, fold from the left the function over the finite list of tails of the second stream (up to the given number).
This function differs from nfoldl
in that it returns the intermediate
results as well.
nscanr :: Typed a => Int -> (Stream a -> Stream b -> Stream b) -> Stream b -> Stream a -> [Stream b] Source #
Given a number, a function on streams, and two streams, fold from the right the function over the finite list of tails of the second stream (up to the given number).
This function differs from nfoldr
in that it returns the intermediate
results as well.
nscanl1 :: Typed a => Int -> (Stream a -> Stream a -> Stream a) -> Stream a -> [Stream a] Source #
Given a number, a function on streams, and two streams, fold from the left the function over the finite list of tails of the second stream (up to the given number).
This function assumes the number of elements to scan is positive, and it also returns the intermediate results.
nscanr1 :: Typed a => Int -> (Stream a -> Stream a -> Stream a) -> Stream a -> [Stream a] Source #
Given a number, a function on streams, and two streams, fold from the right the function over the finite list of tails of the second stream (up to the given number).
This function assumes the number of elements to scan is positive, and it also returns the intermediate results.
case' :: Typed a => [Stream Bool] -> [Stream a] -> Stream a Source #
Case-like function: The index of the first predicate that is true in the predicate list selects the stream result. If no predicate is true, the last element is chosen (default element)
module Copilot.Library.Voting
module Copilot.Library.Stacks