config.ml icon indicating copy to clipboard operation
config.ml copied to clipboard

Support @@cfg in match cases

Open leostera opened this issue 1 year ago • 3 comments

Currently, this is unsupported:

let foo a =
  match a with
  | 0 -> "0"
  | 1 -> "1"
  [@@cfg (disable=true)]

And the expected behavior is that we can remove that match case with the annotation.

This is mostly important for having good support for conditional constructors and variants, so that we can disable in tandem the pattern matching branches for them.

leostera avatar Feb 27 '24 22:02 leostera

I am planning to look at this during the week.

KFoxder avatar Mar 03 '24 17:03 KFoxder

Sounds great! ✨ Let us know if we can help :) and feel free to open a draft PR if you want some early feedback. Thanks! 🙏🏼

leostera avatar Mar 03 '24 22:03 leostera

@leostera I think we can close this now!

KFoxder avatar Apr 15 '24 17:04 KFoxder