Reproduce example in Crypto.JWT

I am try to reproduce the first example here: https://hackage.haskell.org/package/jose-0.10/docs/Crypto-JWT.html I can't seem to succeed with importing the function `runJOSE` ghci> import Crypto.JWT ghci> :t runJOSE <interactive>:1:1: error: Variable not in scope: runJOSE ghci> import Crypto.JOSE.Error --https://github.com/frasertweedale/hs-jose/blob/master/src/Crypto/JOSE/Error.... ghci> :t runJOSE <interactive>:1:1: error: Variable not in scope: runJOSE Can you point out what I am missing? Thanks.

Ciao Pietro, Il 26 febbraio 2023 alle 09:26 Pietro Grandinetti ha scritto:
I am try to reproduce the first example here: https://hackage.haskell.org/package/jose-0.10/docs/Crypto-JWT.html I can't seem to succeed with importing the function `runJOSE`
ghci> import Crypto.JWT ghci> :t runJOSE
I `cabal get` jose-0.10, `cabal repl` and then λ> import Crypto.JWT λ> :t runJOSE runJOSE :: JOSE e m a -> m (Either e a) I would check if you the latest jose, and what :browse Crypto.JWT says —F

Francesco,
Thanks.
I am using stack and the version doesn't match: `stack ls dependencies` shows `jose 0.9`. I can't seem to find a way to upgrade it even if I set `jose >= 0.10` in the package.yaml file:
$ stack build
WARNING: Ignoring uhask's bounds on jose (>=0.10); using jose-0.9.
Reason: allow-newer enabled.
uhask> build (lib + exe)
Preprocessing library for uhask-0.1.0.0..
Building library for uhask-0.1.0.0..
[4 of 7] Compiling Modules.JWS
..... <--- Errors about runJOSE not defined
$ stack install jose-0.10
No latest package revision found for: jose, dependency callstack: []
Google and SO didn't help so far. Can you suggest something to resolve this? Thanks.
________________________________
From: Beginners
I am try to reproduce the first example here: https://hackage.haskell.org/package/jose-0.10/docs/Crypto-JWT.html I can't seem to succeed with importing the function `runJOSE`
ghci> import Crypto.JWT ghci> :t runJOSE
I `cabal get` jose-0.10, `cabal repl` and then λ> import Crypto.JWT λ> :t runJOSE runJOSE :: JOSE e m a -> m (Either e a) I would check if you the latest jose, and what :browse Crypto.JWT says —F _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

Il 26 febbraio 2023 alle 11:57 Pietro Grandinetti ha scritto:
Francesco,
Thanks. I am using stack and the version doesn't match: `stack ls dependencies` shows `jose 0.9`. I can't seem to find a way to upgrade it even if I set `jose >= 0.10` in the package.yaml file:
This is `jose` in stackage: https://www.stackage.org/lts-20.12/package/jose-0.9 So switching to Nightly will do —F

Francesco,
That solved it. Would it be better to use nightly only for this package and, if so, is this possible within the package.yaml file?
Thanks.
________________________________
From: Beginners
Francesco,
Thanks. I am using stack and the version doesn't match: `stack ls dependencies` shows `jose 0.9`. I can't seem to find a way to upgrade it even if I set `jose >= 0.10` in the package.yaml file:
This is `jose` in stackage: https://www.stackage.org/lts-20.12/package/jose-0.9 So switching to Nightly will do —F _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
participants (2)
-
Francesco Ariis
-
Pietro Grandinetti