News for hackers. Stuff that matters.
Re:CIS 194: Introduction to Haskell (Spring 2013) by quchen on Monday July 29, 2013 @10:39AM (#6121345)
He used pseudo-notation for something that is possible in GHC. (1+) on type level corresponds to the successor function, and a compiling version of Peaker's code would be this:

    {-# LANGUAGE DataKinds #-}
    {-# LANGUAGE GADTs #-}
    
    data Nat = Z | S Nat
    
    data Vector l a where
          Nil :: Vector Z a
          Cons :: a -> Vector l a -> Vector (S l) a
Re:CIS 194: Introduction to Haskell (Spring 2013) by jdn on Monday July 29, 2013 @11:29AM (#6121682)
Thanks for this! Had looked at examples of this but it's nice to have the link to Peaker's code