packages feed

BirdPP 1.0 → 1.1

raw patch · 7 files changed

+10/−12 lines, 7 filesbinary-added

Files

+ ._BirdPP.cabal view

binary file changed (absent → 244 bytes)

+ ._LICENSE view

binary file changed (absent → 244 bytes)

+ ._Main.lhs view

binary file changed (absent → 244 bytes)

+ ._README view

binary file changed (absent → 244 bytes)

+ ._Setup.lhs view

binary file changed (absent → 244 bytes)

BirdPP.cabal view
@@ -1,6 +1,6 @@  Name:                BirdPP-Version:             1.0+Version:             1.1 Description:         Literate preprocessor that allows intuitive Haddock comments. License:             GPL License-file:        LICENSE@@ -11,7 +11,7 @@ bug-reports:         http://github.com/seanmcl/BirdPP/issues category:            Development Synopsis:            A preprocessor for Bird-style Literate Haskell comments with Haddock markup.-Extra-source-files:  LICENSE README +Extra-source-files:  LICENSE README Executable BirdPP   Main-is:           Main.lhs   Build-Depends:     base >= 2 && < 4,
Main.lhs view
@@ -8,19 +8,17 @@ Usage: ghc -pgmL BirdPP ...  This file contains some gratuitous Haddock markup so you can see it-in action.  +in action. -> module Main +> module Main >   ( -- * The preprocessor->     literize +>     literize >     -- * The glue >   , main ) > where -> import qualified System > import qualified System.IO as IO > import qualified System.Environment as Env-> import qualified Monad  | This comment will show up in the Haddock docs. @@ -31,16 +29,16 @@ > literize ('>' : ' ' : s) = s > literize s = "-- " ++ s -| Main runs the preprocessor.  +| Main runs the preprocessor.  > main :: IO ()-> main = do ->   args <- System.getArgs+> main = do+>   args <- Env.getArgs  If we are calling BirdPP in the GHC pipeline, it passes a number of arguments (see above URL). ->   if length args >= 3 then +>   if length args >= 3 then >     do let [orig, src, out] = drop (length args - 3) args >        fi <- IO.openFile src IO.ReadMode >        fo <- IO.openFile out IO.WriteMode@@ -53,7 +51,7 @@ To see the result of the preprocessor (for debugging) you can just call BirdPP with a file to process. ->     else case args of +>     else case args of >            [f] -> do text <- IO.readFile f >                      mapM_ (putStrLn . literize) (lines text) >                      return ()