We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0b78af commit 4d12c2aCopy full SHA for 4d12c2a
Data/HashMap/Base.hs
@@ -143,6 +143,7 @@ import qualified GHC.Exts as Exts
143
144
#if MIN_VERSION_base(4,9,0)
145
import Data.Functor.Classes
146
+import GHC.Stack
147
#endif
148
149
#if MIN_VERSION_hashable(1,2,5)
@@ -649,7 +650,11 @@ lookupDefault def k t = findWithDefault def k t
649
650
651
-- | /O(log n)/ Return the value to which the specified key is mapped.
652
-- Calls 'error' if this map contains no mapping for the key.
653
+#if MIN_VERSION_base(4,9,0)
654
+(!) :: (Eq k, Hashable k, HasCallStack) => HashMap k v -> k -> v
655
+#else
656
(!) :: (Eq k, Hashable k) => HashMap k v -> k -> v
657
+#endif
658
(!) m k = case lookup k m of
659
Just v -> v
660
Nothing -> error "Data.HashMap.Base.(!): key not found"
0 commit comments