HPDF 1.4 → 1.4.1
raw patch · 5 files changed
+24/−8 lines, 5 filesdep ~basedep ~binarydep ~bytestring
Dependency ranges changed: base, binary, bytestring, containers, mtl, random, zlib
Files
- Graphics/PDF/Data/PDFTree.hs +1/−1
- Graphics/PDF/Data/Trie.hs +12/−0
- Graphics/PDF/Image.hs +4/−0
- HPDF.cabal +5/−5
- Test/Makefile +2/−2
Graphics/PDF/Data/PDFTree.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS -cpp -fglasgow-exts -fno-bang-patterns #-} +{-# OPTIONS -cpp -fglasgow-exts -XNoBangPatterns #-} ----------------------------------------------------------------------------- -- | -- Module : PDFTree.hs
Graphics/PDF/Data/Trie.hs view
@@ -25,6 +25,13 @@ | Trie (Maybe v) (M.Map Char (MapString v)) deriving(Eq,Show) +#if __GLASGOW_HASKELL__ >= 610+myLookup :: Ord k => k -> M.Map k a ->[a]+myLookup k d = case M.lookup k d of+ Just r -> [r]+ _ -> []+#endif+ fromList :: [(String,v)] -> MapString v fromList = foldr addElem EmptyTrie where@@ -36,8 +43,13 @@ lookup _ EmptyTrie = [] lookup [] (Trie (Just a) _) = [a] lookup [] (Trie Nothing _) = []+#if __GLASGOW_HASKELL__ >= 610+lookup (c:s) (Trie Nothing tc) = (myLookup c tc >>= lookup s)+lookup (c:s) (Trie (Just tn) tc) = tn:(myLookup c tc >>= lookup s)+#else lookup (c:s) (Trie Nothing tc) = (M.lookup c tc >>= lookup s) lookup (c:s) (Trie (Just tn) tc) = tn:(M.lookup c tc >>= lookup s)+#endif insert :: String -> v
Graphics/PDF/Image.hs view
@@ -41,6 +41,10 @@ import Data.Binary.Builder(Builder,fromLazyByteString) import Control.Exception as E +#if __GLASGOW_HASKELL__ >= 610+import Control.OldException(ioErrors)+#endif+ m_sof0 :: Int m_sof0 = 0xc0 m_sof1 :: Int
HPDF.cabal view
@@ -1,6 +1,6 @@ Name: HPDF-Version: 1.4-cabal-version: >=1.2+Version: 1.4.1+cabal-version: >=1.6 License: LGPL License-file:LICENSE Copyright: Copyright (c) 2007-2008, alpheccar@@ -8,7 +8,7 @@ synopsis: Generation of PDF documents maintainer: misc@NOSPAMalpheccar.org build-type: Simple-tested-with: GHC==6.8.1+tested-with: GHC==6.8.1, GHC==6.10.1 homepage: http://www.alpheccar.org description: A PDF library with support for several pages, page transitions, outlines, annotations, compression, colors, shapes, patterns, jpegs, fonts, typesetting ... extra-source-files:@@ -29,9 +29,9 @@ library if flag(splitBase)- build-depends: base >= 3, containers, random >= 1.0, bytestring >= 0.9, array >= 0.1, zlib >= 0.3, binary >= 0.3, mtl+ build-depends: base >= 4 , containers, random >= 1.0, bytestring >= 0.9, array >= 0.1, zlib >= 0.5, binary >= 0.4, mtl else- build-depends: base, haskell98, mtl ,zlib >= 0.3, binary >= 0.3+ build-depends: base >= 3, haskell98, mtl ,zlib >= 0.5, binary >= 0.4 ghc-options: -Wall -funbox-strict-fields -O2 extensions: FlexibleInstances,
Test/Makefile view
@@ -1,8 +1,8 @@ debug:- ghc -o test -ffi -cpp -Wall -funbox-strict-fields -fglasgow-exts -O2 -hidir interfaces -odir bin -optc-I../c -i.. ../c/metrics.c ../c/conversion.c --make test.hs+ ghc -o test -XForeignFunctionInterface -cpp -Wall -funbox-strict-fields -fglasgow-exts -O2 -hidir interfaces -odir bin -optc-I../c -i.. ../c/metrics.c ../c/conversion.c --make test.hs profile:- ghc -o test -prof -auto-all -ffi -cpp -Wall -funbox-strict-fields -fglasgow-exts -O2 -hidir interfaces -odir bin -optc-I../c -i.. ../c/metrics.c ../c/conversion.c --make test.hs+ ghc -o test -prof -auto-all -XForeignFunctionInterface -cpp -Wall -funbox-strict-fields -fglasgow-exts -O2 -hidir interfaces -odir bin -optc-I../c -i.. ../c/metrics.c ../c/conversion.c --make test.hs runprof: ./test +RTS -p -hc