Skip to content

Commit

Permalink
Update to work with GHC 7.10
Browse files Browse the repository at this point in the history
  • Loading branch information
yav committed Jan 6, 2015
1 parent bed376d commit 0fe3b68
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion presburger.cabal
@@ -1,5 +1,5 @@
Name: presburger
Version: 1.2
Version: 1.3
License: BSD3
License-file: LICENSE
Author: Iavor S. Diatchki
Expand Down
10 changes: 9 additions & 1 deletion src/Data/Integer/SAT.hs
Expand Up @@ -47,7 +47,7 @@ import Data.Map (Map)
import qualified Data.Map as Map
import Data.List(partition)
import Data.Maybe(maybeToList,fromMaybe,mapMaybe)
import Control.Applicative(Applicative(..), (<$>))
import Control.Applicative(Applicative(..), Alternative(..), (<$>))
import Control.Monad(liftM,ap,MonadPlus(..),guard)
import Text.PrettyPrint

Expand Down Expand Up @@ -710,6 +710,10 @@ instance Monad Answer where
One a >>= k = k a
Choice m1 m2 >>= k = mplus (m1 >>= k) (m2 >>= k)

instance Alternative Answer where
empty = mzero
(<|>) = mplus

instance MonadPlus Answer where
mzero = None
mplus None x = x
Expand All @@ -734,6 +738,10 @@ instance Monad S where
let S m1 = k a
m1 s1

instance Alternative S where
empty = mzero
(<|>) = mplus

instance MonadPlus S where
mzero = S $ \_ -> mzero
mplus (S m1) (S m2) = S $ \s -> mplus (m1 s) (m2 s)
Expand Down

0 comments on commit 0fe3b68

Please sign in to comment.