Safe Haskell | None |
---|---|
Language | Haskell98 |
An alternative Shape class that allows to add new "methods",
but forbids to add new instances.
You can provide new "methods" by calling switch
with a newtype around your function type.
For the general concept, see: https://www.haskell.org/haskellwiki/Closed_world_instances