Based on a quick web search, the equivalent of F#'s active patterns in Haskell appears to be view patterns...
https://ghc.haskell.org/trac/ghc/wiki/ViewPatterns
...and the closest I found for OCaml was polymorphic variants...
https://realworldocaml.org/v1/en/html/variants.html
>"I know of some research in gradual typing, but I've never seen it in any mainstream languages."
When you say gradual typing, do you mean optional type hinting like you can find in Python 3, or something else?
https://docs.python.org/3/library/typing.html
Thanks for the links. I didn't know about python's typing. It looks like a fairly recent addition.
Thanks for the links. I didn't know about python's typing. It looks like a fairly recent addition.