os-release 0.2.1 → 0.2.2
raw patch · 5 files changed
+47/−5 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.rst +11/−0
- README.rst +17/−0
- library/System/OsRelease.hs +7/−1
- os-release.cabal +11/−4
- tests/HLint.hs +1/−0
+ ChangeLog.rst view
@@ -0,0 +1,11 @@+0.2.2+=====++- Fixes builds failing just due to -Werror++- README.rst and ChangeLog.rst are distributed with cabal package++0.2.1+=====++- Initial release
+ README.rst view
@@ -0,0 +1,17 @@+##########+os-release+##########++http://www.freedesktop.org/software/systemd/man/os-release.html++Usage+#####++.. code-block:: haskell++ import System.OsRelease+ main = readOs >>= print++.. code-block::++ Right (fromList [(OsReleaseKey "ANSI_COLOR",OsReleaseValue "1;32"),(OsReleaseKey "BUG_REPORT_URL",OsReleaseValue "https://bugs.gentoo.org/"),(OsReleaseKey "HOME_URL",OsReleaseValue "http://www.gentoo.org/"),(OsReleaseKey "ID",OsReleaseValue "gentoo"),(OsReleaseKey "NAME",OsReleaseValue "Gentoo"),(OsReleaseKey "PRETTY_NAME",OsReleaseValue "Gentoo/Linux"),(OsReleaseKey "SUPPORT_URL",OsReleaseValue "http://www.gentoo.org/main/en/support.xml")])
library/System/OsRelease.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE FlexibleContexts, TypeSynonymInstances, FlexibleInstances, GeneralizedNewtypeDeriving #-}+{-# LANGUAGE FlexibleContexts, TypeSynonymInstances, FlexibleInstances, GeneralizedNewtypeDeriving, CPP #-} module System.OsRelease ( parseOs@@ -19,7 +19,13 @@ import Data.String import Data.Monoid import Data.Either++#if MIN_VERSION_base(4,8,0)+-- note: using hscpp it should be possible to use `#if not COND`+#else import Control.Applicative ((<$>))+#endif+ import Control.Monad import qualified Control.Exception as E
os-release.cabal view
@@ -9,9 +9,14 @@ homepage: https://github.com/yaccz/os-release name: os-release synopsis: /etc/os-release helpers-version: 0.2.1+version: 0.2.2 description: /etc/os-release helpers+extra-doc-files: ChangeLog.rst README.rst +Flag devel+ Description: Enables -Werror+ Default: False+ Manual: True source-repository head type: git@@ -45,9 +50,11 @@ , temporary default-language: Haskell2010- ghc-options:- -Wall- -Werror++ if flag(devel)+ ghc-options: -Wall -Werror+ else+ ghc-options: -Wall hs-source-dirs: library tests/unit
tests/HLint.hs view
@@ -7,6 +7,7 @@ arguments = [ "library"+ , "--cpp-file=dist/build/autogen/cabal_macros.h" , "tests" ]