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

Adding constraints to transforms #1

Open
ekshaks opened this issue Feb 21, 2020 · 0 comments
Open

Adding constraints to transforms #1

ekshaks opened this issue Feb 21, 2020 · 0 comments

Comments

@ekshaks
Copy link
Member

ekshaks commented Feb 21, 2020

Format: lhs [constaints] -> rhs
data:

1, ['a', :foo{ :bar, :baz[ 42, :qux[ 99, 'e' ] ] } ] ;
x = (1, ['a',  'foo' : {
                         'bar' : {'baz' : [42, 'qux': [99, 'e']] }
                         }
      ])
(int | 
    (str | (foo & baz & ($num | qux & $qux ) 
            ) 
    )
 )
[type($num) == int]
->
($num | $qux)

The format seems user-friendly;

  • need to fix the constraint language
  • update the parser (instead, can we add constraints as a lambda?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant