on master help sign in
Deprecation warnings for `UPair`

Re-instated the old name for `UniquePair` and added deprecation warnings.

commit66a97ecc88c4633e5d0cc20caa35e6034e3801a8 authorJan de Muijnck-Hughes <jfdm@st-andrews.ac.uk> dateThu 28 Jan 2016, 15:46 (11 years ago) parent0a3a77d
1 file changed+8
libs/prelude/Builtins.idr+8
libs/prelude/Builtins.idr+8
@@ -33,6 +33,14 @@ namespace Builtins
3333 ||| @b the right element of the pair
3434 MkUniquePair : {A, B : AnyType} -> (a : A) -> (b : B) -> UniquePair A B
3535
36+ UPair : (A : AnyType) -> (B : AnyType) -> AnyType
37+ UPair a b = UniquePair a b
38+ %deprecate UPair "This name is being deprecated in favour of `UniquePair`"
39+
40+ MkUPair : {A, B : AnyType} -> (a : A) -> (b : B) -> UniquePair A B
41+ MkUPair a b = MkUniquePair a b
42+ %deprecate MkUPair "This name is being deprecated in favour of `MkUniquePair`"
43+
3644 ||| Dependent pairs aid in the construction of dependent types by
3745 ||| providing evidence that some value resides in the type.
3846 |||