Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2850149
Add ghc-7.8 travis job
phadej Nov 11, 2017
2db8a41
add weeder test
NicolasDP Jan 8, 2018
dc05df6
Merge pull request #458 from haskell-foundation/add-weeder
vincenthz Jan 11, 2018
3259691
Merge pull request #455 from haskell-foundation/builder
vincenthz Jan 11, 2018
498ad3c
Fix the build on GHC 7.8. A Monad constraint did not give pure at tha…
gwils Jan 12, 2018
5eb2759
improve Block concat function
NicolasDP Jan 12, 2018
7ff5d82
improve UArray concat function
NicolasDP Jan 12, 2018
1f91c67
improve Builder concat function
NicolasDP Jan 12, 2018
be17219
add concat benchmark
NicolasDP Jan 12, 2018
9322844
Merge pull request #460 from gwils/fix-ghc-7.8
vincenthz Jan 13, 2018
2b5e504
Merge pull request #443 from phadej/add-ghc-7.8-travis-job
vincenthz Jan 13, 2018
1b4ba7a
Merge pull request #462 from haskell-foundation/concat-upgrade
vincenthz Jan 13, 2018
1bb7fca
Unicode Case Mapping (#461)
Jan 13, 2018
3ac0574
fix use of shrinkMutableByteArray# for older GHC
vincenthz Jan 18, 2018
7910dda
Introduce AMPMonad constraint to handle ghc compat before the AMP
vincenthz Jan 18, 2018
f7fdaeb
Use AMPMonad constraint instead of Monad for compat
vincenthz Jan 18, 2018
8643558
Add Typeable explicitely for Word128/Word256 and old ghc versions
vincenthz Jan 18, 2018
47d6a0b
add Typeable for Bitmap
vincenthz Jan 18, 2018
2297d65
ghc 7.8 is missing Typeable for (,,,,,,,), so just comment the test
vincenthz Jan 18, 2018
2f589f4
Merge pull request #464 from haskell-foundation/compat-amp-78
vincenthz Jan 18, 2018
4752ca7
release foundation 0.0.19 and basement 0.0.6
vincenthz Jan 19, 2018
71166c0
add CSV builder on top of Block Builder and String Builder
NicolasDP Jan 21, 2018
8bc0b7a
fix primitive compat functions
NicolasDP Jan 21, 2018
664d929
Merge pull request #465 from haskell-foundation/builder-csv
vincenthz Jan 23, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ matrix:
- env: BUILD=hlint
language: generic
compiler: hlint
- env: BUILD=weeder
language: generic
addons: { apt: { packages: [ libgmp-dev ] } }
compiler: weeder
- env: BUILD=stack RESOLVER=ghc-8.0
language: generic
addons: { apt: { packages: [ libgmp-dev ] } }
Expand All @@ -31,6 +35,10 @@ matrix:
language: generic
addons: { apt: { packages: [ libgmp-dev ] } }
compiler: ghc-7.10
- env: BUILD=stack RESOLVER=ghc-7.8 HADDOCK="--no-haddock"
language: generic
addons: { apt: { packages: [ libgmp-dev ] } }
compiler: ghc-7.8
- env: BUILD=stack RESOLVER=ghc-8.0
os: osx
language: generic
Expand All @@ -45,6 +53,10 @@ matrix:
language: generic
addons: { apt: { packages: [ libgmp-dev ] } }
compiler: ghc-8.0
- env: BUILD=weeder
language: generic
addons: { apt: { packages: [ libgmp-dev ] } }
compiler: weeder
- env: BUILD=hlint
language: generic
compiler: hlint
Expand All @@ -54,7 +66,7 @@ install:
- mkdir -p ~/.local/bin
- |
case "$BUILD" in
stack)
stack|weeder)
if [ `uname` = "Darwin" ]
then
travis_retry curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
Expand All @@ -77,7 +89,7 @@ script:
--flag foundation:bounds-check ${EXPERIMENTAL} \
--install-ghc \
--coverage --bench --no-run-benchmarks \
--haddock --no-haddock-deps
${HADDOCK---haddock --no-haddock-deps}
;;
cabal)
cabal install --only-dependencies --enable-tests
Expand All @@ -88,6 +100,12 @@ script:
hlint)
curl -sL https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh | sh -s . --cpp-define=__GLASGOW_HASKELL__=800 --cpp-define=x86_64_HOST_ARCH=1 --cpp-define=mingw32_HOST_OS=1
;;
weeder)
stack --no-terminal build \
--flag foundation:bounds-check ${EXPERIMENTAL} \
--install-ghc
curl -sL https://raw.github.com/ndmitchell/weeder/master/misc/travis.sh | sh -s .
;;
esac
set +ex

