Skip to content
Snippets Groups Projects
Commit 69554519 authored by Douglas Wilson's avatar Douglas Wilson
Browse files

Patch hs-colour-1.24.4 for Data.List qualified import

parent a9bd5dab
No related branches found
No related tags found
1 merge request!167Patch hs-colour-1.24.4 for Data.List qualified import
diff -ur hscolour-1.24.4/Language/Haskell/HsColour/Anchors.hs hscolour-1.24.4-new/Language/Haskell/HsColour/Anchors.hs
--- hscolour-1.24.4/Language/Haskell/HsColour/Anchors.hs 2017-11-30 19:16:20.000000000 +0000
+++ hscolour-1.24.4-new/Language/Haskell/HsColour/Anchors.hs 2021-07-04 12:34:03.316814920 +0100
@@ -4,7 +4,7 @@
import Language.Haskell.HsColour.Classify
import Language.Haskell.HsColour.General
-import Data.List
+import qualified Data.List as DL
import Data.Char (isUpper, isLower, isDigit, ord, intToDigit)
-- This is an attempt to find the first defining occurrence of an
@@ -176,7 +176,7 @@
emptyST = []
insertST :: String -> ST -> ST
-insertST k st = insert k st
+insertST k st = DL.insert k st
inST :: String -> ST -> Bool
inST k st = k `elem` st
diff -ur hscolour-1.24.4/Language/Haskell/HsColour/Classify.hs hscolour-1.24.4-new/Language/Haskell/HsColour/Classify.hs
--- hscolour-1.24.4/Language/Haskell/HsColour/Classify.hs 2017-11-30 19:16:20.000000000 +0000
+++ hscolour-1.24.4-new/Language/Haskell/HsColour/Classify.hs 2021-07-04 12:32:38.674574097 +0100
@@ -4,7 +4,7 @@
) where
import Data.Char (isSpace, isUpper, isLower, isDigit)
-import Data.List
+import qualified Data.List as DL
-- | Lex Haskell source code into an annotated token stream, without
-- discarding any characters or layout.
@@ -96,9 +96,9 @@
classify s@(h:t)
| isSpace h = Space
| all (=='-') s = Comment
- | "--" `isPrefixOf` s
+ | "--" `DL.isPrefixOf` s
&& any isSpace s = Comment -- not fully correct
- | "{-" `isPrefixOf` s = Comment
+ | "{-" `DL.isPrefixOf` s = Comment
| s `elem` keywords = Keyword
| s `elem` keyglyphs = Keyglyph
| s `elem` layoutchars = Layout
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment