We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae87135 commit 1c1f554Copy full SHA for 1c1f554
src/Development/IDE/Core/Preprocessor.hs
@@ -37,7 +37,7 @@ preprocessor filename mbContents = do
37
let isOnDisk = isNothing mbContents
38
39
-- unlit content if literate Haskell ending
40
- (isOnDisk, contents) <- if ".lhs" `isSuffixOf` filename
+ (isOnDisk, contents) <- if isLiterate filename
41
then do
42
dflags <- getDynFlags
43
newcontent <- liftIO $ runLhs dflags filename mbContents
@@ -53,6 +53,10 @@ preprocessor filename mbContents = do
53
return (contents, dflags)
54
55
56
+isLiterate :: FilePath -> Bool
57
+isLiterate x = takeExtension x `elem` [".lhs",".lhs-boot"]
58
+
59
60
-- | This reads the pragma information directly from the provided buffer.
61
parsePragmasIntoDynFlags
62
:: GhcMonad m
0 commit comments