-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Explore optimization * Various changes for exploration optimization * Remove unused
- Loading branch information
Showing
14 changed files
with
159 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ graphs/* | |
.stack-work | ||
dist-newstyle | ||
.DS_Store | ||
*.tar.gz |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{-# LANGUAGE CPP #-} | ||
|
||
module Language.REST.Internal.Orphans where | ||
|
||
#if !MIN_VERSION_hashable(1,3,5) | ||
import Data.Hashable | ||
import Data.Hashable.Lifted | ||
import Data.Set as Set | ||
import Data.Map as Map | ||
|
||
instance Hashable1 Set where | ||
liftHashWithSalt h s x = Set.foldl' h (hashWithSalt s (Set.size x)) x | ||
|
||
instance (Hashable a) => Hashable (Set a) where | ||
hashWithSalt = hashWithSalt1 | ||
|
||
instance Hashable2 Map.Map where | ||
liftHashWithSalt2 hk hv s m = Map.foldlWithKey' | ||
(\s' k v -> hv (hk s' k) v) | ||
(hashWithSalt s (Map.size m)) | ||
m | ||
|
||
instance Hashable k => Hashable1 (Map.Map k) where | ||
liftHashWithSalt h s m = Map.foldlWithKey' | ||
(\s' k v -> h (hashWithSalt s' k) v) | ||
(hashWithSalt s (Map.size m)) | ||
m | ||
|
||
-- | @since 1.3.4.0 | ||
instance (Hashable k, Hashable v) => Hashable (Map.Map k v) where | ||
hashWithSalt = hashWithSalt2 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.