| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Implicit.ExtOpenScad.Definitions
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
Constructors
| 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.
Constructors
| StatementI SourcePosition (Statement StatementI) |
Instances
| Eq StatementI Source # | |
Defined in Graphics.Implicit.ExtOpenScad.Definitions | |
| Show StatementI Source # | |
Defined in Graphics.Implicit.ExtOpenScad.Definitions Methods showsPrec :: Int -> StatementI -> ShowS # show :: StatementI -> String # showList :: [StatementI] -> ShowS # | |
Constructors
| 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
Constructors
| 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 #
Constructors
| EulerCharacteristic ℕ |
Instances
| Show TestInvariant Source # | |
Defined in Graphics.Implicit.ExtOpenScad.Definitions Methods 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.
Constructors
| SourcePosition Fastℕ Fastℕ FilePath |
Instances
| Eq SourcePosition Source # | |
Defined in Graphics.Implicit.ExtOpenScad.Definitions Methods (==) :: SourcePosition -> SourcePosition -> Bool # (/=) :: SourcePosition -> SourcePosition -> Bool # | |
| Show SourcePosition Source # | |
Defined in Graphics.Implicit.ExtOpenScad.Definitions Methods 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.
An individual message.
Constructors
| Message MessageType SourcePosition String |
data MessageType Source #
The types of messages the execution engine can send back to the application.
Constructors
| TextOut | |
| Warning | |
| Error | |
| SyntaxError | |
| Compatibility | |
| Unimplemented |
Instances
| Eq MessageType Source # | |
Defined in Graphics.Implicit.ExtOpenScad.Definitions | |
| Show MessageType Source # | |
Defined in Graphics.Implicit.ExtOpenScad.Definitions Methods showsPrec :: Int -> MessageType -> ShowS # show :: MessageType -> String # showList :: [MessageType] -> ShowS # | |
Options changing the behavior of the extended OpenScad engine.
Constructors
| ScadOpts | |
Fields | |