Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

make adjustments for GHC 8 support #4

Merged
merged 1 commit into from
Dec 9, 2016

Conversation

agentm
Copy link
Contributor

@agentm agentm commented Dec 9, 2016

  • relax cabal upper bound constraints
  • use Control.Monad.Catch (catch,finally) where appropriate as per deprecation warning
  • fix unused import warnings

Ran "cabal test" against GHC 7.10.3 and GHC 8.0.1 successfully.

I need to compile against binary, time, and deepseq from GHC 8 because our project links against GHC for its scripting engine.

The only remaining warnings in GHC8 are loads of redundant constraint warnings (new in GHC 8), but that will be fixed in a subsequent pull request, if it makes sense to fix them.

-relax cabal upper bound constraints
-use Control.Monad.Catch (catch,finally) where appropriate as per deprecation warning
@@ -80,10 +81,11 @@ type CallId = MonitorRef

newtype CallRef a = CallRef { unCaller :: (Recipient, CallId) }
deriving (Eq, Show, Typeable, Generic)
instance Serializable a => Binary (CallRef a) where
instance NFData a => NFData (CallRef a) where rnf (CallRef x) = rnf x `seq` ()
--instance Serializable a => Binary (CallRef a) where
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GHC 8 introduces warnings for unnecessary constraints. I should have left this chunk out of the pull request since it is non-essential, but please be aware that the GHC 8 generates a lot of new warnings for this project.

@qnikst
Copy link
Contributor

qnikst commented Dec 9, 2016

Thanks for the patch!

Travis CI is failing but so it did for previous versions and master so I'm merging this.

@qnikst qnikst merged commit e0545c9 into haskell-distributed:master Dec 9, 2016
@hyperthunk
Copy link
Member

The build seems to fail when compiling distributed-process-extras.

src/Control/Concurrent/Utils.hs:36:18: Not in scope: ‘<$>’
src/Control/Concurrent/Utils.hs:36:32: Not in scope: ‘<*>’
src/Control/Concurrent/Utils.hs:36:36: Not in scope: ‘pure’
src/Control/Concurrent/Utils.hs:36:50: Not in scope: ‘<*>’
src/Control/Concurrent/Utils.hs:36:54: Not in scope: ‘pure’
Installed distributed-process-async-0.2.3
cabal: Error: some packages failed to install:
distributed-process-extras-0.2.1.2 failed during the building phase. The
exception was:
ExitFailure 1

I'll try and dig in to this, I'm assuming it's an API having changed somewhere.

@agentm
Copy link
Contributor Author

agentm commented Jan 31, 2017

All of those functions are in the Prelude and I don't see any imports hiding them or excluding Prelude.

Also, I just pulled from this master and am unable to reproduce this with 8.0.1.

Are there any errors above this?

@hyperthunk
Copy link
Member

It seems to be talking to build d-p-extras. I'm gonna look at modifying the extension library builds to emulate distributed-process' since that has changed to use stack and I think these libs should do the same for travis. I'll tweak and submit a pr

@qnikst
Copy link
Contributor

qnikst commented Jan 31, 2017

Those functions are from older pre-7.10 GHC where where they were not re-exported by Prelude.

import Control.Applicative
... other imports
import Prelude

should work for all ghc versions.

@hyperthunk
Copy link
Member

Shows how long I've been awol! Will update in a branch and see if travis is happy...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants