úÎ6>1   .Data structure used in parsing needle diagrams(c) Josh KirklinMITjjvk2@cam.ac.ukNone-BE A monad for examining a grid. A  † is a list of rows, the elements of which are not necessarily aligned, with the exception that the left edge of the grid is aligned.5So for example, the following is a valid shape for a  : > ____________ |___|___|_|__| |__|_|_|__|_|__ |_|______|_____|  Generate a  , from a list of rows of elements and widths.Pretty print a gridGet the grid height`Get the element at a certain position in the grid. The top left block is in the (0,0) position.NReturn a list of positions satisfying a predicate in a grid, in reading order.;Run a grid examination. A start position must be specified.Get the entire grid.%Get the current position in the grid.^Set the current position in the grid. This is unsafe -- an in bounds check is NOT performed.`Modify the current position in the grid. This is unsafe -- an in bounds check is NOT performed.(Get the element at the current position.gMove to and return the grid element to the left. If there is no element to the left, returns Nothing.iMove to and return the grid element to the right. If there is no element to the right, returns Nothing.¥Move to and return the grid element above the column a certain distance from the right edge of the current element. If there is no such element, returns Nothing.¥Move to and return the grid element below the column a certain distance from the right edge of the current element. If there is no such element, returns Nothing.¤Move to and return the grid element above the column a certain distance from the left edge of the current element. If there is no such element, returns Nothing.¤Move to and return the grid element below the column a certain distance from the left edge of the current element. If there is no such element, returns Nothing.PBranch an examination, i.e. perform it and then return to the original position. The width of the current element" !"#$%&'( )*+ , !   !"#$%&'( )*+ ,Parsing needle diagrams(c) 2014 Josh KirklinMITjjvk2@cam.ac.ukNoneErrors in parsing.-0The grid element for the first round of parsing.1The datatype representing a generic needle arrow.Present the error.Parse a string to a needle.Pretty print a needle grid/Parse a needle grid 0123-456789:;<=>?@AB./C  0132- =<;:987654>?@AB./CTemplate Haskell for needle(c) 2014 Josh KirklinMITjjvk2@cam.ac.ukNoneE The inline needle quasi-quoter. º{-# LANGUAGE QuasiQuotes #-} exampleArrow :: Num c => (a,b,c) -> (a,a,b,c,c) exampleArrow = [nd| }===========> \========> }===========> }==={negate}> \========> |] Load a needle from a file. f{-# LANGUAGE TemplateHaskell #-} exampleArrow :: Float -> Float exampleArrow = $(ndFile "example.nd")DConvert NeedleArrow to ExpQ DE   DEASCII-fied arrow notation.(c) 2014 Josh KirklinMITjjvk2@cam.ac.ukNone"FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde  f      !"#$%&&'())*+,-./0123456789:;<=>?@ABCDEFGHIGHJGHKGHLGHMGHNGHOGHPGHQGHRGHSGHTGHUGHVGHWGHXGHYGHYGHZGH[GH\GH]GH^GH_GH`GHaGHbGHcGHcGHdGefGeghneedle-0.1.0.0Control.Arrow.Needle.ParseControl.Arrow.Needle.TH(Control.Arrow.Needle.Internal.UnevenGridControl.Arrow.Needle NeedleErrorConstructionError ParseError NeedleArrowJoinThroughInputpresentNeedleError parseNeedlendndFile GridExamineGridgrid prettyGridheight!!? findPositions gridExaminegetGrid getPosition putPositionmodifyPositionhereGetleftGetrightGetrUpGetrDownGetlUpGetlDownGetbranchwidth GridPositionGridElemendunwrapGridRowelementsrowsfromLefthere NeedleElemprettyNeedleGridparseNeedleGrid NeedleGrid DirectionDownUp TunnelExitTunnelEntranceSwitchExtArrowLabelOutLabelInOutInTrackNone gridArrowoutputPositionsfindLabelOutPosition arrowJoinarrowToPosition$fShowNeedleErrorarrowQinputsbase Control.Arrowarrfirstapp|||loopleftApp^<<<<^>>^^>>returnA&&&***secondArrow runKleisliKleisli zeroArrow ArrowZero<+> ArrowPlus+++rightleft ArrowChoice ArrowApply ArrowMonad ArrowLoopControl.Category>>><<<