packages feed

hpygments 0.1.3 → 0.2.0

raw patch · 7 files changed

+53/−56 lines, 7 filesdep ~aesondep ~processdep ~process-extrasPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: aeson, process, process-extras

API changes (from Hackage documentation)

- Text.Highlighting.Pygments.Formatters: instance Eq Formatter
- Text.Highlighting.Pygments.Formatters: instance FromJSON Formatter
- Text.Highlighting.Pygments.Formatters: instance Ord Formatter
- Text.Highlighting.Pygments.Formatters: instance Show Formatter
- Text.Highlighting.Pygments.Formatters: instance ToJSON Formatter
- Text.Highlighting.Pygments.Lexers: instance Eq Lexer
- Text.Highlighting.Pygments.Lexers: instance FromJSON Lexer
- Text.Highlighting.Pygments.Lexers: instance Ord Lexer
- Text.Highlighting.Pygments.Lexers: instance Show Lexer
- Text.Highlighting.Pygments.Lexers: instance ToJSON Lexer
+ Text.Highlighting.Pygments.Formatters: instance Data.Aeson.Types.Class.FromJSON Text.Highlighting.Pygments.Formatters.Formatter
+ Text.Highlighting.Pygments.Formatters: instance Data.Aeson.Types.Class.ToJSON Text.Highlighting.Pygments.Formatters.Formatter
+ Text.Highlighting.Pygments.Formatters: instance GHC.Classes.Eq Text.Highlighting.Pygments.Formatters.Formatter
+ Text.Highlighting.Pygments.Formatters: instance GHC.Classes.Ord Text.Highlighting.Pygments.Formatters.Formatter
+ Text.Highlighting.Pygments.Formatters: instance GHC.Show.Show Text.Highlighting.Pygments.Formatters.Formatter
+ Text.Highlighting.Pygments.Lexers: instance Data.Aeson.Types.Class.FromJSON Text.Highlighting.Pygments.Lexers.Lexer
+ Text.Highlighting.Pygments.Lexers: instance Data.Aeson.Types.Class.ToJSON Text.Highlighting.Pygments.Lexers.Lexer
+ Text.Highlighting.Pygments.Lexers: instance GHC.Classes.Eq Text.Highlighting.Pygments.Lexers.Lexer
+ Text.Highlighting.Pygments.Lexers: instance GHC.Classes.Ord Text.Highlighting.Pygments.Lexers.Lexer
+ Text.Highlighting.Pygments.Lexers: instance GHC.Show.Show Text.Highlighting.Pygments.Lexers.Lexer

Files

LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2012-2013 David Lazar <lazar6@illinois.edu>+Copyright (c) 2012-2016 David Lazar <lazard@csail.mit.edu>  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
README.md view
@@ -1,5 +1,8 @@-**hpygments** is a Haskell library for highlighting source code using [Pygments](http://pygments.org).+hpygments+=========+[![Build Status](https://travis-ci.org/davidlazar/hpygments.svg)](https://travis-ci.org/davidlazar/hpygments)+- - - -See the [Hackage page](http://hackage.haskell.org/package/hpygments) for documentation and examples.+hpygments is a Haskell library for highlighting source code using [Pygments](http://pygments.org). -Please report bugs and feature requests using the [GitHub issue tracker](https://github.com/davidlazar/hpygments/issues).+See the [Hackage page](http://hackage.haskell.org/package/hpygments) for documentation and examples.
hpygments.cabal view
@@ -1,45 +1,40 @@-Name:               hpygments-Version:            0.1.3-Synopsis:           Highlight source code using Pygments-Description:+name: hpygments+version: 0.2.0+cabal-version: >=1.6+build-type: Simple+license: MIT+license-file: LICENSE+maintainer: David Lazar <lazard@csail.mit.edu>+homepage: https://github.com/davidlazar/hpygments+synopsis: Highlight source code using Pygments+description:     Highlight source code using Pygments <http://pygments.org>. This package     depends on Pygments and its accompanying @pygmentize@ script.-Homepage:           https://github.com/davidlazar/hpygments-License:            MIT-License-file:       LICENSE-Author:             David Lazar-Maintainer:         David Lazar <lazar6@illinois.edu>-Category:           Text-Build-type:         Simple-Cabal-version:      >=1.6--Extra-source-files:-    README.md--Data-files:+category: Text+author: David Lazar+tested-with: GHC >=7.6.3+data-files:     pygments_dump_json.py+extra-source-files:+    README.md  source-repository head-  Type:             git-  Location:         https://github.com/davidlazar/hpygments--Library-  ghc-options:      -Wall--  Hs-source-dirs:   src--  Exposed-modules:-    Text.Highlighting.Pygments-    Text.Highlighting.Pygments.Lexers-    Text.Highlighting.Pygments.Formatters--  Other-modules:-    Text.Highlighting.Pygments.JSON-    Paths_hpygments+    type: git+    location: https://github.com/davidlazar/hpygments -  Build-depends:-    base >= 4 && < 5,-    bytestring,-    process,-    process-extras == 0.2.*,-    aeson == 0.6.1.*+library+    exposed-modules:+        Text.Highlighting.Pygments+        Text.Highlighting.Pygments.Lexers+        Text.Highlighting.Pygments.Formatters+    build-depends:+        base >=4 && <5,+        bytestring -any,+        process >=1.2 && <1.3,+        process-extras >=0.3 && <0.4,+        aeson >=0.8 && <0.9+    hs-source-dirs: src+    other-modules:+        Text.Highlighting.Pygments.JSON+        Paths_hpygments+    ghc-options: -Wall
src/Text/Highlighting/Pygments.hs view
@@ -37,7 +37,7 @@ import Text.Highlighting.Pygments.Formatters  -- | Highlight code robustly. This function is more robust than the--- lower-level 'pygmentize' function since this library forbids the +-- lower-level 'pygmentize' function since this library forbids the -- construction of invalid 'Lexer' and 'Formatter' values. Invalid -- 'Options' may still cause this function to raise an exception. highlight :: Lexer -> Formatter -> Options -> String -> IO String@@ -56,7 +56,7 @@     case exitCode of         ExitSuccess -> return stdout         -- TODO throw a custom exception?-        e -> error $ "hpygments: `pygmentize " ++ unwords args ++ "` failed: " +        e -> error $ "hpygments: `pygmentize " ++ unwords args ++ "` failed: "                    ++ show e ++ if stderr /= "" then ": " ++ stderr else ""  -- | The lexer/formatter option @(key, value)@ is passed to the @pygmentize@ 
src/Text/Highlighting/Pygments/Formatters.hs view
@@ -15,10 +15,9 @@     , terminalFormatter     ) where -import Data.Aeson.TH (deriveJSON)-import Data.Maybe (listToMaybe)--import Text.Highlighting.Pygments.JSON+import           Data.Aeson.TH                   (defaultOptions, deriveJSON)+import           Data.Maybe                      (listToMaybe)+import           Text.Highlighting.Pygments.JSON  type FormatterAlias = String @@ -27,7 +26,7 @@     , _formatterAliases :: [FormatterAlias]     } deriving (Eq, Ord, Show) -$(deriveJSON id ''Formatter)+$(deriveJSON defaultOptions ''Formatter)  getAllFormatters :: IO [Formatter] getAllFormatters = getPygmentsJSON "formatters"
src/Text/Highlighting/Pygments/JSON.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE OverloadedStrings #-}-module Text.Highlighting.Pygments.JSON +module Text.Highlighting.Pygments.JSON     (       getPygmentsJSON     ) where
src/Text/Highlighting/Pygments/Lexers.hs view
@@ -18,10 +18,10 @@     , textLexer     ) where -import Data.Aeson.TH (deriveJSON)-import Data.Maybe (listToMaybe)+import           Data.Aeson.TH                   (defaultOptions, deriveJSON)+import           Data.Maybe                      (listToMaybe) -import Text.Highlighting.Pygments.JSON+import           Text.Highlighting.Pygments.JSON  type LexerAlias = String @@ -32,7 +32,7 @@     , _lexerMimeTypes :: [String]     } deriving (Eq, Ord, Show) -$(deriveJSON id ''Lexer)+$(deriveJSON defaultOptions ''Lexer)  getAllLexers :: IO [Lexer] getAllLexers = getPygmentsJSON "lexers"@@ -65,7 +65,7 @@     }  literateHaskellLexer :: Lexer-literateHaskellLexer = Lexer +literateHaskellLexer = Lexer     { _lexerName = "Literate Haskell"     , _lexerAliases = ["lhs","literate-haskell"]     , _lexerFileTypes = ["*.lhs"]