on master help sign in
Fix minor bug in Elab

Checking for type was broken.

commiteed700a1389ccc6f9a14cf59933d5849787ae47b authorDavid Raymond Christiansen <david@davidchristiansen.dk> dateThu 16 Apr 2015, 11:21 (12 years ago) parente32e899
1 file changed+4−3
src/Idris/ElabTerm.hs+4−3
src/Idris/ElabTerm.hs+4−3
@@ -1720,9 +1720,10 @@ runTactical fc env tm = do tm' <- eval tm
17201720 rty = foldr mkPi res args
17211721 (checked, ty') <- lift $ check ctxt [] rty
17221722 case normaliseAll ctxt [] (finalise ty') of
1723− TType _ -> lift . tfail . InternalMsg $
1724− show checked ++ " is not a type: it's " ++ show ty'
1725− _ -> return ()
1723+ UType _ -> return ()
1724+ TType _ -> return ()
1725+ ty'' -> lift . tfail . InternalMsg $
1726+ show checked ++ " is not a type: it's " ++ show ty''
17261727 case lookupDefExact n ctxt of
17271728 Just _ -> lift . tfail . InternalMsg $
17281729 show n ++ " is already defined."