Coder Social home page Coder Social logo

enummapset's People

Contributors

amigalemming avatar bgamari avatar bodigrim avatar felixonmars avatar hth313 avatar hvr avatar kfish avatar liyang avatar michalt avatar mikolaj avatar ollef avatar teofilc avatar thielema avatar willbasky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

enummapset's Issues

Add Apply, Witherable and Align instances

I have found the above to be extremely useful for generically working with various types of Maps. Between them you basically get filtering, unioning and intersecting in a convenient and generic way.

I realize this means depending on witherable, these and semigroupoids. But alas the current Haskell orphan instances situation means that there isn't really a good way around that.

Build failure with GHC 8.4

Add semigroup instances.
See also: https://ghc.haskell.org/trac/ghc/wiki/Migration/8.4#SemigroupMonoidsuperclasses

Building library for enummapset-0.5.2.1..
[1 of 5] Compiling Data.EnumSet     ( Data/EnumSet.hs, dist/build/Data/EnumSet.o )

Data/EnumSet.hs:111:17: error:
    • No instance for (Semigroup (EnumSet k))
        arising from the 'deriving' clause of a data type declaration
      Possible fix:
        use a standalone 'deriving instance' declaration,
          so you can specify the instance context yourself
    • When deriving the instance for (Monoid (EnumSet k))
    |
111 |   deriving (Eq, Monoid, Ord, Typeable, NFData)
    |                 ^^^^^^

Minor: make the result of Show compilable

The Show instances show the same output as IntMap and IntSet do. Mapping toEnum over the resulting lists would enable compiling the shown value in ghci without the need to fix it manually. I suppose this requires an analogous change in Read.

Build failure with GHC-8.6 and containers-0.6

Building     enummapset-0.5.2.2
Failed to install enummapset-0.5.2.2
Build log ( ~/.cabal/logs/ghc-8.6.0.20180823/enummapset-0.5.2.2-2u0xauM3JVBCyceeGTpYwG.log ):
cabal: Entering directory '/tmp/cabal-tmp-26260/enummapset-0.5.2.2'
Configuring enummapset-0.5.2.2...
Preprocessing library for enummapset-0.5.2.2..
Building library for enummapset-0.5.2.2..
[1 of 5] Compiling Data.EnumSet     ( Data/EnumSet.hs, dist/build/Data/EnumSet.o )
[2 of 5] Compiling Data.EnumMap.Base ( Data/EnumMap/Base.hs, dist/build/Data/EnumMap/Base.o )
[3 of 5] Compiling Data.EnumMap.Strict ( Data/EnumMap/Strict.hs, dist/build/Data/EnumMap/Strict.o )
[4 of 5] Compiling Data.EnumMap.Lazy ( Data/EnumMap/Lazy.hs, dist/build/Data/EnumMap/Lazy.o )
[5 of 5] Compiling Data.EnumMap     ( Data/EnumMap.hs, dist/build/Data/EnumMap.o )

Data/EnumMap.hs:30:31: error:
    • Data.IntMap.insertWith' is gone. Use Data.IntMap.Strict.insertWith.
    • In the first argument of ‘(.)’, namely
        ‘I.insertWith' f (fromEnum k) x’
      In the second argument of ‘(.)’, namely
        ‘I.insertWith' f (fromEnum k) x . unWrap’
      In the expression:
        EnumMap . I.insertWith' f (fromEnum k) x . unWrap
   |
30 | insertWith' f k x = EnumMap . I.insertWith' f (fromEnum k) x . unWrap
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Data/EnumMap.hs:35:13: error:
    • Data.IntMap.insertWithKey' is gone. Use Data.IntMap.Strict.insertWithKey.
    • In the first argument of ‘(.)’, namely
        ‘I.insertWithKey' (f . toEnum) (fromEnum k) x’
      In the second argument of ‘(.)’, namely
        ‘I.insertWithKey' (f . toEnum) (fromEnum k) x . unWrap’
      In the expression:
        EnumMap . I.insertWithKey' (f . toEnum) (fromEnum k) x . unWrap
   |
35 |   EnumMap . I.insertWithKey' (f . toEnum) (fromEnum k) x . unWrap
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Data/EnumMap.hs:38:12: error:
    • Data.IntMap.fold' is gone. Use Data.IntMap.foldr or Prelude.foldr.
    • In the first argument of ‘(.)’, namely ‘I.fold f a’
      In the expression: I.fold f a . unWrap
      In an equation for ‘fold’: fold f a = I.fold f a . unWrap
   |
38 | fold f a = I.fold f a . unWrap
   |            ^^^^^^^^^^

Data/EnumMap.hs:41:19: error:
    • Data.IntMap.foldWithKey is gone. Use foldrWithKey.
    • In the first argument of ‘(.)’, namely
        ‘I.foldWithKey (f . toEnum) a’
      In the expression: I.foldWithKey (f . toEnum) a . unWrap
      In an equation for ‘foldWithKey’:
          foldWithKey f a = I.foldWithKey (f . toEnum) a . unWrap
   |
41 | foldWithKey f a = I.foldWithKey (f . toEnum) a . unWrap
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Leaving directory '/tmp/cabal-tmp-26260/enummapset-0.5.2.2'

Build failure "Can't make a derived instance of 'Traversible (EnumMap k)'".

[2 of 5] Compiling Data.EnumMap.Base ( Data/EnumMap/Base.hs, dist/dist-sandbox-62e6f0ad/build/Data/EnumMap/Base.o )

Data/EnumMap/Base.hs:180:49:
Can't make a derived instance of ‘Traversable (EnumMap k)’
(even with cunning newtype deriving):
You need DeriveTraversable to derive an instance for this class
In the newtype declaration for ‘EnumMap’
cabal: Error: some packages failed to install:
enummapset-0.5.2.0 failed during the building phase. The exception was:
ExitFailure 1

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.