on master help sign in
Remove the Unique library, which is no longer in use
commit545e51c61163323689dc05e8727ea73146459829 authorEvan Czaplicki <info@elm-lang.org> dateSat 31 Aug 2013, 03:08 (13 years ago) parent42fb11e
1 file changed−19
compiler/Unique.hs−19
compiler/Unique.hsdeleted−19
@@ -1,19 +0,0 @@
1−{-# LANGUAGE GeneralizedNewtypeDeriving #-}
2−module Unique (guid, set, run, runAt, Unique) where
3−
4−import Control.Monad.State (evalState, State, get, put)
5−
6−-- Wrapper around State monad.
7−newtype Unique a = U { runU :: State Int a }
8− deriving (Monad)
9−
10−-- Get the next GUID, incrementing the counter.
11−guid :: Unique Int
12−guid = U $ do n <- get
13− put (n + 1)
14− return n
15−
16−set n = U (put n)
17−
18−run = runAt 0
19−runAt n x = evalState (runU x) n