Comments (5)
Where would you put the unfolding
statement if there is no opaque
block? Currently the syntax is:
opaque
unfolding ...
x = ...
y = ...
Without the opaque
it would not be clear if the unfolding
declaration applies only to x
or also to y
.
from agda.
If you want to use unfolding
, then you should use opaque
.
from agda.
This feature request was discussed during a recent developer meeting. Someone (@jespercockx?) suggested that there should also be non-pragma syntax corresponding to --opaque
, and @plt-amy suggested that one could use opaque module
to make "everything" inside a module opaque. I wonder if it might make sense to instead use attributes for this: one can already use module @0
to make a module erased, perhaps the notation could be module @opaque
.
That raises the question of whether one should also allow this notation for individual functions:
@opaque f : …
Note that I don't think the possibility to use opaque module
or module @opaque
makes the flag --opaque
pointless: one can put this flag in a project's .agda-lib
file to make things opaque by default, similarly to how one can put StrictHaskell
in a .cabal
file to make code strict by default in a Haskell project.
from agda.
These proposed extensions sure make a lot sense to me.
from agda.
I don't know the exact functioning of opaque. I believe it abstracts the implementation of a function. It forces the user to manually unfold something.
I agree that it should be the default. I am concerned with teaching people the correct way of programming in agda.
For example, instead of unfolding, would it be better to create an abstraction? How can creating an abstraction be more natural and easy than unfolding?
For example, you have a specific implementation of Integers. And you want to prove something that is only affected by properties of integers being an abelian group. How can we teach/guide people not to unfold and just create the abstraction?
from agda.
Related Issues (20)
- Internal error in Mimer with module parameter and matching
- Instance resolution failure in Agda 2.6.4 HOT 6
- Mimer drops part of the solution with module parameter
- Citation.cff HOT 1
- Prune the `Makefile` HOT 7
- Delete the GitHub Wiki HOT 3
- Migrate the Chalmers Wiki HOT 4
- Prune `Setup.hs` HOT 5
- Reorganize `HACKING.md`
- Merge `.authorspellings` and `.mailmap` HOT 1
- Mimer internal error when querying `recRecursive` HOT 1
- Interactive highlighting remnants with lambda-where
- Pattern synonyms with named arguments can be defined but not used HOT 3
- Automatically create names for syntax
- Mangled trX/Con clause for indexed type with green slime
- Why do we `reduce` and `instantiateFull` constraints? HOT 2
- Use of Non-terminating Function in Data Declaration Makes Typechecker Loop HOT 4
- Misprinted domain-free parameters with cohesion attribute HOT 1
- Regression in 2.6.4.2 concerning `with` HOT 6
- Regression in 2.6.4 in `rewrite` with instances
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.