Commit 2e8a45f4 authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

Introduce Distribution.Compat.Map.Lazy module

parent f2dd0ead
......@@ -228,6 +228,7 @@ library
Distribution.Compat.Exception
Distribution.Compat.Graph
Distribution.Compat.Internal.TempFile
Distribution.Compat.Map.Lazy
Distribution.Compat.Map.Strict
Distribution.Compat.Newtype
Distribution.Compat.Prelude.Internal
......
{-# LANGUAGE CPP #-}
-- For bootstrapping GHC
#ifdef MIN_VERSION_containers
#if MIN_VERSION_containers(0,5,0)
#define HAVE_containers_050
#endif
#endif
module Distribution.Compat.Map.Lazy
( module X ) where
#ifdef HAVE_containers_050
import Data.Map.Lazy as X
#else
import Data.Map as X
import qualified Data.Map
import qualified Data.Set
fromSet :: (k -> a) -> Data.Set.Set k -> Map k a
fromSet f = Data.Map.fromDistinctAscList . Prelude.map (\k -> (k, f k)) . Data.Set.toList
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment