News for hackers. Stuff that matters.
Re:Hack: a new programming language for HHVM by anaphor on Thursday March 20, 2014 @04:42PM (#7438598)
I'm pretty sure you and the parent were thinking of Haskell's `newtype` not `type`

λ> :{

Prelude| type Feet = Int

Prelude| type Metres = Int

Prelude| :}

λ> let a = 5 :: Feet

λ> let b = 4 :: Metres

λ> :t a

a :: Feet

λ> :t b

b :: Metres

λ> a + b

9

λ> let f = id :: Feet -> Feet

λ> f b

4

There are no comments on this comment yet.