Idris2/tests/idris2/failing002/FailingBug.idr
2022-04-07 13:59:27 +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