yi-language 0.13.5 → 0.13.6
raw patch · 4 files changed
+13/−14 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Yi.Lexer.Alex: lexEmpty :: forall l_axbm s_axbn t_axbo i_axbp. Lens' (Lexer l_axbm s_axbn t_axbo i_axbp) t_axbo
+ Yi.Lexer.Alex: lexEmpty :: forall l_axCs s_axCt t_axCu i_axCv. Lens' (Lexer l_axCs s_axCt t_axCu i_axCv) t_axCu
- Yi.Lexer.Alex: looked :: forall l_axbm s_axbn t_axbo i_axbp. Lens' (Lexer l_axbm s_axbn t_axbo i_axbp) (l_axbm s_axbn -> Point)
+ Yi.Lexer.Alex: looked :: forall l_axCs s_axCt t_axCu i_axCv. Lens' (Lexer l_axCs s_axCt t_axCu i_axCv) (l_axCs s_axCt -> Point)
- Yi.Lexer.Alex: starting :: forall l_axbm s_axbn t_axbo i_axbp. Lens' (Lexer l_axbm s_axbn t_axbo i_axbp) (s_axbn -> Point -> Posn -> l_axbm s_axbn)
+ Yi.Lexer.Alex: starting :: forall l_axCs s_axCt t_axCu i_axCv. Lens' (Lexer l_axCs s_axCt t_axCu i_axCv) (s_axCt -> Point -> Posn -> l_axCs s_axCt)
- Yi.Lexer.Alex: startingState :: forall l_axbm s_axbn t_axbo i_axbp. Lens' (Lexer l_axbm s_axbn t_axbo i_axbp) s_axbn
+ Yi.Lexer.Alex: startingState :: forall l_axCs s_axCt t_axCu i_axCv. Lens' (Lexer l_axCs s_axCt t_axCu i_axCv) s_axCt
- Yi.Lexer.Alex: statePosn :: forall l_axbm s_axbn t_axbo i_axbp. Lens' (Lexer l_axbm s_axbn t_axbo i_axbp) (l_axbm s_axbn -> Posn)
+ Yi.Lexer.Alex: statePosn :: forall l_axCs s_axCt t_axCu i_axCv. Lens' (Lexer l_axCs s_axCt t_axCu i_axCv) (l_axCs s_axCt -> Posn)
- Yi.Lexer.Alex: step :: forall l_axbm s_axbn t_axbo i_axbp. Lens' (Lexer l_axbm s_axbn t_axbo i_axbp) (TokenLexer l_axbm s_axbn t_axbo i_axbp)
+ Yi.Lexer.Alex: step :: forall l_axCs s_axCt t_axCu i_axCv. Lens' (Lexer l_axCs s_axCt t_axCu i_axCv) (TokenLexer l_axCs s_axCt t_axCu i_axCv)
- Yi.Lexer.Alex: styleLexer :: forall l_axbi s_axbj t_axbk i_axbl l_axFt s_axFu i_axFv. Lens (StyleLexer l_axbi s_axbj t_axbk i_axbl) (StyleLexer l_axFt s_axFu t_axbk i_axFv) (Lexer l_axbi s_axbj (Tok t_axbk) i_axbl) (Lexer l_axFt s_axFu (Tok t_axbk) i_axFv)
+ Yi.Lexer.Alex: styleLexer :: forall l_axCo s_axCp t_axCq i_axCr l_ay6C s_ay6D i_ay6E. Lens (StyleLexer l_axCo s_axCp t_axCq i_axCr) (StyleLexer l_ay6C s_ay6D t_axCq i_ay6E) (Lexer l_axCo s_axCp (Tok t_axCq) i_axCr) (Lexer l_ay6C s_ay6D (Tok t_axCq) i_ay6E)
- Yi.Lexer.Alex: tokLenA :: forall t_axbv. Lens' (Tok t_axbv) Size
+ Yi.Lexer.Alex: tokLenA :: forall t_axCB. Lens' (Tok t_axCB) Size
- Yi.Lexer.Alex: tokPosnA :: forall t_axbv. Lens' (Tok t_axbv) Posn
+ Yi.Lexer.Alex: tokPosnA :: forall t_axCB. Lens' (Tok t_axCB) Posn
- Yi.Lexer.Alex: tokTA :: forall t_axbv t_axyh. Lens (Tok t_axbv) (Tok t_axyh) t_axbv t_axyh
+ Yi.Lexer.Alex: tokTA :: forall t_axCB t_axZq. Lens (Tok t_axCB) (Tok t_axZq) t_axCB t_axZq
- Yi.Lexer.Alex: tokenToStyle :: forall l_axbi s_axbj t_axbk i_axbl. Lens' (StyleLexer l_axbi s_axbj t_axbk i_axbl) (t_axbk -> StyleName)
+ Yi.Lexer.Alex: tokenToStyle :: forall l_axCo s_axCp t_axCq i_axCr. Lens' (StyleLexer l_axCo s_axCp t_axCq i_axCr) (t_axCq -> StyleName)
- Yi.Lexer.Alex: withChars :: forall l_axbm s_axbn t_axbo i_axbp. Lens' (Lexer l_axbm s_axbn t_axbo i_axbp) (Char -> [(Point, Char)] -> i_axbp)
+ Yi.Lexer.Alex: withChars :: forall l_axCs s_axCt t_axCu i_axCv. Lens' (Lexer l_axCs s_axCt t_axCu i_axCv) (Char -> [(Point, Char)] -> i_axCv)
Files
- src/Yi/Lexer/Alex.hs +1/−1
- src/Yi/Lexer/Compilation.x +1/−1
- src/Yi/Regex.hs +9/−10
- yi-language.cabal +2/−2
src/Yi/Lexer/Alex.hs view
@@ -212,7 +212,7 @@ -- | unfold lexer into a function that returns a stream of (state, token) unfoldLexer :: ((state, input) -> Maybe (token, (state, input))) -> (state, input) -> [(state, token)]-unfoldLexer f b = case f b of+unfoldLexer f b = fst b `seq` case f b of Nothing -> [] Just (t, b') -> (fst b, t) : unfoldLexer f b'
src/Yi/Lexer/Compilation.x view
@@ -8,7 +8,7 @@ {-# OPTIONS -w #-} module Yi.Lexer.Compilation (lexer, Token(..)) where import Yi.Lexer.Alex hiding (tokenToStyle)-import Yi.Regex+import Yi.Regex (matchOnceText, Regex, makeRegex) import Yi.Style (commentStyle) }
src/Yi/Regex.hs view
@@ -14,15 +14,18 @@ , module Text.Regex.TDFA ) where +import Data.Bifunctor (first) import Data.Binary import GHC.Generics (Generic)-import Text.Regex.TDFA-import Text.Regex.TDFA.Pattern-import Control.Applicative-import Lens.Micro.Platform+import Yi.Buffer.Basic (Direction(..))++import Text.Regex.TDFA ( Regex, CompOption(..), caseSensitive, multiline+ , defaultCompOpt, defaultExecOpt, makeRegexOptsM+ , matchOnceText, makeRegex, RegexLike(matchAll)+ , AllTextSubmatches(..), (=~))+import Text.Regex.TDFA.Pattern (Pattern(..), DoPa(..), showPattern) import Text.Regex.TDFA.ReadRegex(parseRegex) import Text.Regex.TDFA.TDFA(patternToRegex)-import Yi.Buffer.Basic (Direction(..)) -- input string, regexexp, backward regex. data SearchExp = SearchExp@@ -69,7 +72,7 @@ compile source = patternToRegex source (searchOpts opts defaultCompOpt) defaultExecOpt pattern = if QuoteRegex `elem` opts then Right (literalPattern re)- else mapLeft show (parseRegex re)+ else first show (parseRegex re) instance Binary SearchExp where get = do re <- get@@ -80,10 +83,6 @@ put (SearchExp { seInput = re, seOptions = opts, .. }) = do put re put opts--mapLeft :: (t1 -> a) -> Either t1 t -> Either a t-mapLeft _ (Right a) = Right a-mapLeft f (Left a) = Left (f a) -- | Return an escaped (for parseRegex use) version of the string. regexEscapeString :: String -> String
yi-language.cabal view
@@ -1,9 +1,9 @@--- This file has been generated from package.yaml by hpack version 0.14.0.+-- This file has been generated from package.yaml by hpack version 0.17.0. -- -- see: https://github.com/sol/hpack name: yi-language-version: 0.13.5+version: 0.13.6 synopsis: Collection of language-related Yi libraries. category: Yi homepage: https://github.com/yi-editor/yi#readme