dry-types
                                
                                 dry-types copied to clipboard
                                
                                    dry-types copied to clipboard
                            
                            
                            
                        Intersection (&) support redux
dry-schema and dry-logic both support &. Adding support for & in dry-types allows for a more expressive type system...
module Types
  Callable = Interface(:call)
  Procable = Interface(:to_proc)
  Function = Callable & Procable
end
...and greatly simplifies value coercion in dry-schema, where a custom types merge attempts to simulate an intersection type.
@flash-gordon any thoughts on this? I reopened and finished this work because of the comments in the original intersection support PR (#442) and that it would make downstream & composition in dry-schema less hacky. There's also a matching implication support PR (#446) as well as a composition refactor PR (#447) as well that could make this support generally more holistic.
@robhanlon22 I haven't looked in details yet, but I'm positive overall. I'll get back to this probably next week (traveling atm). Thanks for working on this ❤️
Enjoy your trip @flash-gordon !
I'll be merging the PRs, I'll post-review them
They all look good at the first glance btw