agda / agda-stdlib

The Agda standard library

Home Page:https://wiki.portal.chalmers.se/agda/Libraries/StandardLibrary

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pattern synonym in `Nat.Base` in the way when working with products

flupe opened this issue · comments

I'm currently working in a development importing both Data.Product.Base and Data.Nat.Base.

Every time I have a hole of type Σ A B and I refine said hole, the following pattern gets introduced: less-than-or-equal {?} ? instead of ? , ?. This stems from a pattern-synonym recently introduced in Nat.Base: https://github.com/agda/agda-stdlib/blame/3515c22f3a2c1bd2eeb5fdd504072f67aab3de4d/src/Data/Nat/Base.agda#L366

Am I doing something wrong? Or maybe this pattern-synonym should not stay in Nat.Base?

To reproduce, just try to refine the hole in the following code sample:

open import Data.Unit.Base
open import Data.Nat.Base
open import Data.Product.Base

t : ⊤ × ⊤
t = {!!}

My bad, duplicate of #2216, known issue. Closing.
The takeaway seem to be not to open import Nat.Base.

The takeaway is that the issue should even have been fixed now in v2.0 (your example with C-c C-r in the hole yields ? , ? as to be expected), so please consider yourself encouraged to migrate to that release as soon as possible. But if you still have a problem with v2.0, please let us know, either by re-opening this issue, or by opening a fresh one (better).

Ah, I didn't even think about checking whether I was using the latest version. Sorry for the trouble and thank you for fixing the issue!