Permalink
Browse files

* Minor fixes

* Cabal update
  • Loading branch information...
1 parent 65e8c52 commit 619d3dff3d8493f8e609c361b292c23bdaa20127 @spockz spockz committed Oct 15, 2011
Showing with 7 additions and 7 deletions.
  1. +3 −1 lhs2TeX-hl.cabal
  2. +1 −1 src/Base/Common.hs
  3. +3 −5 src/LiterateHighlighter.hs
View
@@ -1,5 +1,5 @@
Name: lhs2TeX-hl
-Version: 0.1.4.4
+Version: 0.1.4.5
Cabal-Version: >= 1.6
License: MIT
Author: Alessandro Vermeulen <me@alessandrovermeulen.me>
@@ -29,6 +29,8 @@ Executable lhs2TeX-hl
, haskell-src-exts == 1.11.1
, syb >= 0.1.0.1
, cmdargs >= 0.1
+ , filepath == 1.2.0.0
+ , uu-parsinglib >= 2.7
hs-source-dirs: src
Other-Modules: Data.Data, Data.List.Utils, Data.String.Utils,
Language.LaTeX, Language.Markup, Literate.Agda,
View
@@ -1,4 +1,4 @@
module Base.Common where
-programVersion = "0.1.4.3"
+programVersion = "0.1.4.5"
programName = "lhs2TeX-hl"
@@ -61,10 +61,7 @@ main = do args <- cmdArgsRun standard
hSetEncoding stderr utf8
discoverFiles :: FilePath -> IO [FilePath]
-discoverFiles fp = do contents <- fmap ( map ((base ++) . fromJust)
- . filter isJust
- . map runPInclude
- . lines)
+discoverFiles fp = do contents <- fmap (\xs -> [base ++ x | Just x <- map runPInclude (lines xs)])
(readFile fp)
files <- mapM discoverFiles contents
return (nub $ fp : concat files)
@@ -75,7 +72,8 @@ discoverFiles fp = do contents <- fmap ( map ((base ++) . fromJust)
runPInclude = runParse pInclude
runParse :: Show t => Parser t -> String -> Maybe t
-runParse p inp = let r@(a, errors) = PCC.parse ( (,) <$> p <*> pEnd) (createStr (LineColPos 0 0 0) inp)
+runParse p inp = let r@(a, errors) = PCC.parse ( (,) <$> p <*> pEnd)
+ (createStr (LineColPos 0 0 0) inp)
in if null errors then
Just a
else

0 comments on commit 619d3df

Please sign in to comment.