aboutsummaryrefslogtreecommitdiff
path: root/src/HaskellCodeExplorer/Preprocessor.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/HaskellCodeExplorer/Preprocessor.hs')
-rw-r--r--src/HaskellCodeExplorer/Preprocessor.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/HaskellCodeExplorer/Preprocessor.hs b/src/HaskellCodeExplorer/Preprocessor.hs
index 8dcf548..d998976 100644
--- a/src/HaskellCodeExplorer/Preprocessor.hs
+++ b/src/HaskellCodeExplorer/Preprocessor.hs
@@ -19,7 +19,7 @@ import HaskellCodeExplorer.Types
, HaskellModulePath(..)
, LinePragma(..)
, SourceCodeTransformation(..)
- , haskellPreprocessorExtensions
+ , haskellPreprocessorExtensions
)
import System.FilePath (normalise,takeExtension,takeFileName)
@@ -86,13 +86,13 @@ createSourceCodeTransformation currentModulePath originalSourceCode sourceCodeAf
-- | Parses line pragma
linePragmaParser :: AT.Parser (Int, Maybe T.Text)
linePragmaParser = pragma1 <|> pragma2
- where
+ where
pragma1 :: AT.Parser (Int, Maybe T.Text)
pragma1 = parser "#" "line"
-
+
pragma2 :: AT.Parser (Int, Maybe T.Text)
pragma2 = parser "{-#" "LINE"
-
+
parser :: T.Text -> T.Text -> AT.Parser (Int, Maybe T.Text)
parser start line = do
_ <- AT.string start
@@ -103,9 +103,9 @@ linePragmaParser = pragma1 <|> pragma2
_ <- AT.takeWhile (== ' ')
mbName <- (Just <$> fileName) <|> return Nothing
return (num, mbName)
-
+
fileName :: AT.Parser T.Text
- fileName = AT.string "\"" *> AT.takeTill (== '\"') <* AT.string "\""
+ fileName = AT.string "\"" *> AT.takeTill (== '\"') <* AT.string "\""
data Line = FirstLine | LastLine Int | Pragma LinePragma deriving (Show,Eq)