ersatz 0.2.5 → 0.2.5.1
raw patch · 20 files changed
+40/−22 lines, 20 filesdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
- Ersatz.Problem: class HasSAT t_a875 where formula = (sat . go_a877) where go_a877 _f_a878 (SAT __lastAtom_a879 __formula'_a87a __stableMap_a87c) = ((\ __formula_a87b -> SAT __lastAtom_a879 __formula_a87b __stableMap_a87c) <$> (_f_a878 __formula'_a87a)) lastAtom = (sat . go_a87d) where go_a87d _f_a87e (SAT __lastAtom'_a87f __formula_a87h __stableMap_a87i) = ((\ __lastAtom_a87g -> SAT __lastAtom_a87g __formula_a87h __stableMap_a87i) <$> (_f_a87e __lastAtom'_a87f)) stableMap = (sat . go_a87j) where go_a87j _f_a87k (SAT __lastAtom_a87l __formula_a87m __stableMap'_a87n) = ((\ __stableMap_a87o -> SAT __lastAtom_a87l __formula_a87m __stableMap_a87o) <$> (_f_a87k __stableMap'_a87n))
+ Ersatz.Problem: class HasSAT s where lastAtom f = sat $ \ (SAT a b c) -> fmap (\ a' -> SAT a' b c) (f a) formula f = sat $ \ (SAT a b c) -> fmap (\ b' -> SAT a b' c) (f b) stableMap f = sat $ \ (SAT a b c) -> SAT a b <$> f c
- Ersatz.Problem: formula :: HasSAT t_a875 => Lens' t_a875 Formula
+ Ersatz.Problem: formula :: HasSAT s => Lens' s Formula
- Ersatz.Problem: lastAtom :: HasSAT t_a875 => Lens' t_a875 Int
+ Ersatz.Problem: lastAtom :: HasSAT s => Lens' s Int
- Ersatz.Problem: sat :: HasSAT t_a875 => Lens' t_a875 SAT
+ Ersatz.Problem: sat :: HasSAT s => Lens' s SAT
- Ersatz.Problem: stableMap :: HasSAT t_a875 => Lens' t_a875 (HashMap (StableName ()) Literal)
+ Ersatz.Problem: stableMap :: HasSAT s => Lens' s (HashMap (StableName ()) Literal)
Files
- CHANGELOG.md +4/−0
- LICENSE +1/−1
- ersatz.cabal +2/−2
- src/Ersatz.hs +4/−1
- src/Ersatz/Bit.hs +1/−1
- src/Ersatz/Bits.hs +1/−1
- src/Ersatz/Decoding.hs +1/−1
- src/Ersatz/Encoding.hs +1/−1
- src/Ersatz/Equatable.hs +1/−1
- src/Ersatz/Internal/Formula.hs +1/−1
- src/Ersatz/Internal/Literal.hs +1/−1
- src/Ersatz/Internal/Parser.hs +1/−1
- src/Ersatz/Internal/StableName.hs +1/−1
- src/Ersatz/Problem.hs +14/−3
- src/Ersatz/Solution.hs +1/−1
- src/Ersatz/Solver.hs +1/−1
- src/Ersatz/Solver/Common.hs +1/−1
- src/Ersatz/Solver/DepQBF.hs +1/−1
- src/Ersatz/Solver/Minisat.hs +1/−1
- src/Ersatz/Variable.hs +1/−1
CHANGELOG.md view
@@ -1,3 +1,7 @@+0.2.5.1+-------+* Slightly faster builds due to dropping the need for `template-haskell`.+ 0.2.5 ----- * Support for GHC 7.8 and `lens` 4.x
LICENSE view
@@ -1,4 +1,4 @@-Copyright © 2010-2013 Edward Kmett+Copyright © 2010-2014 Edward Kmett Copyright © 2013 Johan Kiviniemi All rights reserved.
ersatz.cabal view
@@ -1,10 +1,10 @@ name: ersatz-version: 0.2.5+version: 0.2.5.1 license: BSD3 license-file: LICENSE author: Edward A. Kmett, Johan Kiviniemi maintainer: Edward A. Kmett <ekmett@gmail.com>-copyright: © 2010-2013 Edward Kmett, © 2013 Johan Kiviniemi+copyright: © 2010-2014 Edward Kmett, © 2013 Johan Kiviniemi stability: experimental homepage: http://github.com/ekmett/ersatz bug-reports: http://github.com/ekmett/ersatz/issues
src/Ersatz.hs view
@@ -1,6 +1,7 @@+{-# LANGUAGE CPP #-} -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental@@ -29,4 +30,6 @@ import Ersatz.Solver import Ersatz.Variable +#ifdef HLINT {-# ANN module "HLint: ignore Use import/export shortcut" #-}+#endif
src/Ersatz/Bit.hs view
@@ -11,7 +11,7 @@ {-# OPTIONS_HADDOCK not-home #-} -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental
src/Ersatz/Bits.hs view
@@ -4,7 +4,7 @@ {-# LANGUAGE Safe #-} -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental
src/Ersatz/Decoding.hs view
@@ -3,7 +3,7 @@ {-# LANGUAGE Safe #-} -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental
src/Ersatz/Encoding.hs view
@@ -2,7 +2,7 @@ {-# LANGUAGE TypeFamilies #-} -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental
src/Ersatz/Equatable.hs view
@@ -12,7 +12,7 @@ {-# OPTIONS_HADDOCK not-home #-} -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental
src/Ersatz/Internal/Formula.hs view
@@ -11,7 +11,7 @@ {-# OPTIONS_HADDOCK not-home #-} -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental
src/Ersatz/Internal/Literal.hs view
@@ -2,7 +2,7 @@ {-# LANGUAGE Trustworthy #-} -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental
src/Ersatz/Internal/Parser.hs view
@@ -1,6 +1,6 @@ -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental
src/Ersatz/Internal/StableName.hs view
@@ -1,7 +1,7 @@ {-# OPTIONS_HADDOCK not-home #-} -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental
src/Ersatz/Problem.hs view
@@ -4,7 +4,6 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE TypeOperators #-}-{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-}@@ -20,7 +19,7 @@ #endif -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental@@ -87,8 +86,20 @@ , _stableMap :: !(HashMap (StableName ()) Literal) -- ^ a mapping used during 'Bit' expansion } deriving Typeable -makeLensesWith ?? ''SAT $ classyRules & lensClass.mapped ?~ ("HasSAT","sat")+class HasSAT s where+ sat :: Lens' s SAT + lastAtom :: Lens' s Int+ lastAtom f = sat $ \ (SAT a b c) -> fmap (\a' -> SAT a' b c) (f a)++ formula :: Lens' s Formula+ formula f = sat $ \ (SAT a b c) -> fmap (\b' -> SAT a b' c) (f b)++ stableMap :: Lens' s (HashMap (StableName ()) Literal)+ stableMap f = sat $ \ (SAT a b c) -> SAT a b <$> f c++instance HasSAT SAT where+ sat = id instance Show SAT where showsPrec p bf = showParen (p > 10)
src/Ersatz/Solution.hs view
@@ -4,7 +4,7 @@ {-# LANGUAGE Trustworthy #-} -- Safe if lens is Safe -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental
src/Ersatz/Solver.hs view
@@ -1,6 +1,6 @@ -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental
src/Ersatz/Solver/Common.hs view
@@ -1,6 +1,6 @@ -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental
src/Ersatz/Solver/DepQBF.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE Trustworthy #-} -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental
src/Ersatz/Solver/Minisat.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE Trustworthy #-} -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental
src/Ersatz/Variable.hs view
@@ -5,7 +5,7 @@ {-# LANGUAGE UndecidableInstances #-} -------------------------------------------------------------------- -- |--- Copyright : © Edward Kmett 2010-2013, Johan Kiviniemi 2013+-- Copyright : © Edward Kmett 2010-2014, Johan Kiviniemi 2013 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmail.com> -- Stability : experimental