Comments (5)
@plt-amy is this intentional? Could you please take a look?
from agda.
This also happens if MyList
is marked abstract
. I think it's perfectly sensible: Agda doesn't track polarities in types (yet), so as far as the positivity checker is concerned, MyList
is Just Some Set → Set
. But I suppose I could be talked down from this position, and the fix is simple..
from agda.
Maybe it makes sense for abstract
, which is kind of trying to prevent any information about the abstract thing to leak (but no one uses it for that purpose).
If opaque
is an explicit mechanism mainly to prevent unwanted unfoldings, it could allow positivity information to get out...
from agda.
Like I said, my view could be swayed! I don't think it makes much sense for the positivity checker to see through opaque definitions like this, but since we don't support opaque data types (hence there would be no way to unfold MyList
in the definition of B
), it would be a sensible stop-gap.
from agda.
I agree that the positivity checker should probably not know this by default, and positivity information should ideally be expressed intentionally in the type of opaque definitions with polarity annotations. Since they are not available (yet), an alternative could be to repurpose the POLARITY
pragma for opaque definitions to explicitly decide whether to expose this information to the positivity checker.
opaque
MyList : Set → Set
MyList = List
{-# POLARITY MyList ++ #-}
Could be coupled with a check that enforces that the given polarities do hold, in order to still allow this with --safe
.
from agda.
Related Issues (20)
- TBT: internal error in function `smallerOrEq` HOT 1
- TBT does not termination-check record type definitions
- TBT: no termination error with `--double-check` HOT 3
- Hard error on `instance` definition with unsolved type
- Compatibiilty of partial elements defined using cubical face lattice generators with reflextion machinery
- `--lossy-unification` doesn't fall back to regular unification when instances are used HOT 3
- Latex backend/package bug: `! Package array Error: Empty preamble: 'l' used.` HOT 5
- Recursion with records HOT 1
- Failed to write interface /usr/share/Agda-stdlib/_build/2.6.4.3/agda/src/Data/Unit/Base.agdai. HOT 5
- fail in solving instance of `⊆-refl` in Agda 2.6.4.3 HOT 12
- with-abstraction regression HOT 6
- U+02B3 (MODIFIER SMALL LETTER R, aka superscript r) not available via \^r HOT 4
- Testsuite: heads up: with GHC 9.10, `throw` will print a callstack HOT 4
- Agda >=2.6.3 hangs on conflicting record directives HOT 4
- Revert cyclic computation of ranges (and ban `mdo` from this code base) HOT 2
- Bad interaction between instance search and opaque HOT 6
- Normalization gives trivial `transp` HOT 1
- `--postfix-projections` do not make use of mixfix syntax HOT 1
- No warning about useless `{-# CATCHALL #-}` pragma
- HTML backend: inconsistent highlighting for macro names
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.