packages feed

th-lift-instances 0.1.6 → 0.1.7

raw patch · 3 files changed

+5/−93 lines, 3 filesdep −directorydep −doctestdep −filepathdep ~basePVP ok

version bump matches the API change (PVP)

Dependencies removed: directory, doctest, filepath

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

LICENSE view
@@ -1,4 +1,4 @@-Copyright 2013-2015 Benno Fünfstück+Copyright 2013-2016 Benno Fünfstück  All rights reserved. 
− tests/doctests.hsc
@@ -1,76 +0,0 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE ForeignFunctionInterface #-}--------------------------------------------------------------------------------- Copyright   :  (C) 2012-13 Edward Kmett--- License     :  BSD-style (see the file LICENSE)--- Maintainer  :  Edward Kmett <ekmett@gmail.com>--- Stability   :  provisional--- Portability :  portable------ This module provides doctests for a project based on the actual versions--- of the packages it was built with. It requires a corresponding Setup.lhs--- to be added to the project-------------------------------------------------------------------------------module Main where--import Build_doctests (deps)-import Control.Applicative-import Control.Monad-import Data.List-import System.Directory-import System.FilePath-import Test.DocTest--import Prelude--##ifdef mingw32_HOST_ARCH-##ifdef i386_HOST_ARCH-##define USE_CP-import Control.Applicative-import Control.Exception-import Foreign.C.Types-foreign import stdcall "windows.h SetConsoleCP" c_SetConsoleCP :: CUInt -> IO Bool-foreign import stdcall "windows.h GetConsoleCP" c_GetConsoleCP :: IO CUInt-##elif defined(x86_64_HOST_ARCH)-##define USE_CP-import Control.Applicative-import Control.Exception-import Foreign.C.Types-foreign import ccall "windows.h SetConsoleCP" c_SetConsoleCP :: CUInt -> IO Bool-foreign import ccall "windows.h GetConsoleCP" c_GetConsoleCP :: IO CUInt-##endif-##endif---- | Run in a modified codepage where we can print UTF-8 values on Windows.-withUnicode :: IO a -> IO a-##ifdef USE_CP-withUnicode m = do-  cp <- c_GetConsoleCP-  (c_SetConsoleCP 65001 >> m) `finally` c_SetConsoleCP cp-##else-withUnicode m = m-##endif--main :: IO ()-main = withUnicode $ forM_ deps $ \(dirs, dep) -> do-    putStrLn $ ":: Running doctests for source directories: " ++ intercalate " " dirs-    mapM getSources dirs >>= \sources -> doctest $-        "-idist/build/autogen"-      : "-optP-include"-      : "-optPdist/build/autogen/cabal_macros.h"-      : "-hide-all-packages"-      : map ("-package="++) dep-        ++ map ("-i"++) dirs -        ++ join sources --getSources :: FilePath -> IO [FilePath]-getSources d = filter (isSuffixOf ".hs") <$> go d-  where-    go dir = do-      (dirs, files) <- getFilesAndDirectories dir-      (files ++) . concat <$> mapM go dirs--getFilesAndDirectories :: FilePath -> IO ([FilePath], [FilePath])-getFilesAndDirectories dir = do-  c <- map (dir </>) . filter (`notElem` ["..", "."]) <$> getDirectoryContents dir-  (,) <$> filterM doesDirectoryExist c <*> filterM doesFileExist c
th-lift-instances.cabal view
@@ -1,10 +1,10 @@ name: th-lift-instances-version: 0.1.6+version: 0.1.7 cabal-version: >=1.10 build-type: Custom license: BSD3 license-file: LICENSE-copyright: Copyright (C) 2013-2015 Benno Fünfstück+copyright: Copyright (C) 2013-2016 Benno Fünfstück maintainer: Benno Fünfstück <benno.fuenfstueck@gmail.com> stability: experimental homepage: http://github.com/bennofs/th-lift-instances/@@ -29,7 +29,7 @@     exposed-modules:         Instances.TH.Lift     build-depends:-        base >=4.4 && <4.9,+        base >=4.4 && <4.10,         template-haskell,         th-lift <0.8,         containers >=0.4 && <0.6,@@ -45,7 +45,7 @@     type: exitcode-stdio-1.0     main-is: Main.hs     build-depends:-        base <4.9,+        base <4.10,         template-haskell,         containers >=0.4 && <0.6,         vector >=0.9 && <0.12,@@ -58,15 +58,3 @@     hs-source-dirs: tests     other-modules:         Data--test-suite doctests-    type: exitcode-stdio-1.0-    main-is: doctests.hs-    build-depends:-        base <4.9,-        directory >=1.0 && <1.3,-        doctest >=0.9.1 && <0.11,-        filepath <1.5-    default-language: Haskell2010-    hs-source-dirs: tests-    ghc-options: -Wall -threaded