implicit-0.4.0.0: A math-inspired programmatic 2D & 3D CAD system.
Safe HaskellNone
LanguageHaskell2010

Graphics.Implicit.ExtOpenScad.Definitions

Synopsis

Documentation

data ArgParser a Source #

Handles parsing arguments to built-in modules

Constructors

AP Symbol (Maybe OVal) Text (OVal -> ArgParser a)

For actual argument entries: AP (argument name) (default) (doc) (next Argparser...)

APTerminator a

For returns: APTerminator (return value)

APFail Text

For failure: APFail (error message)

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

Instances

Instances details
Monad ArgParser Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Methods

(>>=) :: ArgParser a -> (a -> ArgParser b) -> ArgParser b #

(>>) :: ArgParser a -> ArgParser b -> ArgParser b #

return :: a -> ArgParser a #

Functor ArgParser Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Methods

fmap :: (a -> b) -> ArgParser a -> ArgParser b #

(<$) :: a -> ArgParser b -> ArgParser a #

Applicative ArgParser Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Methods

pure :: a -> ArgParser a #

(<*>) :: ArgParser (a -> b) -> ArgParser a -> ArgParser b #

liftA2 :: (a -> b -> c) -> ArgParser a -> ArgParser b -> ArgParser c #

(*>) :: ArgParser a -> ArgParser b -> ArgParser b #

(<*) :: ArgParser a -> ArgParser b -> ArgParser a #

Alternative ArgParser Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Methods

empty :: ArgParser a #

(<|>) :: ArgParser a -> ArgParser a -> ArgParser a #

some :: ArgParser a -> ArgParser [a] #

many :: ArgParser a -> ArgParser [a] #

MonadPlus ArgParser Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Methods

mzero :: ArgParser a #

mplus :: ArgParser a -> ArgParser a -> ArgParser a #

newtype Symbol Source #

Constructors

Symbol Text 

Instances

Instances details
Eq Symbol Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Methods

(==) :: Symbol -> Symbol -> Bool #

(/=) :: Symbol -> Symbol -> Bool #

Ord Symbol Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Show Symbol Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

data Pattern Source #

Constructors

Name Symbol 
ListP [Pattern] 
Wild 

Instances

Instances details
Eq Pattern Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Methods

(==) :: Pattern -> Pattern -> Bool #

(/=) :: Pattern -> Pattern -> Bool #

Show Pattern Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

data Expr Source #

An expression.

Constructors

Var Symbol 
LitE OVal 
ListE [Expr] 
LamE [Pattern] Expr 
Expr :$ [Expr] 

Instances

Instances details
Eq Expr Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Methods

(==) :: Expr -> Expr -> Bool #

(/=) :: Expr -> Expr -> Bool #

Show Expr Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Methods

showsPrec :: Int -> Expr -> ShowS #

show :: Expr -> String #

showList :: [Expr] -> ShowS #

data StatementI Source #

A statement, along with the line, column number, and file it is found at.

data Statement st Source #

Instances

Instances details
Eq st => Eq (Statement st) Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Methods

(==) :: Statement st -> Statement st -> Bool #

(/=) :: Statement st -> Statement st -> Bool #

Show st => Show (Statement st) Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Methods

showsPrec :: Int -> Statement st -> ShowS #

show :: Statement st -> String #

showList :: [Statement st] -> ShowS #

data OVal Source #

Objects for our OpenSCAD-like language

Instances

Instances details
Eq OVal Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Methods

(==) :: OVal -> OVal -> Bool #

(/=) :: OVal -> OVal -> Bool #

Show OVal Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Methods

showsPrec :: Int -> OVal -> ShowS #

show :: OVal -> String #

showList :: [OVal] -> ShowS #

data SourcePosition Source #

In order to not propagate Parsec or other modules around, create our own source position type for the AST.

data CompState Source #

The state of computation.

Constructors

CompState 

Fields

Instances

Instances details
Show CompState Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

newtype VarLookup Source #

Constructors

VarLookup (Map Symbol OVal) 

Instances

Instances details
Eq VarLookup Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Show VarLookup Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

data Message Source #

An individual message.

Instances

Instances details
Eq Message Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Methods

(==) :: Message -> Message -> Bool #

(/=) :: Message -> Message -> Bool #

Show Message Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

data MessageType Source #

The types of messages the execution engine can send back to the application.

data ScadOpts Source #

Options changing the behavior of the extended OpenScad engine.

Instances

Instances details
Eq ScadOpts Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Show ScadOpts Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Default ScadOpts Source # 
Instance details

Defined in Graphics.Implicit.ExtOpenScad.Definitions

Methods

def :: ScadOpts #

lookupVarIn :: Text -> VarLookup -> Maybe OVal Source #

For programs using this API to perform variable lookups, after execution of an escad has completed.