Permalink
Browse files

Eliminated the dependency on Applicative in Hash.

  • Loading branch information...
1 parent 2b838d1 commit 7de891d823188089ce697c20ebda9a6cd7c0fded @luqui committed Nov 12, 2008
Showing with 1 addition and 2 deletions.
  1. +1 −2 Udon/Hash.hs
View
@@ -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

0 comments on commit 7de891d

Please sign in to comment.