!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm n o p q r s t u v w x y z { | } ~   None[\tKeeps track of the lines of text to display, the current scroll positions, and the set of highlighted line numbers..The number of invisible lines above the screen        None[\lThe internal state of the split-view widget. Tracks the state of both child widgets and the current layout.State of the left widgetState of the right widgetCurrent layout!"The currently focused child widgetGview currentWidget $ HSplit { _leftWidget = "foo", _layout = LeftOnly } Left "foo""$Traverses the left widget if focused5has leftWidgetFocused $ HSplit { _layout = LeftOnly }True6has leftWidgetFocused $ HSplit { _layout = RightOnly }FalseDhas leftWidgetFocused $ HSplit { _layout = Split FocusLeft (1 % 2) }True#%Traverses the right widget if focused7has rightWidgetFocused $ HSplit { _layout = RightOnly }True6has rightWidgetFocused $ HSplit { _layout = LeftOnly }FalseFhas rightWidgetFocused $ HSplit { _layout = Split FocusRight (1 % 2) }True !"# !"# !"#  !"#Safe[\ $%&'()*+,-. $%&'()*+,-. ,-.()*+$%&'$%&'()*+,-.None[\5.Ad-hoc data structure to render the (visible) 9 as list of lines.9Results widget state:The results list is empty;7The structure of the Results buffer is a double Zipper:lines above the current screen&lines on screen above the current itemthe current item&lines on screen below the current itemlines below the current screen<Append a line to the 99. The line is appended below the visible screen, so use = to make it visible. Reverse the 9=<Show one more item at the bottom of the screen if available.>9Show one more item at the top of the screen if available.?`Remove the last item from the bottom of the screen and prepend it to the invisible items below.@]Remove the first item from the top of the screen and append it to the invisible items above.AMove the cursor one item down.BMove the cursor one item up.C9Adjust the number of on-screen items to the given height:If the current list is too long for the new height, take items from the top until the current item is topmost, then from the bottom.lIf the current list is too short for the new height, add items below until the buffer is empty, then above.DConverts the visible 9 to a list of 5Hs. Each item in the returned list corresponds to a line on the screen.Each group of 74s that points to the same file is prepended with a 6&. The item below the cursor becomes a 8.EThe line number of a 5.  for 6s.F,The file name of the currently selected itemG.The line number of the currently selected itemHJThe line numbers with matches in the file of the currentliy selected item56789:;<=>?@ABCthe new height! if the height has not changed,  newResults otherwiseDEFGH57689;:<=>?@ABCDEFGH9:;FGH<>=@?BAC5678DE56789:;<=>?@ABCDEFGHSafe[\LParses lines of $, skipping lines that are not valid grep output.MParses a line of grep output. Returns  if the line cannot be parsed.\The output should consist of a file name, line number and the content, separated by colons:#parseLine "path/to/file:123:foobar"Just (FileLineReference {getFile = File {getFileName = "path/to/file"}, getLineReference = LineReference {getLineNumber = Just 123, getLineText = "foobar"}})5Omitting the line number still produces valid output:parseLine "path/to/file:foobar"Just (FileLineReference {getFile = File {getFileName = "path/to/file"}, getLineReference = LineReference {getLineNumber = Nothing, getLineText = "foobar"}})&However, an file name must be present:parseLine "foobar"NothingLM$LMLM$LMSafeOT[\NLike OT, but if the input is not prefixed with a file and line number, i. e. is not valid grep -nH output, then adds -nH (-n: with line number, -H: with file name) to the grep command line arguments.OTakes a  stream and runs it through a grepi process, returning a stream of results. The original command line arguments are passed to the process.PInvokes  grep -nH -rI (-n: with line number, -H: with file name, -r : recursive, -I: ignore binary files) and returns the results as a stream. More arguments (e. g. pattern and directory) are taken from the command line.NOPNOPONPNOPNone[\ SLine numbers (default: blue)T-Highlighted line numbers (default: bold blue)U'Normal text (default: terminal default)V Highlighted text (default: bold)WQFile names in results view (default: terminal default color on green background)X4Selected entry (default: terminal default, inverted)[Color configuration\Tabstop width (default: 8)]Executable for e$ key (default: environment variable $EDITOR, or vi if $EDITOR is not set)QRSTUVWXYZ[\]bcdefghijklQRSTUVWXYZ[\]bcdefghijklYZ[\]QRSTUVWXdcbjihgfekl QRSTUVWXYZ[\]bcdefghijkl None[\m' actions can read from the environment.o5External configuration (colors, editor executable, &)p?The bounds (width and height) of the display region where the   or the current  is displayedmnopstg     QRSTUVWXYZ[\]bcdefghijklmnpostmnopstmnopst NoneOT[\ vmSuspend the application and run the action, e. g. invoking an external process, then resume the application.w Shut down.yVIndicates that the state has been changed visibly, so the screen should be refreshed.zhThe state has not changed or the change would not be visible, so refreshing the screen is not required.{/The type of action to be performed on an event.|>Do not handle the event (fall-through to other event handlers)}(Handle the event by performing an action~Interrupt the applicationIf the lookup returns  action, then handle it with } action' , otherwise | this event handler.Special case of ( where actions are looked up from a map.=The first event handler that triggers (i. e. does not return |) handles the event.uvwxyz{|}~uvwxyz{}|~ {|}~xyzuvwuvwxyz{|}~ None:[\Expand a list of linesExpand a single line Safe[\H !"#$%&    '()*+,-./01234567None 9;<=DILR[\The 3 monad transformer is parameterized over the state s of a  or an .Lift a monadic action to .Pass an initial state and an m and reduce a ( action to an action in the base monad. A version of 8 where the action is lifted to .The m of  is not stateful, however it can be modified globally. An example is resizing the application by changing the display bounds. can read from the mD. Modifications to the enviromnent are only possible globally (see ), the 9 environment is pure. :v !#;9<     *QRSTUVWXYZ[\]bcdefghijklmnpost : NoneOT[\ The % type is parameterized over the type e$ of events it handles and the type s of its state.&Creates the initial state for the app.How to convert an external = to the App's event5Handles an event, possibly modifying the App's state.  handleEvent e s = case e of > ? [] -> } ( z) -- Handles the Enter key, but does nothing. > @ [] -> } ( x) -- Handles the Up8 key and triggers a redraw. _otherwise -> |E -- Does not handle the event, so other handlers may be invoked.  Creates a AC to be displayed. May modify the App's state (e. g. for resizing).Like &, but does not return the final state."Runs runs the event loop until an u w& is encountered. Events handled with u (v action) will shut down BA, run the action (e. g. invoking an external editor), and start B again.CUWe need the display region in order to initialize the app, which in turn will start B6. To resolve this circular dependency, we start once BO in order to determine the display region, and shut it down again immediately.Opens devtty' read-only. Should be connected to the stdin of a GUI process (e. g. B).Opens devtty( write-only. Should be connected to the stdout of a GUI process (e. g. B).CDEF CDEFNoneOT[\A S is a unit that is displayed on the screen. It is associated with a mutable state sW. It provides an event handler with default keybindings and can generate a renderable G. Widget modules should provide a c instance and additionally a collection of actions that can be invoked by external event handlers: widgetAction ::  s m x The initial state of the widgetGenerate a renderable GH from the widget state. The state can be modified (e. g. for resizing).#The default event handler for this (. May provide e.g. default keybindings. xyz{}|~ xyz{|}~None[\ xyz{}|~None[\ Compose two s side-by-side Initial state3Initially, the left widget is rendered full-screen.Drawing the Widgets\Drawing is delegated to the child widgets in a local environment reduced to thir respective .Default keybindings]Events are routed to the focused widget. Additionally, the following keybindings are defined: Tab  f full screen ( / ) q close right widget ( if right widget is focused) #Display the left widget full-screen$Display the right widget full-screen%Display both widgets in a split view.JSwitch focus from left to right child widget and vice versa (only if the  is ) HFocus left or right area,Left area width as fraction of overall widthIJKLMN !"# !"# HIJKLMNNone!"[\'Display lines of text with line numbers Initial state6The pager is empty, i. e. no lines of text to display.Drawing the pager The lines of text are printed, starting at the current scroll position. If not enough lines are available, the scroll position is adjusted until either the screen is filled, or the first line is reached. Highlighted lines are displayed according to the config values i and g (default: bold).Default keybindings !!!!, hjkl  (-1),  1,  (-1),  1 PgUp, PgDn  (-1),  1 %Replace the currently displayed text. Scroll to the given line number.Scroll up or down one line. Gscroll (-1) -- scroll one line up scroll 1 -- scroll one line down~Scroll up or down one page. The first line on the current screen will be the last line on the scrolled screen and vice versa. OscrollPage (-1) -- scroll one page up scrollPage 1 -- scroll one page down'Horizontal scrolling. Increment is one d. RhScroll (-1) -- scroll one tabstop left hScroll 1 -- scroll one tabstop right OP<Lines of text to display in the pager (starting with line 1)/List of line numbers that should be highlightedQR OPQRNoneOT[\QThe results widget displays a list of lines with line numbers, grouped by files. Initial stateAThe initial buffer is empty and can be filled line by line using .Drawing the results list,Found matches are grouped by file name. Each file group has a header and a list of result lines with line numbers. The result lines can be selected with the cursor, the file group headers are skipped. When only part of a file group is shown at the top of the screen, the header is shown nevertheless.Default keybindings  jk, !! ,  PgDn, PgUp ,  Add a line to the results list. If the result is found in the same file as the current last result, it will be added to the same results group, otherwise a new group will be opened.BMove up/down one results page. File group headers will be skipped.BMove up/down one results page. File group headers will be skipped.BMove up/down one results line. File group headers will be skipped.BMove up/down one results line. File group headers will be skipped.STUVWXYZ$%&'()*+,-.9FGH 9FGHSTUVWXYZ[  !"#$%&'()*+,-./01233456789:;<=>??@ABBCDEEFGHIJKLMNOPQRQSTUVWXYZ[\]^_`abcdefghhijklmnoopqrstuvwxyz{|}~                               !"#$%&'()*+,*+-*+./01/02 3 4 567689:;9:<9:=9:>?@?ABCDEDF9:G9:HDIDIDJK9:LDMDNDODPDQDRDSDTUV9WX9WY9WZ*[\*[]*[^*[_*`a*bc d e f g*hijklmnopqrstuvwxyz{|}$vgrep-0.1.3.0-Dp3hIdNhwTpISmGymZ3UoF%Vgrep.Widget.HorizontalSplit.Internal Vgrep.TypeVgrep.Widget.Pager.Internal Vgrep.ResultsVgrep.Widget.Results.Internal Vgrep.ParserVgrep.System.GrepVgrep.Environment.ConfigVgrep.Environment Vgrep.Event Vgrep.TextControl.Monad.State.Extended Vgrep.AppVgrep.Widget.TypeVgrep.Widget.HorizontalSplitVgrep.Widget.PagerVgrep.Widget.ResultsVgrepTApp Vgrep.WidgetWidget Vgepr.AppbaseGHC.Real%transformers-0.5.2.0Control.Monad.Trans.Classlift#mmorph-1.0.6-I6fWQohILlqH1gvA6UibXUControl.Monad.MorphhoistPager_column _highlighted_above_visible $fEqPager $fShowPagerabovecolumn highlightedvisiblepositionLayoutLeftOnly RightOnlySplitFocus FocusLeft FocusRightHSplit _leftWidget _rightWidget_layout $fEqFocus $fEqLayoutlayout leftWidget rightWidget currentWidgetleftWidgetFocusedrightWidgetFocusedFileLineReferencegetFilegetLineReference LineReference getLineNumber getLineTextFile getFileName$fEqFile $fShowFile$fEqLineReference$fShowLineReference$fEqFileLineReference$fShowFileLineReference DisplayLine FileHeaderLine SelectedLineResults EmptyResultsfeedshowNextshowPrevhideNexthidePrevmoveDownmoveUpresizetoLines lineNumbercurrentFileNamecurrentLineNumbercurrentFileResultLineNumbers $fEqResults $fShowResults$fEqDisplayLineparseGrepOutput parseLine grepForAppgrep recursiveGrepColors _lineNumbers_lineNumbersHl_normal _normalHl _fileHeaders _selectedConfig_colors_tabstop_editor $fEqColors $fShowColors $fEqConfig $fShowConfigcolorseditortabstop fileHeaders lineNumbers lineNumbersHlnormalnormalHlselected defaultConfigwithConfiguredEditor EnvironmentEnv_config_region$fEqEnvironment$fShowEnvironmentconfigregion InterruptSuspendHaltRedraw UnchangedNextSkipContinuedispatch dispatchMap$fMonoidRedraw $fFunctorNext $fMonoidNextexpandForDisplayexpandLineForDisplay liftStatewhenSunlessSVgrepmkVgrepT runVgrepT vgrepBracketmodifyEnvironment$fZoomVgrepTVgrepTst$fMFunctorVgrepT$fMonadTransVgrepT$fMonadStatesVgrepT$fMonadReaderEnvironmentVgrepT$fFunctorVgrepT$fApplicativeVgrepT $fMonadVgrepT$fMonadIOVgrepT initialize liftEvent handleEventrenderrunApp_runAppttyInttyOutdrawhandle HSplitWidget hSplitWidgetleftOnly rightOnly splitView switchFocus PagerWidget pagerWidgetreplaceBufferContents moveToLinescroll scrollPagehScroll ResultsWidget resultsWidget feedResultpageUppageDownprevLinenextLineresizeToWindowreverseGHC.BaseNothingJust visibleHeightcurrent bufferToList#text-1.2.2.1-9Yh8rJoh8fO2JMLWffT3QsData.Text.Internal.LazyText lineParsergrepWithFileAndLineNumbergrepPipe recursive withFileNamewithLineNumberskipBinaryFiles lineBufferedcreateGrepProcessstreamResultsFromtextFromHandle textToHandlepeek Control.MonadguardjoinMonad>>=>>returnfailFunctorfmap<$ Applicativepure<*>*><*Data.TraversablemapMsequenceliftM Alternativemanyemptysome MonadPlusmzeromplusmfilter<$!>unless replicateM_ replicateMfoldM_foldM zipWithM_zipWithM mapAndUnzipMforever<=<>=>filterMforMControl.Applicativeoptional WrappedMonad WrapMonad unwrapMonad WrappedArrow WrapArrow unwrapArrowZipList getZipListData.Functor.ConstConstgetConst Data.Foldablemsum sequence_forM_mapM_ Data.Functorvoid<$>apliftM5liftM4liftM3liftM2when=<<liftA3liftA2liftA<**>!vty-5.11.1-IOfA2hjbE0wJLwNGofp7q1Graphics.Vty.Prelude regionHeight regionWidth DisplayRegioncontainers-0.5.7.1 Data.Map.BasefromListMap expandText expandTabsexpandSpecialCharsControl.Monad.FixMonadFixmfix mtl-2.2.1-6qsR1PHUy5lL47Hpoa4jCMControl.Monad.State.Class MonadStategetstateputControl.Monad.IO.ClassMonadIOliftIO Data.FunctionfixControl.Monad.Trans.State.LazyrunStateStategetsmodifyStateT runStateT MonadTransmodify' evalState execStatemapState withState evalStateT execStateT mapStateT withStateTControl.Exception.BasebracketControl.Monad.Reader.Classlocal MonadReaderaskGraphics.Vty.Input.EventsEventEvKeyKEnterKUpGraphics.Vty.PicturePicture Graphics.VtyVtydisplayRegionHack appEventLoopwithVtyinitVtyGraphics.Vty.Image.InternalImage initHSplit drawWidgetsrunInLeftWidgetrunInRightWidget handleEventshSplitKeyBindingsLefthSplitKeyBindingsRight initPagerpagerKeyBindings setPosition renderPager initResultsresultsKeyBindings repeatedly tryPrevLine tryNextLine maybeModifyrenderResultList renderLine