mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-27 13:40:15 +03:00
ecf4765c4b
* [ fix ] Fix issue with eager evaluation of crashing functions * Mark functions that call unsafe builtins as non-constant * Better detection of crash primop when deciding if functions can be constant
16 lines
255 B
Idris
16 lines
255 B
Idris
%noinline
|
|
foo : (0 _ : Z = S Z) -> Void
|
|
foo _ impossible
|
|
|
|
%noinline
|
|
bah : (0 _ : Z = S Z) -> Void
|
|
bah prf = foo prf
|
|
data BadPrf = Ok | No (Z = S Z)
|
|
|
|
Show BadPrf where
|
|
show Ok = "Ok"
|
|
show (No prf) = absurd $ bah prf
|
|
|
|
main : IO ()
|
|
main = printLn Ok
|