-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I have the following function declared in my typeclass:
https://github.com/DSTOQ/haskell-stellar-client/blob/master/src/Control/Monad/Stellar.hs#L26
When calling it in this way:
lastAccountTransaction :: MonadStellar m => AccountId -> m Transaction
lastAccountTransaction accountId = do
let txs = accountTransactions accountId
! #cursor Nothing
! #limit Nothing
! #order Nothingall compiles well,
but if only I try to use ! defaults, I get the following error:
• Could not deduce (MonadStellar m0)
arising from a use of ‘accountTransactions’
from the context: MonadStellar m
bound by the type signature for:
lastAccountTransaction :: forall (m :: * -> *).
MonadStellar m =>
AccountId -> m Transaction
at src/Service/Domain/Offer.hs:40:1-70
The type variable ‘m0’ is ambiguous
These potential instances exist:
instance Control.Monad.Rest.MonadRest m =>
MonadStellar (StellarT m)
-- Defined in ‘Control.Monad.Trans.Stellar’
instance MonadStellar m => MonadStellar (ExceptT e m)
-- Defined in ‘Control.Monad.Stellar’
instance MonadStellar m => MonadStellar (StateT s m)
-- Defined in ‘Control.Monad.Stellar’
...plus four instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the first argument of ‘(!)’, namely
‘accountTransactions accountId’
In the expression: accountTransactions accountId ! defaults
In an equation for ‘txs’:
txs = accountTransactions accountId ! defaults
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels