mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-01 18:32:58 +02:00
hedgewars: patch for ghc 9.8.4
This commit is contained in:
parent
3cd78cbfab
commit
6454d3f62c
2 changed files with 91 additions and 0 deletions
10
srcpkgs/hedgewars/patches/importmonad.patch
Normal file
10
srcpkgs/hedgewars/patches/importmonad.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- a/tools/pas2c/Pas2C.hs 2025-07-07 21:51:17.117166690 +0100
|
||||||
|
+++ b/tools/pas2c/Pas2C.hs 2025-07-07 21:47:34.842095704 +0100
|
||||||
|
@@ -6,6 +6,7 @@
|
||||||
|
import Data.Maybe
|
||||||
|
import Data.Char
|
||||||
|
import Text.Parsec.Prim hiding (State)
|
||||||
|
+import Control.Monad (void, unless, guard, liftM, liftM2)
|
||||||
|
import Control.Monad.State
|
||||||
|
import System.IO
|
||||||
|
import PascalPreprocessor
|
81
srcpkgs/hedgewars/patches/string.patch
Normal file
81
srcpkgs/hedgewars/patches/string.patch
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
--- a/tools/pas2c/PascalPreprocessor.hs 2025-07-07 21:31:06.082177207 +0100
|
||||||
|
+++ b/tools/pas2c/PascalPreprocessor.hs 2025-07-07 21:32:06.163172477 +0100
|
||||||
|
@@ -11,8 +11,8 @@
|
||||||
|
char' :: Char -> ParsecT String u IO ()
|
||||||
|
char' = void . char
|
||||||
|
|
||||||
|
-string' :: String -> ParsecT String u IO ()
|
||||||
|
-string' = void . string
|
||||||
|
+stringlmao :: String -> ParsecT String u IO ()
|
||||||
|
+stringlmao = void . string
|
||||||
|
|
||||||
|
-- comments are removed
|
||||||
|
comment :: ParsecT String u IO String
|
||||||
|
@@ -59,7 +59,7 @@
|
||||||
|
return $ c:s
|
||||||
|
|
||||||
|
switch = do
|
||||||
|
- try $ string' "{$"
|
||||||
|
+ try $ stringlmao "{$"
|
||||||
|
s <- choice [
|
||||||
|
include
|
||||||
|
, ifdef
|
||||||
|
@@ -72,7 +72,7 @@
|
||||||
|
return s
|
||||||
|
|
||||||
|
include = do
|
||||||
|
- try $ string' "INCLUDE"
|
||||||
|
+ try $ stringlmao "INCLUDE"
|
||||||
|
spaces
|
||||||
|
(char' '"')
|
||||||
|
ifn <- many1 $ noneOf "\"\n"
|
||||||
|
@@ -102,7 +102,7 @@
|
||||||
|
return ""
|
||||||
|
|
||||||
|
if' = do
|
||||||
|
- try (string' "IF" >> notFollowedBy alphaNum)
|
||||||
|
+ try (stringlmao "IF" >> notFollowedBy alphaNum)
|
||||||
|
|
||||||
|
void $ manyTill anyChar (char' '}')
|
||||||
|
--char '}'
|
||||||
|
@@ -113,15 +113,15 @@
|
||||||
|
return ""
|
||||||
|
|
||||||
|
elseSwitch = do
|
||||||
|
- try $ string' "ELSE}"
|
||||||
|
+ try $ stringlmao "ELSE}"
|
||||||
|
updateState $ \(m, b:bs) -> (m, (not b):bs)
|
||||||
|
return ""
|
||||||
|
endIf = do
|
||||||
|
- try $ string' "ENDIF}"
|
||||||
|
+ try $ stringlmao "ENDIF}"
|
||||||
|
updateState $ \(m, _:bs) -> (m, bs)
|
||||||
|
return ""
|
||||||
|
define = do
|
||||||
|
- try $ string' "DEFINE"
|
||||||
|
+ try $ stringlmao "DEFINE"
|
||||||
|
spaces
|
||||||
|
i <- identifier
|
||||||
|
d <- ((string ":=" >> return ()) <|> spaces) >> many (noneOf "}")
|
||||||
|
--- a/tools/pas2c/PascalBasics.hs 2025-07-07 21:34:14.466383776 +0100
|
||||||
|
+++ b/tools/pas2c/PascalBasics.hs 2025-07-07 21:34:44.872576888 +0100
|
||||||
|
@@ -13,8 +13,8 @@
|
||||||
|
char' :: Char -> Parsec String u ()
|
||||||
|
char' = void . char
|
||||||
|
|
||||||
|
-string' :: String -> Parsec String u ()
|
||||||
|
-string' = void . string
|
||||||
|
+stringggggggg :: String -> Parsec String u ()
|
||||||
|
+stringggggggg = void . string
|
||||||
|
|
||||||
|
builtin :: [String]
|
||||||
|
builtin = ["succ", "pred", "low", "high", "ord", "inc", "dec", "exit", "break", "continue", "length", "copy"]
|
||||||
|
@@ -43,7 +43,7 @@
|
||||||
|
|
||||||
|
preprocessorSwitch :: Stream String Identity Char => Parsec String u String
|
||||||
|
preprocessorSwitch = do
|
||||||
|
- try $ string' "{$"
|
||||||
|
+ try $ stringggggggg "{$"
|
||||||
|
s <- manyTill (noneOf "\n") $ char '}'
|
||||||
|
return s
|
||||||
|
|
Loading…
Add table
Reference in a new issue