From 963378040c0a6b1819912b406de192ca9ddf0773 Mon Sep 17 00:00:00 2001 From: Mikolaj Konarski Date: Tue, 21 Jan 2025 21:06:22 +0100 Subject: Add size --- src/Data/Dependent/EnumMap/Strict.hs | 2 +- src/Data/Dependent/EnumMap/Strict/Internal.hs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Data/Dependent') diff --git a/src/Data/Dependent/EnumMap/Strict.hs b/src/Data/Dependent/EnumMap/Strict.hs index fd650b2..515a186 100644 --- a/src/Data/Dependent/EnumMap/Strict.hs +++ b/src/Data/Dependent/EnumMap/Strict.hs @@ -56,7 +56,7 @@ module Data.Dependent.EnumMap.Strict ( -- ** Size null, - -- size + size, -- * Combine -- ** Union diff --git a/src/Data/Dependent/EnumMap/Strict/Internal.hs b/src/Data/Dependent/EnumMap/Strict/Internal.hs index 0d944ba..c2dcf95 100644 --- a/src/Data/Dependent/EnumMap/Strict/Internal.hs +++ b/src/Data/Dependent/EnumMap/Strict/Internal.hs @@ -132,7 +132,8 @@ member k (DEnumMap m) = IM.member (fst (fromEnum1 k)) m null :: DEnumMap k v -> Bool null (DEnumMap m) = IM.null m --- size +size :: DEnumMap k v -> Int +size (DEnumMap m) = IM.size m -- * Combine -- cgit v1.2.3-70-g09d2