graphula 2.1.0.1 → 2.1.1.0
raw patch · 2 files changed
+3/−4 lines, 2 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Graphula: ($dmdependsOn) :: (HasDependencies a, HasEot a, HasEot (Dependencies a), GHasDependencies (Proxy a) (Proxy (Dependencies a)) (Eot a) (Eot (Dependencies a))) => a -> Dependencies a -> a
+ Graphula.Dependencies: ($dmdependsOn) :: (HasDependencies a, HasEot a, HasEot (Dependencies a), GHasDependencies (Proxy a) (Proxy (Dependencies a)) (Eot a) (Eot (Dependencies a))) => a -> Dependencies a -> a
+ Graphula.Key: --
+ Graphula.Key: -- </pre>
+ Graphula.Key: -- <a>Key</a>
+ Graphula.Key: -- <pre>
+ Graphula.Key: -- <tt>Dependencies</tt>.
+ Graphula.Key: -- For example, given:
+ Graphula.Key: -- The type class instances currently scale up 4-tuple
+ Graphula.Key: -- This type-class allows you to do:
+ Graphula.Key: -- You would have to do,
+ Graphula.Key: -- course <- <tt>node</tt> @Course (<a>keys</a> (school, teacher)) mempty
+ Graphula.Key: -- instance <tt>HasDependencies</tt> Course where
+ Graphula.Key: -- type Dependencies Course = (SchoolId, TeacherId)
+ Graphula.Key: -- | Type-class for turning a tuple of <a>Entity</a> into a tuple of
+ Graphula.Key: class EntityKeys a where {
+ Graphula.Key: }
- Graphula: class (GenerateKeyInternal (KeySource a) a, KeyConstraint (KeySource a) a, InsertWithPossiblyRequiredKey (KeySourceTypeInternalM (KeySource a)), InsertConstraint (KeySourceTypeInternalM (KeySource a)) a) => GenerateKey a
+ Graphula: class (GenerateKeyInternal KeySource a a, KeyConstraint KeySource a a, InsertWithPossiblyRequiredKey KeySourceTypeInternalM KeySource a, InsertConstraint KeySourceTypeInternalM KeySource a a) => GenerateKey a
- Graphula: class MonadGraphulaBackend m where {
+ Graphula: class MonadGraphulaBackend (m :: Type -> Type) where {
- Graphula: class MonadGraphulaFrontend m
+ Graphula: class MonadGraphulaFrontend (m :: Type -> Type)
- Graphula: data GraphulaIdempotentT m a
+ Graphula: data GraphulaIdempotentT (m :: Type -> Type) a
- Graphula: data GraphulaLoggedT m a
+ Graphula: data GraphulaLoggedT (m :: Type -> Type) a
- Graphula: data GraphulaT n m a
+ Graphula: data GraphulaT (n :: Type -> Type) (m :: Type -> Type) a
- Graphula: dependsOn :: (HasDependencies a, HasEot a, HasEot (Dependencies a), GHasDependencies (Proxy a) (Proxy (Dependencies a)) (Eot a) (Eot (Dependencies a))) => a -> Dependencies a -> a
+ Graphula: dependsOn :: HasDependencies a => a -> Dependencies a -> a
- Graphula: runGraphulaT :: MonadUnliftIO m => Maybe Int -> (forall b. ReaderT SqlBackend n b -> m b) -> GraphulaT n m a -> m a
+ Graphula: runGraphulaT :: forall m (n :: Type -> Type) a. MonadUnliftIO m => Maybe Int -> (forall b. () => ReaderT SqlBackend n b -> m b) -> GraphulaT n m a -> m a
- Graphula: type Dependencies _a = ();
+ Graphula: type Dependencies a = ();
- Graphula: type GraphulaNode m a = (HasDependencies a, Logging m a, PersistEntityBackend a ~ SqlBackend, PersistEntity a, Typeable a, Arbitrary a)
+ Graphula: type GraphulaNode (m :: Type -> Type) a = (HasDependencies a, Logging m a, PersistEntityBackend a ~ SqlBackend, PersistEntity a, Typeable a, Arbitrary a)
- Graphula: type KeySource _a = 'SourceDefault;
+ Graphula: type KeySource a = 'SourceDefault;
- Graphula: type Logging m :: Type -> Constraint;
+ Graphula: type Logging (m :: Type -> Type) :: Type -> Constraint;
- Graphula: type MonadGraphula m = (Monad m, MonadIO m, MonadGraphulaBackend m, MonadGraphulaFrontend m)
+ Graphula: type MonadGraphula (m :: Type -> Type) = (Monad m, MonadIO m, MonadGraphulaBackend m, MonadGraphulaFrontend m)
- Graphula: type family GraphulaContext (m :: Type -> Type) (ts :: [Type]) :: Constraint
+ Graphula: type family GraphulaContext (m :: Type -> Type) (ts :: [Type])
- Graphula.Class: class (SafeToInsert a) => GraphulaSafeToInsert a
+ Graphula.Class: class SafeToInsert a => GraphulaSafeToInsert a
- Graphula.Class: class MonadGraphulaBackend m where {
+ Graphula.Class: class MonadGraphulaBackend (m :: Type -> Type) where {
- Graphula.Class: class MonadGraphulaFrontend m
+ Graphula.Class: class MonadGraphulaFrontend (m :: Type -> Type)
- Graphula.Class: type Logging m :: Type -> Constraint;
+ Graphula.Class: type Logging (m :: Type -> Type) :: Type -> Constraint;
- Graphula.Class: type MonadGraphula m = (Monad m, MonadIO m, MonadGraphulaBackend m, MonadGraphulaFrontend m)
+ Graphula.Class: type MonadGraphula (m :: Type -> Type) = (Monad m, MonadIO m, MonadGraphulaBackend m, MonadGraphulaFrontend m)
- Graphula.Dependencies: class (GenerateKeyInternal (KeySource a) a, KeyConstraint (KeySource a) a, InsertWithPossiblyRequiredKey (KeySourceTypeInternalM (KeySource a)), InsertConstraint (KeySourceTypeInternalM (KeySource a)) a) => GenerateKey a
+ Graphula.Dependencies: class (GenerateKeyInternal KeySource a a, KeyConstraint KeySource a a, InsertWithPossiblyRequiredKey KeySourceTypeInternalM KeySource a, InsertConstraint KeySourceTypeInternalM KeySource a a) => GenerateKey a
- Graphula.Dependencies: dependsOn :: (HasDependencies a, HasEot a, HasEot (Dependencies a), GHasDependencies (Proxy a) (Proxy (Dependencies a)) (Eot a) (Eot (Dependencies a))) => a -> Dependencies a -> a
+ Graphula.Dependencies: dependsOn :: HasDependencies a => a -> Dependencies a -> a
- Graphula.Dependencies: generateKey :: (GenerateKeyInternal s a, KeyConstraint s a) => Gen (KeySourceTypeInternalM s (Key a))
+ Graphula.Dependencies: generateKey :: GenerateKeyInternal s a => Gen (KeySourceTypeInternalM s (Key a))
- Graphula.Dependencies: type Dependencies _a = ();
+ Graphula.Dependencies: type Dependencies a = ();
- Graphula.Dependencies: type InsertConstraint requirement :: Type -> Constraint;
+ Graphula.Dependencies: type InsertConstraint (requirement :: Type -> Type) :: Type -> Constraint;
- Graphula.Dependencies: type KeyForInsert record = KeyRequirementForInsertInternal record (Key record)
+ Graphula.Dependencies: type KeyForInsert record = KeyRequirementForInsertInternal record Key record
- Graphula.Dependencies: type KeyRequirementForInsert record = KeySourceTypeM (KeySource record)
+ Graphula.Dependencies: type KeyRequirementForInsert record = KeySourceTypeM KeySource record
- Graphula.Dependencies: type KeySource _a = 'SourceDefault;
+ Graphula.Dependencies: type KeySource a = 'SourceDefault;
- Graphula.Idempotent: data GraphulaIdempotentT m a
+ Graphula.Idempotent: data GraphulaIdempotentT (m :: Type -> Type) a
- Graphula.Key: type Keys a
+ Graphula.Key: type Keys a;
- Graphula.Logged: data GraphulaLoggedT m a
+ Graphula.Logged: data GraphulaLoggedT (m :: Type -> Type) a
Files
- graphula.cabal +1/−1
- src/Graphula/Key.hs +2/−3
graphula.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 name: graphula-version: 2.1.0.1+version: 2.1.1.0 license: MIT license-file: LICENSE maintainer: Freckle Education
src/Graphula/Key.hs view
@@ -6,9 +6,8 @@ -- | Convenience functions for working with 'Key' dependencies module Graphula.Key- ( onlyKey- , keys- , Keys+ ( EntityKeys(..)+ , onlyKey ) where import Database.Persist