Skip to content

Instantly share code, notes, and snippets.

@timxor
Created September 24, 2018 01:54
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 timxor/683ad8e525e496e7b7da768c95e68471 to your computer and use it in GitHub Desktop.
Save timxor/683ad8e525e496e7b7da768c95e68471 to your computer and use it in GitHub Desktop.
Haskell Ambiguous type variable error message. Clueless..
Ambiguous type variable ‘a0’ arising from a use of ‘getLast’
prevents the constraint ‘(Read a0)’ from being solved.
Relevant bindings include
transferTXIDM :: Maybe a0 (bound at bin/FaeServer/App.hs:93:5)
Probable fix: use a type annotation to specify what ‘a0’ should be.
These potential instances exist:
instance (Read b, Read a) => Read (Either a b)
-- Defined in ‘Data.Either’
instance forall k (s :: k). Read (Proxy s)
-- Defined in ‘Data.Proxy’
instance Read ExitCode -- Defined in ‘GHC.IO.Exception’
...plus 34 others
...plus 102 instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the expression: getLast Nothing Just
In the expression: getLast Nothing Just $ getParams "transferTXID"
In an equation for ‘transferTXIDM’:
transferTXIDM = getLast Nothing Just $ getParams "transferTXID"
|
93 | transferTXIDM = getLast Nothing Just $ getParams "transferTXID"
| ^^^^^^^^^^^^^^^^^^^^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment