Compiler warnings in distributed-process-X libraries

6 views
Skip to first unread message

Tim Watson

unread,
Nov 8, 2018, 6:19:10 AM11/8/18
to cloud-haskel...@googlegroups.com
I get lots of warnings using GHC > 8.x that look like this:

/Users/t4/work/haskell-distributed/distributed-process-task/src/Control/Distributed/Process/Task/Queue/BlockingQueue.hs:143:21: warning: [-Wsimplifiable-class-constraints]

    • The constraint ‘Serializable a’ matches an instance declaration

      instance (Binary a, Typeable a) => Serializable a

        -- Defined in ‘Control.Distributed.Process.Serializable’

      This makes type inference for inner bindings fragile;

        either use MonoLocalBinds, or simplify it using the instance

    • In the type signature:                  

        poolStatsRequest :: (Serializable a) =>

                            BlockingQueue a   

                            -> GetStats       

                               -> Process (ProcessReply BlockingQueueStats (BlockingQueue a))

    |                                         

143 | poolStatsRequest :: (Serializable a)    

    |                     ^^^^^^^^^^^^^^^^... 


So... My question is, should I be removing the class constraints checking in the build, or adding MonoLocalBinds instead?

Reply all
Reply to author
Forward
0 new messages