jonascarpay / apecs

a fast, extensible, type driven Haskell ECS framework for games
392 stars 43 forks source link

apecs-gloss-0.2.2 fails to build in Stackage Nightly #51

Closed juhp closed 5 years ago

juhp commented 5 years ago

While trying to build Stackage Nightly I ran into:

    Building library for apecs-gloss-0.2.2..
    [2 of 2] Compiling Apecs.Physics.Gloss

    /var/stackage/work/unpack-dir/unpacked/apecs-gloss-0.2.2-0d17c2d82e07e1a43f9146bf720e1484542160d124d4ce3ccf59e13ca31d0697/src/Apecs/Physics/Gloss.hs:37:100: error:
        • Could not deduce (Has w IO Physics)
            arising from a use of ‘foldfn’
          from the context: Has w IO Shape
            bound by the type signature for:
                       drawBody :: forall w.
                                   Has w IO Shape =>
                                   (Body, Transform, ShapeList) -> System w Picture
            at src/Apecs/Physics/Gloss.hs:36:1-78
        • In the first argument of ‘foldM’, namely ‘foldfn’
          In the second argument of ‘(<$>)’, namely
            ‘foldM foldfn mempty shapes’
          In the expression:
            color shColor . worldTransform transform
              <$> foldM foldfn mempty shapes
       |
    37 | drawBody (btype, transform, ShapeList shapes) = color shColor . worldTransform transform <$> foldM foldfn mempty shapes
       |                                                                                                    ^^^^^^
juhp commented 5 years ago

Is this caused by newer apecs-physics?

jonascarpay commented 5 years ago

Thanks for reporting. Strange, it definitely looks like it was caused by the apecs-physics update, but I can't seem to replicate (nightly-2019-08-12), what command are you using?

juhp commented 5 years ago

Ah I wasn't clear I was trying to produce the next Stackage Nightly.

To reproduce, you should use your latest versions. :)

jonascarpay commented 5 years ago

Yeah I realized, what's weird is that neither CI not my own builds have trouble with it, even though it's using the same configuration as far as I can tell.

jonascarpay commented 5 years ago

I did not see #50 also changed apecs-gloss, I bumped and uploaded it to hackage.