nikita-volkov / stm-containers

Containers for STM
http://hackage.haskell.org/package/stm-containers
MIT License
67 stars 13 forks source link

stm-containers-0.2.15 build failures with primitive-0.6.2 #17

Open DanBurton opened 7 years ago

DanBurton commented 7 years ago

It seems there are some conflicts with new exports from Data.Primitive.Array. I recommend qualified imports to avoid issues like this.

[ 2 of 11] Compiling STMContainers.SizedArray ( library/STMContainers/SizedArray.hs, dist/
build/STMContainers/SizedArray.o )

library/STMContainers/SizedArray.hs:27:10: error:
    Ambiguous occurrence <E2><80><98>newArray<E2><80><99>
    It could refer to either <E2><80><98>Prelude.newArray<E2><80><99>,
                             imported from <E2><80><98>STMContainers.Prelude<E2><80><99> at library/STMContainers/SizedArray.hs:3:1-59
                             (and originally defined in <E2><80><98>Foreign.Marshal.Array
<E2><80><99>)
                          or <E2><80><98>Data.Primitive.Array.newArray<E2><80><99>,
                             imported from <E2><80><98>Data.Primitive.Array<E2><80><99> at library/STMContainers/SizedArray.hs:4:1-27

library/STMContainers/SizedArray.hs:59:11: error:
    Ambiguous occurrence <E2><80><98>newArray<E2><80><99>
    It could refer to either <E2><80><98>Prelude.newArray<E2><80><99>,
                             imported from <E2><80><98>STMContainers.Prelude<E2><80><99> at library/STMContainers/SizedArray.hs:3:1-59
                             (and originally defined in <E2><80><98>Foreign.Marshal.Array
<E2><80><99>)
                          or <E2><80><98>Data.Primitive.Array.newArray<E2><80><99>,
                             imported from <E2><80><98>Data.Primitive.Array<E2><80><99> at library/STMContainers/SizedArray.hs:4:1-27

library/STMContainers/SizedArray.hs:68:11: error:
    Ambiguous occurrence <E2><80><98>newArray<E2><80><99>
    It could refer to either <E2><80><98>Prelude.newArray<E2><80><99>,
                             imported from <E2><80><98>STMContainers.Prelude<E2><80><99> at library/STMContainers/SizedArray.hs:3:1-59
                             (and originally defined in <E2><80><98>Foreign.Marshal.Array
<E2><80><99>)
                          or <E2><80><98>Data.Primitive.Array.newArray<E2><80><99>,
                             imported from <E2><80><98>Data.Primitive.Array<E2><80><99> at library/STMContainers/SizedArray.hs:4:1-27

library/STMContainers/SizedArray.hs:77:11: error:
    Ambiguous occurrence <E2><80><98>newArray<E2><80><99>
    It could refer to either <E2><80><98>Prelude.newArray<E2><80><99>,
                             imported from <E2><80><98>STMContainers.Prelude<E2><80><99> at library/STMContainers/SizedArray.hs:3:1-59
                             (and originally defined in <E2><80><98>Foreign.Marshal.Array
<E2><80><99>)
                          or <E2><80><98>Data.Primitive.Array.newArray<E2><80><99>,
                             imported from <E2><80><98>Data.Primitive.Array<E2><80><99> at library/STMContainers/SizedArray.hs:4:1-27
DanBurton commented 7 years ago

It seems I was wrong about the cause; primitive-0.6.1.0 exports newArray as well. I don't quite understand how this build was passing previously.

nikita-volkov commented 7 years ago

I suspect, this is due to a conflicting release of "base-prelude", which is already deprecated. Just update the the Hackage index and everything should go fine.

decentral1se commented 7 years ago

Well, I'm still seeing this failure after giving it a shot today. Any other hints @nikita-volkov?

bergmark commented 7 years ago

Since this is LTS the new major base-prelude won't be picked up, @lwm you should add a base-prelude < 1.0.2 constraint to the lts build.

nikita-volkov commented 7 years ago

Better base-prelude >= 1.2

bergmark commented 7 years ago

LTS 8 already contains base-prelude 1.0.*