Comments (6)
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.
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.
@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.
@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.
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.
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)
- Update `index.agda` HOT 1
- definition of ↓-='-in/↓-='-out HOT 1
- Type checking failure in lib/types/Flattening.agda HOT 5
- Set Quotients HOT 2
- General precedence rule HOT 2
- Agda 2.5.0 compatibility and literals for truncation levels HOT 1
- infix path composition not parsed correctly
- J and J' are exactly the same HOT 1
- Update the HIT_README file for rewriting HOT 4
- Agda 2.5.3 compatibility tracker
- Compilation warning HOT 4
- Fix cohomology.MayerVietorisExact.
- Should we enable `--caching` in every file? HOT 1
- Change the inductive definition of iterative loop spaces? HOT 6
- Compatibility with Agda 2.5.4
- Move FinSet into core
- Definition of `Bool` should follow the builtin form
- `instance`s with explicit arguments in `NType.agda` no longer works under the master branch of Agda HOT 2
- A frozen artifact HOT 1
- Archiving this repository HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hott-agda.