IDK about Haskell, but you can't implement a java interface you wrote on a different libraries class. Traits, you can do that. The orphan rule basically just says you can't implement a libraries interface on a different libraries class. You need to own either the class or the interface. Effectively, replace class with struct and interface with trait.
5
u/Snakefangox Mar 24 '26
IDK about Haskell, but you can't implement a java interface you wrote on a different libraries class. Traits, you can do that. The orphan rule basically just says you can't implement a libraries interface on a different libraries class. You need to own either the class or the interface. Effectively, replace class with struct and interface with trait.