Skip to content

Instantly share code, notes, and snippets.

@exarkun
Created October 19, 2018 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exarkun/41998ee82c61f31ec499dcd9bb9298c7 to your computer and use it in GitHub Desktop.
Save exarkun/41998ee82c61f31ec499dcd9bb9298c7 to your computer and use it in GitHub Desktop.
[-Wdeferred-type-errors]
• Couldn't match type ‘GHC.IO.Exception.IOException’
with ‘ServantErr’
arising from a functional dependency between:
constraint ‘Control.Monad.Error.Class.MonadError ServantErr IO’
arising from a use of ‘throwError’
instance ‘Control.Monad.Error.Class.MonadError
GHC.IO.Exception.IOException IO’
at <no location info>
• In the expression: throwError invalidPlanErr
In a case alternative:
Nothing
-> throwError invalidPlanErr
where
invalidPlanErr :: ServantErr
invalidPlanErr = err403 {errBody = encode InvalidPlanID}
In the second argument of ‘($)’, namely
‘case Map.lookup id plans of
Nothing
-> throwError invalidPlanErr
where
invalidPlanErr :: ServantErr
invalidPlanErr = err403 {errBody = encode InvalidPlanID}
Just plan
-> do subscription <- newSubscription plan
openAttempt <- sendSubscription wormholeClient subscription
....’
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment