module AutoProof.Internal.Utils.MapUtils (toMap) where
import Data.Map (Map)
import qualified Data.Map as Map
toMap :: (Ord k, Foldable t) => t (k, v) -> Map k v
toMap :: t (k, v) -> Map k v
toMap = ((k, v) -> Map k v -> Map k v) -> Map k v -> t (k, v) -> Map k v
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr ((k -> v -> Map k v -> Map k v) -> (k, v) -> Map k v -> Map k v
forall a b c. (a -> b -> c) -> (a, b) -> c
uncurry k -> v -> Map k v -> Map k v
forall k a. Ord k => k -> a -> Map k a -> Map k a
Map.insert) Map k v
forall k a. Map k a
Map.empty