Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax binders with multi-argument lambdas #394

Closed
GoogleCodeExporter opened this issue Aug 8, 2015 · 3 comments
Closed

Syntax binders with multi-argument lambdas #394

GoogleCodeExporter opened this issue Aug 8, 2015 · 3 comments
Assignees
Labels
documented-in-changelog Issues already documented in the CHANGELOG syntax Bike-shedding of the surface syntax type: enhancement Issues and pull requests about possible improvements
Milestone

Comments

@GoogleCodeExporter
Copy link

GoogleCodeExporter commented Aug 8, 2015

The following example does not parse after commenting in one of the two lines
with the comment "Doesn't parse". It would be nice to be able to bind more than
one variable.

module SyntaxBug where

record Pair (A : Set)(B : A -> Set) : Set where
  constructor _,_
  field
    fst : A
    snd : B fst
open Pair

split : {A : Set}{B : A -> Set}{P : (x : A) -> B x -> Set}(p : Pair A B)
        (f : (x : A) -> (y : B x) -> P x y) -> P (fst p) (snd p)
split (x , y) f = f x y

-- Doesn't parse
-- syntax split e (\ x y -> f) = e [ x ,, y ]=> f

-- Doesn't parse
-- syntax split e (\ x -> (\ y -> f)) = e [ x ,, y ]=> f

-- Parses
syntax split e (\ x -> f) = e [ x ]=> f

What version of Agda are you using? Latest darcs version.

Original issue reported on code.google.com by Fredriks...@gmail.com on 14 Mar 2011 at 4:16

@GoogleCodeExporter
Copy link
Author

Original comment by nils.anders.danielsson on 15 Mar 2011 at 10:12

  • Added labels: Priority-Medium, Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

Has any progress been made on this front?

I've the latest version of Agda but it seems this issue is still unresolved :'(

Any advice would be most appreciated; thank you!

Original comment by alha...@gmail.com on 21 Jul 2015 at 9:51

@GoogleCodeExporter GoogleCodeExporter added auto-migrated type: enhancement Issues and pull requests about possible improvements labels Aug 8, 2015
@UlfNorell UlfNorell added this to the icebox milestone May 24, 2018
@UlfNorell UlfNorell changed the title Mixfix binders with multi-variable lambdas does not parse Syntax binders with multi-argument lambdas May 24, 2018
@UlfNorell UlfNorell added the syntax Bike-shedding of the surface syntax label May 24, 2018
@nad
Copy link
Contributor

nad commented May 24, 2018

I seem to have sketched a way to do this.

nad added a commit that referenced this issue Sep 21, 2021
Furthermore lambda-bound variables can occur anywhere in the
right-hand side of a syntax declaration. However, there must always be
at least one "identifier" between any two regular "holes".
@nad nad mentioned this issue Sep 22, 2021
nad added a commit that referenced this issue Sep 23, 2021
Furthermore lambda-bound variables can occur anywhere in the
right-hand side of a syntax declaration. However, there must always be
at least one "identifier" between any two regular "holes".
nad added a commit that referenced this issue Sep 23, 2021
Furthermore lambda-bound variables can occur anywhere in the
right-hand side of a syntax declaration. However, there must always be
at least one "identifier" between any two regular "holes".
nad added a commit that referenced this issue Oct 26, 2021
Furthermore lambda-bound variables can occur anywhere in the
right-hand side of a syntax declaration. However, there must always be
at least one "identifier" between any two regular "holes".
nad added a commit that referenced this issue Oct 26, 2021
Furthermore lambda-bound variables can occur anywhere in the
right-hand side of a syntax declaration. However, there must always be
at least one "identifier" between any two regular "holes".
nad added a commit that referenced this issue Oct 27, 2021
Furthermore lambda-bound variables can occur anywhere in the
right-hand side of a syntax declaration. However, there must always be
at least one "identifier" between any two regular "holes".
@nad nad closed this as completed in 53c08b5 Oct 28, 2021
@jespercockx jespercockx modified the milestones: icebox, 2.6.3 Aug 24, 2022
@nad nad added the documented-in-changelog Issues already documented in the CHANGELOG label Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documented-in-changelog Issues already documented in the CHANGELOG syntax Bike-shedding of the surface syntax type: enhancement Issues and pull requests about possible improvements
Development

No branches or pull requests

4 participants