)      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ NoneOTAn iso which converts to/from  -> TextAn iso which converts to/from  -> StringAn iso which converts to/from  -> []None2OT1This represents a range between two coordinates () (Coord Row Column) represents a char in a block of text. (zero indexed) e.g. Coord 0 0 is the first character in the text, Coord 2 1 is the second character of the third row-A Helper only used when combining many spans.8A span which maps a piece of Monoidal data over a range.An Q represents an exact position in a file as a number of characters from the start.A type alias to Range' which specializes the types to s.A type alias to  ) which specializes the types to integers.%Applies a function over the row of a (Applies a function over the column of a -Applies a function over both functors in any . Moves a  by a given q It may be unintuitive, but for (Coord row col) a given range will be moved down by row and to the right by col.!)Moves a range forward by the given amount"Moves a ' forward by the given amount of columns#+Adds the rows and columns of the given two s.$=Given the text you're operating over, creates an iso from an  to a .1Given the text you're operating over, converts a  to an .2Given the text you're operating over, converts an  to a .%This will restrict a given 1 to a valid one which lies within the given text.&This will restrict a given 1 to a valid one which lies within the given text.'Combines a list of spans containing some monoidal data into a list of offsets with with the data that applies from each Offset forwards.(clamp min max val3 restricts val to be within min and max (inclusive)).Returns the number of rows and columns that a  spans as a *GReturns the number of rows and columns that a chunk of text spans as a + A lens over text before a given ,A lens over text after a given -+A lens over text which is encompassed by a 2  !"#$%&'()*+,-./012#  !"#$%&'()*+,-# $%&- *) !"#'(+,(   !"#$%&'()*+,-./012NoneAT:>Members of this class have access to buffer extensions. (Each   is a member of this class);CThis lens focuses the Extensions States map of the in-scope buffer.<7Members of this class have access to editor extensions.='This lens focuses the Extensions States>0A map of extension types to their current value.?DA wrapper around an extension of any type so it can be stored in an >AThis is a lens which will focus the extension state that matches the type inferred as the focal point. It's a little bit of magic, if you treat the focus as a member of your extension state it should just work out.(This lens falls back on the extension's 9 instance (when getting) if nothing has yet been stored.BBQ is a lens which will focus a given extension's state within a buffer (within a ). The lens will automagically focus the required extension by using type inference. It's a little bit of magic, if you treat the focus as a member of your extension state it should just work out.(This lens falls back on the extension's 9 instance (when getting) if nothing has yet been stored. :;<=>?@ABC :;<=>?@AB ?@>:;<=BA:;<=>?@ABCNone /9;AIOTD[A buffer, holds the text in the buffer and any extension states that are set on the buffer.EUThis allows creation of polymorphic lenses over any type which has access to a BufferG2This lens focuses the text of the in-scope buffer.H)Creates a new buffer from the given text. DEFGHIJKDEFGHDEFGH DEFGHIJKNoneAOTL(This is the primary state of the editor.MRAn opaque reference to a buffer. When operating over a BufRef Rasa checks if the D` still exists and simply ignores any operations over non-existent buffers; typically returning RQThis allows polymorphic lenses over anything that has access to an Editor contextT(A lens over the map of available buffersU,A lens over the exiting status of the editorV.A lens over the next buffer id to be allocatedLMNRSTUVWXYZLMNRSTUVLRSTUVMNLMNRSTUVWXYZNoneAT [PThis is triggered when text in a buffer is changed. The Event data includes the D that changed and the new text which is now contined in that range.]IThis represents each modifier key that could be pressed along with a key.a}This event is dispatched in response to keyboard key presses. It contains both the char that was pressed and any modifiers (]+) that where held when the key was pressed.kbThis event is dispatched after adding a new buffer. The contained BufRef refers to the new buffer.mlThis event is dispatched before exiting the editor, listen for this to do any clean-up (saving files, etc.)o7This event is dispatched immediately after dispatching q.qKThis event is dispatched when it's time for extensions to render to screen.s=This event is dispatched immediately before dispatching the q event.ukThis event is dispatched immediately before dispatching any events from asyncronous event listeners (like as)w@This event is dispatched exactly once when the editor starts up.[\]^_`abcdefghijklmnopqrstuvwx[\]_`^abcdefghijklmnopqrstuvwxwxuvstqropmnklabcdefghij]^_`[\ [\]^_`a bcdefghijklmnopqrstuvwxNone 29;<=AIOT bThis contains all data representing the editor's state. It acts as the state object for an 'Action{This is a monad for performing actions against the editor. You can register Actions to be run in response to events using Within an Action you can:Use liftIO for IO5Access/edit extensions that are stored globally, see A Embed any s exported other extensionsEmbed buffer actions using   or  DAdd/Edit/Focus buffers and a few other Editor-level things, see the Rasa.Internal.Actions module.Free Monad Actions for Action:A map of Event types to a list of listeners for that eventxAn opaque reverence to a specific registered event-listener. A ListenerId is used only to remove listeners later with .:A wrapper around event listeners so they can be stored in .+Embeds a ActionF type into the Action MonadOAllows running state actions over ActionState; used to lift mtl state functionsAllows running IO in BufAction.Runs an Action into an IOEvals an Action into an IOExecs an Action into an IOEInterpret the Free Monad; in this case it interprets it down to an IO#NoneATUse this to dispatch an event of any type, any listeners which are listening for this event will be triggered with the provided event. Use this within an Action.pThis is a helper which extracts and coerces a listener from its wrapper back into the proper event handler type.eThis extracts all event listeners from a map of listeners which match the type of the provided event.XThis registers an event listener, as long as the listener is well-typed similar to this:MyEventType -> Action ()< then it will be triggered on all dispatched events of type  MyEventType+. It returns an ID which may be used with  to cancel the listener This acts as 6 but listens only for the first event of a given type.KThis removes a listener and prevents it from responding to any more events.DRegisters an action to be performed during the Initialization phase.This phase occurs exactly ONCE when the editor starts up. Though arbitrary actions may be performed in the configuration block; it's recommended to embed such actions in the onInit event listener so that all event listeners are registered before anything Actions occur.<Registers an action to be performed BEFORE each event phase.JRegisters an action to be performed ONCE before only the NEXT event phase.=Registers an action to be performed BEFORE each render phase.This is a good spot to add information useful to the renderer since all actions have been performed. Only cosmetic changes should occur during this phase.KRegisters an action to be performed ONCE before only the NEXT render phase.=Registers an action to be performed during each render phase.MThis phase should only be used by extensions which actually render something.KRegisters an action to be performed ONCE before only the NEXT render phase.MThis phase should only be used by extensions which actually render something.<Registers an action to be performed AFTER each render phase.This is useful for cleaning up extension state that was registered for the renderer, but needs to be cleared before the next iteration.@Registers an action to be performed after the NEXT render phase.:Registers an action to be performed during the exit phase.This is only triggered exactly once when the editor is shutting down. It allows an opportunity to do clean-up, kill any processes you've started, or save any data before the editor terminates.@Registers an action to be performed after a new buffer is added.,The supplied function will be called with a M& to the new buffer, and the resulting  will be run.2This is fired every time text in a buffer changes.YThe range of text which was altered and the new value of that text are provided inside a [ event.    NoneAOTThis is a type alias to make defining your event provider functions easier; It represents the function your event provider function will be passed to allow dispatching events. Using this type requires the  Rank2Types language pragma. GA helper which when given an output channel results in a function from Action () -> IO ()U which dispatches any actions it's called with asyncronously to the main event loop.nThis function takes an IO which results in some Event, it runs the IO asynchronously and dispatches the eventNThis allows long-running IO processes to provide Events to Rasa asyncronously.JDon't let the type signature confuse you; it's much simpler than it seems.Let's break it down:( ->   ()): I is a type alias just to make defining your own functions easier; Using & with asyncEventProvider requires the  Rank2Types language pragma.;This type as a whole represents a function which accepts a  and returns an  -; the dispatcher itself accepts data of ANY  ( type and emits it as an event (see the Rasa.Internal.Events).When you call ( you pass it a function which accepts a dispatchU function as an argument and then calls it with various events within the resulting  .]Note that asyncEventProvider calls forkIO internally, so there's no need to do that yourself.&Here's a simple example which fires a Timer event every second. {-# language Rank2Types #-} data Timer = Timer myTimer :: Dispatcher -> IO () myTimer dispatch = forever $ dispatch Timer >> threadDelay 1000000 myAction :: Action () myAction = onInit $ asyncEventProvider myTimerDon't let the type signature confuse you; it's much simpler than it seems. The first argument is a function which takes an action provider; the action provider will be passed a dispatch function which can be called as often as you like with  Action ()s. When it is passed an % it forks off an IO to dispatch that w to the main event loop. Note that the dispatch function calls forkIO on its own; so there's no need for you to do so.TUse this function when you have some long-running process which dispatches multiple s._dispatchActionAsync allows you to perform a task asynchronously and then apply the result. In dispatchActionAsync asyncAction,  asyncActionw is an IO which resolves to an Action, note that the context in which the second action is executed is NOT the same context in which dispatchActionAsync is called; it is likely that text and other state have changed while the IO executed, so it's a good idea to check (inside the applying Action) that things are in a good state before making changes. Here's an example: VasyncCapitalize :: Action () asyncCapitalize = do txt <- focusDo $ use text -- We give dispatchActionAsync an IO which resolves in an action dispatchActionAsync $ ioPart txt ioPart :: Text -> IO (Action ()) ioPart txt = do result <- longAsyncronousCapitalizationProgram txt -- Note that this returns an Action, but it's still wrapped in IO return $ maybeApplyResult txt result maybeApplyResult :: Text -> Text -> Action () maybeApplyResult oldTxt capitalized = do -- We get the current buffer's text, which may have changed since we started newTxt <- focusDo (use text) if newTxt == oldTxt -- If the text is the same as it was, we can apply the transformation then focusDo (text .= capitalized) -- Otherwise we can choose to re-queue the whole action and try again -- Or we could just give up. else asyncCapitalize  None 29;<=IOT DContains all data about the editor; as well as a buffer which is in focus1. We keep the full ActionState here too so that s may be lifted inside a FThis is a monad for performing actions on a specific buffer. You run s by embedding them in a  via   or  Within a BufAction you can:Use  to run an Use liftIO for IO>Access/Edit the buffer's text; some commands are available in Rasa.Internal.Actions.#Access/edit buffer extensions; see BEmbed and sequence s from other extensions Free Monad Actions for BufAction1Embeds a BufActionF type into the BufAction Monad&Returns the text of the current buffer#Sets the text of the current buffer&Gets the range of text from the buffer&Sets the range of text from the bufferRAllows running state actions over BufActionState; used to lift mtl state functionsAllows running IO in BufAction.This lifts up an  to be run inside a <This lifts up a bufAction into an Action which performs the K over the referenced buffer and returns the result (if the buffer existed)JInterpret the Free Monad; in this case it interprets it down to an Action.  NoneOT  This lifts a  to an  which performs the ; on every buffer and collects the return values as a list. This lifts a  to an  which performs the " on the buffer referred to by the M; If the buffer referred to no longer exists this returns: Nothing.QThis adds a new buffer with the given text, returning a reference to that buffer."Returns an up-to-date list of all Ms Returns the D for a BufRef if it still exists. This is read-only; altering the buffer has no effect on the stored buffer. This function is useful for renderers."Returns an up-to-date list of all Ds, returned values are read-only; altering them has no effect on the actual stored buffers. This function is useful for renderers.Gets M" that comes after the one providedGets M# that comes before the one providedmThis signals to the editor that you'd like to shutdown. The current events will finish processing, then the 6 event will be dispatched, then the editor will exit.&Runs function over given range of text4Deletes the text in the given range from the buffer.9Replaces the text in the given range with the given text.*Inserts text into the buffer at the given .**(C) 2016 Chris PennerMIT+Chris Penner <christopher.penner@gmail.com>None:OTm  !"$%&'()*+,:;<=ABDEFGMR]_`^abcdefghijmDEFMGR*<=A:;Babcdefghij]^_` '$%& ),+ !"( NoneAOTThe main function to run rasa. rasa eventProviders extensionsAThis should be imported by a user-config with and called with an 7 containing any extensions which have event listeners.  rasa $ do cursor vim slateOThis is the main event loop, it runs recursively forever until something sets . It runs the pre-event listeners, then checks if any async events have finished, then runs the post event listeners and repeats. !"#$%&'()*+,-..//0#123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUUVWX YZ[\]^_`aabcdefghijklmmnopqrrstuvwxyz{{||}}~~       `                       !rasa-0.1.9-Je0L1jX0KLeL9XEYQLj3I5Rasa.Internal.TextRasa.Internal.RangeRasa.Internal.ExtensionsRasa.Internal.BufferRasa.Internal.EditorRasa.Internal.EventsRasa.Internal.ActionRasa.Internal.ListenersRasa.Internal.AsyncRasa.Internal.BufActionRasa.Internal.ActionsRasaBuffer Data.Action BufActiononEveryTriggerbufDo buffersDoremoveListenerbufferDo Rasa.ActionActionRasa.Ext Rasa.EditorexitingasTextasStringasLinesRange_rStart_rEnd $fShowRange $fEqRangeCoord'Coord _coordRow _coordColrEndrStart $fOrdRange$fBitraversableRange$fBifoldableRange$fBifunctorRange $fShowCoord' $fEqCoord'SpanOffsetCrdRangecoordColcoordRowoverRowoverColoverBoth moveRange moveRangeByN moveCursorByN moveCursorasCoord clampCoord clampRange combineSpansclampsizeOfRsizeOfbeforeCafterCrange $fNumCoord'$fBifunctorSpan $fOrdCoord'$fBiapplicativeCoord'$fBifunctorCoord' $fShowOffset $fEqOffset $fShowSpan$fEqSpan $fFunctorSpan $fShowMarker $fEqMarker HasBufExtsbufExtsHasExtsextsExtMapExtextbufExt $fShowExt HasBufferbuffertextmkBuffer$fHasBufferBuffer $fShowBuffer$fHasBufExtsBufferEditorBufRef $fShowBufRef $fEqBufRef $fOrdBufRef HasEditoreditorbuffers nextBufId$fDefaultEditor$fHasExtsEditor$fHasEditorEditor $fShowEditorBufTextChangedModCtrlAltShiftKeypressKEscKBSKEnterKUnknownKLeftKRightKUpKDownBufAddedExit AfterRenderOnRender BeforeRender BeforeEventInit $fShowInit$fEqInit$fShowBeforeEvent$fEqBeforeEvent$fShowBeforeRender$fEqBeforeRender$fShowOnRender $fEqOnRender$fShowAfterRender$fEqAfterRender $fShowExit$fEqExit$fShowBufAdded $fEqBufAdded $fShowMod$fEqMod$fShowKeypress $fEqKeypress$fShowBufTextChanged$fEqBufTextChanged ActionState getAction Listeners ListenerIdListener$fEqListenerId$fFunctorActionF$fFunctorAction$fApplicativeAction $fMonadAction actionQueue listenersnextListenerId mkActionState runAction evalAction execAction$fMonadIOAction$fMonadStateActionStateAction$fHasExtsActionState$fHasEditorActionState$fShowActionState dispatchEventmatchingListenersonEveryTrigger_ onNextEventonInitbeforeEveryEventbeforeEveryEvent_beforeNextEventbeforeEveryRenderbeforeEveryRender_beforeNextRender onEveryRenderonEveryRender_ onNextRenderafterEveryRenderafterEveryRender_afterNextRenderonExit onBufAddedonBufTextChanged DispatcherdispatchEventAsyncasyncEventProviderasyncActionProviderdispatchActionAsync getBufActiongetTextsetTextgetRangesetRange liftState liftAction runBufAction$fMonadIOBufAction#$fMonadStateBufActionStateBufAction$fHasBufExtsBufActionState$fFunctorBufActionF$fFunctorBufAction$fApplicativeBufAction$fMonadBufAction buffersDo_bufDo_ newBuffer getBufRefs getBuffer getBuffers nextBufRef prevBufRefexit overRange deleteRange replaceRangeinsertAtrasa$yi-rope-0.7.0.2-4e29TpEi6l7hStEfnaGSYi.RopeYiStringMarkerbaseData.Bifunctor BifunctortoOffsettoCoordIDStartEnd1data-default-class-0.1.2.0-FYQpjIylblBDctdkHAFeXAData.Default.ClassDefault_text' _bufExts'bufExts'text'GHC.BaseNothing _buffers' _exiting' _extState' _nextBufId'buffers'exiting' extState' nextBufId'ActionF liftActionFliftFIOactionInterpreter_ed _listeners_nextListenerId _actionQueue LiftStateLiftIOed getListener makeListenerextendListenerdispatchActionghc-prim GHC.TypesIOData.Typeable.InternalTypeableBufActionState BufActionF liftBufActionbufActionInterpreter_buffer' _actionStateGetTextSetTextSetRange actionStatebuffer'bufAt eventLoop