graphula-2.0.1.1: A simple interface for generating persistent data and linking its dependencies
Safe HaskellNone
LanguageHaskell2010

Graphula.Dependencies.Generic

Description

Machinery for the Generic-based HasDependencies instance

Documentation

class GHasDependencies nodeTyProxy depsTyProxy node deps where Source #

Methods

genericDependsOn :: nodeTyProxy -> depsTyProxy -> node -> deps -> node Source #

Instances

Instances details
(TypeError ('Text "Use \8216()\8217 instead of \8216Void\8217 for datatypes with no dependencies in" :$$: DependenciesTypeInstance nodeTy depsTy) :: Constraint) => GHasDependencies (Proxy nodeTy) (Proxy depsTy) node Void Source # 
Instance details

Defined in Graphula.Dependencies.Generic

Methods

genericDependsOn :: Proxy nodeTy -> Proxy depsTy -> node -> Void -> node Source #

(TypeError ('Text "A datatype with no constructors can't use the dependencies in" :$$: DependenciesTypeInstance nodeTy depsTy) :: Constraint) => GHasDependencies (Proxy nodeTy) (Proxy depsTy) Void (Either deps rest) Source # 
Instance details

Defined in Graphula.Dependencies.Generic

Methods

genericDependsOn :: Proxy nodeTy -> Proxy depsTy -> Void -> Either deps rest -> Void Source #

GHasDependencies (Proxy nodeTy) (Proxy depsTy) Void (Either () Void) Source # 
Instance details

Defined in Graphula.Dependencies.Generic

Methods

genericDependsOn :: Proxy nodeTy -> Proxy depsTy -> Void -> Either () Void -> Void Source #

(TypeError ('Text "Cannot automatically find dependencies for sum type or use a sum type as a dependency in" :$$: DependenciesTypeInstance nodeTy depsTy) :: Constraint) => GHasDependencies (Proxy nodeTy) (Proxy depsTy) (Either left1 (Either right1 rest1)) (Either left2 (Either right2 rest2)) Source # 
Instance details

Defined in Graphula.Dependencies.Generic

Methods

genericDependsOn :: Proxy nodeTy -> Proxy depsTy -> Either left1 (Either right1 rest1) -> Either left2 (Either right2 rest2) -> Either left1 (Either right1 rest1) Source #

(TypeError ('Text "Cannot automatically use a sum type as dependencies in" :$$: DependenciesTypeInstance nodeTy depsTy) :: Constraint) => GHasDependencies (Proxy nodeTy) (Proxy depsTy) (Either node Void) (Either left (Either right rest)) Source # 
Instance details

Defined in Graphula.Dependencies.Generic

Methods

genericDependsOn :: Proxy nodeTy -> Proxy depsTy -> Either node Void -> Either left (Either right rest) -> Either node Void Source #

(TypeError ('Text "Cannot automatically find dependencies for sum type in" :$$: DependenciesTypeInstance nodeTy depsTy) :: Constraint) => GHasDependencies (Proxy nodeTy) (Proxy depsTy) (Either left (Either right rest)) (Either deps Void) Source # 
Instance details

Defined in Graphula.Dependencies.Generic

Methods

genericDependsOn :: Proxy nodeTy -> Proxy depsTy -> Either left (Either right rest) -> Either deps Void -> Either left (Either right rest) Source #

(FindMatches nodeTy depsTy node deps ~ fields, GHasDependenciesRecursive (Proxy fields) node deps) => GHasDependencies (Proxy nodeTy) (Proxy depsTy) (Either node Void) (Either deps Void) Source # 
Instance details

Defined in Graphula.Dependencies.Generic

Methods

genericDependsOn :: Proxy nodeTy -> Proxy depsTy -> Either node Void -> Either deps Void -> Either node Void Source #