-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
empty is defined as
-- | A completely empty configuration.
empty :: Config
empty = Config "" $ unsafePerformIO $ do
p <- newIORef []
m <- newIORef H.empty
s <- newIORef H.empty
return BaseConfig {
cfgAuto = Nothing
, cfgPaths = p
, cfgMap = m
, cfgSubs = s
}
{-# NOINLINE empty #-}If I let myEmpty = empty, and then apply something like addToConfig to myEmpty, suddenly myEmpty and empty are no longer equivalent. I believe the only sane thing to do is to remove empty altogether, replacing it with mkEmpty :: IO Config.
Metadata
Metadata
Assignees
Labels
No labels