mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-30 07:02:24 +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
15 lines
221 B
Idris
15 lines
221 B
Idris
-- no_clauses.idr
|
|
%default total
|
|
|
|
bad : (0 _ : Z = S Z) -> Void
|
|
bad _ impossible
|
|
|
|
data BadPrf = Ok | No (Z = S Z)
|
|
|
|
Show BadPrf where
|
|
show Ok = "Ok"
|
|
show (No prf) = absurd $ bad prf
|
|
|
|
main : IO ()
|
|
main = printLn Ok
|