Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ArgParser a
- newtype Symbol = Symbol String
- data Pattern
- data Expr
- data StatementI = StatementI SourcePosition (Statement StatementI)
- data Statement st
- data OVal
- = OUndefined
- | OError [String]
- | OBool Bool
- | ONum ℝ
- | OList [OVal]
- | OString String
- | OFunc (OVal -> OVal)
- | OUModule Symbol (Maybe [(Symbol, Bool)]) ([OVal] -> ArgParser (StateC [OVal]))
- | ONModule Symbol (SourcePosition -> [OVal] -> ArgParser (StateC [OVal])) [([(Symbol, Bool)], Maybe Bool)]
- | OVargsModule String (String -> SourcePosition -> [(Maybe Symbol, OVal)] -> [StatementI] -> ([StatementI] -> StateC ()) -> StateC ())
- | OObj3 SymbolicObj3
- | OObj2 SymbolicObj2
- newtype TestInvariant = EulerCharacteristic ℕ
- data SourcePosition = SourcePosition Fastℕ Fastℕ FilePath
- type StateC = StateT CompState IO
- data CompState = CompState {}
- newtype VarLookup = VarLookup (Map Symbol OVal)
- data Message = Message MessageType SourcePosition String
- data MessageType
- data ScadOpts = ScadOpts {}
- lookupVarIn :: String -> VarLookup -> Maybe OVal
- varUnion :: VarLookup -> VarLookup -> VarLookup
Documentation
Handles parsing arguments to built-in modules
AP Symbol (Maybe OVal) String (OVal -> ArgParser a) | For actual argument entries: ArgParser (argument name) (default) (doc) (next Argparser...) |
APTerminator a | For returns: ArgParserTerminator (return value) |
APFailIf Bool String (ArgParser a) | For failure: ArgParserFailIf (test) (error message) (child for if true) |
APExample String (ArgParser a) | |
APTest String [TestInvariant] (ArgParser a) | |
APBranch [ArgParser a] |
data StatementI Source #
A statement, along with the line, column number, and file it is found at.
Instances
Eq StatementI Source # | |
Defined in Graphics.Implicit.ExtOpenScad.Definitions (==) :: StatementI -> StatementI -> Bool # (/=) :: StatementI -> StatementI -> Bool # | |
Show StatementI Source # | |
Defined in Graphics.Implicit.ExtOpenScad.Definitions showsPrec :: Int -> StatementI -> ShowS # show :: StatementI -> String # showList :: [StatementI] -> ShowS # |
Include String Bool | |
Pattern := Expr | |
If Expr [st] [st] | |
NewModule Symbol [(Symbol, Maybe Expr)] [st] | |
ModuleCall Symbol [(Maybe Symbol, Expr)] [st] | |
DoNothing |
Objects for our OpenSCAD-like language
OUndefined | |
OError [String] | |
OBool Bool | |
ONum ℝ | |
OList [OVal] | |
OString String | |
OFunc (OVal -> OVal) | |
OUModule Symbol (Maybe [(Symbol, Bool)]) ([OVal] -> ArgParser (StateC [OVal])) | |
ONModule Symbol (SourcePosition -> [OVal] -> ArgParser (StateC [OVal])) [([(Symbol, Bool)], Maybe Bool)] | |
OVargsModule String (String -> SourcePosition -> [(Maybe Symbol, OVal)] -> [StatementI] -> ([StatementI] -> StateC ()) -> StateC ()) | |
OObj3 SymbolicObj3 | |
OObj2 SymbolicObj2 |
newtype TestInvariant Source #
Instances
Show TestInvariant Source # | |
Defined in Graphics.Implicit.ExtOpenScad.Definitions showsPrec :: Int -> TestInvariant -> ShowS # show :: TestInvariant -> String # showList :: [TestInvariant] -> ShowS # |
data SourcePosition Source #
In order to not propagate Parsec or other modules around, create our own source position type for the AST.
Instances
Eq SourcePosition Source # | |
Defined in Graphics.Implicit.ExtOpenScad.Definitions (==) :: SourcePosition -> SourcePosition -> Bool # (/=) :: SourcePosition -> SourcePosition -> Bool # | |
Show SourcePosition Source # | |
Defined in Graphics.Implicit.ExtOpenScad.Definitions showsPrec :: Int -> SourcePosition -> ShowS # show :: SourcePosition -> String # showList :: [SourcePosition] -> ShowS # |
This is the state of a computation. It contains a hash of variables/functions, an array of OVals, a path, messages, and options controlling code execution.
data MessageType Source #
The types of messages the execution engine can send back to the application.
Instances
Eq MessageType Source # | |
Defined in Graphics.Implicit.ExtOpenScad.Definitions (==) :: MessageType -> MessageType -> Bool # (/=) :: MessageType -> MessageType -> Bool # | |
Show MessageType Source # | |
Defined in Graphics.Implicit.ExtOpenScad.Definitions showsPrec :: Int -> MessageType -> ShowS # show :: MessageType -> String # showList :: [MessageType] -> ShowS # |
Options changing the behavior of the extended OpenScad engine.