Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S sweet-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • sweet-js
  • sweet-core
  • Issues
  • #298
Closed
Open
Issue created Apr 11, 2014 by Tim Disney@disnetContributor

interaction of custom operators and infix macros

Realized as I was typing up docs for custom operators that we currently have a problem with composing infix macros and custom operators. Example:

operator (>>=) 16 left { $left, $right } => #{ $left.then($right) }
macro => {
    rule infix { ($params ...) | { $body ... } } => {
        function inner($params ...) { $body ... }
    }
}

foo >>= (x) => {
    return unit(x + 1);
}
// error `=>` cannot be matched...

I think this is the same problem @natefaubion ran into with assignment and infix macros which was solved by enforesting until a fixed point was reached right? The same solution should work here?

Assignee
Assign to
Time tracking