-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A stream DSL for writing embedded C programs.
--   
--   Copilot is a stream-based runtime verification framework implemented
--   as an embedded domain-specific language (EDSL) in Haskell. Programs
--   can be interpreted for testing, or translated into C99 code to be
--   incorporated in a project, or as a standalone application. The C99
--   backend output is constant in memory and time, making it suitable for
--   systems with hard realtime requirements.
--   
--   This package is the main entry-point for using Copilot.
--   
--   A tutorial, examples, and other information are available at
--   <a>https://copilot-language.github.io</a>.
@package copilot
@version 3.13


-- | Create Copilot executables that generate code or interpret streams and
--   print the results to stdout.
module Language.Copilot.Main

-- | Create a main to either compile or interpret a copilot specification.
--   
--   This function must be provided an auxiliary function capable of
--   compiling <a>Copilot Core</a> specifications for some target.
--   
--   The command line program supports four main commands:
--   
--   <ul>
--   <li><tt>--output/-o</tt>: use the given compiler to produce C
--   code.</li>
--   <li><tt>--justrun/-c</tt>: execute a dry-run, which parses and
--   converts the specification to core but does not produce any
--   output.</li>
--   <li><tt>--print/-p</tt>: pretty print the specification.</li>
--   <li><tt>--interpret/-i NUM</tt>: interpret the specification for a
--   given number of steps.</li>
--   </ul>
copilotMain :: Interpreter -> Printer -> Compiler -> Spec -> IO ()

-- | Create a main function with a default interpreter and pretty printer.
--   
--   This function must be provided an auxiliary function capable of
--   compiling <a>Copilot Core</a> specifications for some target.
--   
--   This function relies on <a>copilotMain</a>, please refer to that
--   function for the command line options.
defaultMain :: Compiler -> Spec -> IO ()


-- | Copilot is a stream-based runtime verification framework. Programs can
--   be interpreted for testing, or translated into C99 code to be
--   incorporated in a project, or as a standalone application. The C99
--   backend output is constant in memory and time, making it suitable for
--   systems with hard realtime requirements.
--   
--   This module is the main entry point for the Copilot language. The
--   expectation is that most Copilot users will only need to import this
--   module, together with one of the backend modules (at present, only
--   <a>C99</a> from the <a>copilot-c99</a> library is available).
module Language.Copilot

-- | Create a main to either compile or interpret a copilot specification.
--   
--   This function must be provided an auxiliary function capable of
--   compiling <a>Copilot Core</a> specifications for some target.
--   
--   The command line program supports four main commands:
--   
--   <ul>
--   <li><tt>--output/-o</tt>: use the given compiler to produce C
--   code.</li>
--   <li><tt>--justrun/-c</tt>: execute a dry-run, which parses and
--   converts the specification to core but does not produce any
--   output.</li>
--   <li><tt>--print/-p</tt>: pretty print the specification.</li>
--   <li><tt>--interpret/-i NUM</tt>: interpret the specification for a
--   given number of steps.</li>
--   </ul>
copilotMain :: Interpreter -> Printer -> Compiler -> Spec -> IO ()

-- | Create a main function with a default interpreter and pretty printer.
--   
--   This function must be provided an auxiliary function capable of
--   compiling <a>Copilot Core</a> specifications for some target.
--   
--   This function relies on <a>copilotMain</a>, please refer to that
--   function for the command line options.
defaultMain :: Compiler -> Spec -> IO ()
