-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A compiler for Copilot targeting C99.
--
-- This package is a back-end from Copilot to the Atom DSL.
--
-- Copilot is a stream (i.e., infinite lists) domain-specific language
-- (DSL) in Haskell that compiles into embedded C. Copilot contains an
-- interpreter, multiple back-end compilers, and other verification
-- tools. A tutorial, bug reports, and todos are available at
-- https://github.com/leepike/copilot-discussion.
--
-- Examples are available at
-- https://github.com/leepike/Copilot/tree/master/Examples.
@package copilot-c99
@version 2.2.0
module Copilot.Compile.C99.Common
mkTmpExtFunVarName :: Name -> Tag -> String
typeSpec :: Type a -> String
module Copilot.Compile.C99.Witness
data ExprInst a
ExprInst :: ExprInst a
exprInst :: Type a -> ExprInst a
data AssignInst a
AssignInst :: AssignInst a
assignInst :: Type a -> AssignInst a
data EqEInst a
EqEInst :: EqEInst a
eqEInst :: Eq a => Type a -> EqEInst a
data OrdEInst a
OrdEInst :: OrdEInst a
ordEInst :: Ord a => Type a -> OrdEInst a
data NumEInst a
NumEInst :: NumEInst a
numEInst :: Num a => Type a -> NumEInst a
data IntegralEInst a
IntegralEInst :: IntegralEInst a
integralEInst :: Integral a => Type a -> IntegralEInst a
data FloatingEInst a
FloatingEInst :: FloatingEInst a
floatingEInst :: Floating a => Type a -> FloatingEInst a
data BitsEInst a
BitsEInst :: BitsEInst a
bitsEInst :: Bits a => Type a -> BitsEInst a
module Copilot.Compile.C99.Queue
data Queue a
dropFirstElemAndSnoc :: Assign a => E a -> Queue a -> Atom ()
lookahead :: Expr a => Int -> Queue a -> E a
size :: Queue a -> QueueIndexType
queue :: Expr a => String -> [a] -> Atom (Queue a)
module Copilot.Compile.C99.MetaTable
data StreamInfo
StreamInfo :: Queue a -> V a -> Type a -> StreamInfo
[streamInfoQueue] :: StreamInfo -> Queue a
[streamInfoTempVar] :: StreamInfo -> V a
[streamInfoType] :: StreamInfo -> Type a
data ExternInfo
ExternInfo :: V a -> Type a -> ExternInfo
[externInfoVar] :: ExternInfo -> V a
[externInfoType] :: ExternInfo -> Type a
data ExternArrayInfo
ExternArrayInfo :: V b -> Expr a -> Type a -> Type b -> ExternArrayInfo
[externArrayInfoVar] :: ExternArrayInfo -> V b
[externArrayInfoIdxExpr] :: ExternArrayInfo -> Expr a
[externArrayInfoIdxType] :: ExternArrayInfo -> Type a
[externArrayInfoElemType] :: ExternArrayInfo -> Type b
data ExternFunInfo
ExternFunInfo :: [UExpr] -> V a -> Type a -> ExternFunInfo
[externFunInfoArgs] :: ExternFunInfo -> [UExpr]
[externFunInfoVar] :: ExternFunInfo -> V a
[externFunInfoType] :: ExternFunInfo -> Type a
type StreamInfoMap = Map Id StreamInfo
type ExternInfoMap = Map Name ExternInfo
type ExternFunInfoMap = Map (Name, Tag) ExternFunInfo
data MetaTable
MetaTable :: StreamInfoMap -> ExternInfoMap -> ExternArrayInfoMap -> ExternFunInfoMap -> MetaTable
[streamInfoMap] :: MetaTable -> StreamInfoMap
[externInfoMap] :: MetaTable -> ExternInfoMap
[externArrayInfoMap] :: MetaTable -> ExternArrayInfoMap
[externFunInfoMap] :: MetaTable -> ExternFunInfoMap
allocMetaTable :: Spec -> Atom MetaTable
module Copilot.Compile.C99.C2A
c2aExpr :: MetaTable -> Expr a -> E a
c2aType :: Type a -> Type
module Copilot.Compile.C99.Test.Iteration
newtype Iteration
Iteration :: (Map String [Output]) -> Iteration
[iterationOutputs] :: Iteration -> (Map String [Output])
execTraceToIterations :: ExecTrace -> [Iteration]
instance GHC.Classes.Eq Copilot.Compile.C99.Test.Iteration.Iteration
instance GHC.Show.Show Copilot.Compile.C99.Test.Iteration.Iteration
module Copilot.Compile.C99.Test.ReadCSV
iterationsFromCSV :: ByteString -> [Iteration]
module Copilot.Compile.C99.Test.Driver
driver :: Int -> Spec -> Text
module Copilot.Compile.C99.Params
data Params
Params :: Maybe String -> Bool -> Params
[prefix] :: Params -> Maybe String
[verbose] :: Params -> Bool
defaultParams :: Params
withPrefix :: Maybe String -> String -> String
module Copilot.Compile.C99.Phases
schedulePhases :: Params -> MetaTable -> Spec -> Atom ()
numberOfPhases :: Int
instance GHC.Show.Show Copilot.Compile.C99.Phases.Phase
instance GHC.Classes.Ord Copilot.Compile.C99.Phases.Phase
instance GHC.Enum.Enum Copilot.Compile.C99.Phases.Phase
instance GHC.Classes.Eq Copilot.Compile.C99.Phases.Phase
instance GHC.Enum.Bounded Copilot.Compile.C99.Phases.Phase
module Copilot.Compile.C99.PrePostCode
preCode :: Params -> Spec -> String
postCode :: Params -> Spec -> String
-- | Compile through the Atom backend.
module Copilot.Compile.C99
compile :: Params -> Spec -> IO ()
c99DirName :: String
c99FileRoot :: String
module Copilot.Compile.C99.Test.CheckSpec
checkSpec :: Int -> Spec -> IO Bool