Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsList instances for GHC ≥ 7.8 #79

Merged
merged 1 commit into from Apr 13, 2014
Merged

IsList instances for GHC ≥ 7.8 #79

merged 1 commit into from Apr 13, 2014

Conversation

andy-morris
Copy link
Contributor

For the OverloadedLists extension.

@@ -433,11 +440,14 @@ insertWith f k0 v0 m0 = go h0 k0 v0 0 m0
{-# INLINABLE insertWith #-}

-- | In-place update version of insertWith
unsafeInsertWith :: (Eq k, Hashable k) => (v -> v -> v) -> k -> v -> HashMap k v
unsafeInsertWith :: forall k v. (Eq k, Hashable k)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why these changes? They don't seem related.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, right, I meant to say; sorry.

Turning on type families seemed to interfere with the type inference for the ST stuff, so I had to add some extra signatures for those.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you know why this is? Is it documented somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aha! Type families imply MonoLocalBinds. So the s variables aren't polymorphic enough without an explicit signature and everything goes pear shaped.

The relevant manual section is http://www.haskell.org/ghc/docs/latest/html/users_guide/other-type-extensions.html#mono-local-binds.

@andy-morris
Copy link
Contributor Author

Also, while I'm remembering things I should've mentioned (again, sorry): I wasn't sure whether the version checks should be 707or 708. Do you happen to know if IsList had the same API in 7.7?

@tibbe
Copy link
Collaborator

tibbe commented Apr 13, 2014

Now when 7.8 is out I don't think we need to add it for 7.7.

@tibbe tibbe merged commit 1447081 into haskell-unordered-containers:master Apr 13, 2014
@UnkindPartition
Copy link
Contributor

Could you make a release for this?

@tibbe
Copy link
Collaborator

tibbe commented Jul 10, 2014

@feuerbach released as 0.2.5.0.

@UnkindPartition
Copy link
Contributor

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

3 participants