I’d like to use the gi-secret
package to manage secrets in the gnome keyring running on my linux machine. Here is an example invocation of passwordLookupSync
in ghci
which fails.
...
λ> import GI.Secret.Functions
λ> passwordLookupSync Nothing (Map.fromList [("key", "value")]) Nothing
<interactive>:2:1: error:
• Couldn't match representation of type ‘a0’
with that of ‘haskell-gi-base-0.26.8:Data.GI.Base.BasicTypes.ManagedPtr
()’
arising from a superclass required to satisfy ‘Coercible
a0
(haskell-gi-base-0.26.8:Data.GI.Base.BasicTypes.ManagedPtr
())’,
arising from a superclass required to satisfy ‘haskell-gi-base-0.26.8:Data.GI.Base.BasicTypes.ManagedPtrNewtype
a0’,
arising from a superclass required to satisfy ‘haskell-gi-base-0.26.8:Data.GI.Base.BasicTypes.GObject
a0’,
arising from a use of ‘passwordLookupSync’
• In the expression:
passwordLookupSync
Nothing (Map.fromList [("key", "value")]) Nothing
In an equation for ‘it’:
it
= passwordLookupSync
Nothing (Map.fromList [("key", "value")]) Nothing
I am getting the same error during compilation of my program.
I am using ghc 9.4.8
, the highest version which I managed to compile haskell-gi
packages. From cabal freeze
output here is the list of gi
packages used:
any.gi-gio ==2.0.35,
any.gi-glib ==2.0.30,
any.gi-gobject ==2.0.31,
any.gi-secret ==0.0.18,
any.haskell-gi ==0.26.12,
any.haskell-gi-base ==0.26.8,
any.haskell-gi-overloading ==1.0,
I am not too familiar with the gnome/gobject/glib/...
ecosystem. Could you, please, give me some pointers how to properly use the functions from GI.Secret.Functions
module?