lhs2TeX-hl 0.1.2.0 → 0.1.2.1
raw patch · 4 files changed
+12/−5 lines, 4 files
Files
- README +2/−0
- lhs2TeX-hl.cabal +1/−1
- src/Base/Common.hs +1/−1
- src/Literate/Haskell.hs +8/−3
README view
@@ -65,6 +65,8 @@ CHANGES -------+ 1.2.1: * Fixed a regression, detection of language pragmas was apparently+ broken and now they aren't anymore. 1.2.0: * Hopefully the ``ambiguous infix operator'' error shouldn't occur that often anymore. * Removed the AGDA dependency for until it actually works.
lhs2TeX-hl.cabal view
@@ -1,5 +1,5 @@ Name: lhs2TeX-hl-Version: 0.1.2.0+Version: 0.1.2.1 Cabal-Version: >= 1.6 License: MIT Author: Alessandro Vermeulen <me@alessandrovermeulen.me>
src/Base/Common.hs view
@@ -1,4 +1,4 @@ module Base.Common where -programVersion = "0.1.2.0"+programVersion = "0.1.2.1" programName = "lhs2TeX-hl"
src/Literate/Haskell.hs view
@@ -3,9 +3,10 @@ module Literate.Haskell (runHaskell, mapping, listClasses, fromParse) where import Data.List (nub)+import Data.Maybe import Data.Data import Data.Generics-import Language.Haskell.Exts+import Language.Haskell.Exts hiding (parseFile) import Language.LaTeX import Literate.SimpleInfo@@ -13,10 +14,14 @@ newtype M = M Module deriving (Typeable, Data) +parseFile fp = parseFileWithMode (defaultParseMode { fixities = baseFixities+ , parseFilename = fp + } + )+ fp runHaskell :: FilePath -> IO SimpleInfo-runHaskell fp = do mod <- parseFileWithMode (defaultParseMode { fixities = baseFixities } ) - fp+runHaskell fp = do mod <- parseFile fp case mod of (ParseOk m) -> return $ getSimpleInfo m (ParseFailed loc err) -> error $