I opened https://github.com/haskell/containers/issues/814 about adding
this function to the containers package:
import qualified Data.Map.Internal as Map
import qualified Data.Set.Internal as Set
import Data.Semigroup (Arg(..))
mapToArgSet :: Map.Map k a -> Set.Set (Arg k a)
mapToArgSet Map.Tip = Set.Tip
mapToArgSet (Map.Bin sz k v l r) = Set.Bin sz (Arg k v) (mapToArgSet
l) (mapToArgSet r)
Does anyone have any suggestions or improvements for this? In
particular, I'm sure there's a less clunky name that I just can't
think of.
Thanks,
Joseph C. Sible
_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries