On Mon, Feb 10, 2014 at 6:12 PM, Meta <[email protected]> wrote: > I'm trying to write a D implementation of Haskell's "type level > quicksort"[0], but I'm already running into problems with > std.typecons.Typedef. I have tried to translate this Haskell code:
> alias One = Typedef!(Succ!Zero); > alias Two = Typedef!(Succ!One); > alias Three = Typedef!(Succ!Two); > alias Four = Typedef!(Succ!Three); Did you try just using: alias One = Succ!Zero; alias Two = Succ!One; alias Three = Succ!Two; alias Four = Succ!Three; ? I remember having fun implementing type-level addition and multiplication using D and this Peano construct, so Quicksort is probably possible.