Expand Down
202 changes: 202 additions & 0 deletions .weeder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
- package:
- name: foundation
- section:
- name: bench:bench
- message:
- name: Module not compiled
- module:
- BenchUtil.Common
- BenchUtil.RefData
- Fake.ByteString
- Fake.Text
- Fake.Vector
- Main.hs
- Sys
- message:
- name: Redundant build-depends entry
- depends:
- attoparsec
- base
- basement
- bytestring
- foundation
- gauge
- text
- vector
- section:
- name: library
- message:
- name: Excessive other-modules entry
- module:
- Foundation.System.Bindings.Hs
- Foundation.System.Bindings.Network
- message:
- name: Module not compiled
- module:
- Foundation.Foreign.MemoryMap.Windows
- Foundation.Network.HostName
- Foundation.System.Bindings.Macos
- Foundation.System.Bindings.Windows
- Foundation.System.Entropy.Windows
- message:
- name: Weeds exported
- module:
- name: Foundation.Array.Bitmap
- identifier:
- append
- concat
- cons
- empty
- index
- read
- snoc
- unsafeIndex
- unsafeRead
- unsafeWrite
- write
- module:
- name: Foundation.Check.Print
- identifier: diffBlame
- module:
- name: Foundation.Check.Property
- identifier: checkHasSucceed
- module:
- name: Foundation.Collection.Mappable
- identifier: sequence_
- module:
- name: Foundation.Conduit.Internal
- identifier:
- Await
- Done
- Leftover
- Pipe
- PipeM
- Yield
- liftResourceT
- runResourceT
- module:
- name: Foundation.Foreign.MemoryMap.Posix
- identifier:
- MemoryAdvice
- MemoryAdviceDontNeed
- MemoryAdviceNormal
- MemoryAdviceRandom
- MemoryAdviceSequential
- MemoryAdviceWillNeed
- MemoryMapFlag
- MemoryMapPrivate
- MemoryMapShared
- MemoryProtection
- MemoryProtectionExecute
- MemoryProtectionNone
- MemoryProtectionRead
- MemoryProtectionWrite
- MemorySyncAsync
- MemorySyncFlag
- MemorySyncInvalidate
- MemorySyncSync
- memoryAdvise
- memoryLock
- memoryMap
- memoryProtect
- memorySync
- memoryUnlock
- memoryUnmap
- sysconfPageSize
- module:
- name: Foundation.Hashing.FNV
- identifier:
- FNV1Hash32
- FNV1Hash64
- module:
- name: Foundation.Hashing.Hasher
- identifier: hashNew
- module:
- name: Foundation.IO.File
- identifier:
- hGetNonBlocking
- hGetSome
- module:
- name: Foundation.Monad.Identity
- identifier: IdentityT
- module:
- name: Foundation.Partial
- identifier:
- fromJust
- fromLeft
- fromRight
- head
- partialError
- module:
- name: Foundation.Random.ChaChaDRG
- identifier: keySize
- module:
- name: Foundation.Random.XorShift
- identifier:
- next
- nextDouble
- nextList
- module:
- name: Foundation.System.Bindings.Hs
- identifier: sysHsCoreGetErrno
- module:
- name: Foundation.System.Bindings.Network
- identifier:
- getHErrno
- herr_HostNotFound
- herr_NoData
- herr_NoRecovery
- herr_TryAgain
- module:
- name: Foundation.System.Bindings.Time
- identifier:
- CTimeVal
- CTimeZone
- size_CTimeT
- size_CTimeVal
- size_CTimeZone
- sysTimeClockGetRes
- sysTimeGetTimeOfDay
- sysTime_CLOCK_BOOTTIME
- sysTime_CLOCK_BOOTTIME_ALARM
- sysTime_CLOCK_MONOTONIC_RAW
- sysTime_CLOCK_PROCESS_CPUTIME_ID
- sysTime_CLOCK_REALTIME
- sysTime_CLOCK_REALTIME_ALARM
- sysTime_CLOCK_REALTIME_COARSE
- sysTime_CLOCK_TAI
- sysTime_CLOCK_THREAD_CPUTIME_ID
- section:
- name: test:check-foundation
- message:
- name: Weeds exported
- module:
- name: Test.Checks.Property.Collection
- identifier:
- testCollectionProperties
- testEqualityProperties
- testIsListPropertyies
- testMonoidProperties
- testOrderingProperties
- testSequentialProperties
- toListP
- module:
- name: Test.Data.List
- identifier:
- generateListOfElement
- generateListOfElementMaxN
- generateNonEmptyListOfElement
- module:
- name: Test.Foundation.Number
- identifier: testNumber
- section:
- name: test:doctest
- message:
- name: Module not compiled
- module: DocTest.hs
- message:
- name: Redundant build-depends entry
- depends:
- base
- doctest

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.0.19

* Add Block, UArray, String Builder
* Improve concat for Block andd UArray
* Add unicode case mapping
* Re-add compatibility with ghc 7.8

## 0.0.18

* Add missing lowlevel Block functionality
Expand Down
2 changes: 2 additions & 0 deletions Foundation/Array/Bitmap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
-- unnecessary churn.
--
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Foundation.Array.Bitmap
( Bitmap
, MutableBitmap
Expand Down Expand Up @@ -46,6 +47,7 @@ import GHC.ST
import qualified Data.List

data Bitmap = Bitmap (CountOf Bool) (UArray Word32)
deriving (Typeable)

data MutableBitmap st = MutableBitmap (CountOf Bool) (MUArray Word32 st)

Expand Down
2 changes: 1 addition & 1 deletion Foundation/Exception.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Control.Exception (Exception, SomeException)
import Foundation.Monad.Exception

finally :: MonadBracket m => m a -> m b -> m a
finally f g = generalBracket (pure ()) (\() a -> g >> pure a) (\() _ -> g) (const f)
finally f g = generalBracket (return ()) (\() a -> g >> return a) (\() _ -> g) (const f)

try :: (MonadCatch m, Exception e) => m a -> m (Either e a)
try a = catch (a >>= \ v -> return (Right v)) (\e -> return (Left e))
Loading