packages feed

show 0.5 → 0.6

raw patch · 4 files changed

+7/−98 lines, 4 filesdep −QuickCheckdep −randomdep −simple-reflectnew-uploader

Dependencies removed: QuickCheck, random, simple-reflect, smallcheck

Files

ShowFun.hs view
@@ -1,5 +1,3 @@--- Helper code for runplugs that doesn't agree with SmallCheck- module ShowFun where  import Data.Typeable
− ShowQ.hs
@@ -1,59 +0,0 @@-{-# LANGUAGE FlexibleContexts, NoMonomorphismRestriction #-}--- Helper code for runplugs--module ShowQ where--import Data.List (group, intercalate, sort)-import System.IO.Unsafe (unsafePerformIO)-import Test.QuickCheck (numTests, quickCheckWithResult, stdArgs, Result(..), Testable)-import qualified Test.SmallCheck as SC (smallCheck, Testable)--mysmallcheck :: (SC.Testable IO prop) => prop -> ()-mysmallcheck = unsafePerformIO . mysmallcheck'-mysmallcheck' :: (SC.Testable IO prop) => prop -> IO ()-mysmallcheck' = SC.smallCheck 6--myquickcheck :: Testable prop => prop -> String-myquickcheck = unsafePerformIO . myquickcheck'--myquickcheck' :: Testable prop => prop -> IO String-myquickcheck' a = tests a 0 []--tests :: (Testable prop) => prop -> Int -> [[String]] -> IO String-tests prop ntest stamps =-  do result <- quickCheckWithResult stdArgs prop-     case result of-       NoExpectedFailure _ _ _ -> done "Arguments exhausted after" (numTests result) stamps-       GaveUp _ _ _ -> done "Arguments exhausted after" (numTests result) stamps-       Success _ _ _  -> done "OK, passed" (numTests result) stamps-       Failure _ _ _ _ _ _ _ -> return $ "Falsifiable, after "-                                ++ show ntest-                                ++ " tests:\n"-                                ++ reason result--done :: String -> Int -> [[String]] -> IO String-done mesg ntest stamps = return $ mesg ++ " " ++ show ntest ++ " tests" ++ table- where-  table = display-        . map entry-        . reverse-        . sort-        . map pairLength-        . group-        . sort-        . filter (not . null)-        $ stamps--  display []  = "."-  display [x] = " (" ++ x ++ ")."-  display xs  = '.' : unlines (map (++ ".") xs)--  pairLength :: [a] -> (Int, a)-  pairLength [] = (0, error "pairLength should never get an empty list")-  pairLength xss@(xs:_) = (length xss, xs)--  entry (n, xs)         = percentage n ntest-                       ++ intercalate ", " xs--  percentage n m        = show ((100 * n) `div` m) ++ "%"-
− SimpleReflect.hs
@@ -1,22 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}--------------------------------------------------------------------------------- |--- Module      :  SimpleReflect--- Copyright   :  (c) 2008 Twan van Laarhoven--- License     :  BSD-style------ Maintainer  :  twanvl@gmail.com--- Stability   :  experimental--- Portability :  portable------ Simple reflection of Haskell expressions containing variables.------ This module re-exports Debug.SimpleReflect from the simple-reflect package.----------------------------------------------------------------------------------module SimpleReflect-    ( module Debug.SimpleReflect-    ) where--import Debug.SimpleReflect-
show.cabal view
@@ -1,5 +1,5 @@ name:                show-version:             0.5+version:             0.6  license:             GPL license-file:        LICENSE@@ -9,31 +9,23 @@ stability:           Experimental category:            Language synopsis:            'Show' instances for Lambdabot-description:         This package provides ShowQ, ShowFun, and SimpleReflect.-                     .-                     ShowFun gives us Typeable instances for neutering IO expressions.-                     .-                     ShowQ adds SmallCheck & QuickCheck support.-                     .-                     And SimpleReflect allows us to literally see how functions 'expand',-                     through appropriate Show magic. See <http://twan.home.fmf.nl/blog/haskell/simple-reflection-of-expressions.details>.+description:         Show instances for functions and IO procedures  build-type:          Simple Cabal-Version:       >= 1.6-tested-with:         GHC==6.12.1+tested-with:         GHC==7.4.2, GHC == 7.6.1  source-repository head-  type:     darcs-  location: http://code.haskell.org/lambdabot+  type:                 git+  location:             https://github.com/mokus0/show.git  Flag base4- Description: Build with base-4+ Description: Build with base-4 or newer  Default: True  library-   exposed-modules:     ShowQ, ShowFun, SimpleReflect+   exposed-modules:     ShowFun -   build-depends:       random, QuickCheck>=2.4, smallcheck>=1.0, simple-reflect    if flag(base4)     build-depends:       base == 4.*, syb    else