on master help sign in
Add missing LHS type check
commitba1f8e3cfb08e13e7fd54a41ca95bef0393fea7a authorEdwin Brady <ecb10@st-andrews.ac.uk> dateFri 19 Dec 2014, 13:34 (12 years ago) parent6d54cb3
1 file changed+3
src/Idris/ElabTerm.hs+3
src/Idris/ElabTerm.hs+3
@@ -366,6 +366,9 @@ elab ist info emode opts fn tm
366366-- | isTConName f (tt_ctxt ist) && pattern && not reflection && not inty
367367-- = lift $ tfail (Msg "Typecase is not allowed")
368368 elab' ec _ (PRef fc n)
369+ | pattern && not reflection && not (e_qq ec) && not (e_intype ec)
370+ && isTConName n (tt_ctxt ist)
371+ = lift $ tfail $ Msg ("No explicit types on left hand side: " ++ show tm)
369372 | (pattern || (bindfree && bindable n)) && not (inparamBlock n) && not (e_qq ec)
370373 = do let ina = e_inarg ec
371374 guarded = e_guarded ec