You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Cubical.Categories.Morphism, some things are defined inside an anonymous module:
module_ {C : Precategory ℓ ℓ'} where
...
isMonic : (Hom[ x , y ]) → Type (ℓ-max ℓ ℓ')
so that when you access these definitions from the outside world, C is added as an implicit argument:
isMonic : {C : Precategory ℓ ℓ'} → {x y : ob C} → (Hom[ x , y ]) → Type (ℓ-max ℓ ℓ')
The issue is that when trying to use isMonic, Agda seems unable to work out what C should be. I suspect this is related to the fact that Precategory is a record type, and I'm not sure if this is a bug or a feature. Nonetheless, when referring to isMonic, it seems you always have to give C as an argument:
f : C [ x , y ]
...
mon : isMonic {C = C} f
Clearly, this defeats the purpose of making C implicit in the first place. Hence I propose changing the Cubical.Categories.Morphism file to
module_ (C : Precategory ℓ ℓ') where
and all instances of isMonic (and the other definitions) to
isMonic C f
This is technically a breaking change, but I don't think its impact will be too great, and it's easily fixed.
The text was updated successfully, but these errors were encountered:
You're probably right. I think the problem is that isMonic is currently not used anywhere else in the library, so whoever wrote that code just guessed what the implicit arguments should be. Feel free to change it
With some testing, I determined that some of the definitions could still infer the category, so I've left those implicit. It also seems that C can usually be inferred inside where blocks, but not outside.
In
Cubical.Categories.Morphism
, some things are defined inside an anonymous module:so that when you access these definitions from the outside world,
C
is added as an implicit argument:The issue is that when trying to use
isMonic
, Agda seems unable to work out whatC
should be. I suspect this is related to the fact thatPrecategory
is a record type, and I'm not sure if this is a bug or a feature. Nonetheless, when referring toisMonic
, it seems you always have to giveC
as an argument:Clearly, this defeats the purpose of making
C
implicit in the first place. Hence I propose changing theCubical.Categories.Morphism
file toand all instances of
isMonic
(and the other definitions) toThis is technically a breaking change, but I don't think its impact will be too great, and it's easily fixed.
The text was updated successfully, but these errors were encountered: