Browse files

bug fix: semantics of First changed now that we import Data.Semigroup…

…, so recompilation was getting stuck in a loop when there are type errors
  • Loading branch information...
1 parent ab724da commit 6942b9e5023d2e0e03dd9bd11fa60710d3183e17 Brent Yorgey committed Apr 5, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Diagrams/Backend/Cairo/CmdLine.hs
@@ -33,7 +33,7 @@ import System.Console.CmdArgs.Implicit hiding (args)
import Prelude hiding (catch)
import Data.Maybe (fromMaybe)
-import Control.Monad (when, forM_)
+import Control.Monad (when, forM_, mplus)
import Data.List.Split
import Text.Printf
@@ -212,7 +212,7 @@ waitForChange lastAttempt opts prog args = do
(newBin, newAttempt) <- recompile lastAtt prog (src opts)
if newBin
then executeFile prog False args Nothing
- else go $ getFirst (First newAttempt <> First lastAtt)
+ else go $ newAttempt `mplus` lastAtt
-- | @recompile t prog@ attempts to recompile @prog@, assuming the
-- last attempt was made at time @t@. If @t@ is @Nothing@ assume

0 comments on commit 6942b9e

Please sign in to comment.