Idris2/tests/idris2/error014/expected

22 lines
642 B
Plaintext
Raw Normal View History

1/1: Building Issue735 (Issue735.idr)
Error: While processing left hand side of isCons. Can't match on :: (Under-applied constructor).
Issue735:5:8--5:12
2021-02-11 20:24:26 +03:00
1 | module Issue735
2 |
3 | -- Not allowed to pattern-match on under-applied constructors
4 | isCons : (a -> List a -> List a) -> Bool
5 | isCons (::) = True
2021-02-11 20:24:26 +03:00
^^^^
Error: While processing left hand side of test. Can't match on A (Under-applied constructor).
Issue735:12:6--12:7
2021-02-11 20:24:26 +03:00
08 | interface A a where
09 |
10 | -- Not allowed to pattern-match on under-applied type constructors
11 | test : (kind : Type -> Type) -> Maybe Nat
12 | test A = Just 1
2021-02-11 20:24:26 +03:00
^