-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A small programming language for numerical computing -- -- A small programming language for numerical computing. @package mathista @version 0.0.1 module Mathista.AST type Id = String type Var = (Id, Maybe [(Expr, Maybe Expr)]) data Stmt If :: [(Expr, [Stmt])] -> (Maybe [Stmt]) -> Stmt While :: Expr -> [Stmt] -> Stmt For :: Id -> Integer -> Integer -> [Stmt] -> Stmt Assign :: [Var] -> Expr -> Stmt Return :: [Expr] -> Stmt Break :: Stmt Continue :: Stmt FuncDecl :: Id -> [(Id, Id)] -> [Id] -> [Stmt] -> Stmt ExprStmt :: Expr -> Stmt DoNothing :: Stmt data Expr VarRef :: Var -> Expr Add :: Expr -> Expr -> Expr Sub :: Expr -> Expr -> Expr Mul :: Expr -> Expr -> Expr Div :: Expr -> Expr -> Expr Eq :: Expr -> Expr -> Expr Neq :: Expr -> Expr -> Expr Gt :: Expr -> Expr -> Expr Gte :: Expr -> Expr -> Expr Lt :: Expr -> Expr -> Expr Lte :: Expr -> Expr -> Expr And :: Expr -> Expr -> Expr Or :: Expr -> Expr -> Expr Not :: Expr -> Expr Plus :: Expr -> Expr Minus :: Expr -> Expr FuncCall :: Id -> [Expr] -> Expr Number :: Double -> Expr Matrix :: [Expr] -> Expr instance GHC.Classes.Eq Mathista.AST.Stmt instance GHC.Show.Show Mathista.AST.Stmt instance GHC.Classes.Eq Mathista.AST.Expr instance GHC.Show.Show Mathista.AST.Expr module Mathista.IL data IL ILFuncDecl :: String -> [(Id, Id)] -> [Id] -> IL ILCall :: String -> [Id] -> [Id] -> IL ILReturn :: [Id] -> IL ILLAssign :: Id -> [Id] -> [Integer] -> [Double] -> IL ILAssign :: Id -> [Id] -> [Id] -> Id -> IL ILIf :: Id -> IL ILElseIf :: Id -> IL ILElse :: IL ILWhile :: Id -> IL ILBreak :: IL ILContinue :: IL ILEnd :: IL instance GHC.Show.Show Mathista.IL.IL instance GHC.Classes.Eq Mathista.IL.IL module Mathista.Compiler compile :: [Stmt] -> [IL] module Mathista.Generator.C vstr :: [Char] -> [Char] len :: [a] -> String generate :: IL -> String extract_vars :: String -> [String] generate_c :: String -> [IL] -> String module Mathista.Generator.Matlab generate_matlab :: String -> [IL] -> String module Mathista.Parser parse_str :: [Char] -> Either ParseError [Stmt]