Hacker News new | ask | show | jobs
by nihils 3816 days ago
This is actually perfect for a library on algebraic structures I've been trying to make in Haskell. For example, how does one distinguish between elements in the Dihedral group of order 10 vs. Dihedral group on order 16 when obstensibly, they have the same representation. For now, I think Haskell programmers use type-level arithmetic libraries, but this is a much better solution.
1 comments

Haskell is actively moving in the direction of adding dependent types too. I believe phase 1[1] of the plan[2] is slated for GHC 8.0 (the upcoming release), and I'm sure the rest of it will follow soon.

It's pretty exciting!

[1]: https://ghc.haskell.org/trac/ghc/wiki/DependentHaskell/Phase...

[2]: https://ghc.haskell.org/trac/ghc/wiki/DependentHaskell