kowainik / stan

🕵️ Haskell STatic ANalyser
https://kowainik.github.io/projects/stan
Mozilla Public License 2.0
565 stars 48 forks source link

Come up with the nicer way to create analysis flow #364

Open vrom911 opened 4 years ago

vrom911 commented 4 years ago

Currently, we have to pattern match a lot on children, or check if any of the children satisfy some predicate. A list is not always reasonable representation (for example, we know that function node should have exactly 2 children). So it would be nice to have some nicer way to express such expectations. Seems like we want something like parser combinators but for Trees.