1{-# language DataKinds #-}
2{-# language StandaloneKindSignatures #-}
3{-# language TypeFamilies #-}
4{-# language UndecidableInstances #-}
6-- | This module implements some machinery for implementing methods of the
7-- 'Table' class for a particular special (but important) class of polymorphic
10-- This special case is characterised by a @newtype@ wrapper around a bare
11-- 'HTable' which is constructed by applying a type family to the polymorphic
14-- Examples of this class of @Table@ include @ListTable@ and @NonEmptyTable@.
16-- The tricky part about implementing @Table@ for these types is 'reify' and
17-- 'unreify'. There is no guarantee in general that @'Unreify' a@ is itself
18-- a @Table@, let alone a @Table@ with the same 'Columns' as @a@
19-- (e.g., @Unreify (AColumn Result Bool) = Bool@, and @Bool@ is not a
22module Rel8.Table.Unreify
28import Data.Kind ( Constraint, Type )
32import qualified Rel8.Schema.Kind as K
33import Rel8.Schema.Reify ( Reify )
34import Rel8.Table ( Table, Columns, Unreify )
37type Unreifiable :: K.Context -> Type -> Constraint
38type family Unreifiable context a where
39 Unreifiable (Reify context) a =
40 ( Table context (Unreify a)
41 , Columns a ~ Columns (Unreify a)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list