aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-06-01 20:31:47 +0200
committerDavid Roundy <droundy@darcs.net>2007-06-01 20:31:47 +0200
commitf67ce40adf3a62e453734b51e956aa1e7175cee9 (patch)
treee197707fd9b591598e976efaeeb7d6b6a01ee43c
parent9f786a2867183f61a076ed37b49db9b9e2c8fdeb (diff)
downloadXMonadContrib-f67ce40adf3a62e453734b51e956aa1e7175cee9.tar.gz
XMonadContrib-f67ce40adf3a62e453734b51e956aa1e7175cee9.tar.xz
XMonadContrib-f67ce40adf3a62e453734b51e956aa1e7175cee9.zip
fix error in select.
darcs-hash:20070601183147-72aca-7e72a8a8953398776e0a9f0d9a8ed51fe982b2b3.gz
-rw-r--r--Anneal.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Anneal.hs b/Anneal.hs
index 093a570..52f7048 100644
--- a/Anneal.hs
+++ b/Anneal.hs
@@ -57,8 +57,8 @@ metropolis x = do r <- gets rate
then modify $ \s -> s { current = rx }
else return ()
-select :: [a] -> State (Anneal x) a
-select [] = error "empty list in select"
+select :: [a] -> State (Anneal a) a
+select [] = the_value `fmap` gets best
select [x] = return x
select xs = do n <- getOne (0,length xs - 1)
return (xs !! n)