4
如何在HomCategory
中提供Category
中定義的符號?實施模塊中從模塊簽名導入符號
Module Type Category.
Parameter Object : Type.
Parameter Arrow : Object -> Object -> Type.
Infix "~>" := Arrow (at level 25) : category_scope.
Open Scope category_scope.
Delimit Scope category_scope with category.
Bind Scope category_scope with Object Arrow.
Variable id : forall a : Object, a ~> a.
...
End Category.
Module HomCategory <: Category.
Definition Object := Type.
Definition Arrow(a b : Object) := a -> b.
Print Scope category_scope. (* Error: Scope category_scope is not declared. *)
...
End HomCategory.