tweag / sparkle

Haskell on Apache Spark.
BSD 3-Clause "New" or "Revised" License
447 stars 30 forks source link

Build failure with latest dependencies #137

Closed snoyberg closed 6 years ago

snoyberg commented 6 years ago

My best guess (and it really is just a guess) is this is caused by the distributed-closure-0.3.5 release:

[ 4 of 17] Compiling Control.Distributed.Spark.PairRDD ( src/Control/Distributed/Spark/PairRDD.hs, dist/bu
ild/Control/Distributed/Spark/PairRDD.o )

src/Control/Distributed/Spark/PairRDD.hs:90:1: error:
    • Could not deduce (Typeable a1) arising from a static form
      from the context: (Typeable (Dict (Reflect (Tuple2 a b))),
                         Typeable (Dict (Reflect a)), Typeable (Dict (Reflect b)),
                         Static (Reflect a), Static (Reflect b))
        bound by the instance declaration
        at src/Control/Distributed/Spark/PairRDD.hs:(90,1)-(107,3)
    • In the first argument of ‘closure’, namely
        ‘(static static_helper_6989586621679184957 ::
            GHC.StaticPtr.StaticPtr (Dict (Reflect a_aJz7)
                                     -> Dict (Reflect b_aJz8)
                                        -> Dict (Reflect (Tuple2 a_aJz7 b_aJz8))))’
      In the first argument of ‘cap’, namely
        ‘(closure
            (static static_helper_6989586621679184957 ::
               GHC.StaticPtr.StaticPtr (Dict (Reflect a_aJz7)
                                        -> Dict (Reflect b_aJz8)
                                           -> Dict (Reflect (Tuple2 a_aJz7 b_aJz8)))))’
      In the first argument of ‘cap’, namely
        ‘((closure
             (static static_helper_6989586621679184957 ::
                GHC.StaticPtr.StaticPtr (Dict (Reflect a_aJz7)
                                         -> Dict (Reflect b_aJz8)
                                            -> Dict (Reflect (Tuple2 a_aJz7 b_aJz8)))))
            `cap` closureDict)’
   |
90 | withStatic [d|
   | ^^^^^^^^^^^^^^...
facundominguez commented 6 years ago

Thanks @snoyberg. Your guess is correct. The latest distributed-closure requires ScopedTypeVariables on the modules which use withStatic and the error message when it isn't enabled is terrible.

I'm going to deprecate 0.3.5 given that this is a breaking change, and provide a better error message in 0.4.0.

facundominguez commented 6 years ago

sparkle is back in stackage, sparkle-0.7.3 has been released, distributed-closure-0.3.5 has been deprecated and distributed-closure-0.4.0 has been released.

Now we have a better error message when ScopedTypeVariables is missing.