From 9c693eedb8e7e11aeaedbd3ce79a9478b10be7c8 Mon Sep 17 00:00:00 2001 From: Cyril Cohen Date: Tue, 24 Nov 2020 23:14:22 +0100 Subject: Using `only printing` and fixing coercion in notations --- mathcomp/ssreflect/eqtype.v | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'mathcomp/ssreflect/eqtype.v') diff --git a/mathcomp/ssreflect/eqtype.v b/mathcomp/ssreflect/eqtype.v index a844aa8..3d9acd6 100644 --- a/mathcomp/ssreflect/eqtype.v +++ b/mathcomp/ssreflect/eqtype.v @@ -661,11 +661,14 @@ Local Notation inlined_sub_rect := Local Notation inlined_new_rect := (fun K K_S u => let (x) as u return K u := u in K_S x). +Reserved Notation "[ 'subType' 'for' v ]" + (at level 0, format "[ 'subType' 'for' v ]"). + Notation "[ 'subType' 'for' v ]" := (SubType _ v _ inlined_sub_rect vrefl_rect) - (at level 0, only parsing) : form_scope. + (only parsing) : form_scope. -Notation "[ 'sub' 'Type' 'for' v ]" := (SubType _ v _ _ vrefl_rect) - (at level 0, format "[ 'sub' 'Type' 'for' v ]") : form_scope. +Notation "[ 'subType' 'for' v ]" := (SubType _ v _ _ vrefl_rect) + (only printing) : form_scope. Notation "[ 'subType' 'for' v 'by' rec ]" := (SubType _ v _ rec vrefl) (at level 0, format "[ 'subType' 'for' v 'by' rec ]") : form_scope. @@ -681,11 +684,13 @@ Definition NewType T U v c Urec := SubType U v (fun x _ => c x) Urec'. Arguments NewType [T U]. +Reserved Notation "[ 'newType' 'for' v ]" (at level 0, format "[ 'newType' 'for' v ]"). + Notation "[ 'newType' 'for' v ]" := (NewType v _ inlined_new_rect vrefl_rect) - (at level 0, only parsing) : form_scope. + (only parsing) : form_scope. -Notation "[ 'new' 'Type' 'for' v ]" := (NewType v _ _ vrefl_rect) - (at level 0, format "[ 'new' 'Type' 'for' v ]") : form_scope. +Notation "[ 'newType' 'for' v ]" := (NewType v _ _ vrefl_rect) + (only printing) : form_scope. Notation "[ 'newType' 'for' v 'by' rec ]" := (NewType v _ rec vrefl) (at level 0, format "[ 'newType' 'for' v 'by' rec ]") : form_scope. -- cgit v1.2.3