Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Language.Trans.Spec2Copilot
Contents
Description
Transform an Ogma specification into a standalone Copilot specification.
Normally, this module would be implemented as a conversion between ASTs, but we want to add comments to the generated code, which are not representable in the abstract syntax tree.
Documentation
spec2Copilot :: String -> [(String, String)] -> ([(String, String)] -> a -> a) -> (a -> String) -> Spec a -> Either String (String, String, String, String, String) Source #
For a given spec, return the corresponding Copilot file, or an error message if such file cannot be generated.
PRE: there are no name clashes between the variables and names used in the specification and any definitions in Haskell's Prelude or in Copilot.