Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Generate haskell style line pragmas in cpphs.

haskell-src-exts has difficulty parsing the CPP style line pragmas.
  • Loading branch information...
commit 99e8b31778b53e1dc4ca8bbec04bb5b6e13206cd 1 parent ec7f127
@hesselink hesselink authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 Main.hs
View
4 Main.hs
@@ -163,8 +163,10 @@ haskellSource file = do
contents <- readFile file
let needsCpp = maybe False (L.CPP `elem`) (L.readExtensions contents)
if needsCpp
- then CPP.runCpphs CPP.defaultCpphsOptions file contents
+ then CPP.runCpphs cppOpts file contents
else return contents
+ where
+ cppOpts = CPP.defaultCpphsOptions { CPP.boolopts = CPP.defaultBoolOptions { CPP.hashline = False } }
makeDatabase :: [FilePath] -> IO Database
Please sign in to comment.
Something went wrong with that request. Please try again.