packages feed

bound 0.5.0.2 → 0.5.1

raw patch · 6 files changed

+69/−23 lines, 6 filesdep ~bifunctorsdep ~comonaddep ~prelude-extrasbuild-type:Customsetup-changedPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: bifunctors, comonad, prelude-extras

API changes (from Hackage documentation)

Files

.travis.yml view
@@ -1,1 +1,8 @@ language: haskell+notifications:+  irc:+    channels:+      - "irc.freenode.org#haskell-lens"+    skip_join: true+    template:+      - "\x0313bound\x03/\x0306%{branch}\x03 \x0314%{commit}\x03 %{build_url} %{message}"
CHANGELOG.markdown view
@@ -1,5 +1,10 @@-0.5+0.5.1 -----+* Removed my personal inter-package dependency upper bounds+* Updated doctest suite to use exact versions.++0.5+--- * Created a `doctest`-based test suite * Added many examples * 100% haddock coverage
Setup.lhs view
@@ -1,7 +1,44 @@ #!/usr/bin/runhaskell-> module Main (main) where+\begin{code}+{-# OPTIONS_GHC -Wall #-}+module Main (main) where -> import Distribution.Simple+import Data.List ( nub )+import Data.Version ( showVersion )+import Distribution.Package ( PackageName(PackageName), PackageId, InstalledPackageId, packageVersion, packageName )+import Distribution.PackageDescription ( PackageDescription(), TestSuite(..) )+import Distribution.Simple ( defaultMainWithHooks, UserHooks(..), simpleUserHooks )+import Distribution.Simple.Utils ( rewriteFile, createDirectoryIfMissingVerbose )+import Distribution.Simple.BuildPaths ( autogenModulesDir )+import Distribution.Simple.Setup ( BuildFlags(buildVerbosity), fromFlag )+import Distribution.Simple.LocalBuildInfo ( withLibLBI, withTestLBI, LocalBuildInfo(), ComponentLocalBuildInfo(componentPackageDeps) )+import Distribution.Verbosity ( Verbosity )+import System.FilePath ( (</>) ) -> main :: IO ()-> main = defaultMain+main :: IO ()+main = defaultMainWithHooks simpleUserHooks+  { buildHook = \pkg lbi hooks flags -> do+     generateBuildModule (fromFlag (buildVerbosity flags)) pkg lbi+     buildHook simpleUserHooks pkg lbi hooks flags+  }++generateBuildModule :: Verbosity -> PackageDescription -> LocalBuildInfo -> IO ()+generateBuildModule verbosity pkg lbi = do+  let dir = autogenModulesDir lbi+  createDirectoryIfMissingVerbose verbosity True dir+  withLibLBI pkg lbi $ \_ libcfg -> do+    withTestLBI pkg lbi $ \suite suitecfg -> do+      rewriteFile (dir </> "Build_" ++ testName suite ++ ".hs") $ unlines+        [ "module Build_" ++ testName suite ++ " where"+        , "deps :: [String]"+        , "deps = " ++ (show $ formatdeps (testDeps libcfg suitecfg))+        ]+  where+    formatdeps = map (formatone . snd)+    formatone p = case packageName p of+      PackageName n -> n ++ "-" ++ showVersion (packageVersion p)++testDeps :: ComponentLocalBuildInfo -> ComponentLocalBuildInfo -> [(InstalledPackageId, PackageId)]+testDeps xs ys = nub $ componentPackageDeps xs ++ componentPackageDeps ys++\end{code}
bound.cabal view
@@ -1,6 +1,6 @@ name:          bound category:      Language, Compilers/Interpreters-version:       0.5.0.2+version:       0.5.1 license:       BSD3 cabal-version: >= 1.9.2 license-file:  LICENSE@@ -11,6 +11,7 @@ bug-reports:   http://github.com/ekmett/bound/issues copyright:     Copyright (C) 2012 Edward A. Kmett synopsis:      Making de Bruijn Succ Less+build-type:    Custom description:    We represent the target language itself as an ideal monad supplied by the    user, and provide a 'Scope' monad transformer for introducing bound variables@@ -32,7 +33,6 @@    structure we permit easy simultaneous substitution and further speed up     instantiation. -build-type:    Simple extra-source-files:   .travis.yml   examples/Simple.hs@@ -58,10 +58,10 @@     Bound.Var    build-depends:-    base           >= 4   && < 5,-    bifunctors     == 3.0.*,-    comonad        == 3.0.*,-    prelude-extras >= 0.2 && < 0.3,+    base           >= 4 && < 5,+    bifunctors     >= 3,+    comonad        >= 3,+    prelude-extras >= 0.2,     transformers   >= 0.2 && < 0.4    ghc-options: -Wall -O2 -fspec-constr -fdicts-cheap -funbox-strict-fields
examples/Simple.hs view
@@ -1,7 +1,7 @@ module Main where  -- this is a simple example where lambdas only bind a single variable at a time--- this directly corresponds to the usual de bruijn presentation+-- this directly corre:sponds to the usual de bruijn presentation  import Data.List (elemIndex) import Data.Foldable hiding (notElem)@@ -30,7 +30,6 @@ -- Lam (Scope (Lam (Scope (V (B ()) :@ V (F (V (B ()))))))) lam :: Eq a => a -> Exp a -> Exp a lam v b = Lam (abstract1 v b)-  -- | A smart constructor for Let bindings 
tests/doctests.hs view
@@ -1,26 +1,24 @@ module Main where -import Test.DocTest-import System.Directory-import System.FilePath+import Build_doctests (deps) import Control.Applicative import Control.Monad import Data.List+import System.Directory+import System.FilePath+import Test.DocTest  main :: IO () main = getSources >>= \sources -> doctest $-    "-iexamples"-  : "-isrc"+    "-isrc"   : "-idist/build/autogen"   : "-optP-include"   : "-optPdist/build/autogen/cabal_macros.h"-  : sources+  : "-hide-all-packages"+  : map ("-package="++) deps ++ sources  getSources :: IO [FilePath]-getSources = do-  examples <- go "examples"-  src <- go "src"-  return $ filter (isSuffixOf ".hs") (examples ++ src)+getSources = filter (isSuffixOf ".hs") <$> go "src"   where     go dir = do       (dirs, files) <- getFilesAndDirectories dir