-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A Haskell-embedded DSL for monitoring hard real-time distributed systems. -- -- Blah blah blah... @package copilot-language @version 0.3 -- | Reexports Prelude from package base hiding identifiers -- redefined by Copilot. module Copilot.Language.Prelude module Copilot.Language.Operators.BitWise -- | The Bits class defines bitwise operations over integral types. -- -- -- -- Minimal complete definition: .&., .|., xor, -- complement, (shift or (shiftL and -- shiftR)), (rotate or (rotateL and -- rotateR)), bitSize and isSigned. class Num a => Bits a (.&.) :: Bits a => a -> a -> a (.|.) :: Bits a => a -> a -> a complement :: Bits a => a -> a (.^.) :: Bits a => a -> a -> a (.<<., .>>.) :: (Bits a, Typed a, Typed b, Integral b) => Stream a -> Stream b -> Stream a instance (Typed a, Bits a) => Bits (Stream a) module Copilot.Language.Operators.Temporal (++) :: Typed a => [a] -> Stream a -> Stream a drop :: Typed a => Int -> Stream a -> Stream a module Copilot.Language.Operators.Ord (<=) :: (Ord a, Typed a) => Stream a -> Stream a -> Stream Bool (>=) :: (Ord a, Typed a) => Stream a -> Stream a -> Stream Bool (<) :: (Ord a, Typed a) => Stream a -> Stream a -> Stream Bool (>) :: (Ord a, Typed a) => Stream a -> Stream a -> Stream Bool -- | if-then-else. module Copilot.Language.Operators.Mux mux :: Typed a => Stream Bool -> Stream a -> Stream a -> Stream a ifThenElse :: Typed a => Stream Bool -> Stream a -> Stream a -> Stream a module Copilot.Language.Operators.Integral div :: (Typed a, Integral a) => Stream a -> Stream a -> Stream a mod :: (Typed a, Integral a) => Stream a -> Stream a -> Stream a (^) :: (Typed a, Typed b, Num a, Bits a, Integral b) => Stream a -> Stream b -> Stream a module Copilot.Language.Operators.Local local :: (Typed a, Typed b) => Stream a -> (Stream a -> Stream b) -> Stream b module Copilot.Language.Operators.Extern extern :: Typed a => String -> Maybe [a] -> Stream a externB :: String -> Maybe [Bool] -> Stream Bool externW8 :: String -> Maybe [Word8] -> Stream Word8 externW16 :: String -> Maybe [Word16] -> Stream Word16 externW32 :: String -> Maybe [Word32] -> Stream Word32 externW64 :: String -> Maybe [Word64] -> Stream Word64 externI8 :: String -> Maybe [Int8] -> Stream Int8 externI16 :: String -> Maybe [Int16] -> Stream Int16 externI32 :: String -> Maybe [Int32] -> Stream Int32 externI64 :: String -> Maybe [Int64] -> Stream Int64 externF :: String -> Maybe [Float] -> Stream Float externD :: String -> Maybe [Double] -> Stream Double data FunArg externFun :: Typed a => String -> [FunArg] -> Maybe (Stream a) -> Stream a externArray :: (Typed a, Typed b, Integral a) => String -> Stream a -> Size -> Maybe [[b]] -> Stream b externArrayB :: (Typed a, Integral a) => String -> Stream a -> Size -> Maybe [[Bool]] -> Stream Bool externArrayW8 :: (Typed a, Integral a) => String -> Stream a -> Size -> Maybe [[Word8]] -> Stream Word8 externArrayW16 :: (Typed a, Integral a) => String -> Stream a -> Size -> Maybe [[Word16]] -> Stream Word16 externArrayW32 :: (Typed a, Integral a) => String -> Stream a -> Size -> Maybe [[Word32]] -> Stream Word32 externArrayW64 :: (Typed a, Integral a) => String -> Stream a -> Size -> Maybe [[Word64]] -> Stream Word64 externArrayI8 :: (Typed a, Integral a) => String -> Stream a -> Size -> Maybe [[Int8]] -> Stream Int8 externArrayI16 :: (Typed a, Integral a) => String -> Stream a -> Size -> Maybe [[Int16]] -> Stream Int16 externArrayI32 :: (Typed a, Integral a) => String -> Stream a -> Size -> Maybe [[Int32]] -> Stream Int32 externArrayI64 :: (Typed a, Integral a) => String -> Stream a -> Size -> Maybe [[Int64]] -> Stream Int64 externArrayF :: (Typed a, Integral a) => String -> Stream a -> Size -> Maybe [[Float]] -> Stream Float externArrayD :: (Typed a, Integral a) => String -> Stream a -> Size -> Maybe [[Double]] -> Stream Double funArg :: Typed a => Stream a -> FunArg module Copilot.Language.Operators.Eq (==) :: (Eq a, Typed a) => Stream a -> Stream a -> Stream Bool (/=) :: (Eq a, Typed a) => Stream a -> Stream a -> Stream Bool -- | Constants. module Copilot.Language.Operators.Constant constant :: Typed a => a -> Stream a constB :: Bool -> Stream Bool constW8 :: Word8 -> Stream Word8 constW16 :: Word16 -> Stream Word16 constW32 :: Word32 -> Stream Word32 constW64 :: Word64 -> Stream Word64 constI8 :: Int8 -> Stream Int8 constI16 :: Int16 -> Stream Int16 constI32 :: Int32 -> Stream Int32 constI64 :: Int64 -> Stream Int64 constF :: Float -> Stream Float constD :: Double -> Stream Double -- | Type-safe casting operators. module Copilot.Language.Operators.Cast cast :: (Cast a b, Typed a, Typed b) => Stream a -> Stream b instance Cast Int64 Int64 instance Cast Int32 Int64 instance Cast Int32 Int32 instance Cast Int16 Int64 instance Cast Int16 Int32 instance Cast Int16 Int16 instance Cast Int8 Int64 instance Cast Int8 Int32 instance Cast Int8 Int16 instance Cast Int8 Int8 instance Cast Word64 Word64 instance Cast Word32 Int64 instance Cast Word32 Word64 instance Cast Word32 Word32 instance Cast Word16 Int64 instance Cast Word16 Int32 instance Cast Word16 Word64 instance Cast Word16 Word32 instance Cast Word16 Word16 instance Cast Word8 Int64 instance Cast Word8 Int32 instance Cast Word8 Int16 instance Cast Word8 Word64 instance Cast Word8 Word32 instance Cast Word8 Word16 instance Cast Word8 Word8 instance Cast Bool Int64 instance Cast Bool Int32 instance Cast Bool Int16 instance Cast Bool Int8 instance Cast Bool Word64 instance Cast Bool Word32 instance Cast Bool Word16 instance Cast Bool Word8 instance Cast Bool Bool module Copilot.Language.Operators.Boolean (&&) :: Stream Bool -> Stream Bool -> Stream Bool (||) :: Stream Bool -> Stream Bool -> Stream Bool not :: Stream Bool -> Stream Bool true :: Stream Bool false :: Stream Bool xor :: Stream Bool -> Stream Bool -> Stream Bool (==>) :: Stream Bool -> Stream Bool -> Stream Bool module Copilot.Language.Error impossible :: String -> String -> a badUsage :: String -> a -- | Transforms a Copilot Language specification into a Copilot Core -- specification. module Copilot.Language.Reify reify :: Spec -> IO Spec -- | The interpreter. module Copilot.Language.Interpret csv :: Integer -> Spec -> IO () -- | Much slower, but pretty-printed interpreter output. interpret :: Integer -> Spec -> IO () -- | Main Copilot language export file. module Copilot.Language type Spec = Writer [SpecItem] () data Stream :: * -> * observer :: Typed a => String -> Stream a -> Spec trigger :: String -> Stream Bool -> [TriggerArg] -> Spec arg :: Typed a => Stream a -> TriggerArg prettyPrint :: Spec -> IO () module Copilot