Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aos-signature fails to build on GHC 8.6.1 #4

Closed
jkachmar opened this issue Nov 10, 2018 · 1 comment
Closed

aos-signature fails to build on GHC 8.6.1 #4

jkachmar opened this issue Nov 10, 2018 · 1 comment

Comments

@jkachmar
Copy link

aos-signature currently fails to build on GHC 8.6.1 with the following errors:

src/LSAG.hs:54:7: error:
    • Could not deduce (Control.Monad.Fail.MonadFail m)
        arising from a do statement
        with the failable pattern ‘(sK1 : sK2ToPrevSK)’
      from the context: MonadRandom m
        bound by the type signature for:
                   sign :: forall (m :: * -> *).
                           MonadRandom m =>
                           [ECDSA.PublicKey]
                           -> (ECDSA.PublicKey, ECDSA.PrivateKey)
                           -> ByteString
                           -> m (Integer, [Integer], ECC.Point)
        at src/LSAG.hs:(42,1)-(47,38)
      Possible fix:
        add (Control.Monad.Fail.MonadFail m) to the context of
          the type signature for:
            sign :: forall (m :: * -> *).
                    MonadRandom m =>
                    [ECDSA.PublicKey]
                    -> (ECDSA.PublicKey, ECDSA.PrivateKey)
                    -> ByteString
                    -> m (Integer, [Integer], ECC.Point)
    • In a stmt of a 'do' block:
        (sK1 : sK2ToPrevSK) <- replicateM (participants - 1)
                                 $ generateBetween 1 (n - 1)
      In the expression:
        do (sK1 : sK2ToPrevSK) <- replicateM (participants - 1)
                                    $ generateBetween 1 (n - 1)
           u <- generateBetween 1 (n - 1)
           let chK1 = genChallenge curve pubKeys y msg (gu u) (hu u)
           let reversedChKToChK1 = runChallenges k sK1 chK1 sK2ToPrevSK u y h
               chK = head reversedChKToChK1
           ....
      In a case alternative:
          Just k
            -> do (sK1 : sK2ToPrevSK) <- replicateM (participants - 1)
                                           $ generateBetween 1 (n - 1)
                  u <- generateBetween 1 (n - 1)
                  let chK1 = ...
                  ....
   |
54 |       (sK1:sK2ToPrevSK) <- replicateM (participants - 1) $ generateBetween 1 (n - 1)
   | 

cf. commercialhaskell/stackage#4119

@sdiehl
Copy link
Owner

sdiehl commented Nov 10, 2018

Fixed in aos-signature-0.1.1

@sdiehl sdiehl closed this as completed Nov 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants