3 ms·
In Haskell? There are packages like http://hackage.haskell.org/package/vector-sized http://hackage.haskell.org/package/vector-sized One might need a typechecker
by danidiaz 9y ago
In Haskell? There are packages like http://hackage.haskell.org/package/vector-sized http://hackage.haskell.org/package/vector-sized One might need a typechecker plugin like ghc-typelits-natnormalise http://hackage.haskell.org/package/ghc-typelits-natnormalise http://hackage.haskell.org/package/ghc-typelits-natnormalise to help GHC reason about the lengths.
These two presentations about dependent types in GHC are also good: https://www.youtube.com/watch?v=buVyfrU6QF4 https://www.youtube.com/watch?v=buVyfrU6QF4 https://www.youtube.com/watch?v=GgD0KUxMaQs https://www.youtube.com/watch?v=GgD0KUxMaQs