Idris2/tests/idris2/failing/failing002/FailingBug.idr
2023-09-07 14:57:22 +01:00

30 lines
477 B
Idris

data NonEmpty : List a -> Type where
IsNonEmpty : NonEmpty (x :: xs)
head : (xs : List a) -> NonEmpty xs => a
head (x :: xs) = x
failing "Can't find an implementation for NonEmpty xs."
myHead : List a -> a
myHead xs = head xs
failing "Can't find
an implementation
for NonEmpty xs."
myHead : List a -> a
myHead xs = head xs
failing "Can't
find
an implementation
for NonEmpty xs."
myHead : List a -> a
myHead xs = head xs