on 00a36f5 help sign in
rel8/src/Rel8/Schema/Spec/ConstrainDBType.hs
34 lines 796 B history raw
1{-# language ConstraintKinds #-}
2{-# language DataKinds #-}
3{-# language FlexibleInstances #-}
4{-# language MultiParamTypeClasses #-}
5{-# language QuantifiedConstraints #-}
6{-# language StandaloneKindSignatures #-}
7{-# language TypeFamilies #-}
8{-# language UndecidableInstances #-}
10module Rel8.Schema.Spec.ConstrainDBType
11 ( ConstrainDBType
12 )
13where
15-- base
16import Data.Kind ( Constraint, Type )
17import Prelude ()
19-- rel8
20import Rel8.Schema.Spec ( Spec( Spec ) )
23type ConstrainDBType :: (Type -> Constraint) -> Spec -> Constraint
24class
25 ( forall labels necessity db a. ()
26 => (spec ~ 'Spec labels necessity db a)
27 => constraint db
28 )
29 => ConstrainDBType constraint spec
30instance
31 ( spec ~ 'Spec labels necessity db a
32 , constraint db
33 )
34 => ConstrainDBType constraint spec