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
  • Merge requests
  • !350

Macroclass cont'd

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/natefaubion/macroclass2 into master Jun 22, 2014
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes 2

Created by: natefaubion

This PR refines the experimental macroclass feature we released with 0.6.0. The syntax has changed slightly, and auxillary bindings are a bit more robust.

You declare patterns like before, but instead of being rules themselves, patterns contain a rule declaration along with any auxillary with bindings. I renamed where to with to mirror withSyntax. with bindings support syntax quotes with #{} but can also use syntax constructors like makeValue et al. Additionally, patterns with only a rule declaration can be collapsed into a single rule to mirror identity rules.

Here is an example implementation of clojure-like protocols using macroclasses: https://gist.github.com/natefaubion/bd7addb60a888c1ec759

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/natefaubion/macroclass2