Skip to content

Instantly share code, notes, and snippets.

@beastaugh
Created January 3, 2011 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beastaugh/763807 to your computer and use it in GitHub Desktop.
Save beastaugh/763807 to your computer and use it in GitHub Desktop.
Prelude> :l time.hs
[1 of 1] Compiling Main ( time.hs, interpreted )
Ok, modules loaded: Main.
*Main> (Time 0) == 0
True
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
newtype Time = Time Integer deriving (Eq, Ord, Read, Show, Num)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment