mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-15 14:23:32 +03:00
a972778eab
They don't all pass yet, for minor reasons. Coming shortly... Unfortunately the startup overhead for chez is really noticeable here!
16 lines
349 B
Idris
16 lines
349 B
Idris
module Temp
|
|
|
|
import Data.List
|
|
|
|
safeHead : (l : List a) -> {auto pr : NonEmpty l} -> a
|
|
safeHead [] = absurd pr
|
|
safeHead (x::xs) = x
|
|
|
|
safeHead1 : (l : List a) -> {auto pr : NonEmpty l} -> a
|
|
safeHead1 @{pr} [] = absurd pr
|
|
safeHead1 (x::xs) = x
|
|
|
|
safeHead2 : (l : List a) -> {auto pr : NonEmpty l} -> a
|
|
safeHead2 @{t} [] = absurd t
|
|
safeHead2 (x::xs) = x
|