summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2017-03-07 23:17:24 +0000
committerkrasimir <krasimir@chalmers.se>2017-03-07 23:17:24 +0000
commitf1240ef4899796fdc37ce19cca1845fabba1a3a6 (patch)
tree2634b693504d3b061b63e410d3150578cf253657 /src/compiler/GF/Compile
parent31cd69b730b69694eb67e7a141b71ac1f65c9790 (diff)
a better error message
Diffstat (limited to 'src/compiler/GF/Compile')
-rw-r--r--src/compiler/GF/Compile/TypeCheck/ConcreteNew.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/GF/Compile/TypeCheck/ConcreteNew.hs b/src/compiler/GF/Compile/TypeCheck/ConcreteNew.hs
index 580029e3e..8fd6023b3 100644
--- a/src/compiler/GF/Compile/TypeCheck/ConcreteNew.hs
+++ b/src/compiler/GF/Compile/TypeCheck/ConcreteNew.hs
@@ -480,7 +480,8 @@ subsCheckRho ge scope t ty1@(VRecType rs1) ty2@(VRecType rs2) = do -- Rule
let fields = [(l,ty2,lookup l rs1) | (l,ty2) <- rs2]
case [l | (l,_,Nothing) <- fields] of
[] -> return ()
- missing -> tcError ("Missing fields:" <+> hsep missing)
+ missing -> tcError ("In the term" <+> pp t $$
+ "there are no values for fields:" <+> hsep missing)
rs <- sequence [mkField scope l t ty1 ty2 | (l,ty2,Just ty1) <- fields, Just t <- [mkProj l]]
return (mkWrap (R rs))
subsCheckRho ge scope t tau1 tau2 = do -- Rule EQ