summaryrefslogtreecommitdiff
path: root/src/Data/Dependent/EnumMap
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/Dependent/EnumMap')
-rw-r--r--src/Data/Dependent/EnumMap/Strict.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Data/Dependent/EnumMap/Strict.hs b/src/Data/Dependent/EnumMap/Strict.hs
index 21db518..6e1e9d6 100644
--- a/src/Data/Dependent/EnumMap/Strict.hs
+++ b/src/Data/Dependent/EnumMap/Strict.hs
@@ -106,8 +106,8 @@ lookup k (DEnumMap m) = (\(KV _ v) -> coe1 v) <$> IM.lookup (fst (fromEnum1 k))
findWithDefault :: Enum1 k => v a -> k a -> DEnumMap k v -> v a
findWithDefault def k (DEnumMap m) =
- (\(KV _ v) -> coe1 v) $
- IM.findWithDefault (KV undefined def) (fst (fromEnum1 k)) m
+ case IM.findWithDefault (KV undefined def) (fst (fromEnum1 k)) m of
+ KV _ v -> coe1 v
member :: Enum1 k => k a -> DEnumMap k v -> Bool
member k (DEnumMap m) = IM.member (fst (fromEnum1 k)) m