\@      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~            !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?GHCunstablestephen.tetley@gmail.comVersion number  (0,15,0) !@AB'Convert a join list to a regular list. 'Build a join list from a regular list.  This builds a tall skinny list. )WARNING - throws an error on empty list. Create an empty join list. Create a singleton join list. /Cons an element to the front of the join list. .Snoc an element to the tail of the join list. =Extract the first element of a join list - i.e. the leftmost ? element of the left spine. An error is thrown if the list is  empty. <This function performs a traversal down the left spine, so  unlike head2 on regular lists this function is not performed  in constant time. 8This function throws a runtime error on the empty list. C&Right-associative fold of a JoinList. D%Left-associative fold of a JoinList. #Access the left end of a sequence. <Unlike the corresponing operation on Data.Sequence this is = not a cheap operation, the joinlist must be traversed down + the left spine to find the leftmost node. :Also the traversal may involve changing the shape of the  underlying binary tree. $Access the right end of a sequence. <Unlike the corresponing operation on Data.Sequence this is = not a cheap operation, the joinlist must be traversed down + the left spine to find the leftmost node. :Also the traversal may involve changing the shape of the  underlying binary tree.     GHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com>9 Doc is a Join List ... EFGHIJK!'Create an empty, zero length document. ")Create a document from a ShowS function. #6Horizontally concatenate two documents with no space  between them. $<Horizontally concatenate two documents with a single space  between them. %6Vertical concatenate two documents with a line break. &'2Horizontally concatenate a list of documents with (<>). (2Horizontally concatenate a list of documents with (<+>). )9Vertically concatenate a list of documents, with a line  break between each doc. *)Create a document from a literal string. <The string should not contain newlines (though this is not  enforced). +,Create a document from a literal character. *The char should not be a tab or newline. ,Show the Int as a Doc.  int = text . show -Show the Integer as a Doc. .Show an "integral value" as a Doc via L. /Show the Float as a Doc. 0Show the Double as a Doc. 18Show the Int as hexadecimal, padding up to 4 digits if  necessary. 9No trucation occurs if the value has more than 4 digits. 22Create a Doc containing a single space character. 3!Create a Doc containing a comma, ",". 4&Create a Doc containing a semi colon, ";". 5!Create a Doc containing newline, "\n". 6:Fill a doc to the supplied length, padding the right-hand  side with spaces. >Note - this function is expensive - it unrolls the functional  representation of the String. /Also it should only be used for single line Doc's. M7String version of 6. This is more efficient than 6 as the input is a string " so its length is more accesible. 6Padding is the space character appended to the right. 8Left-padding version of 7. 9=Punctuate the Doc list with the separator, producing a Doc. :,Enclose the final Doc within the first two. +There are no spaces between the documents:  enclose l r d = l <> d <> r ;&Enclose the Doc within single quotes. <&Enclose the Doc within double quotes. =Enclose the Doc within parens (). >'Enclose the Doc within square brackets []. ?$Enclose the Doc within curly braces {}. @&Enclose the Doc within angle brackets <>. A&Create a Doc containing a left paren, '('. B'Create a Doc containing a right paren, ')'. C/Create a Doc containing a left square bracket, '['. D0Create a Doc containing a right square bracket, ']'. E,Create a Doc containing a left curly brace, '{'. F-Create a Doc containing a right curly brace, '}'. G.Create a Doc containing a left angle bracket, '<'. H/Create a Doc containing a right angle bracket, '>'. I;Comma separate the list of documents and enclose in square  brackets. J<Comma separate the list of documents and enclose in parens. K9Separate the list with a semicolon and enclose in curly  braces. LHorizontally indent a Doc. &Note - this space-prefixes the Doc on the current line. It = does not indent subsequent lines if the Doc spans multiple  lines. MWrite a Doc to file. 1 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM1 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM1 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMGHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com>>NOPQNOPQRSTUVRSWXTUYZ[This one is from Chris Okasaki's "Even Higher-Order  Functions for Parsing". \;Peek tries the supplied parse, but does not consume input  ** even when the parse succeeds **. ]^_`abcdeVApplicative cons. fghijklmnoo" an alias for Control.Applicative W. pqrstuvwxyz{|}~5NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~5QRTSPONUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~5NOPQRTSSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~GHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com>;Opaque type representing a parser that consumes arbitrary  space.  Unlike Parsec'1s lexeme parser, this can be customized so that 0 e.g. newlines are not consumed as white space. XY#Build a lexeme parser that handles space. Space' is zero or more elements matching the isSpace  predicate from  Data.Char. -Build a lexeme parser that handles arbitrary space. space5 is parametric, for instance this can manufacture a : lexeme parser that consumes space and tab chars but not  newline. ;Build a lexeme parser that handles start-and-end delimited  comments and arbitrary space. ;Build a lexeme parser that handles line spanning comments  an arbitrary space. ;Build a lexeme parser that handles start-and-end delimited ' comments, line comments and arbitrary space. Z[\<Wrap a CharParser with a lexeme parser, the CharParser will : consume trailing space according to the strategy of the  LexemeParser. GHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com>8GhostScript version that the aliases were derived from. ghostscript_version :: String  ghostscript_version = gs8.54 A map from standard Adode PostScript font name to the 0 equivalent GhostScript font and AFM file name. >It is expected that all GhostScript AFM files will be located  in the same directory. Get the .afm metrics file. <Note this return only the file name and not the path to it. 0 The full path must be resolved in client code. %Get the GhostScript font name alias. 5Get the GhostScript version number that the FontMap  represents. 4Map from PostScript font name to the corresponding  GhostScript name and file. 0Naming is correct for GhostSCript version 8.54. GHCunstablestephen.tetley@gmail.com 6velo consumes the list as per map, but builds it back , as a Hughes list - so items can be dropped  replaced, repeated, etc... GHCunstablestephen.tetley@gmail.com =ScalingContext is a dictionary of two functions for scaling  in X and Y. =Build a ScalingContext where both X and Y are scaled by the  same uniform step. @The dimensions (types) of the ScalingContext are unified - the 3 output type and the input types are all the same. 4Build a ScalingContext for scaling Int coordinates. 7The scaling factors in X and Y can be different sizes.  GHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com>*A map between a font name and MetricsOps. ]^ tfor a particular named font. )Operations on the metrics set of a font. >The is the internal representation used by Wumpus-Basic after  parsing the font file. A lookup from code point to  width vector. ?Note - in PostScript terminology a width vector is not obliged 9 to be left-to-right (writing direction 0). It could be & top-to-bottom (writing direction 1). A Unicode code-point. 8This ignores the Char code lookup and just returns the  default advance vector.  GHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com>!5The metrics read from a font file by a font loader. "NOTE - FontProps is parametric on cu - Character Unit and  not on the usual u. A typical character unit is , < the unit of measurement for AFM files (1000th of a point). =The is the initial representation used by Wumpus-Basic as an ' syntax tree when loading font files. 9Monospace defaults are used if the font loader fails to  extract the necessary fields. =The values are taken from the font correpsonding to Courier  in the distributed font files. >Wumpus needs a very small subset of AFM files, common to both  version 2.0 and version 4.1. >Note - Bounding Box is mandatory for AFM versions 3.0 and 4.1 ?Cap Height is optional in AFM versions 3.0 and 4.1. As Wumpus ? uses cap height in calculations, glyph metrics must be build / with an arbitrary value if it is not present. *Encoding Scheme is optional in AFM files. Afm files index glyphs by PostScript character code. This & is not the same as Unicode, ASCII... #It is expected to be determined by EncodingScheme in the " Global Font Information Section. Wrapped Double representing 1/1000 of the scale factor < (Point size) of a font. AFM files encode all measurements  as these units. _`=Compute the size of a measurement in Afm units scaled by the  point size of the font. 9Build a MetricsOps function table, from a character unit 2 scaling function and FontProps read from a file.  GHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com>abcdef aka liftIO The standard monadic sequence would finish on first fail = for the FontLoadIO monad. As we want to be able to sequence 9 the loading of a list of fonts, this is not really the B behaviour we want for Wumpus. Instead we prefer to use fallback @ metrics and produce an inaccurate drawing on a font load error * rather than fail and produce no drawing. g8Afm files do not have a default advance vec so use the  monospace default. Afm files hopefully have  CapHeight and FontBBox properties < in the header. Use the monospace default only if they are  missing. hi GHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com>j;Strictly speaking a fontBBox is measured in integer units. kl GHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com>mnoGHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com>pqGHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com> >The unit of Margin is always Double representing Points, e.g. @ 1.0 is 1 Point. Margins are not scaled relative to the current  font size. The default value is 2 point.     2Type synonym for DrawingContext update functions.  - the "graphics state" of Wumpus-Basic. B DrawingContext is operated on within a Reader monad rather than  a State monad so "updates" are delineated within a local  operation (called localize# in Wumpus), rather than permanent  until overridden as per set of a State monad. Note - round_corner_factor is only accounted for by some 6 graphic objects (certain Path objects and Shapes in @ Wumpus-Drawing for instance). There many be many objects that 4 ignore it and are drawn only with angular corners. :Also note - in contrast to most other drawing objects in ; Wumpus, none of the measurement values are parameteric - ( usually notated with the type variable u in Wumpus. This is ; so Wumpus can (potentially) support different units e.g. = centimeters rather than just Doubles (represening printers @ points), though adding support for other units has a very low  priority. rstuCourier "Project a value out of a context.                    GHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com>%Because textAttr* is so commonly used here is a functional  version that avoids tupling.  !"#$%&9Vertical distance between baselines of consecutive text  lines. '9Vertical distance between baselines of consecutive text  lines. ()*+,9Vertical distance between baselines of consecutive text  lines. -The mark4 height is the height of a lowercase letter in the  current font. =Arrowheads, dots etc. should generally be drawn at the mark  height. .v/0123w45678x9Height of a lower case 'x' in Courier. 'x'" has no ascenders or descenders. :;<=Query the dimensions of the text using the current font size ) but using metrics derived from Courier. 8Note - the width will generally be a over-estimate for  non-monospaced fonts. =The heigth of n lines of text, which is  n lines + n-1 line spacers >#The default padding is half of the  char width. ?$Vector from baseline left to center " !"#$%&'()*+,-./0123456789:;<=>?" !"#$%&'()*+-.,/0123456789:;<=>?" !"#$%&'()*+,-./0123456789:;<=>?GHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com>#yz@AA :  xsep * ysep -> DrawingContextF  B{|}CSet the line width to a thick. Note this context update is  oblivious - operationally the  line width is set to exactly 2.0. DE~FGHIJKLMNOPQRSTU<Set the font size to double the current size, note the font 7 size also controls the size of dots, arrowsheads etc. V:Set the font size to half the current size, note the font 7 size also controls the size of dots, arrowsheads etc. ;As fontsize is an integer this is not exact - half size of  15pt type is 7pt. WXYZ[@ABCDEFGHIJKLMNOPQRSTUVWXYZ[@ABCDEFGHIJKLMNOPQRTSUVWXYZ[@ABCDEFGHIJKLMNOPQRSTUVWXYZ[GHC highly unstablestephen.tetley@gmail.com\4A monad that supplies points, e.g. a turtle monad. ** WARNING *** - the idea behind this class is somewhat = half-baked. It may be revised or even dropped in subsequent  versions of Wumpus-Basic. ]^;DUnit is always for fully saturated type constructors, so = (seemingly) an equivalent type family is needed for monads. __# is a type representing functions  from Radian * Point to Point. <It is useful for building arrowheads which are constructed @ with an implicit angle representing the direction of the line  at the arrow tip. ``# is a type representing functions  from Point to Point. ?It is especially useful for building composite graphics where @ one part of the graphic is drawn from a different start point  to the other part. a9Advance vectors provide an idiom for drawing consecutive > graphics. PostScript uses them to draw left-to-right text - 9 each character has an advance vector for the width and > as characters are drawn they successively displace the start 9 point for the next character with their advance vector. Type alias for Vec2. b:Vertical alignment - align to the left, center or bottom. cdef;Horizontal alignment - align to the top, center or bottom. ghijA Bifunctor class. >Again, it would be nice if there was a Bifunctor class in the  Haskell Base libraries... klmnA Semigroup class. ?The perhaps unusual name is the TeX name for the circled plus ? glyph. It would be nice if there was a semigroup class in the  Haskell Base libraries... opqrs7Extract the horizontal component of an advance vector. ;For left-to-right latin text, the vertical component of an 8 advance vector is expected to be 0. Ingoring it seems  permissible when drawing text. t6Extract the verticall component of an advance vector. uu :  x -> y -> PointDisplace  Build a combinator to move Points by the supplied x and  y distances. vx :  (V2 x y) -> PointDisplace   Version of u' where the displacement is supplied as & a vector rather than two parameters. ww :  x -> PointDisplace  Build a combinator to move Points by horizontally the  supplied x distance. xx :  y -> PointDisplace  Build a combinator to move Points vertically by the supplied  y distance. yy :  dist -> ThetaPointDisplace  Build a combinator to move Points in parallel to the ; direction of the implicit angle by the supplied distance  dist. zy :  dist -> ThetaPointDisplace  Build a combinator to move Points perpendicular to the ; direction of the implicit angle by the supplied distance  dist. \]^_`abcdefghijklmnopqrstuvwxyznopjklmqrfihgbedcast`uvwx_yz^\]\]]^_`abedccdefihgghijklmklmnoopqrstuvwxyzGHC highly unstablestephen.tetley@gmail.com){ Alias of ~( where the unit type is specialized to  Double. | Alias of ( where the unit type is specialized to  Double. } Alias of ( where the unit type is specialized to  Double. ~Type specialized verison of  where the static arguments  are the  start point and the  end point. = ConnectorCF :: DrawingContext -> Point2 u -> Point2 u -> a Type specialized verison of  where the static arguments  are the  start point and the angle of displacement. : LocThetaCF :: DrawingContext -> Point2 u -> Radian -> a Type specialized verison of  where the static argument  is the  start point. + LocCF :: DrawingContext -> Point2 u -> a  Variation of  with two parametric static arguments. ?The first argument is commonly a point representing the start  point /1 origin of a drawing. The second argument might B typically be the angle of displacement (for drawing arrowheads) > or an end point (for drawing connectors between two points). ) CF2 :: DrawingContext -> r1 -> r2 -> a  Variation of  with one parametric static argument. @The static argument is commonly a point representing the start  point / origin of a drawing. # CF1 :: DrawingContext -> r1 -> a :Most drawing operations in Wumpus-Basic have an implicit  graphics state the , so the most primitive ? building block is a function from the DrawingContext to some  polymorphic answer. @This functional type is represented concretely as the initials  CF for contextual function.  CF :: DrawingContext -> a Run a CF' (context function) with the supplied  DrawingContext. Run a CF1' (context function) with the supplied  DrawingContext and static argument. Run a CF1' (context function) with the supplied  DrawingContext and two static arguments. #Lift a zero-arity context function  to an arity one  context function . #Lift a zero-arity context function  to an arity two  context function . #Lift an arity one context function  to an arity two  context function . Promote a function 'from one argument to a Context Function  to an arity one Context Function. 7The type signature is as explanatory as a description: ' promoteR1 :: (r1 -> CF a) -> CF1 r1 a Promote a function (from two arguments to a Context Function  to an arity two Context Function. 7The type signature is as explanatory as a description: 0 promoteR2 :: (r1 -> r2 -> CF a) -> CF2 r1 r2 a ;Apply an arity-one Context Function to a single argument, < downcasting it by one level, making an arity-zero Context  function. 7The type signature is as explanatory as a description: $ apply1R1 :: CF1 r1 a -> r1 -> CF a 7Apply an arity-two Context Function to two arguments, = downcasting it by two levels, making an arity-zero Context  function. 7The type signature is as explanatory as a description: - apply2R2 :: CF2 r1 r2 a -> r1 -> r2 -> CF a 6Apply an arity-two Context Function to one argument, ; downcasting it by one level, making an arity-one Context  function. 7The type signature is as explanatory as a description: + apply1R2 :: CF2 r1 r2 a -> r2 -> CF1 r1 a +Extract the drawing context from a CtxFun.  (ctx -> ctx) 6Apply the projection function to the drawing context.  (ctx -> a) -> (ctx -> a) *Extract the drawing context from a LocCF.  (ctx -> pt -> ctx)  Extract the start point from a LocCF.  (ctx -> pt -> pt) /Extract the drawing context from a LocThetaCF.  (ctx -> pt -> ang -> ctx)  Extract the start point from a LocThetaCF.  (ctx -> pt -> ang -> pt) %Extract the angle from a LocThetaCF.  (ctx -> pt -> ang -> ang) 0Extract the drawing context from a ConnectorCF.  (ctx -> pt1 -> pt2 -> ctx) ,Extract the start point from a ConnectorCF.  (ctx -> pt1 -> pt2 -> pt1) *Extract the end point from a ConnectorCF.  (ctx -> pt1 -> pt2 -> pt2)  Downcast a * function by applying it to the supplied 0 point, making an arity-zero Context Function.  Remember a  function is a  context function where  the static argument" is specialized to a start point.  Downcast a ! function by applying it to the : supplied angle, making an arity-one Context Function (a  ).  Downcast a ! function by applying it to the 9 supplied point and angle, making an arity-zero Context  Function (a ).  Downcast a ~! function by applying it to the = start and end point, making an arity-zero Context Function  (a ). Chaining combinator - the answer of the A first Context Function is feed to the second Context Function. 'This contrasts with the usual idiom in  Wumpus-Basic where A composite graphics are built by applying both functions to the  same initial static argument.  Desciption: >Evaluate the first Context Function with the drawing context  and the  initial state st0#. The result of the evaluation is  a new state st1 and and answer a1. ?Evaluate the second Context Function with the drawing context  and the new state st1, producing a new state s2 and an  answer a2. 1Return the result of combining the answers with  op :: (ans -> ans -> ans) and the second state s2.  H (ctx -> s1 -> (w,s1)) -> (ctx -> s1 -> (w,s1)) -> (ctx -> s1 -> (w,s1))?This models chaining start points together, which is the model @ PostScript uses for text output when successively calling the  show operator. #{|}~#~}|{#{|}~GHC highly unstablestephen.tetley@gmail.com =Graphics objects, even simple ones (line, arrow, dot) might = need more than one primitive (path or text label) for their ? construction. Hence, the primary representation that all the $ others are built upon must support  concatenation of  primitives. 8Wumpus-Core has a type Picture - made from one or more ? Primitives - but Pictures include support for affine frames. > For drawing many simple graphics (dots, connector lines...) ? that do not need individual affine transformations this is a ; penalty. A list of Primitives is therefore more suitable 2 representation, and a Hughes list which supports " efficient concatenation is wise. 9Collect elementary graphics as part of a larger drawing. 'TraceM works much like a writer monad.    GHC highly unstablestephen.tetley@gmail.com A query on the DrawingContext.  Alias for . 9A query on the DrawingContext respective to the supplied  point.  Alias for . 9A query on the DrawingContext respective to the supplied  point and angle.  Alias for . :An Image always returns a pair of some polymorphic answer a  and a PrimGraphic. $Note a PrimGraphic cannot be empty. %Draw a PrimGraphic repsective to the DrawingContext and  return some answer a. %Draw a PrimGraphic respective to the DrawingContext and ( the supplied point, return some answer a. %Draw a PrimGraphic respective to the DrawingContext and  the supplied point and angle.    GHC highly unstablestephen.tetley@gmail.com8ConnectorImage is a connector drawn between two points  constructing an Image. >Usually the answer type of a ConnectorImage will be a Path so  the Points ar midway, atstart etc. can be taken on it. :ConnectorGraphic is a connector drawn between two points  contructing a Graphic. GHC highly unstablestephen.tetley@gmail.com- Alias of % where the unit type is specialized  to Double.  Originated2 drawing - produce a primitive respective to the > supplied start-point, access the DrawingContext as required.  Alias of ( where the unit type is specialized to  Double.  Originated2 drawing - produce a primitive respective to the > supplied start-point, access the DrawingContext as required.  Alias of ( where the unit type is specialized to  Double. @Simple drawing - produce a primitive, access the DrawingContext B as required, e.g for fill colour, stroke colur, line width, etc. Build an Image... Build a LocImage... Build a LocThetaImage... 6Move the start-point of a LocImage with the supplied  displacement function. 6Move the start-point of a LocImage with the supplied  displacement function. This is the analogue to  in  Wumpus-core. This is the analogue to  in  Wumpus-core. 8Build an empty LocGraphic - this is a path with a start  point but no path segments. The  It is treated as a null primitive by   Wumpus-Core0 and is not drawn, although it does generate a 3 minimum bounding box at the implicit start point.  :  path -> Graphic  This is the analogue to  in  Wumpus-core , but the ? drawing properties (colour, line width, etc.) are taken from  the implicit DrawingContext.  :  path -> Graphic  This is the analogue to  in  Wumpus-core , but the ? drawing properties (colour, line width, etc.) are taken from  the implicit DrawingContext.  :  path -> Graphic  This is the analogue to  in  Wumpus-core , but the ( fill colour is taken from the implicit DrawingContext.  :  path -> Graphic  This is the analogue to  in  Wumpus-core , but the > drawing properties (fill colour, border colour, line width, # etc.) are taken from the implicit DrawingContext. This is the analogue to  in  Wumpus-core. This is the analogue to  in  Wumpus-core. This is the analogue to  in  Wumpus-core. This is the analogue to  in  Wumpus-core. This is the analogue to  in  Wumpus-core. This is the analogue to  in  Wumpus-core. This is the analogue to  in  Wumpus-core. This is the analogue to rstrokeEllispe in  Wumpus-core. This is the analogue to  fillEllispe in  Wumpus-core. This is the analogue to  rfillEllispe in  Wumpus-core. This is the analogue to fillStrokeEllispe in  Wumpus-core. This is the analogue to rfillStrokeEllispe in  Wumpus-core. :Draw a straight line formed from displacing the implicit ' start point with the supplied vector. 9Draw a straight line - start and end point are supplied  explicitly. :Draw a Bezier curve - all points are supplied explicitly. Supplied point is  bottom-left. Supplied point is  bottom left. Supplied point is  bottom left. Supplied point is  bottom left. 7Supplied point is center. Circle is drawn with Bezier  curves. 7Supplied point is center. Circle is drawn with Bezier  curves. 7Supplied point is center. Circle is drawn with Bezier  curves. disk is drawn with Wumpus-Core's ellipse primitive. 5This is a efficient representation of circles using  PostScript's arc or SVG's circle in the generated : output. However, stroked-circles do not draw well after < non-uniform scaling - the line width is scaled as well as  the shape. 8For stroked circles that can be adequately scaled, use   instead. Filled disk... bordered disk... ***GHC highly unstablestephen.tetley@gmail.comAdvance vector& graphic - this partially models the  PostScript show command which moves the  current point by the 4 width (advance) vector as each character is drawn. 9Construction is different to intoZZ functions hence the  different name. ** WARNING ** - pending removal. GHC highly unstablestephen.tetley@gmail.com %LocThetaGraphic with a bounding box. &Note the size of bounding box for the "same" shape will vary 6 according to the rotation. A bounding box is always ' orthonormal (?) to the x- and y-axes.  LocGraphic with a bounding box. Graphic with a bounding box.  :  theta * bbox -> BBox  Rotate a bounding box by theta about its center. Take the  new bounding box. @Remember that bounding boxes are always orthonormal rectangles, > so the dimensions as well as the positions may change under  rotation.    GHC unstablestephen.tetley@gmail.com<Run the drawing returning only the output it produces, drop * any answer from the monadic computation. =Run the drawing ignoring the output it produces, return the & answer from the monadic computation. >Note - this useful for testing, generally one would want the : opposite behaviour (return the drawing, ignore than the  answer). Unsafe promotion of HPrim to Picture. 3If the HPrim is empty, a run-time error is thrown. Safe promotion of HPrim to (Maybe Picture). If the HPrim is empty, then Nothing is returned. Unsafe promotion of (Maybe Picture) to Picture. This is equivalent to:  ! fromMaybe (error "empty") $ pic ;This function is solely a convenience, using it saves one  import and a few characters. If the supplied value is Nothing a run-time error is thrown. 2Draw a Graphic taking the drawing style from the  drawing context.  This operation is analogeous to tell in a Writer monad. Hyperlink version of . 1Draw an Image taking the drawing style from the  drawing context. ?The graphic representation of the Image is drawn in the Trace $ monad, and the result is returned.  Forgetful . Hyperlink version of .  Forgetful .     GHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com> 6Anchor on a border that can be addressed by an angle. ?The angle is counter-clockwise from the right-horizontal, i.e.  0 is east.   ?Secondary group of cardinal (compass) positions on an object. =It seems possible that for some objects defining the primary = compass points (north, south,...) will be straight-forward 7 whereas defining the secondary compass points may be < problemmatic, hence the compass points are split into two  classes.  ,Cardinal (compass) positions on an object. ;Note - in TikZ cardinal anchors are not necessarily at the @ equivalent radial position, for instance reactangle north-east = is the top-right corner whether or not this is incident at  45deg. .Wumpus generally follows the TikZ convention. Center of an object.  :  dist * object -> Point  ;Project the anchor along a line from the center that goes  through the north anchor. =If the distance is zero the answer with be the north anchor. AIf the distance is negative the answer within the object before  the north anchor. ;If the distance is positive the anchor outside the object.  :  dist * object -> Point  Variant of the function , but projecting the line + southwards from the center of the object.  :  dist * object -> Point  Variant of the function , but projecting the line * eastwards from the center of the object.  :  dist * object -> Point  Variant of the function , but projecting the line * westwards from the center of the object.  :  dist * object -> Point  Variant of the function , but projecting the line / northeastwards from the center of the object.  :  dist * object -> Point  Variant of the function , but projecting the line / southeastwards from the center of the object.  :  dist * object -> Point  Variant of the function , but projecting the line / southwestwards from the center of the object.  :  dist * object -> Point  Variant of the function , but projecting the line / northwestwards from the center of the object.    : + object_a * object_b -> (Point_a, Point_b)  .Find the radial connectors points for objects a and b along ! the line joining their centers.                  GHC unstablestephen.tetley@gmail.com4!"#$%&'The center of a picture. 'Extract the mid point of the top edge. *Extract the mid point of the bottom edge. (Extract the mid point of the left edge. )Extract the mid point of the right edge. Extract the top-left corner. Extract the top-right corner.  Extract the bottom-left corner. !Extract the bottom-right corner. (  a `over` b Place 'drawing' a over b. The idea of over here is in = terms z-ordering, nither picture a or b are actually moved. )  a `under` b  Similarly under! draws the first drawing behind  the second but move neither. *Move in both the horizontal and vertical. *Draw a, move b) so its center is at the same center as  a, b) is drawn over underneath in the zorder.  a `centeric` b +  a `nextToH` b Horizontal composition - move b, placing it to the right  of a. ,  a `nextToV` b Vertical composition - move b, placing it below a. -)Place the picture at the supplied point. - was previous the  operator. .*Center the picture at the supplied point. /#Concatenate the list of drawings. No pictures are moved. 0Concatenate the list pictures xs horizontally. 1!Concatenate the list of pictures xs vertically. 2  hspace n a b Horizontal composition - move b, placing it to the right  of a with a horizontal gap of n separating the pictures. 3  vspace n a b Vertical composition - move b, placing it below a with a  vertical gap of n separating the pictures. 4  hsep n xs !Concatenate the list of pictures xs horizontally with  hspace starting at x&. The pictures are interspersed with  spaces of n units. 5  vsep n xs !Concatenate the list of pictures xs vertically with  vspace starting at x&. The pictures are interspersed with  spaces of n units. 6  alignH align a b Horizontal composition - move b, placing it to the right  of a0 and align it with the top, center or bottom of a. 7  alignV align a b Vertical composition - move b, placing it below a 0 and align it with the left, center or right of a. 8  alignHSep align sep a b !Spacing version of alignH - move b to the right of a  separated by sep units, align b according to align. 9  alignVSep align sep a b !Spacing version of alignV - move b below a  separated by sep units, align b according to align. : Variant of 0% that aligns the pictures as well as  concatenating them. ; Variant of 1% that aligns the pictures as well as  concatenating them. < Variant of hsep% that aligns the pictures as well as ! concatenating and spacing them. = Variant of vsep% that aligns the pictures as well as ! concatenating and spacing them. !"#$%&'()*+,-./0123456789:;<=!"#$%&'()*+,-./0123456789:;<=!"#$%&'()*+,-./0123456789:;<=GHC highly unstablestephen.tetley@gmail.comS      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=GHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com>>> :   path_to_afm_fonts * [font_name] -> IO (metrics, messages)  "Load the supplied list of fonts. <Note - if a font fails to load a message is written to the  log and monospaced fallback metrics are used. >These are values extracted from Courier in the core 14 fonts. >>>GHChighly unstable)Stephen Tetley <stephen.tetley@gmail.com>?? :   path_to_gs_fonts * [font_name] -> IO (metrics, messages)  "Load the supplied list of fonts. <Note - if a font fails to load a message is written to the  log and monospaced fallback metrics are used. )These are values extracted from the file  n022003l.afm  which is the font NimbusMonL-Regu , GhostScript' s eqivalent $ font for the core 14 font Courier. ??? !"#$%&'()*+,-./0123456789:;<=>?@/ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~JQLO                                            L K O  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<FH=>G?@ABCDEFGHIJKLMNOPJQRSTUVWXpYZ[\]^_`Uabcdef  g  h  i j j k l 1 m n o p q r s tusvwxyz{|}~U.wumpus-basic-0.15.0Wumpus.Basic.VersionNumberWumpus.Basic.Utils.JoinList$Wumpus.Basic.Utils.FormatCombinators$Wumpus.Basic.Utils.ParserCombinatorsWumpus.Basic.Utils.TokenParsers-Wumpus.Basic.System.FontLoader.Base.GSFontMapWumpus.Basic.Utils.HList'Wumpus.Basic.Kernel.Base.ScalingContext%Wumpus.Basic.Kernel.Base.GlyphMetrics-Wumpus.Basic.System.FontLoader.Base.Datatypes1Wumpus.Basic.System.FontLoader.Base.FontLoadMonad1Wumpus.Basic.System.FontLoader.Base.AfmParserBase3Wumpus.Basic.System.FontLoader.Base.AfmV4Dot1Parser/Wumpus.Basic.System.FontLoader.Base.AfmV2Parser'Wumpus.Basic.Kernel.Base.DrawingContext Wumpus.Basic.Kernel.Base.QueryDC!Wumpus.Basic.Kernel.Base.UpdateDC!Wumpus.Basic.Kernel.Base.BaseDefs#Wumpus.Basic.Kernel.Base.ContextFun)Wumpus.Basic.Kernel.Base.WrappedPrimitive'Wumpus.Basic.Kernel.Objects.BaseObjects%Wumpus.Basic.Kernel.Objects.Connector#Wumpus.Basic.Kernel.Objects.Graphic*Wumpus.Basic.Kernel.Objects.AdvanceGraphic#Wumpus.Basic.Kernel.Objects.Bounded(Wumpus.Basic.Kernel.Objects.TraceDrawing Wumpus.Basic.Kernel.Base.Anchors&Wumpus.Basic.Kernel.Objects.CtxPicture"Wumpus.Basic.System.FontLoader.Afm*Wumpus.Basic.System.FontLoader.GhostScriptWumpus.Basic.Kernelwumpus_basic_versionViewR:>EmptyRViewL:<EmptyLJoinListtoListfromList fromListFtoListFtoListMzipWithIntoListnullemptyoneconssnocjoinheadtakeLlength takeWhileL accumMapLviewlviewrunViewLunViewRFormatformatDocSDocshowsDoc<><+>vconcatseparatehcathsepvcattextcharintintegerintegralfloatdoublehex4spacecomma semicolonlinefill fillStringR fillStringL punctuateenclosesquotesdquotesparensbracketsbracesangleslparenrparenlbracketrbracketlbracerbracelangleranglelisttupled semiBracesindentwriteDoc ParseError CharResult CharParserParserResultOkayFail runParserrunParserEitherapplyfailure throwError lookaheadpeekeofequalssatisfyoneOfnoneOfchainl1chainr1chainlchainrchoicecountbetweenoption optionMaybe optionUnitskipOneskipMany skipMany1many1sepBysepBy1sepEndBy sepEndBy1manyTill manyTill1stringanyCharupperlowerletteralphaNumdigithexDigitoctDigitnewlinetab LexemeParserspaceLexemeParserspaceCharLexemeParsercommentLexemeParsercommentLineLexemeParsercommentMultiLexemeParserlexeme whiteSpaceoctBaseoctHaskhexBasenatural GSFontMapghostscript_versionghostscript_fontmap gsMetricsFile gsFontAliasgsVersionNumberghostscript_fontmap_8_54HemptyHwrapHconsHsnocHappendHunfoldrHveloHconcatHtoListH fromListHScalingContext scale_in_x scale_in_yscaleXscaleYscalePtscaleVecunitXunitYuniformScalingcoordinateScaling GlyphMetricsFontMetricsOps MetricsOpsget_bounding_box get_cw_tableget_cap_heightCharWidthTable CodePointFontNameemptyGlyphMetrics lookupFont insertFontmonospace_metrics FontPropsfp_bounding_boxfp_default_adv_vec fp_adv_vecs fp_cap_heightMonospaceDefaultsdefault_letter_bboxdefault_cap_heightdefault_char_widthAfmGlyphMetrics afm_char_codeafm_width_vector afm_char_nameAfmFile afm_encodingafm_letter_bboxafm_cap_heightafm_glyph_metrics GlobalInfoAfmKeyAfmBoundingBoxPSEncodingScheme PSCharCodeAfmUnitafmValue afmUnitScalebuildMetricsOps FontLoadIO FontLoadErr runFontLoadIOevalFontLoadIO loadError logLoadMsg promoteIO promoteEither runParserFLIO sequenceAllbuildAfmFontProps checkFontPath afmFileParserrunQuery textQuery getFontBBoxgetEncodingScheme getCapHeightcharBBoxmetric keyStringPair versionNumberstartCharMetricskeyName newlineOrEOF uptoNewlinenamename1seminumbercinthexIntoctIntsymbolafmV4Dot1Parser afmV2Parser DrawingCtxMaskDClocalize TextMargin text_margin_x text_margin_yDrawingContextFDrawingContext glyph_tablesfallback_metrics stroke_props font_props stroke_colour fill_colourline_spacing_factorround_corner_factor text_marginstandardContextmetricsContextdefault_drawing_contextasksDCwithFontMetricstextAttr withTextAttr strokeAttrwithStrokeAttrfillAttr withFillAttr borderedAttrwithBorderedAttrgetRoundCornerSize getTextMargin getLineWidth getFontAttr getFontSize getFontFacebaselineSpacing markHeightmarkHalfHeightglyphBoundingBoxglyphHeightRange glyphHeightglyphCapHeight cwLookupTablemonoFontPointSize monoCharWidth monoTextWidthmonoTextLength monoCapHeightmonoLowerxHeightmonoDescenderDepthmonoAscenderHeightmonoTextDimensionsmonoMultiLineHeightmonoDefaultPaddingmonoVecToCenterroundCornerFactor textMargin lineWidththick ultrathickthincapButtcapRound capSquare joinMiter joinRound joinBevel dashPatternunit_dash_patternphasedphase doublegaps doubledashesfontAttrfontFacefontSize doublesizehalfsize swapColoursbothStrokeColourbothFillColour strokeColour fillColour PointSupplyMpositionMonUnitThetaPointDisplace PointDisplace AdvanceVecVAlignVRightVCenterVLeftHAlignHBottomHCenterHTopBimapbimapbimapLbimapROPlusoplusoconcatreplaceLreplaceRadvanceHadvanceVdisplace displaceVec displaceH displaceVdisplaceParalleldisplacePerpendicular DConnectorCF DLocThetaCFDLocCF ConnectorCF LocThetaCFLocCFCF2CF1CFrunCFrunCF1runCF2lift0R1lift0R2lift1R2 promoteR1 promoteR2apply1R1apply2R2apply1R2 drawingCtxqueryCtxlocCtxlocPoint locThetaCtx locThetaPoint locThetaAngconnCtx connStartconnEndatrotatRotconnectchain1getPrimGraphic PrimGraphicHPrimtraceTraceM hprimToListsingleH primGraphic metamorphPrimcollectH DrawingInfoLocDrawingInfoLocThetaDrawingInfoImageAns GraphicAnsImageLocImage LocThetaImageDImage DLocImageDLocThetaImage hyperlinkDConnectorImageConnectorImageDConnectorGraphicConnectorGraphicDLocThetaGraphicLocThetaGraphic DLocGraphic LocGraphicDGraphicGraphic intoImage intoLocImageintoLocThetaImagemoveStartPointmoveStartPointThetalocPath emptyLocPathemptyLocGraphic openStroke closedStroke filledPath borderedPathtextline rtextline escapedline rescapedline hkernline vkernlinestrokedEllipserstrokedEllipse filledEllipserfilledEllipseborderedEllipserborderedEllipse straightLinestraightLineBetween curveBetweenstrokedRectanglefilledRectangleborderedRectangle strokedCircle filledCircleborderedCircle strokedDisk filledDisk borderedDisk DAdvGraphic AdvGraphicmakeAdvGraphicextractLocGraphic runAdvGraphicadvplus advconcatDBoundedLocThetaGraphicBoundedLocThetaGraphicDBoundedLocGraphicBoundedLocGraphicDBoundedGraphicBoundedGraphiccenterOrthoBBoxemptyBoundedLocGraphicillustrateBoundedGraphicillustrateBoundedLocGraphic illustrateBoundedLocThetaGraphic TraceDrawing TraceDrawingT DTraceDrawingDTraceDrawingTrunTraceDrawingexecTraceDrawingevalTraceDrawingrunTraceDrawingTexecTraceDrawingTevalTraceDrawingTliftToPictureUliftToPictureMb mbPictureUquerydrawxdrawdrawidrawi_xdrawixdrawi_nodenodei RadialAnchor radialAnchorCardinalAnchor2 northeast southeast southwest northwestCardinalAnchornorthsoutheastwest CenterAnchorcenter northwards southwards eastwards westwardsnortheastwardssoutheastwardssouthwestwardsnorthwestwardsradialConnectorPoints CtxPicture DCtxPicture runCtxPicturerunCtxPictureU drawTracingclipCtxPicture mapCtxPictureoverundercentricnextToHnextToVatPoint centeredAtzconcathspacevspacevsepalignHalignV alignHSep alignVSephcatAvcatAhsepAvsepAloadAfmMetrics loadGSMetricsJoinOneEmpty joinfoldr joinfoldlIndentLineDoc1unDocindentSrunDocbaseGHC.Real fromIntegralpadr getParserFKSKyieldalt eagerMany eagerSome<:>Control.ApplicativesomegetLexemeParser lineComment spanCommentendLinegetGlyphMetrics getAfmUnit getFontLoadIO FontLoadLoggetFontLoadLogmessage1extractCapHeightextractFontBBox globalInfofontBBoxlpcharMetricsV4Dot1 widthVector characterCode charMetricsV2standardTextMargin wumpus_blackwumpus_light_graywumpus_courier glyphQuery withFontSizemonoTotalCharHeightupdateStrokePropsupdateFontProps thick_lineultra_thick_line thin_line setLineCap setLineJoinunCF2unCF1unCFgetHPrim graphicBodywumpus-core-0.42.0Wumpus.Core.Picture vectorPath emptyPathostrokecstroke fillStroke textlabel rtextlabel escapedlabel rescapedlabel hkernlabel vkernlabel strokeEllipsedrawWith rectanglePath bbrectanglegetTraceDrawinggetTraceDrawingT extendPtDist getCtxPicture boundaryExtr boundaryCtr boundaryN boundaryS boundaryE boundaryW boundaryNW boundaryNE boundarySW boundarySEboundaryLeftEdgeboundaryRightEdgeboundaryBottomEdgeboundaryTopEdge empty_drawing drawingConcat mbpostcomb megaCombRmove alignMove alignMove2afmLoadFontCalcsafm_mono_defaults_4_1gsLoadFontCalcsresolveFontFileghostscript_mono_defaults_8_54