fix: reducibility setting should not hide non-definitions (constructors, inductive types, etc)

This commit is contained in:
Leonardo de Moura 2019-11-23 09:36:22 -08:00
parent 4a6d0a8082
commit 63d3429246

View file

@ -314,10 +314,11 @@ do env ← getEnv;
match env.find constName with
| some (info@(ConstantInfo.thmInfo _)) =>
condM reduceAll? (pure (some info)) (pure none)
| some info =>
| some (info@(ConstantInfo.defnInfo _)) =>
condM reduceReducibleOnly?
(condM (isReducible constName) (pure (some info)) (pure none))
(pure (some info))
| some info => pure (some info)
| none =>
if exception? then throwEx $ Exception.unknownConst constName
else pure none