2015-07-03 03:03:34 +00:00
|
|
|
From 04a1230cf4d740d37ab427165eef4b4db2a3898f Mon Sep 17 00:00:00 2001
|
|
|
|
From: dummy <dummy@example.com>
|
|
|
|
Date: Fri, 3 Jul 2015 02:20:42 +0000
|
|
|
|
Subject: [PATCH] build without v1 uuid which needs network-info
|
2013-11-11 04:03:24 +00:00
|
|
|
|
|
|
|
---
|
2015-07-03 03:03:34 +00:00
|
|
|
Data/UUID/Util.hs | 11 -----------
|
|
|
|
uuid.cabal | 2 --
|
|
|
|
2 files changed, 13 deletions(-)
|
2013-11-11 04:03:24 +00:00
|
|
|
|
|
|
|
diff --git a/Data/UUID/Util.hs b/Data/UUID/Util.hs
|
2015-07-03 03:03:34 +00:00
|
|
|
index 8817f51..0d43b01 100644
|
2013-11-11 04:03:24 +00:00
|
|
|
--- a/Data/UUID/Util.hs
|
|
|
|
+++ b/Data/UUID/Util.hs
|
|
|
|
@@ -3,7 +3,6 @@ module Data.UUID.Util (
|
|
|
|
UnpackedUUID(..)
|
|
|
|
, unpack, pack
|
|
|
|
, version
|
|
|
|
- , extractMac
|
|
|
|
, extractTime
|
|
|
|
, setTime
|
|
|
|
) where
|
|
|
|
@@ -13,7 +12,6 @@ import Data.Word
|
|
|
|
import Data.Word.Util
|
|
|
|
import Data.Bits
|
2015-07-03 03:03:34 +00:00
|
|
|
import Data.UUID.Types.Internal
|
2013-11-11 04:03:24 +00:00
|
|
|
-import Network.Info
|
|
|
|
import Data.Int (Int64)
|
|
|
|
|
|
|
|
version :: UUID -> Int
|
2015-07-03 03:03:34 +00:00
|
|
|
@@ -42,12 +40,3 @@ extractTime uuid =
|
|
|
|
|
2013-11-11 04:03:24 +00:00
|
|
|
timeAndVersionToTime :: Word16 -> Word16
|
|
|
|
timeAndVersionToTime tv = tv .&. 0x0FFF
|
2015-07-03 03:03:34 +00:00
|
|
|
-
|
2013-11-11 04:03:24 +00:00
|
|
|
-extractMac :: UUID -> Maybe MAC
|
2015-07-03 03:03:34 +00:00
|
|
|
-extractMac uuid =
|
2013-11-11 04:03:24 +00:00
|
|
|
- if version uuid == 1
|
2015-07-03 03:03:34 +00:00
|
|
|
- then Just $
|
2013-11-11 04:03:24 +00:00
|
|
|
- MAC (node_0 unpacked) (node_1 unpacked) (node_2 unpacked) (node_3 unpacked) (node_4 unpacked) (node_5 unpacked)
|
|
|
|
- else Nothing
|
|
|
|
- where
|
|
|
|
- unpacked = unpack uuid
|
|
|
|
diff --git a/uuid.cabal b/uuid.cabal
|
2015-07-03 03:03:34 +00:00
|
|
|
index 2fa548b..9d86fd2 100644
|
2013-11-11 04:03:24 +00:00
|
|
|
--- a/uuid.cabal
|
|
|
|
+++ b/uuid.cabal
|
2015-07-03 03:03:34 +00:00
|
|
|
@@ -30,7 +30,6 @@ Library
|
|
|
|
binary >= 0.4 && < 0.8,
|
|
|
|
bytestring >= 0.9 && < 0.11,
|
2013-11-11 04:03:24 +00:00
|
|
|
cryptohash >= 0.7 && < 0.12,
|
|
|
|
- network-info == 0.2.*,
|
2015-07-03 03:03:34 +00:00
|
|
|
random >= 1.0.1 && < 1.2,
|
|
|
|
time >= 1.1 && < 1.6,
|
|
|
|
uuid-types >= 1.0 && < 2
|
|
|
|
@@ -38,7 +37,6 @@ Library
|
2013-11-11 04:03:24 +00:00
|
|
|
Exposed-Modules:
|
|
|
|
Data.UUID
|
|
|
|
Data.UUID.Util
|
|
|
|
- Data.UUID.V1
|
|
|
|
Data.UUID.V3
|
|
|
|
Data.UUID.V4
|
|
|
|
Data.UUID.V5
|
|
|
|
--
|
2015-07-03 03:03:34 +00:00
|
|
|
2.1.4
|
2013-11-11 04:03:24 +00:00
|
|
|
|