1{-# language DataKinds #-}
3{-# language LambdaCase #-}
4{-# language StandaloneKindSignatures #-}
5{-# language TypeFamilies #-}
6{-# language TypeOperators #-}
8module Rel8.Schema.Context.Abstract
10 , Virtual(..), virtualOrResult, exclusivity
15import Data.Kind ( Constraint, Type )
16import Data.Type.Equality ( (:~:)( Refl) )
20import Rel8.Aggregate ( Aggregate )
21import Rel8.Expr ( Expr )
22import Rel8.Kind.Context ( SContext(..) )
23import qualified Rel8.Schema.Kind as K
24import Rel8.Schema.Name ( Name )
25import Rel8.Schema.Reify ( Reify )
26import Rel8.Schema.Result ( Result, NotResult( NotResult ) )
29type Abstract :: K.Context -> Constraint
30type family Abstract context where
31 Abstract (Reify context) = IsVirtual context
35type IsVirtual :: K.Context -> Constraint
36class IsVirtual context where
37 virtual :: Virtual context
40instance IsVirtual Aggregate where
44instance IsVirtual Expr where
48instance IsVirtual Name where
52instance IsVirtual (Reify context) where
56type Virtual :: K.Context -> Type
57data Virtual context where
58 VAggregate :: Virtual Aggregate
61 VReify :: Virtual (Reify context)
66 -> Either (context :~: Result) (Virtual context)
67virtualOrResult = \case
68 SAggregate -> Right VAggregate
72 SReify _ -> Right VReify
75exclusivity :: Virtual context -> NotResult context
77 VAggregate -> NotResult
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