yi 0.12.3 → 0.12.4
raw patch · 8 files changed
+20/−25 lines, 8 files
Files
- src/library/Yi/Buffer/HighLevel.hs +2/−2
- src/library/Yi/Dired.hs +4/−4
- src/library/Yi/Editor.hs +2/−2
- src/library/Yi/Eval.hs +2/−6
- src/library/Yi/Paths.hs +2/−3
- src/library/Yi/Snippets.hs +5/−5
- src/library/Yi/UI/Pango/Control.hs +2/−2
- yi.cabal +1/−1
src/library/Yi/Buffer/HighLevel.hs view
@@ -123,7 +123,7 @@ import Control.Applicative (Applicative ((<*>)), (<$>)) import Control.Lens (assign, over, use, (%=), (.=)) import Control.Lens.Cons (_last)-import Control.Monad (forM, forM_, liftM, replicateM_, unless, void, when)+import Control.Monad (forM, forM_, replicateM_, unless, void, when) import Control.Monad.RWS.Strict (ask) import Control.Monad.State (gets) import Data.Char (isDigit, isHexDigit, isOctDigit, isSpace, isUpper, toLower, toUpper)@@ -357,7 +357,7 @@ readPreviousOfLnB = readRegionB =<< regionOfPartB Line Backward hasWhiteSpaceBefore :: BufferM Bool-hasWhiteSpaceBefore = liftM isSpace (prevPointB >>= readAtB)+hasWhiteSpaceBefore = fmap isSpace (prevPointB >>= readAtB) -- | Get the previous point, unless at the beginning of the file prevPointB :: BufferM Point
src/library/Yi/Dired.hs view
@@ -49,7 +49,7 @@ import Control.Category ((>>>)) import Control.Exc (orException, printingException) import Control.Lens (assign, makeLenses, use, (%~), (&), (.=), (.~), (^.))-import Control.Monad.Reader (asks, foldM, liftM, unless, void, when)+import Control.Monad.Reader (asks, foldM, unless, void, when) import Data.Binary (Binary) import Data.Char (toLower) import Data.Default (Default, def)@@ -453,7 +453,7 @@ exists <- fileExist path if exists then case de of (DiredDir _dfi) -> do- isNull <- liftM nullDir $ getDirectoryContents path+ isNull <- fmap nullDir $ getDirectoryContents path return $ if isNull then DOConfirm recDelPrompt [DORemoveDir path] [DONoOp] else DORemoveDir path@@ -696,9 +696,9 @@ then return . ((fn <> " -> ") <>) =<< readSymbolicLink fp else return fn ownerEntry <- orException (getUserEntryForID uid)- (liftM (scanForUid uid) getAllUserEntries)+ (fmap (scanForUid uid) getAllUserEntries) groupEntry <- orException (getGroupEntryForID gid)- (liftM (scanForGid gid) getAllGroupEntries)+ (fmap (scanForGid gid) getAllGroupEntries) let fmodeStr = (modeString . fileMode) fileStatus sz = toInteger $ fileSize fileStatus ownerStr = R.fromString $ userName ownerEntry
src/library/Yi/Editor.hs view
@@ -103,8 +103,8 @@ import Control.Lens (Lens', assign, lens, mapped, use, uses, view, (%=), (%~), (&), (.~), (^.))-import Control.Monad (forM_)-import Control.Monad.Reader (MonadReader (ask), asks, liftM,+import Control.Monad (forM_, liftM)+import Control.Monad.Reader (MonadReader (ask), asks, unless, when) import Control.Monad.State (gets, modify) import Data.Binary (Binary, get, put)
src/library/Yi/Eval.hs view
@@ -75,7 +75,7 @@ languageExtensions, OptionVal((:=)), InterpreterError,- Extension(OverloadedStrings, NoImplicitPrelude),+ Extension(OverloadedStrings), setTopLevelModules, interpret ) import System.Directory ( doesFileExist )@@ -205,11 +205,7 @@ void $ LHI.runInterpreter $ do LHI.set [LHI.searchPath LHI.:= []] - -- We no longer have Yi.Prelude, perhaps we should remove- -- NoImplicitPrelude?- LHI.set [LHI.languageExtensions LHI.:= [ LHI.OverloadedStrings- , LHI.NoImplicitPrelude- ]]+ LHI.set [LHI.languageExtensions LHI.:= [ LHI.OverloadedStrings ]] when haveUserContext $ do LHI.loadModules [contextFile] LHI.setTopLevelModules ["Env"]
src/library/Yi/Paths.hs view
@@ -12,7 +12,6 @@ , getDataPath ) where -import Control.Monad (liftM) import Control.Monad.Base (MonadBase, liftBase) import System.Directory (createDirectoryIfMissing, doesDirectoryExist,@@ -42,7 +41,7 @@ -- | Given a path relative to application data directory, -- this function finds a path to a given data file. getDataPath :: (MonadBase IO m) => FilePath -> m FilePath-getDataPath fp = liftM (</> fp) getDataDir+getDataPath fp = fmap (</> fp) getDataDir -- | Given a path relative to application configuration directory, -- this function finds a path to a given configuration file.@@ -52,7 +51,7 @@ -- | Given an action that retrieves config path, and a path relative to it, -- this function joins the two together to create a config file path. getCustomConfigPath :: MonadBase IO m => m FilePath -> FilePath -> m FilePath-getCustomConfigPath cd fp = (</> fp) `liftM` cd+getCustomConfigPath cd fp = (</> fp) `fmap` cd -- Note: Dyre also uses XDG cache dir - that would be: --getCachePath = getPathHelper XDG.getUserCacheDirectory
src/library/Yi/Snippets.hs view
@@ -28,8 +28,8 @@ MonadState, MonadTrans (..), MonadWriter (tell), Monoid (mappend, mempty), RWST, evalRWST,- filterM, forM, forM_, liftM, liftM2,- unless, when, (<>))+ filterM, forM, forM_, liftM2, unless,+ when, (<>)) import Data.Binary (Binary) import Data.Char (isSpace) import Data.Default (Default, def)@@ -198,7 +198,7 @@ mapM_ updateDependents findEditedMarks :: [Update] -> BufferM [MarkInfo]-findEditedMarks upds = liftM (nub . concat) (mapM findEditedMarks' upds)+findEditedMarks upds = fmap (nub . concat) (mapM findEditedMarks' upds) where findEditedMarks' :: Update -> BufferM [MarkInfo] findEditedMarks' upd = do@@ -313,8 +313,8 @@ -> Bool -> Region -> MarkInfo -> BufferM [MarkInfo] findOverlappingMarksWith fMarkRegion flattenMarks border r m = let markFilter = filter (m /=) . flattenMarks . marks- regOverlap = liftM (regionsOverlap border r) . fMarkRegion- in liftM markFilter getBufferDyn >>= filterM regOverlap+ regOverlap = fmap (regionsOverlap border r) . fMarkRegion+ in fmap markFilter getBufferDyn >>= filterM regOverlap findOverlappingMarks :: ([[MarkInfo]] -> [MarkInfo]) -> Bool -> Region -> MarkInfo -> BufferM [MarkInfo]
src/library/Yi/UI/Pango/Control.hs view
@@ -84,7 +84,7 @@ import qualified Graphics.UI.Gtk.Gdk.Events as Gdk.Events import System.Glib.GError import Control.Monad.Reader (ask, asks, MonadReader(..))-import Control.Monad.State (liftM, ap, get, put, modify)+import Control.Monad.State (ap, get, put, modify) import Control.Monad.Base import Control.Concurrent (newMVar, modifyMVar, MVar, newEmptyMVar, putMVar, readMVar, isEmptyMVar)@@ -176,7 +176,7 @@ , Common.end = \_ -> void $ runControl' end yiMVar , Common.suspend = void $ runControl' suspend yiMVar , Common.refresh = \e -> void $ runControl' (refresh e) yiMVar- , Common.layout = \e -> liftM (fromMaybe e) $+ , Common.layout = \e -> fmap (fromMaybe e) $ runControl' (doLayout e) yiMVar , Common.reloadProject = \f -> void $ runControl' (reloadProject f) yiMVar }
yi.cabal view
@@ -1,5 +1,5 @@ name: yi-version: 0.12.3+version: 0.12.4 category: Development, Editor synopsis: The Haskell-Scriptable Editor description: