Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Eliminated the dependency on Applicative in Hash.

  • Loading branch information...
commit 7de891d823188089ce697c20ebda9a6cd7c0fded 1 parent 2b838d1
@luqui authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  Udon/Hash.hs
View
3  Udon/Hash.hs
@@ -5,7 +5,6 @@ where
import qualified Data.ByteString.Lazy as Str
import qualified Data.Digest.SHA256 as SHA
import Data.Binary
-import Control.Applicative
type Blob = Str.ByteString
@@ -14,7 +13,7 @@ newtype Hash = Hash Blob
instance Binary Hash where
put (Hash x) = put x
- get = Hash <$> get
+ get = fmap Hash get
hashBlob :: Blob -> Hash
hashBlob = Hash . Str.pack . SHA.hash . Str.unpack
Please sign in to comment.
Something went wrong with that request. Please try again.