diff --git a/src/Data/Map/Monoidal.hs b/src/Data/Map/Monoidal.hs index c81286414..fc7f2fcd0 100644 --- a/src/Data/Map/Monoidal.hs +++ b/src/Data/Map/Monoidal.hs @@ -3,6 +3,7 @@ module Data.Map.Monoidal ( Map , lookup +, singleton , size , insert , filterWithKey @@ -22,6 +23,10 @@ unMap :: Map key value -> Map.Map key value unMap (Map map) = map +singleton :: key -> value -> Map key value +singleton k v = Map (Map.singleton k v) + + lookup :: Ord key => key -> Map key value -> Maybe value lookup key = Map.lookup key . unMap