packages feed

unique-logic 0.4.0.1 → 0.4.0.2

raw patch · 5 files changed

+7/−17 lines, 5 filesdep ~semigroupsPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: semigroups

API changes (from Hackage documentation)

- UniqueLogic.ST.Example.Label: type Variable s = Variable Assigns s (Ignore T)
+ UniqueLogic.ST.Example.Label: type Variable s = Variable Assigns s Ignore T
- UniqueLogic.ST.Example.Verify: Track :: ExceptionalT Exception (WriterT Assigns m) a -> Track m a
+ UniqueLogic.ST.Example.Verify: Track :: ExceptionalT Exception (WriterT Assigns m) a -> Track (m :: Type -> Type) a
- UniqueLogic.ST.Example.Verify: [runTrack] :: Track m a -> ExceptionalT Exception (WriterT Assigns m) a
+ UniqueLogic.ST.Example.Verify: [runTrack] :: Track (m :: Type -> Type) a -> ExceptionalT Exception (WriterT Assigns m) a
- UniqueLogic.ST.Example.Verify: inconsistency :: Monad m => Name -> TrackedNumber Rational -> TrackedNumber Rational -> Wrap Track m ()
+ UniqueLogic.ST.Example.Verify: inconsistency :: forall (m :: Type -> Type). Monad m => Name -> TrackedNumber Rational -> TrackedNumber Rational -> Wrap Track m ()
- UniqueLogic.ST.Example.Verify: newtype Track m a
+ UniqueLogic.ST.Example.Verify: newtype Track (m :: Type -> Type) a
- UniqueLogic.ST.Example.Verify: type Variable s = Variable Track s (TrackedNumber Rational)
+ UniqueLogic.ST.Example.Verify: type Variable s = Variable Track s TrackedNumber Rational
- UniqueLogic.ST.Expression: (=!=) :: C w => T w s a -> T w s a -> T w s a
+ UniqueLogic.ST.Expression: (=!=) :: forall (w :: (Type -> Type) -> Type -> Type) s a. C w => T w s a -> T w s a -> T w s a
- UniqueLogic.ST.Expression: (=:=) :: C w => T w s a -> T w s a -> T w s ()
+ UniqueLogic.ST.Expression: (=:=) :: forall (w :: (Type -> Type) -> Type -> Type) s a. C w => T w s a -> T w s a -> T w s ()
- UniqueLogic.ST.Expression: arg :: T w s a -> Apply w s (Variable w s a)
+ UniqueLogic.ST.Expression: arg :: forall (w :: (Type -> Type) -> Type -> Type) s a. T w s a -> Apply w s (Variable w s a)
- UniqueLogic.ST.Expression: constant :: (C w, C a) => a -> T w s a
+ UniqueLogic.ST.Expression: constant :: forall (w :: (Type -> Type) -> Type -> Type) a s. (C w, C a) => a -> T w s a
- UniqueLogic.ST.Expression: data Apply w s f
+ UniqueLogic.ST.Expression: data Apply (w :: Type -> Type -> Type -> Type) s f
- UniqueLogic.ST.Expression: data T w s a
+ UniqueLogic.ST.Expression: data T (w :: Type -> Type -> Type -> Type) s a
- UniqueLogic.ST.Expression: fromRule1 :: (C w, C a) => (Variable w s a -> T w s ()) -> T w s a
+ UniqueLogic.ST.Expression: fromRule1 :: forall (w :: (Type -> Type) -> Type -> Type) a s. (C w, C a) => (Variable w s a -> T w s ()) -> T w s a
- UniqueLogic.ST.Expression: fromRule2 :: (C w, C b) => (Variable w s a -> Variable w s b -> T w s ()) -> T w s a -> T w s b
+ UniqueLogic.ST.Expression: fromRule2 :: forall (w :: (Type -> Type) -> Type -> Type) b s a. (C w, C b) => (Variable w s a -> Variable w s b -> T w s ()) -> T w s a -> T w s b
- UniqueLogic.ST.Expression: fromRule3 :: (C w, C c) => (Variable w s a -> Variable w s b -> Variable w s c -> T w s ()) -> T w s a -> T w s b -> T w s c
+ UniqueLogic.ST.Expression: fromRule3 :: forall (w :: (Type -> Type) -> Type -> Type) c s a b. (C w, C c) => (Variable w s a -> Variable w s b -> Variable w s c -> T w s ()) -> T w s a -> T w s b -> T w s c
- UniqueLogic.ST.Expression: fromVariable :: Variable w s a -> T w s a
+ UniqueLogic.ST.Expression: fromVariable :: forall (w :: (Type -> Type) -> Type -> Type) s a. Variable w s a -> T w s a
- UniqueLogic.ST.Expression: max :: (C w, Ord a, C a) => T w s a -> T w s a -> T w s a
+ UniqueLogic.ST.Expression: max :: forall (w :: (Type -> Type) -> Type -> Type) a s. (C w, Ord a, C a) => T w s a -> T w s a -> T w s a
- UniqueLogic.ST.Expression: maximum :: (C w, Ord a, C a) => [T w s a] -> T w s a
+ UniqueLogic.ST.Expression: maximum :: forall (w :: (Type -> Type) -> Type -> Type) a s. (C w, Ord a, C a) => [T w s a] -> T w s a
- UniqueLogic.ST.Expression: pair :: (C w, C a, C b) => T w s a -> T w s b -> T w s (a, b)
+ UniqueLogic.ST.Expression: pair :: forall (w :: (Type -> Type) -> Type -> Type) a b s. (C w, C a, C b) => T w s a -> T w s b -> T w s (a, b)
- UniqueLogic.ST.Expression: runApply :: (C w, C a) => Apply w s (Variable w s a -> T w s ()) -> T w s a
+ UniqueLogic.ST.Expression: runApply :: forall (w :: (Type -> Type) -> Type -> Type) a s. (C w, C a) => Apply w s (Variable w s a -> T w s ()) -> T w s a
- UniqueLogic.ST.Expression: sqr :: (C w, C a, Floating a) => T w s a -> T w s a
+ UniqueLogic.ST.Expression: sqr :: forall (w :: (Type -> Type) -> Type -> Type) a s. (C w, C a, Floating a) => T w s a -> T w s a
- UniqueLogic.ST.Expression: sqrt :: (C w, C a, Floating a) => T w s a -> T w s a
+ UniqueLogic.ST.Expression: sqrt :: forall (w :: (Type -> Type) -> Type -> Type) a s. (C w, C a, Floating a) => T w s a -> T w s a
- UniqueLogic.ST.MonadTrans: Wrap :: Const (t m a) (m a) -> Wrap t m a
+ UniqueLogic.ST.MonadTrans: Wrap :: Const (t m a) (m a) -> Wrap (t :: (Type -> Type) -> Type -> Type) (m :: Type -> Type) a
- UniqueLogic.ST.MonadTrans: bind :: (C t, Monad m) => t m a -> (a -> t m b) -> t m b
+ UniqueLogic.ST.MonadTrans: bind :: forall (m :: Type -> Type) a b. (C t, Monad m) => t m a -> (a -> t m b) -> t m b
- UniqueLogic.ST.MonadTrans: class MonadTrans t => C t
+ UniqueLogic.ST.MonadTrans: class MonadTrans t => C (t :: Type -> Type -> Type -> Type)
- UniqueLogic.ST.MonadTrans: lift :: (C t, Monad m) => m a -> Wrap t m a
+ UniqueLogic.ST.MonadTrans: lift :: forall (t :: (Type -> Type) -> Type -> Type) m a. (C t, Monad m) => m a -> Wrap t m a
- UniqueLogic.ST.MonadTrans: newtype Wrap t m a
+ UniqueLogic.ST.MonadTrans: newtype Wrap (t :: Type -> Type -> Type -> Type) (m :: Type -> Type) a
- UniqueLogic.ST.MonadTrans: point :: (C t, Monad m) => a -> t m a
+ UniqueLogic.ST.MonadTrans: point :: forall (m :: Type -> Type) a. (C t, Monad m) => a -> t m a
- UniqueLogic.ST.MonadTrans: unwrap :: Wrap t m a -> t m a
+ UniqueLogic.ST.MonadTrans: unwrap :: forall t (m :: Type -> Type) a. Wrap t m a -> t m a
- UniqueLogic.ST.MonadTrans: wrap :: t m a -> Wrap t m a
+ UniqueLogic.ST.MonadTrans: wrap :: forall t (m :: Type -> Type) a. t m a -> Wrap t m a
- UniqueLogic.ST.Rule: add :: (Num a, C w) => Variable w s a -> Variable w s a -> Variable w s a -> T w s ()
+ UniqueLogic.ST.Rule: add :: forall a (w :: (Type -> Type) -> Type -> Type) s. (Num a, C w) => Variable w s a -> Variable w s a -> Variable w s a -> T w s ()
- UniqueLogic.ST.Rule: equ :: C w => Variable w s a -> Variable w s a -> T w s ()
+ UniqueLogic.ST.Rule: equ :: forall (w :: (Type -> Type) -> Type -> Type) s a. C w => Variable w s a -> Variable w s a -> T w s ()
- UniqueLogic.ST.Rule: generic2 :: C w => (b -> a) -> (a -> b) -> Variable w s a -> Variable w s b -> T w s ()
+ UniqueLogic.ST.Rule: generic2 :: forall (w :: (Type -> Type) -> Type -> Type) b a s. C w => (b -> a) -> (a -> b) -> Variable w s a -> Variable w s b -> T w s ()
- UniqueLogic.ST.Rule: generic3 :: C w => (b -> c -> a) -> (c -> a -> b) -> (a -> b -> c) -> Variable w s a -> Variable w s b -> Variable w s c -> T w s ()
+ UniqueLogic.ST.Rule: generic3 :: forall (w :: (Type -> Type) -> Type -> Type) b c a s. C w => (b -> c -> a) -> (c -> a -> b) -> (a -> b -> c) -> Variable w s a -> Variable w s b -> Variable w s c -> T w s ()
- UniqueLogic.ST.Rule: max :: (Ord a, C w) => Variable w s a -> Variable w s a -> Variable w s a -> T w s ()
+ UniqueLogic.ST.Rule: max :: forall a (w :: (Type -> Type) -> Type -> Type) s. (Ord a, C w) => Variable w s a -> Variable w s a -> Variable w s a -> T w s ()
- UniqueLogic.ST.Rule: mul :: (Fractional a, C w) => Variable w s a -> Variable w s a -> Variable w s a -> T w s ()
+ UniqueLogic.ST.Rule: mul :: forall a (w :: (Type -> Type) -> Type -> Type) s. (Fractional a, C w) => Variable w s a -> Variable w s a -> Variable w s a -> T w s ()
- UniqueLogic.ST.Rule: pair :: C w => Variable w s a -> Variable w s b -> Variable w s (a, b) -> T w s ()
+ UniqueLogic.ST.Rule: pair :: forall (w :: (Type -> Type) -> Type -> Type) s a b. C w => Variable w s a -> Variable w s b -> Variable w s (a, b) -> T w s ()
- UniqueLogic.ST.Rule: pow :: (Floating a, C w) => Variable w s a -> Variable w s a -> Variable w s a -> T w s ()
+ UniqueLogic.ST.Rule: pow :: forall a (w :: (Type -> Type) -> Type -> Type) s. (Floating a, C w) => Variable w s a -> Variable w s a -> Variable w s a -> T w s ()
- UniqueLogic.ST.Rule: square :: (Floating a, C w) => Variable w s a -> Variable w s a -> T w s ()
+ UniqueLogic.ST.Rule: square :: forall a (w :: (Type -> Type) -> Type -> Type) s. (Floating a, C w) => Variable w s a -> Variable w s a -> T w s ()
- UniqueLogic.ST.System: arg :: Variable w s a -> Apply w s a
+ UniqueLogic.ST.System: arg :: forall (w :: (Type -> Type) -> Type -> Type) s a. Variable w s a -> Apply w s a
- UniqueLogic.ST.System: assignment2 :: C w => (a -> b) -> Variable w s a -> Variable w s b -> T w s ()
+ UniqueLogic.ST.System: assignment2 :: forall (w :: (Type -> Type) -> Type -> Type) a b s. C w => (a -> b) -> Variable w s a -> Variable w s b -> T w s ()
- UniqueLogic.ST.System: assignment3 :: C w => (a -> b -> c) -> Variable w s a -> Variable w s b -> Variable w s c -> T w s ()
+ UniqueLogic.ST.System: assignment3 :: forall (w :: (Type -> Type) -> Type -> Type) a b c s. C w => (a -> b -> c) -> Variable w s a -> Variable w s b -> Variable w s c -> T w s ()
- UniqueLogic.ST.System: break :: (Fragile t, Monad m) => Wrap t m a
+ UniqueLogic.ST.System: break :: forall (m :: Type -> Type) a. (Fragile t, Monad m) => Wrap t m a
- UniqueLogic.ST.System: class C w => C w
+ UniqueLogic.ST.System: class C w => C (w :: Type -> Type -> Type -> Type)
- UniqueLogic.ST.System: class C t => Fragile t
+ UniqueLogic.ST.System: class C t => Fragile (t :: Type -> Type -> Type -> Type)
- UniqueLogic.ST.System: constant :: (C w, C a) => a -> T w s (Variable w s a)
+ UniqueLogic.ST.System: constant :: forall (w :: (Type -> Type) -> Type -> Type) a s. (C w, C a) => a -> T w s (Variable w s a)
- UniqueLogic.ST.System: data Apply w s a
+ UniqueLogic.ST.System: data Apply (w :: Type -> Type -> Type -> Type) s a
- UniqueLogic.ST.System: data T w s a
+ UniqueLogic.ST.System: data T (w :: Type -> Type -> Type -> Type) s a
- UniqueLogic.ST.System: data Variable w s a
+ UniqueLogic.ST.System: data Variable (w :: Type -> Type -> Type -> Type) s a
- UniqueLogic.ST.System: globalVariable :: (C w, C a) => SimpleUpdater w s a -> ST s (Variable w s a)
+ UniqueLogic.ST.System: globalVariable :: forall (w :: (Type -> Type) -> Type -> Type) a s. (C w, C a) => SimpleUpdater w s a -> ST s (Variable w s a)
- UniqueLogic.ST.System: localVariable :: (C w, C a) => T w s (Variable w s a)
+ UniqueLogic.ST.System: localVariable :: forall (w :: (Type -> Type) -> Type -> Type) a s. (C w, C a) => T w s (Variable w s a)
- UniqueLogic.ST.System: query :: Variable w s a -> ST s (Maybe a)
+ UniqueLogic.ST.System: query :: forall (w :: (Type -> Type) -> Type -> Type) s a. Variable w s a -> ST s (Maybe a)
- UniqueLogic.ST.System: queryForbid :: Variable w s (Forbid a) -> ST s (Maybe a)
+ UniqueLogic.ST.System: queryForbid :: forall (w :: (Type -> Type) -> Type -> Type) s a. Variable w s (Forbid a) -> ST s (Maybe a)
- UniqueLogic.ST.System: queryIgnore :: Variable w s (Ignore a) -> ST s (Maybe a)
+ UniqueLogic.ST.System: queryIgnore :: forall (w :: (Type -> Type) -> Type -> Type) s a. Variable w s (Ignore a) -> ST s (Maybe a)
- UniqueLogic.ST.System: queryVerify :: Variable w s (Verify a) -> ST s (Maybe a)
+ UniqueLogic.ST.System: queryVerify :: forall (w :: (Type -> Type) -> Type -> Type) s a. Variable w s (Verify a) -> ST s (Maybe a)
- UniqueLogic.ST.System: runApply :: C w => Apply w s a -> Variable w s a -> T w s ()
+ UniqueLogic.ST.System: runApply :: forall (w :: (Type -> Type) -> Type -> Type) s a. C w => Apply w s a -> Variable w s a -> T w s ()
- UniqueLogic.ST.System: simpleUpdate :: (C w, C a) => SimpleUpdater w s a
+ UniqueLogic.ST.System: simpleUpdate :: forall (w :: (Type -> Type) -> Type -> Type) a s. (C w, C a) => SimpleUpdater w s a
- UniqueLogic.ST.System: updateAndCheck :: (C w, C a) => (a -> a -> Wrap w (ST s) ()) -> Updater w s a
+ UniqueLogic.ST.System: updateAndCheck :: forall (w :: (Type -> Type) -> Type -> Type) a s. (C w, C a) => (a -> a -> Wrap w (ST s) ()) -> Updater w s a
- UniqueLogic.ST.System: updateIfNew :: (C w, C a) => Updater w s a
+ UniqueLogic.ST.System: updateIfNew :: forall (w :: (Type -> Type) -> Type -> Type) a s. (C w, C a) => Updater w s a
- UniqueLogic.ST.System.Label: arg :: Variable w s a -> Apply w s a
+ UniqueLogic.ST.System.Label: arg :: forall (w :: (Type -> Type) -> Type -> Type) s a. Variable w s a -> Apply w s a
- UniqueLogic.ST.System.Label: assignment2 :: C w => (a -> b) -> Variable w s a -> Variable w s b -> T w s ()
+ UniqueLogic.ST.System.Label: assignment2 :: forall (w :: (Type -> Type) -> Type -> Type) a b s. C w => (a -> b) -> Variable w s a -> Variable w s b -> T w s ()
- UniqueLogic.ST.System.Label: assignment3 :: C w => (a -> b -> c) -> Variable w s a -> Variable w s b -> Variable w s c -> T w s ()
+ UniqueLogic.ST.System.Label: assignment3 :: forall (w :: (Type -> Type) -> Type -> Type) a b c s. C w => (a -> b -> c) -> Variable w s a -> Variable w s b -> Variable w s c -> T w s ()
- UniqueLogic.ST.System.Label: constant :: (C w, C a) => a -> T w s (Variable w s a)
+ UniqueLogic.ST.System.Label: constant :: forall (w :: (Type -> Type) -> Type -> Type) a s. (C w, C a) => a -> T w s (Variable w s a)
- UniqueLogic.ST.System.Label: data Apply w s a
+ UniqueLogic.ST.System.Label: data Apply (w :: Type -> Type -> Type -> Type) s a
- UniqueLogic.ST.System.Label: localVariable :: (C w, C a) => T w s (Variable w s a)
+ UniqueLogic.ST.System.Label: localVariable :: forall (w :: (Type -> Type) -> Type -> Type) a s. (C w, C a) => T w s (Variable w s a)
- UniqueLogic.ST.System.Label: query :: Variable w s a -> ST s (Maybe a)
+ UniqueLogic.ST.System.Label: query :: forall (w :: (Type -> Type) -> Type -> Type) s a. Variable w s a -> ST s (Maybe a)
- UniqueLogic.ST.System.Label: queryForbid :: Variable w s (Forbid a) -> ST s (Maybe a)
+ UniqueLogic.ST.System.Label: queryForbid :: forall (w :: (Type -> Type) -> Type -> Type) s a. Variable w s (Forbid a) -> ST s (Maybe a)
- UniqueLogic.ST.System.Label: queryIgnore :: Variable w s (Ignore a) -> ST s (Maybe a)
+ UniqueLogic.ST.System.Label: queryIgnore :: forall (w :: (Type -> Type) -> Type -> Type) s a. Variable w s (Ignore a) -> ST s (Maybe a)
- UniqueLogic.ST.System.Label: queryVerify :: Variable w s (Verify a) -> ST s (Maybe a)
+ UniqueLogic.ST.System.Label: queryVerify :: forall (w :: (Type -> Type) -> Type -> Type) s a. Variable w s (Verify a) -> ST s (Maybe a)
- UniqueLogic.ST.System.Label: runApply :: C w => Apply w s a -> Variable w s a -> T w s ()
+ UniqueLogic.ST.System.Label: runApply :: forall (w :: (Type -> Type) -> Type -> Type) s a. C w => Apply w s a -> Variable w s a -> T w s ()
- UniqueLogic.ST.System.Label: type T w = T (WriterT w)
+ UniqueLogic.ST.System.Label: type T w = T WriterT w
- UniqueLogic.ST.System.Label: type Variable w = Variable (WriterT w)
+ UniqueLogic.ST.System.Label: type Variable w = Variable WriterT w
- UniqueLogic.ST.System.Simple: arg :: Variable w s a -> Apply w s a
+ UniqueLogic.ST.System.Simple: arg :: forall (w :: (Type -> Type) -> Type -> Type) s a. Variable w s a -> Apply w s a
- UniqueLogic.ST.System.Simple: assignment2 :: C w => (a -> b) -> Variable w s a -> Variable w s b -> T w s ()
+ UniqueLogic.ST.System.Simple: assignment2 :: forall (w :: (Type -> Type) -> Type -> Type) a b s. C w => (a -> b) -> Variable w s a -> Variable w s b -> T w s ()
- UniqueLogic.ST.System.Simple: assignment3 :: C w => (a -> b -> c) -> Variable w s a -> Variable w s b -> Variable w s c -> T w s ()
+ UniqueLogic.ST.System.Simple: assignment3 :: forall (w :: (Type -> Type) -> Type -> Type) a b c s. C w => (a -> b -> c) -> Variable w s a -> Variable w s b -> Variable w s c -> T w s ()
- UniqueLogic.ST.System.Simple: data Apply w s a
+ UniqueLogic.ST.System.Simple: data Apply (w :: Type -> Type -> Type -> Type) s a
- UniqueLogic.ST.System.Simple: runApply :: C w => Apply w s a -> Variable w s a -> T w s ()
+ UniqueLogic.ST.System.Simple: runApply :: forall (w :: (Type -> Type) -> Type -> Type) s a. C w => Apply w s a -> Variable w s a -> T w s ()
- UniqueLogic.ST.System.Simple: type T = T IdentityT
+ UniqueLogic.ST.System.Simple: type T = T IdentityT :: Type -> Type -> Type -> Type
- UniqueLogic.ST.System.Simple: type Variable s a = Variable IdentityT s (Ignore a)
+ UniqueLogic.ST.System.Simple: type Variable s a = Variable IdentityT :: Type -> Type -> Type -> Type s Ignore a

