@@ -45,7 +45,6 @@ module Text.Pandoc.Free ( PandocActionF(..)
4545 , getDefaultReferenceODT
4646 , newStdGen
4747 , newUniqueHash
48− , newUUID
4948 , readFileStrict
5049 , readFileLazy
5150 , readFileUTF8
@@ -81,8 +80,6 @@ import qualified Data.ByteString.Lazy as BL
8180import Control.Monad.Free
8281import qualified Control.Exception as E
8382import qualified System.Environment as IO (lookupEnv)
84−import Text.Pandoc.UUID
85−import qualified Text.Pandoc.UUID as IO (getRandomUUID)
8683import qualified Text.Pandoc.UTF8 as UTF8 (readFile, toString)
8784import System.FilePath.Glob (match, compile)
8885import System.FilePath ((</>))
@@ -100,7 +97,6 @@ data PandocActionF nxt =
10097 | GetDefaultReferenceODT (Maybe FilePath) (Archive -> nxt)
10198 | NewStdGen (StdGen -> nxt)
10299 | NewUniqueHash (Int -> nxt)
103− | NewUUID (UUID -> nxt)
104100 | ReadFileStrict FilePath (B.ByteString -> nxt)
105101 | ReadFileLazy FilePath (BL.ByteString -> nxt)
106102 | ReadFileUTF8 FilePath (String -> nxt)
@@ -137,9 +133,6 @@ newStdGen = liftF $ NewStdGen id
137133newUniqueHash :: PandocAction Int
138134newUniqueHash = liftF $ NewUniqueHash id
139135
140−newUUID :: PandocAction UUID
141−newUUID = liftF $ NewUUID id
142−
143136readFileStrict :: FilePath -> PandocAction B.ByteString
144137readFileStrict fp = liftF $ ReadFileStrict fp id
145138
@@ -183,7 +176,6 @@ runIO (Free (GetDefaultReferenceODT mfp f)) =
183176 IO.getDefaultReferenceODT mfp >>= runIO . f
184177runIO (Free (NewStdGen f)) = IO.newStdGen >>= runIO . f
185178runIO (Free (NewUniqueHash f)) = hashUnique <$> IO.newUnique >>= runIO . f
186−runIO (Free (NewUUID f)) = IO.getRandomUUID >>= runIO . f
187179runIO (Free (ReadFileStrict fp f)) = B.readFile fp >>= runIO . f
188180runIO (Free (ReadFileLazy fp f)) = BL.readFile fp >>= runIO . f
189181runIO (Free (ReadFileUTF8 fp f)) = UTF8.readFile fp >>= runIO . f
@@ -250,14 +242,6 @@ runTest (Free (NewUniqueHash f)) = do
250242 modify $ \st -> st { stUniqStore = us }
251243 return u >>= runTest . f
252244 _ -> M.fail "uniq store ran out of elements"
253−runTest (Free (NewUUID f)) = do
254− word8s <- gets stWord8Store
255− case word8s of
256− -- note we use f' because f is a param of the function
257− a:b:c:d:e:f':g:h:i:j:k:l:m:n:o:p:remaining -> do
258− modify $ \st -> st { stWord8Store = remaining }
259− return (UUID a b c d e f' g h i j k l m n o p) >>= runTest . f
260− _ -> M.fail "word8 supply was not infinite"
261245runTest (Free (ReadFileStrict fp f)) = do
262246 fps <- asks envFiles
263247 case lookup fp fps of