Comments (7)
It seems we can get a cleaner implementation if we split out TacticAttribute
from Attribute
and then use Either Attribute TacticAttribute
for the parsed attributes, which can then be handled after a partitionEithers
by either applyAttr...
or setTacticAttr
.
agda/src/full/Agda/Syntax/Concrete/Attribute.hs
Lines 24 to 31 in 08b79a6
TacticAttribute
is in fact not a modifier of ArgInfo
so it violates (see bedde3d, #3858) the dedication of Attribute
given in its genesis (see 5f5efa7).from agda.
It seems like the macro just doesn't get called for fails
.
from agda.
@jespercockx Where in the code do we call these tactics? I failed to find it in Rules.Application
or Rules.Term
...
from agda.
Oh, it is here:
agda/src/full/Agda/TypeChecking/Implicit.hs
Lines 107 to 125 in 08b79a6
from agda.
Trace:
calling implicitNamedArgs
sFun = {_ : Set} → Set
hx = Hidden
mx = nothing
implicitNamedArgs {_ : Set} → Set
Checking named arg {_} : Set
implicitNamedArgs Set
checkApplication: checkHeadApplication returned
v = doTheThing
checkExpr doTheThing {_} : Set
returns doTheThing
More detail:
implicitNamedArgs El
{_getSort = ..., unEl = Pi (Dom {domInfo = ArgInfo {...}}
, domName = Nothing
, domIsFinite = False
, domTactic = Nothing
, unDom = El {_getSort = ..., unEl = Sort (Univ UType (Max 0 []))}}) (NoAbs "_" El {_getSort = ..., unEl = Sort (Univ UType (Max 0 []))})}
Looks your tactic is dropped from the type of doTheThing : @(tactic auto) {Set} → Set
and never makes it to the place of implicit argument insertion.
from agda.
I would guess the tactic is already dropped in the parser, since applyAttr...
ignores tactics, and there is a special setTacticAttr
which is only called in certain places. This looks like bad engineering. Tactics should also be handled by applyAttr...
.
agda/src/full/Agda/Syntax/Parser/Parser.y
Lines 628 to 629 in 08b79a6
from agda.
@andreasabel Since work on this issue seems to have stalled, I am moving it to the later
milestone. When the issue is resolved, please change it to the current milestone at the time of fixing.
from agda.
Related Issues (20)
- 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
- Internal error on pattern lambda with no clauses
- wrong type for unnamed record constructor
- Search for project root crashes when (parent) directory lacks permissions HOT 1
- quoteTerm loops on dependent copattern lambda HOT 3
- Caching loses reflection-generated pragmas
- Emacs: Support default value of `agda2-infer-type-maybe-toplevel` from type at point HOT 1
- 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
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.