packages feed

nvim-hs 0.0.8 → 0.1.0

raw patch · 13 files changed

+38/−176 lines, 13 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Neovim.Context.Internal: StatefulSettings :: (FunctionalityDescription -> ([Object] -> Neovim r st Object) -> TQueue SomeMessage -> TVar (Map FunctionName ([Object] -> Neovim r st Object)) -> Neovim r st (Maybe FunctionMapEntry)) -> TQueue SomeMessage -> TVar (Map FunctionName ([Object] -> Neovim r st Object)) -> PluginSettings r st
- Neovim.Context.Internal: StatelessSettings :: (FunctionalityDescription -> ([Object] -> Neovim' Object) -> Neovim' (Maybe FunctionMapEntry)) -> PluginSettings () ()
+ Neovim: infixr 5 +:
+ Neovim.API.String: nvim_buf_add_highlight :: Buffer -> Int64 -> String -> Int64 -> Int64 -> Int64 -> forall r st. Neovim r st (Either Object Int64)
+ Neovim.API.String: nvim_buf_clear_highlight :: Buffer -> Int64 -> Int64 -> Int64 -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_buf_del_var :: Buffer -> String -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_buf_get_lines :: Buffer -> Int64 -> Int64 -> Bool -> forall r st. Neovim r st (Either Object [String])
+ Neovim.API.String: nvim_buf_get_mark :: Buffer -> String -> forall r st. Neovim r st (Either Object (Int64, Int64))
+ Neovim.API.String: nvim_buf_get_name :: Buffer -> forall r st. Neovim r st (Either Object String)
+ Neovim.API.String: nvim_buf_get_number :: Buffer -> forall r st. Neovim r st (Either Object Int64)
+ Neovim.API.String: nvim_buf_get_option :: Buffer -> String -> forall r st. Neovim r st (Either Object Object)
+ Neovim.API.String: nvim_buf_get_var :: Buffer -> String -> forall r st. Neovim r st (Either Object Object)
+ Neovim.API.String: nvim_buf_is_valid :: Buffer -> forall r st. Neovim r st (Either Object Bool)
+ Neovim.API.String: nvim_buf_line_count :: Buffer -> forall r st. Neovim r st (Either Object Int64)
+ Neovim.API.String: nvim_buf_set_lines :: Buffer -> Int64 -> Int64 -> Bool -> [String] -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_buf_set_name :: Buffer -> String -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_buf_set_option :: Buffer -> String -> Object -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_buf_set_var :: Buffer -> String -> Object -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_call_atomic :: [Object] -> forall r st. Neovim r st (Either Object [Object])
+ Neovim.API.String: nvim_call_function :: String -> [Object] -> forall r st. Neovim r st (Either Object Object)
+ Neovim.API.String: nvim_command :: String -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_command_output :: String -> forall r st. Neovim r st (Either Object String)
+ Neovim.API.String: nvim_del_current_line :: forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_del_var :: String -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_err_write :: String -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_err_writeln :: String -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_eval :: String -> forall r st. Neovim r st (Either Object Object)
+ Neovim.API.String: nvim_feedkeys :: String -> String -> Bool -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_get_api_info :: forall r st. Neovim r st (Either Object [Object])
+ Neovim.API.String: nvim_get_color_by_name :: String -> forall r st. Neovim r st (Either Object Int64)
+ Neovim.API.String: nvim_get_color_map :: forall r st. Neovim r st (Either Object (Map Object Object))
+ Neovim.API.String: nvim_get_current_buf :: forall r st. Neovim r st (Either Object Buffer)
+ Neovim.API.String: nvim_get_current_line :: forall r st. Neovim r st (Either Object String)
+ Neovim.API.String: nvim_get_current_tabpage :: forall r st. Neovim r st (Either Object Tabpage)
+ Neovim.API.String: nvim_get_current_win :: forall r st. Neovim r st (Either Object Window)
+ Neovim.API.String: nvim_get_option :: String -> forall r st. Neovim r st (Either Object Object)
+ Neovim.API.String: nvim_get_var :: String -> forall r st. Neovim r st (Either Object Object)
+ Neovim.API.String: nvim_get_vvar :: String -> forall r st. Neovim r st (Either Object Object)
+ Neovim.API.String: nvim_input :: String -> forall r st. Neovim r st (Either Object Int64)
+ Neovim.API.String: nvim_list_bufs :: forall r st. Neovim r st (Either Object [Buffer])
+ Neovim.API.String: nvim_list_runtime_paths :: forall r st. Neovim r st (Either Object [String])
+ Neovim.API.String: nvim_list_tabpages :: forall r st. Neovim r st (Either Object [Tabpage])
+ Neovim.API.String: nvim_list_wins :: forall r st. Neovim r st (Either Object [Window])
+ Neovim.API.String: nvim_out_write :: String -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_replace_termcodes :: String -> Bool -> Bool -> Bool -> forall r st. Neovim r st (Either Object String)
+ Neovim.API.String: nvim_set_current_buf :: Buffer -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_set_current_dir :: String -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_set_current_line :: String -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_set_current_tabpage :: Tabpage -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_set_current_win :: Window -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_set_option :: String -> Object -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_set_var :: String -> Object -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_strwidth :: String -> forall r st. Neovim r st (Either Object Int64)
+ Neovim.API.String: nvim_subscribe :: String -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_tabpage_del_var :: Tabpage -> String -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_tabpage_get_number :: Tabpage -> forall r st. Neovim r st (Either Object Int64)
+ Neovim.API.String: nvim_tabpage_get_var :: Tabpage -> String -> forall r st. Neovim r st (Either Object Object)
+ Neovim.API.String: nvim_tabpage_get_win :: Tabpage -> forall r st. Neovim r st (Either Object Window)
+ Neovim.API.String: nvim_tabpage_is_valid :: Tabpage -> forall r st. Neovim r st (Either Object Bool)
+ Neovim.API.String: nvim_tabpage_list_wins :: Tabpage -> forall r st. Neovim r st (Either Object [Window])
+ Neovim.API.String: nvim_tabpage_set_var :: Tabpage -> String -> Object -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_ui_attach :: Int64 -> Int64 -> Map Object Object -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_ui_detach :: forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_ui_set_option :: String -> Object -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_ui_try_resize :: Int64 -> Int64 -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_unsubscribe :: String -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_win_del_var :: Window -> String -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_win_get_buf :: Window -> forall r st. Neovim r st (Either Object Buffer)
+ Neovim.API.String: nvim_win_get_cursor :: Window -> forall r st. Neovim r st (Either Object (Int64, Int64))
+ Neovim.API.String: nvim_win_get_height :: Window -> forall r st. Neovim r st (Either Object Int64)
+ Neovim.API.String: nvim_win_get_number :: Window -> forall r st. Neovim r st (Either Object Int64)
+ Neovim.API.String: nvim_win_get_option :: Window -> String -> forall r st. Neovim r st (Either Object Object)
+ Neovim.API.String: nvim_win_get_position :: Window -> forall r st. Neovim r st (Either Object (Int64, Int64))
+ Neovim.API.String: nvim_win_get_tabpage :: Window -> forall r st. Neovim r st (Either Object Tabpage)
+ Neovim.API.String: nvim_win_get_var :: Window -> String -> forall r st. Neovim r st (Either Object Object)
+ Neovim.API.String: nvim_win_get_width :: Window -> forall r st. Neovim r st (Either Object Int64)
+ Neovim.API.String: nvim_win_is_valid :: Window -> forall r st. Neovim r st (Either Object Bool)
+ Neovim.API.String: nvim_win_set_cursor :: Window -> (Int64, Int64) -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_win_set_height :: Window -> Int64 -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_win_set_option :: Window -> String -> Object -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_win_set_var :: Window -> String -> Object -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: nvim_win_set_width :: Window -> Int64 -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: ui_attach :: Int64 -> Int64 -> Bool -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: ui_detach :: forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: ui_try_resize :: Int64 -> Int64 -> forall r st. Neovim r st (Either Object Object)
+ Neovim.Classes: infixr 5 +:
+ Neovim.Context.Internal: [StatefulSettings] :: (FunctionalityDescription -> ([Object] -> Neovim r st Object) -> TQueue SomeMessage -> TVar (Map FunctionName ([Object] -> Neovim r st Object)) -> Neovim r st (Maybe FunctionMapEntry)) -> TQueue SomeMessage -> TVar (Map FunctionName ([Object] -> Neovim r st Object)) -> PluginSettings r st
+ Neovim.Context.Internal: [StatelessSettings] :: (FunctionalityDescription -> ([Object] -> Neovim' Object) -> Neovim' (Maybe FunctionMapEntry)) -> PluginSettings () ()
- Neovim: ObjectExt :: UnpkInt8 -> ByteString -> Object
+ Neovim: ObjectExt :: ~Int8 -> ByteString -> Object
- Neovim: fromObject :: (NvimObject o, NvimObject o) => Object -> Either Doc o
+ Neovim: fromObject :: NvimObject o => Object -> Either Doc o
- Neovim.API.String: buffer_is_valid :: Buffer -> forall r st. Neovim r st Bool
+ Neovim.API.String: buffer_is_valid :: Buffer -> forall r st. Neovim r st (Either Object Bool)
- Neovim.API.String: tabpage_is_valid :: Tabpage -> forall r st. Neovim r st Bool
+ Neovim.API.String: tabpage_is_valid :: Tabpage -> forall r st. Neovim r st (Either Object Bool)
- Neovim.API.String: vim_del_current_line :: Neovim r st (Either Object ())
+ Neovim.API.String: vim_del_current_line :: forall r st. Neovim r st (Either Object ())
- Neovim.API.String: vim_err_write :: String -> forall r st. Neovim r st ()
+ Neovim.API.String: vim_err_write :: String -> forall r st. Neovim r st (Either Object ())
- Neovim.API.String: vim_feedkeys :: String -> String -> Bool -> forall r st. Neovim r st ()
+ Neovim.API.String: vim_feedkeys :: String -> String -> Bool -> forall r st. Neovim r st (Either Object ())
- Neovim.API.String: vim_get_api_info :: Neovim r st (STM [Object])
+ Neovim.API.String: vim_get_api_info :: forall r st. Neovim r st (Either Object [Object])
- Neovim.API.String: vim_get_buffers :: Neovim r st [Buffer]
+ Neovim.API.String: vim_get_buffers :: forall r st. Neovim r st (Either Object [Buffer])
- Neovim.API.String: vim_get_color_map :: Neovim r st (Map Object Object)
+ Neovim.API.String: vim_get_color_map :: forall r st. Neovim r st (Either Object (Map Object Object))
- Neovim.API.String: vim_get_current_buffer :: Neovim r st Buffer
+ Neovim.API.String: vim_get_current_buffer :: forall r st. Neovim r st (Either Object Buffer)
- Neovim.API.String: vim_get_current_line :: Neovim r st (Either Object String)
+ Neovim.API.String: vim_get_current_line :: forall r st. Neovim r st (Either Object String)
- Neovim.API.String: vim_get_current_tabpage :: Neovim r st Tabpage
+ Neovim.API.String: vim_get_current_tabpage :: forall r st. Neovim r st (Either Object Tabpage)
- Neovim.API.String: vim_get_current_window :: Neovim r st Window
+ Neovim.API.String: vim_get_current_window :: forall r st. Neovim r st (Either Object Window)
- Neovim.API.String: vim_get_tabpages :: Neovim r st [Tabpage]
+ Neovim.API.String: vim_get_tabpages :: forall r st. Neovim r st (Either Object [Tabpage])
- Neovim.API.String: vim_get_windows :: Neovim r st [Window]
+ Neovim.API.String: vim_get_windows :: forall r st. Neovim r st (Either Object [Window])
- Neovim.API.String: vim_input :: String -> forall r st. Neovim r st (STM Int64)
+ Neovim.API.String: vim_input :: String -> forall r st. Neovim r st (Either Object Int64)
- Neovim.API.String: vim_list_runtime_paths :: Neovim r st [String]
+ Neovim.API.String: vim_list_runtime_paths :: forall r st. Neovim r st (Either Object [String])
- Neovim.API.String: vim_name_to_color :: String -> forall r st. Neovim r st Int64
+ Neovim.API.String: vim_name_to_color :: String -> forall r st. Neovim r st (Either Object Int64)
- Neovim.API.String: vim_out_write :: String -> forall r st. Neovim r st ()
+ Neovim.API.String: vim_out_write :: String -> forall r st. Neovim r st (Either Object ())
- Neovim.API.String: vim_replace_termcodes :: String -> Bool -> Bool -> Bool -> forall r st. Neovim r st String
+ Neovim.API.String: vim_replace_termcodes :: String -> Bool -> Bool -> Bool -> forall r st. Neovim r st (Either Object String)
- Neovim.API.String: vim_report_error :: String -> forall r st. Neovim r st ()
+ Neovim.API.String: vim_report_error :: String -> forall r st. Neovim r st (Either Object ())
- Neovim.API.String: vim_subscribe :: String -> forall r st. Neovim r st ()
+ Neovim.API.String: vim_subscribe :: String -> forall r st. Neovim r st (Either Object ())
- Neovim.API.String: vim_unsubscribe :: String -> forall r st. Neovim r st ()
+ Neovim.API.String: vim_unsubscribe :: String -> forall r st. Neovim r st (Either Object ())
- Neovim.API.String: window_is_valid :: Window -> forall r st. Neovim r st Bool
+ Neovim.API.String: window_is_valid :: Window -> forall r st. Neovim r st (Either Object Bool)
- Neovim.Classes: fromObject :: (NvimObject o, NvimObject o) => Object -> Either Doc o
+ Neovim.Classes: fromObject :: NvimObject o => Object -> Either Doc o

Files

CHANGELOG.md view
@@ -1,8 +1,3 @@-# 0.0.8--* Adjust version range for messagepack rpc library and adjust implementation to-  the changes in that library- # 0.0.7  * Adjust handling of string sent by neovim in API generation.
− TestPlugins.hs
@@ -1,50 +0,0 @@-{-# LANGUAGE LambdaCase        #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TemplateHaskell   #-}-import           Neovim-import qualified Neovim.Context.Internal   as Internal-import           Neovim.Main               (realMain)-import           Neovim.Plugin.Classes-import           TestPlugins.TestFunctions--import           Control.Concurrent        (takeMVar, killThread)---- The script `TestPlugins.vim` comments how these functions should behave.--main :: IO ()-main = realMain transitionHandler Nothing defaultConfig-    { plugins = [ randPlugin ]-    }-  where-    transitionHandler tids cfg = takeMVar (Internal.transitionTo cfg) >>= \case-        Internal.InitSuccess ->-            transitionHandler tids cfg--        _ ->-            mapM_ killThread tids--randPlugin :: Neovim (StartupConfig NeovimConfig) () NeovimPlugin-randPlugin = do-    -- This plugin was intended to use a real random number generator, but-    -- unfortunately a Travis build with other GHC versions failed to reproduce-    -- the same numbers. So we just chose from these three numbers. You better-    -- don't use this for cryptography!-    let randomNumbers = cycle [42,17,-666] :: [Int16]-    wrapPlugin Plugin-      { exports = [ $(function' 'randoom) Sync-                  , $(function' 'const42) Sync-                  , $(function "PingNvimhs" 'pingNvimhs) Sync-                  , $(command "ComplicatedSpecialArgsHandling" 'complicatedCommand)-                      [ CmdSync Sync, CmdRange WholeFile-                      , CmdBang , CmdNargs "+"-                      ]-                  ]-      , statefulExports =-          [((), randomNumbers,-            [ $(function "Random" 'rf) Sync-            , $(function "InjectNumber" 'inj) Sync-            , $(function "InitLazy" 'registerFunctionLazily) Sync-            ])-          ]-      }-
− TestPlugins.sh
@@ -1,30 +0,0 @@-#!/bin/sh--# Shell script that starts a plugin provider which is interpreted from the-# TestPlugins.hs file inside this repository.--if [ -d ".cabal-sandbox/" ] ; then-    if ! type cabal > /dev/null 2>&1 ; then-        echo "cabal-install program not installed or on PATH"-        echo $PATH-        exit 1-    fi--    if ! type runghc > /dev/null 2>&1 ; then-        echo "runghc not installed or on PATH"-        echo $PATH-        exit 2-    fi-    # Use `cabal exec` if we are in a sandbox-    exec cabal exec runghc TestPlugins.hs -- $1 -l test-log.txt -v DEBUG-elif [ -d ".stack-work" ] ; then-    exec stack runghc TestPlugins.hs -- $1 -l test-log.txt -v DEBUG-else-    if ! type runghc > /dev/null 2>&1 ; then-        echo "runghc not installed or on PATH"-        echo $PATH-        exit 3-    fi-    exec runghc TestPlugins.hs -- $1 -l test-log.txt -v DEBUG-fi-
− TestPlugins.vim
@@ -1,73 +0,0 @@-" This script tests the intoroperability with all plugins defined in-" TestPlugins.hs-"-" TODO Define functions that return error messages for the assertions.-" For now, if the tests fail you should check the test log file for error-" messages (something like dist/test/nvim-hs-0.0.1-hspec.log).--" Initialize the plugin provider-call remote#host#Register('test', "*.l\?hs", rpcstart('./TestPlugins.sh', ['test']))-let haskellChannel = remote#host#Require('test')-" We need to issue a synchornous request to make sure that the function-" hooks are registered before we try to call them. Issueing this as late as-" possible will improve startup time because this is a blocking operation.-" TODO think about hooking into a general undefined function autocmd.-try-	if "Pong" != rpcrequest(haskellChannel, 'PingNvimhs', [])-		echom 'Ping function not properly registered'-		cq!-	endif-catch-	echom 'Functions not properly registered aborting'-	cq!-endtry--if haskellChannel < 1-	echom 'Failure to initialize the haskell channel for remote procedure calls'-	cq!-endif--" The test plugin random number generator is initialized with a static seed-if Random() != 42-	echom 'Expected Value of 42 but got: ' . Random()-	cq!-endif-if Random() != 17-	echom 'Expected Value of 17 but got: ' . Random()-	cq!-endif-if Random() != -666-	echom 'Expected Value of -666 but got: ' . Random()-	cq!-endif--" Test notifications-call InjectNumber(7)-if Random() != 7-	echom 'Expected Value of 7 but got: ' . Random()-	cq!-endif---let notsorandomvalue = Const42()-if notsorandomvalue != 42-	echom 'Expected the ultimate answer, but got: ' . notsorandomvalue-	cq!-endif--call Lazy()--" Well, this doesn't initialize a function (yet), but it will modify the-" state of the random numbers!-call InitLazy()--call Lazy()--if Random() != 1337-	echom 'Expected the next random number to be 1337'-	cq!-endif--" Everything works, exit normally-q!-
library/Neovim/API/Parser.hs view
@@ -146,8 +146,8 @@ extractFunction funDefMap = NeovimFunction     <$> (oLookup "name" funDefMap)     <*> (oLookup "parameters" funDefMap >>= toParameterlist)-    <*> (oLookupDefault False "can_fail" funDefMap)-    <*> (oLookup "async" funDefMap)+    <*> (oLookupDefault True "can_fail" funDefMap)+    <*> (oLookupDefault False "async" funDefMap)     <*> (oLookup "return_type" funDefMap >>= parseType)  
library/Neovim/API/TH.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE LambdaCase        #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell   #-}+{-# LANGUAGE CPP #-} {- | Module      :  Neovim.API.TH Description :  Template Haskell API generation module@@ -60,6 +61,13 @@  import           Prelude +dataD' :: CxtQ -> Name -> [TyVarBndr] -> [ConQ] -> [Name] -> DecQ+#if __GLASGOW_HASKELL__ < 800+dataD' = dataD+#else+dataD' cxtQ n tyvarbndrs conq ns =+    dataD cxtQ n tyvarbndrs Nothing conq (mapM conT ns)+#endif  -- | Generate the API types and functions provided by @nvim --api-info@. --@@ -183,11 +191,16 @@ createDataTypeWithByteStringComponent :: Name -> [Name] -> Q Dec createDataTypeWithByteStringComponent nme cs = do         tObject <- [t|ByteString|]-        dataD+#if __GLASGOW_HASKELL__ < 800+        let strictNess = (IsStrict, tObject)+#else+        let strictNess = (Bang NoSourceUnpackedness SourceStrict, tObject)+#endif+        dataD'             (return [])             nme             []-            (map (\n-> normalC n [return (IsStrict, tObject)]) cs)+            (map (\n-> normalC n [return strictNess]) cs)             (mkName <$> ["Typeable", "Eq", "Show"])  @@ -426,7 +439,11 @@ functionImplementation functionName = do     fInfo <- reify functionName     nargs <- mapM classifyArgType $ case fInfo of+#if __GLASGOW_HASKELL__ < 800             VarI _ functionType _ _ ->+#else+            VarI _ functionType _ ->+#endif                 determineNumberOfArguments functionType              x ->
library/Neovim/Classes.hs view
@@ -71,7 +71,7 @@             P.<+> lparen P.<> e P.<> rparen         Right obj -> obj -    fromObject :: (NvimObject o) => Object -> Either Doc o+    fromObject :: Object -> Either Doc o     fromObject = return . fromObjectUnsafe  
library/Neovim/Plugin.hs view
@@ -174,11 +174,14 @@             return p          Nothing -> do-            api <- wait vim_get_api_info+            api <- nvim_get_api_info             case api of-                (ObjectInt i:_) -> do+                Right (ObjectInt i:_) -> do                     liftIO . atomically . putTMVar mp . Right $ fromIntegral i                     return . Right $ fromIntegral i++                Left _ ->+                    err "Unexpected error when quering via nvim_get_api_info."                  _ ->                     err "Could not determine provider name."
library/Neovim/Plugin/ConfigHelper/Internal.hs view
@@ -92,9 +92,7 @@     (f,l,c) <- pLocation      void $ many spaceChar-    e <- option Error $ do-        void . try $ string "Warning:"-        return Warning+    e <- pSeverity     desc <- try pShortDesrciption <|> pLongDescription     return $ (quickfixListItem (Right f) (Left l))         { col = Just (c, True)@@ -102,6 +100,11 @@         , errorType = e         } +pSeverity :: Parser QuickfixErrorType+pSeverity = do+    try (string "Warning:" *> return Warning)+    <|> try (string "error:"   *> return Error)+    <|> return Error  pShortDesrciption :: Parser String pShortDesrciption = (:)
library/Neovim/RPC/Common.hs view
@@ -88,7 +88,7 @@     createUnixSocketHandle f =         liftIO $ getSocketUnix f >>= flip socketToHandle ReadWriteMode -    createTCPSocketHandle :: (Functor io, MonadIO io) => Int -> String -> io Handle+    createTCPSocketHandle :: (MonadIO io) => Int -> String -> io Handle     createTCPSocketHandle p h = liftIO $ getSocketTCP (fromString h) p         >>= flip socketToHandle ReadWriteMode . fst 
library/Neovim/RPC/FunctionCall.hs view
@@ -52,7 +52,7 @@ -- | Strip the error result from the function call. This should only be used by -- the Template Haskell API generated code for functions that declare -- themselves as unfailable.-withIgnoredException :: (Functor f, NvimObject result)+withIgnoredException :: (Functor f)                      => FunctionName -- ^ For better error messages                      -> f (Either err result)                      -> f result
nvim-hs-devel.sh view
@@ -24,7 +24,7 @@ elif [ -d "$sandbox_directory/.stack-work" ] ; then     # Stack leaves behind a .stack-work directory, so we take its present as a     # sign to use this approach.-    PATH=`stack path --bin-path` stack exec nvim-hs -- "$@"+    stack exec nvim-hs -- "$@" else     echo "No development directories found. Have you built the project?"     exit 2
nvim-hs.cabal view
@@ -1,5 +1,5 @@ name:                nvim-hs-version:             0.0.8+version:             0.1.0 synopsis:            Haskell plugin backend for neovim description:   This package provides a plugin provider for neovim. It allows you to write@@ -32,10 +32,7 @@ cabal-version:       >=1.10 -- TODO uncomment when somebody has cared about the new travis infrastructure (see #39) -- tested-with:         GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2-extra-source-files:    TestPlugins.vim-                     , TestPlugins.hs-                     , TestPlugins.sh-                     , nvim-hs-devel.sh+extra-source-files:    nvim-hs-devel.sh                      , test-files/compile-error-for-quickfix-test1                      , test-files/compile-error-for-quickfix-test2                      , test-files/compile-error-for-quickfix-test3