Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ArgParser a
- newtype Symbol = Symbol Text
- data Pattern
- data Expr
- data StatementI = StatementI SourcePosition (Statement StatementI)
- data Statement st
- data OVal
- = OUndefined
- | OError Text
- | OBool Bool
- | ONum ℝ
- | OList [OVal]
- | OString Text
- | OFunc (OVal -> OVal)
- | OUModule Symbol (Maybe [(Symbol, Bool)]) (VarLookup -> ArgParser (StateC [OVal]))
- | ONModule Symbol (SourcePosition -> [OVal] -> ArgParser (StateC [OVal])) [([(Symbol, Bool)], Maybe Bool)]
- | OVargsModule Symbol (Symbol -> 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 Text
- data MessageType
- data ScadOpts = ScadOpts {}
- lookupVarIn :: Text -> VarLookup -> Maybe OVal
- varUnion :: VarLookup -> VarLookup -> VarLookup
Documentation
Handles parsing arguments to built-in modules
AP Symbol (Maybe OVal) Text (OVal -> ArgParser a) | For actual argument entries: |
APTerminator a | For returns: |
APFail Text | For failure: |
APExample Text (ArgParser a) | An example, then next |
APTest Text [TestInvariant] (ArgParser a) | A string to run as a test, then invariants for the results, then next |
APBranch [ArgParser a] | A branch where there are a number of possibilities for the parser underneath |
An expression.
Instances
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 Text 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 Text | |
OBool Bool | |
ONum ℝ | |
OList [OVal] | |
OString Text | |
OFunc (OVal -> OVal) | |
OUModule Symbol (Maybe [(Symbol, Bool)]) (VarLookup -> ArgParser (StateC [OVal])) | |
ONModule Symbol (SourcePosition -> [OVal] -> ArgParser (StateC [OVal])) [([(Symbol, Bool)], Maybe Bool)] | |
OVargsModule Symbol (Symbol -> SourcePosition -> [(Maybe Symbol, OVal)] -> [StatementI] -> ([StatementI] -> StateC ()) -> StateC ()) | |
OObj3 SymbolicObj3 | |
OObj2 SymbolicObj2 |
Instances
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 # |
The state of computation.
CompState | |
|
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.