darcs

Patch 1789 RepoModel tests: replace Either with an ... (and 8 more)

Title RepoModel tests: replace Either with an ... (and 8 more)
Superseder Nosy List ganesh
Related Issues
Status needs-review Assigned To
Milestone

Created on 2019-01-17.06:34:29 by ganesh, last changed 2019-01-17.06:45:05 by ganesh.

Files
File name Status Uploaded Type Edit Remove
patch-preview.txt ganesh, 2019-01-17.06:34:27 text/x-darcs-patch
repomodel-tests_-replace-either-with-an-explicit-failure-type.dpatch ganesh, 2019-01-17.06:34:28 application/x-darcs-patch
unnamed ganesh, 2019-01-17.06:34:28 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg20617 (view) Author: ganesh Date: 2019-01-17.06:34:28
GHC 8.6 fixes and other version bumps.

All intended for 2.14 branch as well, except that the
base/GHC bump patch itself is a slightly amended for the
branch.

The main change is to support "MonadFail", i.e. the removal
of fail from the Monad class; do blocks with incomplete
patterns now acquire a MonadFail constraint.

In most cases the incomplete patterns appear to be internal
assertions and we should just call bug instead - this is
preferable to propagating MonadFail everywhere and needing
to add orphan instances for things like MonadFail Identity.

In a couple of cases in the test code I have introduced
newtypes and MonadFail instances.

I haven't bumped binary because I can't find a build plan
for the new version - the "constraints" library hasn't been
updated for it.

9 patches for repository darcs-unstable@darcs.net:screened:

patch 989e775c409acdd28fcde591ac377e39f7d8d44d
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Tue Jan 15 06:59:56 GMT 2019
  * RepoModel tests: replace Either with an explicit failure type
  
  This means we can have a non-orphan MonadFail instance.
  
  Immediately before this change fail on this type would
  have just called error, but the code dates from before
  the explicit fail definition was removed from Either in 2010,
  so this probably restores the original intention.
  
  (see https://ghc.haskell.org/trac/ghc/ticket/4159)
  

patch d5419c335f4d06cd05fbaed648cb429211790dae
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Tue Jan 15 07:09:34 GMT 2019
  * PrimV1 tests: refactor a bit to avoid failable patterns in do-block

patch 4cb2d98b8511f46695572661aec7cfca7bce8d47
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Wed Jan 16 05:21:21 GMT 2019
  * replace failable pattern in existsAnycase with error
  
  A failure shouldn't be possible and anyway isn't
  caught by callers.
  

patch 7671fa1aee967a202232cc1f29d30390a015d893
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Wed Jan 16 05:22:16 GMT 2019
  * change failable pattern in partiallyUpdateTree to error
  
  Inspecting the call sites, a failure shouldn't be possible.

patch 91bf7d740f789f510808f788da3c9792e2dc921f
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Wed Jan 16 05:28:02 GMT 2019
  * support zip-archive 0.4

patch 992eed4081feee87e42370bb93c25532b9dbbc7d
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Wed Jan 16 06:15:23 GMT 2019
  * support network 2.8

patch 85f52f7457b2b62fe3d466022288ef2acf567293
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Wed Jan 16 06:15:31 GMT 2019
  * support QuickCheck 2.12

patch ead874f5d6d6abf034960d153468a1c886352c83
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Wed Jan 16 06:27:42 GMT 2019
  * PatchCheck tests: introduce newtype to implement MonadFail
  
  This restores the pre-MonadFail behaviour of this code
  (which would be to call error)
  

patch 5d674ea8304b0aced93afb532df4bdd7036bbeeb
Author: Ganesh Sittampalam <ganesh@earth.li>
Date:   Wed Jan 16 06:44:52 GMT 2019
  * Support GHC 8.6/base 4.12
  
  Also bump a couple of other versions needed to find a build
  plan with base 4.12.
Attachments
History
Date User Action Args
2019-01-17 06:34:29ganeshcreate
2019-01-17 06:45:05ganeshsetstatus: needs-screening -> needs-review