Files

src/UniqueLogic/ST/Example/Label.hs view
@@ -15,9 +15,6 @@ import Control.Monad.ST (ST, runST, ) import Control.Monad (liftM2, liftM3, ) -import qualified Prelude as P-import Prelude hiding (max, log)-   data Assign = Assign Term.Name Term.T
src/UniqueLogic/ST/Example/Rule.hs view
@@ -8,9 +8,6 @@ import Control.Monad.ST (runST, ) import Control.Monad (liftM4, ) -import qualified Prelude as P-import Prelude hiding (max)-  {- | > x=1
src/UniqueLogic/ST/Example/Verify.hs view
@@ -18,9 +18,6 @@ import Control.Monad (liftM, liftM2, ap, ) import Control.Applicative (Applicative, pure, (<*>), ) -import qualified Prelude as P-import Prelude hiding (max, log)-   data Assign = Assign Term.Name Term.T
src/UniqueLogic/ST/System.hs view
@@ -194,8 +194,7 @@    Variable w s a -> Variable w s b ->    T w s () assignment2 f (Variable _ al av) b =-   let update =-          varUpdate b $ fmap f $ readSTRefM av+   let update = varUpdate b $ fmap f $ readSTRefM av    in  lift $        modifySTRef al (update :) @@ -205,9 +204,7 @@    Variable w s a -> Variable w s b -> Variable w s c ->    T w s () assignment3 f (Variable _ al av) (Variable _ bl bv) c =-   let update =-          varUpdate c $-          liftM2 f (readSTRefM av) (readSTRefM bv)+   let update = varUpdate c $ liftM2 f (readSTRefM av) (readSTRefM bv)    in  lift $        modifySTRef al (update :) >>        modifySTRef bl (update :)
unique-logic.cabal view
@@ -1,6 +1,6 @@ Cabal-Version:    2.2 Name:             unique-logic-Version:          0.4.0.1+Version:          0.4.0.2 License:          BSD-3-Clause License-File:     LICENSE Author:           Henning Thielemann@@ -60,11 +60,13 @@     We demonstrate that in "UniqueLogic.ST.Example.Verify".   .   The package is purely Haskell 98.+  .+  For a variant using type families, see @unique-logic-tf@. Tested-With:       GHC==7.4.2 Build-Type:        Simple  Source-Repository this-  Tag:         0.4.0.1+  Tag:         0.4.0.2   Type:        darcs   Location:    https://hub.darcs.net/thielema/unique-logic/ @@ -106,7 +108,7 @@     QuickCheck >=2.4 && <3,     unique-logic,     non-empty >=0.0 && <0.4,-    semigroups >=0.1 && <1.0,+    semigroups >=0.1 && <1,     transformers,     utility-ht,     base