1. Bryan O'Sullivan
  2. configurator

Commits

Bryan O'Sullivan  committed ded9959

Ensure that a space leak cannot occur.

  • Participants
  • Parent commits 497dbcf
  • Branches default

Comments (0)

Files changed (1)

File Data/Configurator.hs

View file
-{-# 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