Comments (7)
@jespercockx, I guess this is related to issue #6124.
from agda.
go2 : Name → Term → TC ⊤
go2 cons-name hole = do
raw-ty ← getType cons-name
inf-ty ← inferType (con cons-name [])
unify inf-ty raw-ty
returnTC _
Same error.
fail2 : Set₁
fail2 = {@0 A : Set} → A → Copy A
mk-copy' : {@0 A : Set} → A → Copy A
mk-copy' = mk-copy
Inlining fail2
in the signature of mk-copy'
is OK, but standalone fail2
raises an error.
from agda.
Btw, for a simplified example
data Copy (A : Set) : Set where
mk-copy : A → Copy A
checkExpr
reports a peculiar type
Checking {@0 A : Set₀} (z : A) → Copy A : Set
at $HOME/ErasedReflectionBug.agda:34,8-19
--> Set
This is universe inconsistent, Set
must be Set1
.
from agda.
The following variant passes with Agda 2.6.3 but fails with 2.6.4, so it could be labelled regression:
{-# OPTIONS --erase-record-parameters --safe #-}
open import Agda.Primitive
open import Agda.Builtin.Equality
open import Agda.Builtin.List
open import Agda.Builtin.Reflection
open import Agda.Builtin.Unit
_>>=_ : {a b : Level} {A : Set a} {B : Set b} → TC A → (A → TC B) → TC B
_>>=_ = bindTC
macro
go : Name → Term → TC ⊤
go cons-name hole = do
raw-ty ← getType cons-name
ty ← reduce raw-ty --<-- here
returnTC _
record Copy {ℓ} (A : Set ℓ) : Set ℓ where
constructor mk-copy
field the-copy : A
success1 success2 : ⊤
success1 = go []
success2 = go _∷_
fail : ⊤
fail = go mk-copy
from agda.
@cmcmA20 Is your issue related/identical to this one?
from agda.
@andreasabel I guess it is. Slapping workOnTypes
on top of all typechecker calls inside tcReduce
resolves the problem with go
but it feels ad hoc.
from agda.
Maybe since you are reducing a type, using workOnTypes
isn't so strange to request here.
The general story is #6400. Closing as duplicate then...
from agda.
Related Issues (20)
- Proof of ⊥ using HIT-indexed type HOT 6
- Literate programming Org/LaTeX feature request
- `--save-metas` causes internal error in `lookupMetaInstantiation` HOT 3
- Consider using `Set` instead of `nub`
- Mimer options `-l` and `-s` not covered by testsuite HOT 2
- The specification of `--safe` misses the pragmas
- MAlonzo bug: `unreachable code reached` HOT 9
- Our error messages do not follow the GNU standard HOT 4
- Agda 2.7.0-rc1 crashes when run twice, probably serialization issue HOT 3
- .cabal description "...: It ..." HOT 4
- Is pattern `AnnP` unused? (added in Oct 2020 as "not usable yet") HOT 2
- Pattern matching unifier does not preserve instances HOT 1
- `__IMPOSSIBLE__` error in `SSet` but not in `Set` HOT 2
- Cabal 3.12.1.0 install failure for `lib:Agda` - dist/build/agda/agda does not exist HOT 5
- Mimer internal error in hole with constraint HOT 1
- Wanted: reproducer for error "The type is non-fibrant or its sort depends on an interval variable" HOT 1
- Trigger failure of `checkModalityArgs` HOT 4
- Reproduce errors in createMissingHCompClause HOT 2
- `cabal install Agda` fails -- missing files in multiple pacakges HOT 2
- Erasure and irrelevance forbid deeper absurd patterns HOT 5
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 agda.