packages feed

xformat 0.1.1 → 0.1.2

raw patch · 4 files changed

+51/−46 lines, 4 filesdep +xformatsetup-changed

Dependencies added: xformat

Files

Setup.lhs view
@@ -6,7 +6,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Setup--- Copyright   :  (c) 2009 Sean Leather+-- Copyright   :  (c) 2009-2012 Sean Leather -- License     :  BSD3 -- -- Maintainer  :  leather@cs.uu.nl@@ -14,42 +14,10 @@  module Main (main) where -import System.Cmd-  ( system-  )--import System.FilePath-  ( (</>)-  )--import Distribution.Simple-  ( defaultMainWithHooks-  , simpleUserHooks-  , UserHooks(runTests)-  , Args-  )--import Distribution.Simple.LocalBuildInfo-  ( LocalBuildInfo-  )--import Distribution.PackageDescription-  ( PackageDescription-  )+import Distribution.Simple (defaultMain)  main :: IO ()-main = defaultMainWithHooks hooks-  where-    hooks = simpleUserHooks-            { runTests    = runTests'-            }---- Run a 'test' binary that gets built when configured with '-ftest'.-runTests' :: Args -> Bool -> PackageDescription -> LocalBuildInfo -> IO ()-runTests' _ _ _ _ = system cmd >> return ()-  where testdir = "dist" </> "build" </> "test"-        testcmd = "." </> "test"-        cmd = "cd " ++ testdir ++ " && " ++ testcmd+main = defaultMain  \end{code} 
src/Text/XFormat/Read.hs view
@@ -76,6 +76,7 @@  import Control.Applicative ((<$>)) import Text.ParserCombinators.ReadP+import Text.Read.Lex (readDecP) import Data.Char (isSpace)  --------------------------------------------------------------------------------@@ -175,14 +176,14 @@ data IntF = Int  instance Format IntF Int where-  readpf Int = readS_to_P reads+  readpf Int = readDecP  -- | Parse an 'Integer'.  data IntegerF = Integer  instance Format IntegerF Integer where-  readpf Integer = readS_to_P reads+  readpf Integer = readDecP  -- | Parse a 'Float'. 
+ test/Main.hs view
@@ -0,0 +1,28 @@++--------------------------------------------------------------------------------+-- |+-- Module      :  Main+-- Copyright   :  (c) 2009-2012 Sean Leather+-- License     :  BSD3+--+-- Maintainer  :  leather@cs.uu.nl+--+-- Tests for Text.XFormat.*.+--------------------------------------------------------------------------------++module Main where++import System.Exit (exitFailure, exitSuccess)++import qualified Read (test)+import qualified Show (test)++test :: Bool+test = and+  [ Read.test+  , Show.test+  ]++main :: IO ()+main = if test then exitSuccess else exitFailure+
xformat.cabal view
@@ -1,5 +1,5 @@ name:                   xformat-version:                0.1.1+version:                0.1.2 synopsis:    Extensible, type-safe formatting with scanf- and printf-like functions@@ -7,9 +7,6 @@ homepage:               http://github.com/spl/xformat description: -  /Warning:/ This version of the package is very experimental and the interface-  may change in later versions. I am seeking comments to improve it.-  .   This package is composed of two functions for formatted conversion between   strings and typed values. Each is defined as a type-indexed function using a   type class with multiple parameters and functional dependencies along with@@ -30,16 +27,20 @@   appropriate class.  category:               Text, Generics-copyright:              (c) 2009 Sean Leather+copyright:              (c) 2009-2014 Sean Leather license:                BSD3 license-file:           LICENSE author:                 Sean Leather-maintainer:             leather@cs.uu.nl+maintainer:             sean.leather@gmail.com stability:              experimental-build-type:             Custom-cabal-version:          >= 1.2.1-tested-with:            GHC == 6.8.3, GHC == 6.10.1, GHC == 7.4.1+build-type:             Simple+cabal-version:          >= 1.9.2+tested-with:            GHC == 6.8.3, GHC == 6.10.1, GHC == 7.4.1, GHC == 7.6.3 +source-repository head+  type:     git+  location: git@github.com:spl/xformat.git+ --------------------------------------------------------------------------------  Library@@ -51,4 +52,11 @@   build-depends:        base >= 3.0 && < 5.0    ghc-options:          -Wall -O2++Test-Suite test+  type:                 exitcode-stdio-1.0+  hs-source-dirs:       test+  main-is:              Main.hs+  build-depends:        base >= 3.0 && < 5.0,+                        xformat