fix(library/compiler/compiler): do not silently abort on user-given sorrys
This commit is contained in:
parent
3d24c6466b
commit
6d0b3afa7e
3 changed files with 4 additions and 8 deletions
|
|
@ -93,7 +93,7 @@ environment compile(environment const & env, options const & opts, names const &
|
|||
return env;
|
||||
|
||||
for (name const & c : cs) {
|
||||
if (!env.get(c).is_definition() || is_builtin_constant(c) || has_sorry(env.get(c).get_value()))
|
||||
if (!env.get(c).is_definition() || is_builtin_constant(c) || has_synthetic_sorry(env.get(c).get_value()))
|
||||
return env;
|
||||
}
|
||||
// TODO(Leo): generate boxed_version for builtin constants
|
||||
|
|
|
|||
|
|
@ -12,10 +12,8 @@ def w : array nat :=
|
|||
def f : fin w.sz → nat :=
|
||||
array.cases_on w (λ _ f, f)
|
||||
|
||||
constant magic {a : Prop} : a
|
||||
|
||||
#eval f ⟨1, magic⟩
|
||||
#eval f ⟨9, magic⟩
|
||||
#eval f ⟨1, sorry⟩
|
||||
#eval f ⟨9, sorry⟩
|
||||
|
||||
#eval (((mk_array 1 1).push 2).push 3).foldl 0 (+)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,4 @@ structure S :=
|
|||
def f (s : S) :=
|
||||
s.b - s.a
|
||||
|
||||
constant magic {p : Prop} : p
|
||||
|
||||
#eval f {a := 5, b := 30, h := magic }
|
||||
#eval f {a := 5, b := 30, h := sorry }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue