bartavelle / language-puppet

A library to work with Puppet manifests, test them and eventually replace everything ruby.
BSD 3-Clause "New" or "Revised" License
51 stars 8 forks source link

Compilation fails with ghc-8.6.1 #259

Closed PierreR closed 5 years ago

PierreR commented 5 years ago

See https://travis-ci.org/bartavelle/language-puppet/jobs/443125154

src/Puppet/Interpreter/Resolve.hs:413:3: error:
    • No instance for (Control.Monad.Fail.MonadFail
                         (Operational.ProgramT
                            InterpreterInstr
                            (Control.Monad.Trans.State.Strict.State InterpreterState)))
        arising from a do statement
        with the failable pattern ‘(mx : targs)’
    • In a stmt of a 'do' block:
        (mx : targs) <- mapM resolveExpressionString (V.toList args)
      In the expression:
        do let nbargs = V.length args
           when
             (nbargs < 1 || nbargs > 2)
             (throwPosError "fqdn_rand(): Expects one or two arguments")
           fqdn <- resolveVariable "::fqdn" >>= resolvePValueString
           (mx : targs) <- mapM resolveExpressionString (V.toList args)
           ....
      In an equation for ‘resolveFunction’:
          resolveFunction "fqdn_rand" args
            = do let nbargs = ...
                 when
                   (nbargs < 1 || nbargs > 2)
                   (throwPosError "fqdn_rand(): Expects one or two arguments")
                 fqdn <- resolveVariable "::fqdn" >>= resolvePValueString
                 ....
    |
413 |   (mx:targs) <- mapM resolveExpressionString (V.toList args)
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build language-puppet-1.4.0 (which is required by exe:yera
from language-puppet-1.4.0, exe:puppetresources from language-puppet-1.4.0 and
others).
PierreR commented 5 years ago

We now have a problem with parallel-io which is a deprecated library: `https://github.com/batterseapower/parallel-io/issues/11

Shall we replace it with 'mapConcurrently' from the async package ?

bartavelle commented 5 years ago

Sounds good to me!