Skip to content

Adding constraints to transforms #1

@ekshaks

Description

@ekshaks

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?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions