{-# LANGUAGE TypeSynonymInstances #-} module Clash.Unique ( Unique , Uniquable (..) ) where type Unique = Int class Uniquable a where getUnique :: a -> Unique setUnique :: a -> Unique -> a instance Uniquable Unique where getUnique :: Unique -> Unique getUnique = Unique -> Unique forall a. a -> a id setUnique :: Unique -> Unique -> Unique setUnique = (Unique -> Unique -> Unique) -> Unique -> Unique -> Unique forall a b c. (a -> b -> c) -> b -> a -> c flip Unique -> Unique -> Unique forall a b. a -> b -> a const