diff options
author | 2017-10-14 00:27:13 -0400 | |
---|---|---|
committer | 2017-10-14 00:27:13 -0400 | |
commit | 02fe256a6ef420e31ca26f6a2516cdfc182632f3 (patch) | |
tree | ad1ec7e85821426b338e7fc1072f01119ee7f2e3 /src | |
parent | a5f4e7db26cf4e76de2fd7cb8a59f2d19f187203 (diff) |
Add SmartFlatTypeMap_Pair
Diffstat (limited to 'src')
-rw-r--r-- | src/Compilers/SmartMap.v | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Compilers/SmartMap.v b/src/Compilers/SmartMap.v index 78a06d30a..c81c76ce1 100644 --- a/src/Compilers/SmartMap.v +++ b/src/Compilers/SmartMap.v @@ -194,6 +194,12 @@ Section homogenous_type. Definition SmartFlatTypeMap {var'} (f : forall t, var' t -> base_type_code) {t} : interp_flat_type var' t -> flat_type := @smart_interp_flat_map var' (fun _ => flat_type) (fun t v => Tbase (f t v)) Unit (fun _ _ => Prod) t. + Definition SmartFlatTypeMap_Pair {var'} (f : forall t, var' t -> base_type_code) {A B} + (x : interp_flat_type var' (A * B)) + : SmartFlatTypeMap f x + = (SmartFlatTypeMap f (@fst (interp_flat_type _ _) (interp_flat_type _ _) x) + * SmartFlatTypeMap f (@snd (interp_flat_type _ _) (interp_flat_type _ _) x))%ctype + := eq_refl. Definition SmartFlatTypeUnMap (t : flat_type) : interp_flat_type (fun _ => base_type_code) t := SmartValf (fun t => t) t. |