File tree 2 files changed +5
-0
lines changed 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ library
23
23
build-depends : base >= 4.5 && < 4.10 ,
24
24
blaze-builder >= 0.4 && < 0.5 ,
25
25
bytestring >= 0.10 && < 0.11 ,
26
+ hashable >= 1.1 && < 1.3 ,
26
27
text >= 0.11 && < 1.3 ,
27
28
unordered-containers >= 0.2 && < 0.2.7
28
29
hs-source-dirs : src
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import qualified Blaze.ByteString.Builder as BB
36
36
import qualified Blaze.ByteString.Builder.Html.Utf8 as BB
37
37
import qualified Data.ByteString.Lazy as LB
38
38
import Data.ByteString.Lazy (ByteString )
39
+ import Data.Hashable (Hashable (.. ))
39
40
import Data.HashMap.Strict (HashMap )
40
41
import qualified Data.HashMap.Strict as M
41
42
import Data.Monoid
@@ -51,6 +52,9 @@ import qualified Data.Text.Lazy.Encoding as LT
51
52
data Attribute = Attribute ! Text ! Text
52
53
deriving (Show ,Eq )
53
54
55
+ instance Hashable Attribute where
56
+ hashWithSalt salt (Attribute a b) = salt `hashWithSalt` a `hashWithSalt` b
57
+
54
58
-- | Type of an SVG element.
55
59
newtype Element = Element (HashMap Text Text -> Builder )
56
60
You can’t perform that action at this time.
0 commit comments