GithubHelp home page GithubHelp logo

Comments (6)

aerskine avatar aerskine commented on August 22, 2024

If anyone is interested, this problem is being caused by the definition of truncation level:

data TLevel : Type₀ where
⟨-2⟩ : TLevel
S : (n : TLevel) → TLevel

The use of S for succ is confusing Agda.

Perhaps consider renaming this S to STLevel or sucT for example... the occasional highlighting errors it causes can be very distracting!

from hott-agda.

pthariensflame avatar pthariensflame commented on August 22, 2024

In the meantime, you can use the following instead of open import HoTT to help fix it:

open import HoTT hiding (module TLevel)
open TLevel renaming (S to sucT)

from hott-agda.

favonia avatar favonia commented on August 22, 2024

@aerskine Sorry that I wasn't very responsive. One reason is that I am not personally using Emacs mode and was waiting for others. Does this always happen with the constructors with the same name? I thought Agda will fully parse the whole file before highlighting it, which means that this could be an Agda bug. Did I miss something here?

from hott-agda.

favonia avatar favonia commented on August 22, 2024

@aerskine @pthariensflame Hi, I am wondering if newer Agda renders the overloaded constructors correctly. Personally I am not using Emacs so I need feedback from you. Thanks.

from hott-agda.

mikeshulman avatar mikeshulman commented on August 22, 2024

I'm using Emacs and I just tried out the sample linked to in the report and see the same behavior with Agda 2.5.1.1.

Commenting out the imports and replacing them with the commented lines doesn't work though; it complains "Duplicate binding for built-in thing LEVEL, previous binding to .Agda.Primitive.Level"

from hott-agda.

favonia avatar favonia commented on August 22, 2024

I feel this issue is lingering for too long so I installed Emacs for myself to see what is going on. This is not about highlighting at all---the code simply fails to compile because Agda is unable to resolve S n by just looking at the type of n; it has to know the entire expression S n is a natural number first. Therefore, the real issue is whether we want constructors of the same name.

@mikeshulman The error message is due to a recent change in Agda. Here is a self-contained fragment that exposes the issue.

data _==_ {A : Set} (a : A) : A  Set where
  idp : a == a

data  : Set where
  O :S : (n : ℕ) data TLevel : Set where
  ⟨-2⟩ : TLevel
  S : (n : TLevel)  TLevel

S= : {m n : ℕ}  m == n  S m == S n
S= idp = idp

from hott-agda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.