Closed
Description
The following module works in v1.7.2
but does not work in master
:
module bug where
open import Data.Maybe using (just)
open import Data.Fin using (fromℕ<)
open import Data.List using (List; lookup; length; head; _∷_; [])
open import Data.Nat using (_<_; ℕ)
open import Data.Nat.Properties using (n<1⇒n≡0; ≤-reflexive)
open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym)
bug : ∀ {l : List ℕ} → (len≡1 : length l ≡ 1) → lookup l (fromℕ< (≤-reflexive (sym len≡1))) < (length l) → head l ≡ just 0
bug {x ∷ []} len≡1 headBounded rewrite n<1⇒n≡0 headBounded = refl
According to git bisect
the culprit is 82c1b9d so I suppose the problem is fromℕ<
.