mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-12-11 06:41:04 +03:00
8081b0374a
This slows things down a bit because to find the holes and give them the right multiplicities, we need to normalise all the arguments which might have been metavariables. Maybe we should skip this if we're not using anything linear, for efficiency? As patterns are handled by deciding which side of the as is considered 'used'. In case blocks, that should be the variable name, but in general it should be the pattern, so IAs now has a flag to say which one.
16 lines
327 B
Plaintext
16 lines
327 B
Plaintext
data Pair : Type -> Type -> Type where
|
|
MkPair : (1 xa : $a) -> (1 ya : $b) -> Pair $a $b
|
|
|
|
dup : (1 x : $a) -> Pair $a $a
|
|
dup $x = MkPair ?foo ?bar
|
|
|
|
dup1 : (1 x : $a) -> Pair $a $a
|
|
dup1 $x = MkPair x ?baz1
|
|
|
|
dup2 : (1 x : $a) -> Pair $a $a
|
|
dup2 $x = MkPair ?baz2 x
|
|
|
|
dupbad : (1 x : $a) -> Pair $a $a
|
|
dupbad $x = MkPair x x
|
|
|