lean2/tests/lean/opaque.lean
Leonardo de Moura 8df7c7b02d feat(kernel/type_checker): remove fallback that expands opaque definitions in the type checker
We should not rely on this feature. It can be quite expensive.
We invoke is_convertible in several places, in particular, if we are using overloading. For example, the frontend uses is_convertible to check which overload should be used. Thus, it will make several calls such as

   is_convertible(num, Nat)

If is_convertible starts unfolding opaque definitions, we would keep expanding num.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-09 11:31:24 -08:00

17 lines
283 B
Text

import macros
import subtype
import optional
using subtype
using optional
namespace sum
set_opaque optional false
set_opaque subtype false
set_opaque some false
set_opaque optional::none false
set_opaque rep false
set_opaque subtype::abst false
set_opaque optional_pred false
end