summaryrefslogtreecommitdiff
path: root/src/Data
diff options
context:
space:
mode:
authorTom Smeding <t.j.smeding@uu.nl>2024-07-22 15:18:48 +0200
committerTom Smeding <t.j.smeding@uu.nl>2024-07-22 15:18:48 +0200
commit58a7f5379e4d9f8a8a3676fe058947ab30340e65 (patch)
tree5a28061765750de6e588b8545d89037f4cbc799a /src/Data
parentead35e571ddf77c227aba555fb745fd38ff8b96f (diff)
Code style
Diffstat (limited to 'src/Data')
-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