mikeizbicki / subhask

Type safe interface for working in subcategories of Hask
BSD 3-Clause "New" or "Revised" License
418 stars 43 forks source link

Uniform Numerical Hierarchy #63

Closed SamuelSchlesinger closed 7 years ago

SamuelSchlesinger commented 7 years ago

Hey Mike,

I've been interested in the project for a while and have messed around with the algebraic interface design space and have come up with this solution [https://github.com/SamuelSchlesinger/Gaia] to address the problems that Haskell typeclasses create by only demanding one instance for each type. The basic design is displayed on the README and I'm curious to see what you think, but the essence is that you get a lot for free by splitting up the classes a lot more than mathematicians tend to. I'd be willing to take a look at structuring the SubHask algebraic hierarchy in this way (keeping external interfaces) if you like this design. At a first glance it looks like it would really trim down the number of tests you need to write for the respective structures if they're constructed more uniformly.

Best, Sam

SamuelSchlesinger commented 7 years ago

The structure actually ended up getting annoying because people have the ability to declare or not to declare their types representationally coercible