diff options
author | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-07-08 16:34:24 +0200 |
---|---|---|
committer | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-07-08 16:34:24 +0200 |
commit | 56c2cd7e855f07ac273295f6b3e02865590004ec (patch) | |
tree | 4d7589ef7535bc3bfec09f334c054e16ab4a3b72 | |
parent | 022b0ca4c442581a5c389d28083be25f44387d33 (diff) | |
download | nixos-56c2cd7e855f07ac273295f6b3e02865590004ec.tar nixos-56c2cd7e855f07ac273295f6b3e02865590004ec.tar.gz nixos-56c2cd7e855f07ac273295f6b3e02865590004ec.tar.bz2 nixos-56c2cd7e855f07ac273295f6b3e02865590004ec.tar.xz nixos-56c2cd7e855f07ac273295f6b3e02865590004ec.zip |
minor code cleanup
-rw-r--r-- | ymir/mlmmj-expose.nix | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/ymir/mlmmj-expose.nix b/ymir/mlmmj-expose.nix index b07396aa..077f6c81 100644 --- a/ymir/mlmmj-expose.nix +++ b/ymir/mlmmj-expose.nix | |||
@@ -19,17 +19,11 @@ let | |||
19 | 19 | ||
20 | import Control.Monad | 20 | import Control.Monad |
21 | 21 | ||
22 | -- import Codec.Crypto.SimpleAES | ||
23 | |||
24 | import Crypto.Hash | 22 | import Crypto.Hash |
25 | 23 | ||
26 | import qualified Data.ByteString.Lazy as LBS | 24 | import qualified Data.ByteString.Lazy as LBS |
27 | import qualified Data.ByteString.Lazy.Char8 as CLBS | ||
28 | import qualified Data.ByteString as BS | ||
29 | import qualified Data.ByteString.Char8 as CBS | 25 | import qualified Data.ByteString.Char8 as CBS |
30 | 26 | ||
31 | -- import Data.Hex | ||
32 | |||
33 | import qualified Data.UUID as UUID (toString) | 27 | import qualified Data.UUID as UUID (toString) |
34 | import qualified Data.UUID.V4 as UUID (nextRandom) | 28 | import qualified Data.UUID.V4 as UUID (nextRandom) |
35 | 29 | ||
@@ -88,7 +82,7 @@ let | |||
88 | readDir dir = concat <$> (mapM (fmap lines . readFile) . map (dir </>) . filter (not . (`elem` [".", ".."]))=<< (getDirectoryContents dir)) | 82 | readDir dir = concat <$> (mapM (fmap lines . readFile) . map (dir </>) . filter (not . (`elem` [".", ".."]))=<< (getDirectoryContents dir)) |
89 | 83 | ||
90 | hash' :: Show a => a -> String | 84 | hash' :: Show a => a -> String |
91 | hash' = take len . map toLower . show . (hash :: BS.ByteString -> Digest SHA256) . CBS.pack . map toLower . show | 85 | hash' = take len . map toLower . show . (hash :: CBS.ByteString -> Digest SHA256) . CBS.pack . map toLower . show |
92 | 86 | ||
93 | len :: Int | 87 | len :: Int |
94 | len = 32 | 88 | len = 32 |