Skip to content

Commit

Permalink
merge of fixes for hashable-1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
atzedijkstra committed Nov 25, 2013
2 parents cbaed2d + 62cfab3 commit 9bc67ab
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion EHC/configure
Expand Up @@ -3798,7 +3798,7 @@ HADDOCK_VERSION=$haddockVersion
# GHC version dependencies: packages passed as option, cabal packages
cabal_base_lib_depends="base mtl fgl directory hashable>=1.1&&<1.2 uhc-util>=0.1.1&&<0.1.3"
cabal_base_lib_depends="base mtl fgl directory hashable>=1.1&&<1.3 uhc-util>=0.1.1&&<0.1.3"
if test x$enableClr = "xyes"
then
cabal_base_lib_depends="$cabal_base_lib_depends language-cil"
Expand Down
2 changes: 1 addition & 1 deletion EHC/configure.ac
Expand Up @@ -415,7 +415,7 @@ AC_SUBST(HADDOCK_CMD,$haddockCmd)
AC_SUBST(HADDOCK_VERSION, $haddockVersion)

# GHC version dependencies: packages passed as option, cabal packages
cabal_base_lib_depends="base mtl fgl directory hashable>=1.1&&<1.2 uhc-util>=0.1.1&&<0.1.3"
cabal_base_lib_depends="base mtl fgl directory hashable>=1.1&&<1.3 uhc-util>=0.1.1&&<0.1.3"
if test x$enableClr = "xyes"
then
cabal_base_lib_depends="$cabal_base_lib_depends language-cil"
Expand Down
10 changes: 5 additions & 5 deletions EHC/src/ehc/Base/HsName.chs
Expand Up @@ -213,18 +213,18 @@ hsnUniqifyEval = hsnUniqify HsNameUniqifier_Evaluated
hsnHashWithSalt :: Int -> HsName -> Int
hsnHashWithSalt salt (HsName_Base s ) = hashWithSalt salt s
hsnHashWithSalt salt (HsName_Pos p ) = hashWithSalt salt p
hsnHashWithSalt salt (HsName_Modf _ q b u) = hashWithSalt salt q `combine` hashWithSalt salt b `combine` hashWithSalt salt (Map.toList u)
hsnHashWithSalt salt (HNmNr i n ) = i `combine` hashWithSalt salt n
hsnHashWithSalt salt (HsName_Modf _ q b u) = hashWithSalt salt q `hashWithSalt` hashWithSalt salt b `hashWithSalt` hashWithSalt salt (Map.toList u)
hsnHashWithSalt salt (HNmNr i n ) = i `hashWithSalt` hashWithSalt salt n

instance Hashable HsName where
hashWithSalt salt n@(HsName_Modf h _ _ _) | h /= 0 = h
hashWithSalt salt n = hsnHashWithSalt salt n

instance Hashable OrigName where
hashWithSalt salt (OrigNone ) = salt
hashWithSalt salt (OrigLocal n) = 23 `combine` hashWithSalt salt n
hashWithSalt salt (OrigGlobal n) = 19 `combine` hashWithSalt salt n
hashWithSalt salt (OrigFunc n) = 17 `combine` hashWithSalt salt n
hashWithSalt salt (OrigLocal n) = 23 `hashWithSalt` hashWithSalt salt n
hashWithSalt salt (OrigGlobal n) = 19 `hashWithSalt` hashWithSalt salt n
hashWithSalt salt (OrigFunc n) = 17 `hashWithSalt` hashWithSalt salt n

instance Hashable HsNameUnique where
hashWithSalt salt (HsNameUnique_None ) = salt
Expand Down
2 changes: 1 addition & 1 deletion EHC/src/ehc/Base/UID.chs
Expand Up @@ -64,7 +64,7 @@ instance Show UID where

%%[99
instance Hashable UID where
hashWithSalt salt (UID h _) = salt `combine` h
hashWithSalt salt (UID h _) = salt `hashWithSalt` h
%%]

%%[1.UID.mkNewLevUID
Expand Down

0 comments on commit 9bc67ab

Please sign in to comment.