Giter Site home page Giter Site logo

GHC 7.7 warnings about containers HOT 10 CLOSED

haskell avatar haskell commented on June 3, 2024
GHC 7.7 warnings

from containers.

Comments (10)

tibbe avatar tibbe commented on June 3, 2024

I think what we'll do is once 7.8 is out we'll #ifdef a

import Prelude hiding (join)

for GHC >= 7.8.

from containers.

hvr avatar hvr commented on June 3, 2024

I'm afraid that won't silence the warning... I just tried with GHC HEAD with the following dummy module:

module Foo (join) where

import Prelude ()

join :: ()
join = ()

See also GHC #8004 for details about this new "feature".

from containers.

tibbe avatar tibbe commented on June 3, 2024

Ugh. Why not? What are you supposed to do?

from containers.

foxik avatar foxik commented on June 3, 2024

Maybe we can just rename join. That way we would not need any preprocessor magic.

from containers.

tibbe avatar tibbe commented on June 3, 2024

I'm OK with that, but I also want to follow up with GHC HQ to see why the fix (hide the import) doesn't work. How about glue instead of join? :)

from containers.

hvr avatar hvr commented on June 3, 2024

@tibbe Fwiw, you could also add an ifdef'ed {-# OPTIONS_GHC -fno-warn-amp #-} to that module; but please, follow up on that GHC ticket.

from containers.

foxik avatar foxik commented on June 3, 2024

We already use glue in Set and Map which is join without a root, i.e.,

glue :: Map k a -> Map k a -> Map k a
join :: k -> a -> Map k a -> Map k a -> Map k a

What about link? We could also use node if we rename the node used in printing...

from containers.

tibbe avatar tibbe commented on June 3, 2024

I don't care much either way as long as the function is documented clearly and we don't break the public API.

from containers.

foxik avatar foxik commented on June 3, 2024

Thanks Johan for commenting GHC #8004. Lets wait and see if the GHC behaviour is modified and if so, use your first suggestion import Prelude hiding (join).

from containers.

foxik avatar foxik commented on June 3, 2024

Just pushed the changes to silense the warnings. I do not have build of GHC 7.7, so I only hope the warnings will be gone. If not, please reopen the issue.

Update: the commits are 5b7e912, 501fa5b and c58285c.

from containers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.