I am trying to understand a compiler error message that refers to a variable of type p0 . In most cases, an error message will tell me that the compiler calls p0 , and something along the lines of βp0 is a variable of hard type, connected ...β, but not in this case.
In general, if a compiler error message refers to a variable of the type that it assigned (and not to a variable of type I that refers to the type signature), and it does not tell me where the type variable is bound, how can I understand this?
{-
Here's the error:
Ξ»> :l ../amy.hs [1 of 1] Compiling Main ( ../amy.hs, interpreted ) ../amy.hs:33:19: Could not deduce (v ~ Metric p0) from the context (Pattern p, Ord v, v ~ Metric p, GM.GridMap gm p, GM.GridMap gm v, k ~ G.Index (GM.BaseGrid gm p), k ~ G.Index (GM.BaseGrid gm v)) bound by the type signature for wombat :: (Pattern p, Ord v, v ~ Metric p, GM.GridMap gm p, GM.GridMap gm v, k ~ G.Index (GM.BaseGrid gm p), k ~ G.Index (GM.BaseGrid gm v)) => SOM gm kp -> p -> (k, [(k, v)]) at ../amy.hs:(30,10)-(32,40) `v' is a rigid type variable bound by the type signature for wombat :: (Pattern p, Ord v, v ~ Metric p, GM.GridMap gm p, GM.GridMap gm v, k ~ G.Index (GM.BaseGrid gm p), k ~ G.Index (GM.BaseGrid gm v)) => SOM gm kp -> p -> (k, [(k, v)]) at ../amy.hs:30:10 In the expression: bar diffs In the expression: (bar diffs, diffs) In an equation for `wombat': wombat sp = (bar diffs, diffs) where diffs = foo sp Failed, modules loaded: none.