Commits

Bryan O'Sullivan committed ded9959

Ensure that a space leak cannot occur.

  • Participants
  • Parent commits 497dbcf

Comments (0)

Files changed (1)

Data/Configurator.hs

-{-# LANGUAGE OverloadedStrings, RecordWildCards, ScopedTypeVariables #-}
+{-# LANGUAGE BangPatterns, OverloadedStrings, RecordWildCards,
+    ScopedTypeVariables #-}
 
 -- |
 -- Module:      Data.Configurator
  where
    go seen path = do
      ds <- loadOne . T.unpack =<< interpolate path H.empty
-     let seen' = H.insert path ds seen
+     let !seen'    = H.insert path ds seen
          notSeen n = not . isJust . H.lookup n $ seen
      foldM go seen' . filter notSeen . importsOf $ ds