a      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ None3A complete Processing script. 5It consists in several parts, most of them optional.  !(: Usually the place where variables are  initialized.  *: After running the code in the preamble, + the code in this part is executed once.  ,: After the setup, this part of the code is * executed in loops over and over again.  &: Each time the user clicks, the code  here is executed once. +To generate each part of the code, use the ProcM monad  and the functions from the !Graphics.Web.Processing.Interface  module. Then, run runProcM or  execProcM to get the  code result. *Class of reducible types. Values of these ) types contain expressions that can be  reducible.  class for Proc_* values.  class for Proc_* values. !Class of Processing value types. 'Create a variable assignment, provided 4 the name of the variable and the value to asign. "Create an argument for a command. Variable reading. Type of variables. Get the name of a variable.  Assigments. A command argument. A piece of Processing code. ) The type parameter indicates what the  context of the code is. ' This context will allow or disallow  the use of certain commands. Type of textual values. Type of characters. Type of images. Floating point numbers.  The provided % instance checks the equality of the ' internal expression, not the value. Integer numbers. Boolean values. 2Code that is executed when the mouse is released. 1Code that is executed when the mouse is clicked. The drawing loop. In the setup part, settings like size or   frame rate are supplied. !The preamble is the code that is executed # at the beginning of the script. # Value of . $ Value of . % Negation. & Disjunction. ' Conjunction. (Cast a  value. )Cast an  value. *Calculates the  of a . Float recursion+. Applies a function to the subexpressions  of a . +Cast a  value. Noise random function. ,Cast a  to a . -Cast a  value. .Cast a strict  value. Code for commands. Code for assignments. Code for variable creation. Code for comments. Code for conditionals. )Sequence to pieces of code with the same - context type. This way, code that belongs * to different parts of the program will  never get mixed. An empty piece of code. DReturns the name of the type (processing version) in an assignment. 'Internal function to create variables. /Empty script.  WARNING: , , ,  and   methods are undefined.  WARNING:  method is undefined.  WARNING:  method is undefined.   !"#$%&'()*+,-.Name of the command.  Arguments.  Code result.  Assignment.  Code result. Initial assignment.  Code result. /      !"#$%&'()*e  !"#$%&'()*+,-./c    !"#$%&'()*+,-./      !"#$%&'()* None0:Types in this instance form a monad when they are applied  to a context c*. Then, they are used to write Processing  code. +;Internal function to process commands in the target monad. ,=Internal function to process asignments in the target monad. -EInternal function to process variable creations in the target monad. 1Write a comment in the code. 2Conditional execution. .Lift a 3 computation. 3.Processing script producer monad. The context c indicates the context  of the underlying ,. This context restricts the use of certain 4 commands only to places where they are expected. EThe commands that you can run under this monad are mostly defined in  !Graphics.Web.Processing.Interface. -Once you have all the commands you want, use 4 or 5 ; to generate the corresponding Processing code under the  type. 4#Generate Processing code using the 3 monad.  The code output is reduced. /Run a 3) computation with an initial var number. > It also applies a reduction to the output Processing code. 5#Generate Processing code using the 3 monad, discarding the final  value.  execProcM = snd . runProcM 0Adds 11 to the variable counter and returns the result. 1!Get the current variable number. 2!Set the current variable number. 0+,-12 Condition.  Execution when the condition is #.  Execution when the condition is $. .3344/501256780+,-12.34/5012 0+,-12.3344/50125678None6-Create a new variable with a starting value. 2 The creation of variables is restricted to the  !. 7Read a variable.  Funny fact: 1it does not matter when you execute this function.  The result will always. hold the last value asigned to the variable.  For example, this code   v <- newVar 10  ten <- readVar v  writeVar v 20  point (10,ten) will draw a point at (10,20). 8Write a value to a variable. 96786786789678None%9-A point as a pair of floating point numbers. :$RGBA colors. Values must be between . 0 and 255, including in the alpha channel. < Red channel. =Blue channel. >Green channel. ?Alpha channel (opacity). & 0 means transparent, and 255 opaque. @3Class of contexts where the user can draw pictures  in the screen. Instances:         AWidth of the canvas. BHeight of the canvas. C4Frames since the beginning of the script execution. D)Approximate number of frames per second. ENoise random function. FSet the drawing color. GSet the filling color. H$Fill the screen with a given color. ISet the weight of the lines. JDraw a ellipse. KDraw a circle. L Draw an arc. 2The arc is drawn following the line of an ellipse  between two angles. M Draw a line. NPrints a dot. O1A quad is a quadrilateral, a four sided polygon. 3 The first parameter is the first vertex and the 5 subsequent parameters should proceed clockwise or / counter-clockwise around the defined shape. P2Draws a rectangle to the screen. A rectangle is a 8 four-sided shape with every angle at ninety degrees. - The first parameter set the location, the 9 second sets the width, and the third sets the height. Q:A triangle is a plane created by connecting three points. RBzier curve. :#Begin shape command. Not exported. ;!End shape command. Not exported. <Vertex command. Not exported. SPolygon drawer. TDisplay a text in the screen.  The color is specified by G. U5Apply a rotation to the following pictures, centered  at the current position. V4Apply a scaling to the following pictures, centered  at the current position. WMove the current position. X!Reset the transformation matrix. Y/Get the current position of the mouse pointer. ZSet the size of the canvas. [;Specify the number of frames to be displayed every second. - The default rate is 60 frames per second. +9:;<=>?@ABCDE=FGHIJCenter of the ellipse. Width of the ellipse. Height of the ellipse. KCenter of the circle. Radius. LCenter of the ellipse. Width of the ellipse. Height of the ellipse. Initial angle (in radians). End angle (in radians). MStarting point.  End point. NLocation of the point. OPLocation of the rectangle. Width of the rectangle. Height of the rectangle. QRInitial point. First control point. Second control point.  End point. :;<STText to draw.  Position. Width. Height. UVHorizontal scaling. Vertical scaling. WHorizontal displacement. Vertical displacement. XYZ[>?@A&0129:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[&ABE@:;<=>?FGHI9JKLMNOPQRSTZ[WUVXYCD012&9:;<=>?@ABCDE=FGHIJKLMNOPQR:;<STUVWXYZ[>?@ANoneB-Number of operations needed to calculate the  value of a given  value. C,Number that indicates the maximum number of  operations allowed for a  calculation  to consider it cheap. D,Number of times an expression is considered & repeated enough to be substituted. E Check if a  calculation is expensive,  depending on C. F Check if a  calculation is cheap,  depending on C. GAdd a  to the  float counter. H#Add each expression contained in a  to the   float counter. I1Most frequent expensive expression within a list  of expressions.  It returns J when no expensive expression 3 was found, or they are not repeated enough (see D). 8 If there are more than one most frequent expression,  it returns one of them. KApply a substitution. L3From a list of arguments, create a sequence of the  arguments of type  (which may be empty). M5Gather all the float expressions in a piece of code. NLike I", but applied to a piece of code. O Assign a substitution variable a expression, 2 and use that variable in the rest of the code. P-Apply a substitution to a floating argument. ( To other arguments, it does nothing. Q)Apply a substitution to a piece of code. \LOptimization by substitution. It looks for commonly repeated operations and ? create variables for them so they are only calculated once. 6This optimization is applied automatically when using  execScriptM. (RSTUVWXYBCDEFGHZIKOrigin. Target.  Expression. Result. LMN[Index. Optimization variable name. OSubstitution variable index. Expressions to be substituted. Original code. Assignment and result code. POrigin. Target. Original argument. Result argument. QOrigin. Target. Original code.  Result code. \]^_`abcdefgh\i\\$RSTUVWXYBCDEFGHZIKLMN[OPQ\]^_`abcdefgh\iNone]Render a script as a lazy j. ^Render a script using ] and  write it directly in a file. k]^0  !"#$%&'()*+,-./]^0/]^!" #$(%&'),+*-.  k]^None^  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^345None _8Class of monads where variables can be set in a natural  way (similar to IORef"). Instances of this class behave ? in a proper way, without the weird behavior of the original  7. `-Create a new variable with a starting value. aRead a variable. b!Write a new value to a variable. cIContext of an event. The context determines which functions can be used.  ! is not an instance of c to avoid using ! as  an event (see f). d@Scripter monad. This monad is where Processing code is written. + Because of some implementation details, d has a context c.  However, this context is always !. eMonad of events. Use f! to insert an event in a script (d). 1 To write the event code, use the functions in  &Graphics.Web.Processing.Core.Interface, since e is an instance  of 0. lPlain empty event state. fESet an event. Different events are specified by the instances of the  c class. )For example, the following code sets the G' pattern in the setup event (the event ; that is called once at the beginning of the execution). # on Setup $ fill $ Color 0 0 0 255 g>Execute the scripter monad to get the full Processing script.  Use ] or ^ to render it. :After generating the script, the output code is optimized  using \. mMagic! Keep it private, it's our secret! nMagic! Keep it private, it's our secret! -_`abcodpqrstuvwxeyz{|}~lfgmna  !"#$%&'()*+,-./0129:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefg cedfg_`ab_`abcodpqrstuvwxeyz{|}~lfgmn Nonea  !"#$%&'()*+,-./0129:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefgNoneh2Typeclass of values that can be stored in several  native variables (). i/Calculate how many native variables are needed  to store a value. jETypeclass of custom values, which can be stored in custom variables (n). k Version of ` for custom variables. l Version of a for custom variables. m Version of b for custom variables. nVariable with custom values. +hijklmnhijklmnnhijklm"hijklmnNone2SimpleEventM monad: EventM with a state attached. oThe monoid of plane figures. pList of figures. q-Scale a figure by the given x and y factors. r/Rotate a figure by the given angle in radians. s1Translate a figure in the direction of a vector. t#Set the filling color of a figure. u Set the line color of a figure. vText. w7Bezier curve. First and last arguments are the initial 5 and end points of the curve. The other points are  control points. x+Rectangle such that the top-left corner is - at the specified point, and its width and 4 height are specified by the other two arguments. y,Arc. The arc is drawn following the line of " an ellipse between two angles. 4 The first argument is the center of the ellipse. 6 The next two arguments are the width and height of  the ellipse. 2 The last two arguments are the initial and end  angles of the arc. z,Circle centered at the given point and with  the specified radius. {%Ellipse centered at the given point, ) with width and height also specified. | Polygon given a list of vertex. }Line joining a list of points. ~!A path is just a list of points. )Adjust a point so x coordinates increase . to the right and y coordinates to the top. ,Display a figure using a Processing script. %Create a Processing animation from a o-valued function. )Framework to create interactive scripts. 9Note that is required for the state to be an instance of j. 1 More info on how to instantiate a type in the j class in the  %Graphics.Web.Processing.Mid.CustomVar module. "opqrstuvwxyz{|}~0Width (if none, takes as much as is available). 1Height (if none, takes as much as is available). Background color. Figure to display. 0Width (if none, takes as much as is available). 1Height (if none, takes as much as is available).  Frame rate. Background color. 1Function to produce the next frame of animation, # given the current frame number. 0Width (if none, takes as much as is available). 1Height (if none, takes as much as is available).  Frame rate. Initial state. How to print the state. 2Background color, depending on the current state. *Function to step the world one iteration. . It is passed the number of frames from the  beginning. 0Function called each time the mouse is clicked. n  !"#$%&'()*+,-./9:;<=>?]^hijklmnopqrstuvwxyz{|}~:;<=>?9~o}|{zyxwvutsrqpo}|{zyxwvutsrqp~ None>Create a canvas element which contain a Processing animation. ( The output is of the following form: < <canvas data-processing-sources="specified path"></canvas> #Create the following HTML element:  ( <script src="specified path"></script> Use it to import the  processing.js script,  inside the head tag. =Default template for visualizing Processing scripts in HTML. ?Write a Processing script and the HTML default template for it  to files, using ^ and . File path to the script. Location of the  processing.js script. Where to find the  processing.js module. *File name for the Processing script (with .pde extension).  Html title.  Html output. Where to find the  processing.js module. +Where to write the Processing script (with .pde extension).  Html title. #Where to write the HTML file (with .html extension). Processing script.                       ! " # $ % % & & ' ' ( ( ) ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; <=>?@AABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde=>?fghijklmnopqrstuvwxyz{|}~     y                                          "         #                                                          ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 : 9 : ; < =>?@ABCDEFGHIJKLMNOPQRSTUVWXYYZ[\]^_`abcdefghijklmnoypqrstguvvwxyz{h|}}~qprocessing-1.0.0.0"Graphics.Web.Processing.Core.Types Graphics.Web.Processing.Core.Var&Graphics.Web.Processing.Core.InterfaceGraphics.Web.Processing.Basic Graphics.Web.Processing.OptimizeGraphics.Web.Processing.Mid%Graphics.Web.Processing.Mid.CustomVarGraphics.Web.Processing.SimpleGraphics.Web.Processing.Html#Graphics.Web.Processing.Core.Primal"Graphics.Web.Processing.Core.MonadGraphics.Web.Processing ProcScript proc_preamble proc_setup proc_drawproc_mouseClickedproc_mouseReleasedProc_Ord#<=#<#>=#>Proc_Eq#==#/=ProcTypeVarvarNameProcCode Proc_Text Proc_Char Proc_Image Proc_FloatProc_Int Proc_Bool MouseReleased MouseClickedDrawSetupPreambletruefalsepnot#||#&&fromBoolfromIntpfloor fromFloat intToFloatfromChar fromStText emptyScript ProcMonad writeCommentiffProcMrunProcM execProcMnewVarreadVarwriteVar Proc_PointColorredcbluecgreencalphacDrawing screenWidth screenHeight frameCount getFrameRatenoisestrokefill background strokeWeightellipsecirclearclinepointquadrecttrianglebezierpolygondrawtextrotatescale translate resetMatrix getMousePointsize setFrameRateoptimizeBySubstitution renderScript renderFile ProcVarMonadContextScriptMEventMon execScriptM VarLength varLength CustomValuenewVarCreadVarC writeVarC CustomVarFigureFiguresScaleRotate Translate FillColor LineColorTextBezier RectangleArcCircleEllipsePolygonLinePath displayFigure animateFigureinteractiveFigure procCanvas importScript defaultHtml writeHtml Reducibleghc-prim GHC.ClassesOrdEq proc_asignproc_arg proc_read ProcAsignProcArg GHC.TypesTrueFalseBoolIntbaseGHC.RealfloorrecFloatFloatnoisefChar text-0.11.3.1Data.Text.Internalcommand assignment createVarcomment conditional>>. emptyCodeptype varFromText$fFloatingProc_Float GHC.Floatsinhcoshasinhacoshatanh$fNumProc_FloatGHC.Numsignum $fNumProc_Intreduce CharAsign TextAsign ImageAsign FloatAsignIntAsign BoolAsignCharArgTextArgImageArgFloatArgIntArgBoolArgSequenceComment Conditional Assignment CreateVarCommandText_VarChar_Var Image_Var Float_Noise Float_FloorFloat_ArctangentFloat_Arccosine Float_Arcsine Float_Cosine Float_Sine Float_Log Float_Sqrt Float_Exp Float_Abs Float_Var Float_Mod Float_Mult Float_DivideFloat_Substract Float_Sum Int_FloorInt_AbsInt_VarInt_ModInt_Mult Int_Divide Int_SubstractInt_SumText_EqChar_NEqChar_EqFloat_GFloat_GEFloat_LFloat_LE Float_NEqFloat_EqInt_GInt_GEInt_LInt_LEInt_NEqInt_EqBool_NEqBool_EqBool_VarProc_AndProc_OrProc_Neg Proc_False Proc_TrueExtendedextendpatmatch pfunctionextendfextendopdocEqdocNEqdocLEdocLdocGEdocG indentLeveliteratedReducereduceProcPairpvoid$fPrettyProcScript$fReducibleProcCode$fReducibleProcArg$fReducibleProc_Float$fProc_OrdProc_Float$fProc_OrdProc_Int$fProc_EqProc_Text$fProc_EqProc_Char$fProc_EqProc_Float$fProc_EqProc_Int$fProc_EqProc_Bool$fProcTypeProc_Text$fProcTypeProc_Char$fProcTypeProc_Image$fProcTypeProc_Float$fProcTypeProc_Int$fProcTypeProc_Bool$fPrettyProcAsign$fPrettyProcArg$fMonoidProcCode$fPrettyProcCode$fIsStringProc_Text$fPrettyProc_Text$fExtendedTextProc_Text$fPrettyProc_Char$fExtendedCharProc_Char$fPrettyProc_Image$fFractionalProc_Float$fPrettyProc_Float$fExtendedFloatProc_Float$fIntegralProc_Int$fRealProc_Int$fEnumProc_Int $fOrdProc_Int$fPrettyProc_Int$fExtendedIntProc_Int$fPrettyProc_Bool$fExtendedBoolProc_BoolcommandMassignM createVarMliftProc runProcMWith newVarNumber getVarNumber setVarNumberunProcM$fProcMonadProcM $fMonadProcM$fApplicativeProcM$fFunctorProcM intVarName beginShapeendShapevertex colorArgs$fDrawingMouseReleased$fDrawingMouseClicked $fDrawingDraw$fDrawingSetupnumOps limitNumber occurNumber isExpensiveisCheapaddFloat browseFloatmostFreq Data.MaybeNothing floatsubs getFloatArgs floatsInCode mostFreqCode varForExpargsubscodesubsSubsM SubsState codeWritten codeStacksubstitutionIndex FloatCounterFloatSet execCounter optVarNamesubstitutionOversubstitutionOverAuxaddSubsCommentssubsPrevCommentsubsPostComment addToStack addToWrittensetIndex resetStackapplySubstitutioncodeSubstitutionrunSubstitution subsOptimize subsCommentData.Text.Lazy.Internal charsPerLineemptyEventState switchContextswitchContextEaddEvent unScriptM ScriptState script_code script_setup script_drawscript_mouseClickedscript_mouseReleasedunEventM EventStateevent_preamble event_codeaddCodeaddPCodeemptyScriptState$fProcVarMonadEventM$fProcVarMonadScriptM$fContextMouseReleased$fContextMouseClicked $fContextDraw$fContextSetup$fProcMonadScriptM$fMonadScriptM$fApplicativeScriptM$fFunctorScriptM$fProcMonadEventM $fMonadEventM$fApplicativeEventM$fFunctorEventM GCustomValuegnewVarC greadVarC gwriteVarC GVarLength gvarLengthfromVar fromCustomVarvarDropcastCVar$fCustomValue(,,)$fVarLength(,,)$fCustomValue(,)$fVarLength(,)$fGCustomValueK1$fGCustomValueM1$fGCustomValue:+:$fGCustomValue:*:$fGVarLengthK1$fGVarLengthM1$fGVarLength:+:$fGVarLength:*:$fGVarLengthU1$fVarLengthProc_Char$fVarLengthProc_Image$fVarLengthProc_Text$fVarLengthProc_Float$fVarLengthProc_Int$fVarLengthProc_Bool$fCustomValueProc_Char$fCustomValueProc_Image$fCustomValueProc_Text$fCustomValueProc_Float$fCustomValueProc_Int$fCustomValueProc_Bool SimpleEventM adjustPointSettingscurrentLineColorcurrentFillColorpairListdefaultSettings setLineColor getLineColor setFillColor getFillColor figureSEvent figureEvent$fMonoidFigure Data.Monoid<>mconcatmappendmemptyMonoidgetDualDualappEndoEndogetAllAllgetAnyAnygetSumSum getProductProductgetFirstFirstgetLastLast