Skip to content

Commit

Permalink
Merge pull request yi-editor#1136 from josephcsible/newerdeps
Browse files Browse the repository at this point in the history
Allow building with newer dependencies
  • Loading branch information
mfourne authored Aug 28, 2024
2 parents 671c098 + 3db8706 commit 1689230
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 16 deletions.
5 changes: 5 additions & 0 deletions yi-core/src/Yi/Dired.hs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ import System.PosixCompat.Files (FileStatus, fileExist, fileGroup,
unionFileModes)
import System.PosixCompat.Types (FileMode, GroupID, UserID)
#ifndef mingw32_HOST_OS
#if MIN_VERSION_unix(2,8,0)
import System.Posix.User.ByteString (GroupEntry(GroupEntry), UserEntry(UserEntry))
import System.Posix.User (getAllGroupEntries,
#else
import System.Posix.User (GroupEntry(..), UserEntry(..),getAllGroupEntries,
#endif
getAllUserEntries,
getGroupEntryForID,
getUserEntryForID, groupID, userID, userName, groupName)
Expand Down
3 changes: 2 additions & 1 deletion yi-frontend-pango/src/Yi/Frontend/Pango/Control.hs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ import qualified Graphics.UI.Gtk as Gtk
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 (ap, get, put, modify)
import Control.Monad (ap)
import Control.Monad.State (get, put, modify)
import Control.Monad.Base
import Control.Concurrent (newMVar, modifyMVar, MVar, newEmptyMVar, putMVar,
readMVar, isEmptyMVar)
Expand Down
2 changes: 1 addition & 1 deletion yi-frontend-vty/yi-frontend-vty.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ library
, pointedlist
, stm >= 2.2
, text
, vty >= 5.4
, vty >= 5.4 && < 6
, yi-core >= 0.19
, yi-language >= 0.19
, yi-rope >= 0.10
Expand Down
4 changes: 2 additions & 2 deletions yi-language/src/Yi/Lexer/Compilation.x
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ tokens :-
let Just (_before, arr, _after) = matchOnceText re $ map snd str
re :: Regex
re = makeRegex "^(.+):([0-9]+):([0-9]+):(.*)$"
in (st, Report (fst $ arr!1) (read $ fst $ arr!2) (read $ fst $ arr!3) (fst $ arr!4)) }
in (st, Report (fst $ arr Data.Array.! 1) (read $ fst $ arr Data.Array.! 2) (read $ fst $ arr Data.Array.! 3) (fst $ arr Data.Array.! 4)) }
-- without a column number
@file":" @number ":" .*\n { \str st ->
let Just (_before, arr, _after) = matchOnceText re $ map snd str
re :: Regex
re = makeRegex "^(.+):([0-9]+):(.*)$"
in (st, Report (fst $ arr!1) (read $ fst $ arr!2) 0 (fst $ arr!3)) }
in (st, Report (fst $ arr Data.Array.! 1) (read $ fst $ arr Data.Array.! 2) 0 (fst $ arr Data.Array.! 3)) }

$white+ ; -- unparseable stuff
[^$white]+ ;
Expand Down
6 changes: 3 additions & 3 deletions yi-language/src/Yi/Lexer/common.hsinc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#define IBOX(n) (I# (n))

#define GEQ_(x, y) (tagToEnum# (x >=# y))
#define EQ_(x, y) (tagToEnum# (x ==# y))
#define GEQ_(x, y) (GHC.Exts.tagToEnum# (x >=# y))
#define EQ_(x, y) (GHC.Exts.tagToEnum# (x ==# y))

-- | Scan one token. Return (maybe) a token and a new state.
alexScanToken :: (AlexState HlState, AlexInput) -> Maybe (Tok Token, (AlexState HlState, AlexInput))
Expand Down Expand Up @@ -37,7 +37,7 @@ alexScanUser' user input (I# (sc))
Just _ -> (AlexError input', lookahead)
(AlexLastSkip input'' len, _, lookahead) -> (AlexSkip input'' len, lookahead)
#if MIN_TOOL_VERSION_alex(3,2,0)
(AlexLastAcc k input'' len, _, lookahead) -> (AlexToken input'' len (alex_actions ! k), lookahead)
(AlexLastAcc k input'' len, _, lookahead) -> (AlexToken input'' len (alex_actions Data.Array.! k), lookahead)
#else
(AlexLastAcc k input'' len, _, lookahead) -> (AlexToken input'' len k, lookahead)
#endif
Expand Down
6 changes: 3 additions & 3 deletions yi-misc-modes/src/Yi/Lexer/common.hsinc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#define IBOX(n) (I# (n))

#define GEQ_(x, y) (tagToEnum# (x >=# y))
#define EQ_(x, y) (tagToEnum# (x ==# y))
#define GEQ_(x, y) (GHC.Exts.tagToEnum# (x >=# y))
#define EQ_(x, y) (GHC.Exts.tagToEnum# (x ==# y))

-- | Scan one token. Return (maybe) a token and a new state.
alexScanToken :: (AlexState HlState, AlexInput) -> Maybe (Tok Token, (AlexState HlState, AlexInput))
Expand Down Expand Up @@ -37,7 +37,7 @@ alexScanUser' user input (I# (sc))
Just _ -> (AlexError input', lookahead)
(AlexLastSkip input'' len, _, lookahead) -> (AlexSkip input'' len, lookahead)
#if MIN_TOOL_VERSION_alex(3,2,0)
(AlexLastAcc k input'' len, _, lookahead) -> (AlexToken input'' len (alex_actions ! k), lookahead)
(AlexLastAcc k input'' len, _, lookahead) -> (AlexToken input'' len (alex_actions Data.Array.! k), lookahead)
#else
(AlexLastAcc k input'' len, _, lookahead) -> (AlexToken input'' len k, lookahead)
#endif
Expand Down
6 changes: 3 additions & 3 deletions yi-mode-haskell/src/Yi/Lexer/common.hsinc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#define IBOX(n) (I# (n))

#define GEQ_(x, y) (tagToEnum# (x >=# y))
#define EQ_(x, y) (tagToEnum# (x ==# y))
#define GEQ_(x, y) (GHC.Exts.tagToEnum# (x >=# y))
#define EQ_(x, y) (GHC.Exts.tagToEnum# (x ==# y))

-- | Scan one token. Return (maybe) a token and a new state.
alexScanToken :: (AlexState HlState, AlexInput) -> Maybe (Tok Token, (AlexState HlState, AlexInput))
Expand Down Expand Up @@ -37,7 +37,7 @@ alexScanUser' user input (I# (sc))
Just _ -> (AlexError input', lookahead)
(AlexLastSkip input'' len, _, lookahead) -> (AlexSkip input'' len, lookahead)
#if MIN_TOOL_VERSION_alex(3,2,0)
(AlexLastAcc k input'' len, _, lookahead) -> (AlexToken input'' len (alex_actions ! k), lookahead)
(AlexLastAcc k input'' len, _, lookahead) -> (AlexToken input'' len (alex_actions Data.Array.! k), lookahead)
#else
(AlexLastAcc k input'' len, _, lookahead) -> (AlexToken input'' len k, lookahead)
#endif
Expand Down
6 changes: 3 additions & 3 deletions yi-mode-javascript/src/Yi/Lexer/common.hsinc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#define IBOX(n) (I# (n))

#define GEQ_(x, y) (tagToEnum# (x >=# y))
#define EQ_(x, y) (tagToEnum# (x ==# y))
#define GEQ_(x, y) (GHC.Exts.tagToEnum# (x >=# y))
#define EQ_(x, y) (GHC.Exts.tagToEnum# (x ==# y))

-- | Scan one token. Return (maybe) a token and a new state.
alexScanToken :: (AlexState HlState, AlexInput) -> Maybe (Tok Token, (AlexState HlState, AlexInput))
Expand Down Expand Up @@ -37,7 +37,7 @@ alexScanUser' user input (I# (sc))
Just _ -> (AlexError input', lookahead)
(AlexLastSkip input'' len, _, lookahead) -> (AlexSkip input'' len, lookahead)
#if MIN_TOOL_VERSION_alex(3,2,0)
(AlexLastAcc k input'' len, _, lookahead) -> (AlexToken input'' len (alex_actions ! k), lookahead)
(AlexLastAcc k input'' len, _, lookahead) -> (AlexToken input'' len (alex_actions Data.Array.! k), lookahead)
#else
(AlexLastAcc k input'' len, _, lookahead) -> (AlexToken input'' len k, lookahead)
#endif
Expand Down

0 comments on commit 1689230

Please sign in to comment.