Commit d3feb16a authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan
Browse files

Make Unique a newtype

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision:
parent e98edbd1
......@@ -87,12 +87,10 @@ The @Chars@ are ``tag letters'' that identify the @UniqueSupply@.
Fast comparison is everything on @Uniques@:
--why not newtype Int?
-- | The type of unique identifiers that are used in many places in GHC
-- for fast ordering and equality tests. You should generate these with
-- the functions from the 'UniqSupply' module
data Unique = MkUnique {-# UNPACK #-} !Int
newtype Unique = MkUnique Int
Now come the functions which construct uniques from their pieces, and vice versa.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment