Skip to content

Commit

Permalink
Add Projection with machinery for generic construction
Browse files Browse the repository at this point in the history
This allows us to make Functors out of ListTable and NonEmptyTable, albeit in the category of projections, but this is still a useful feature.
  • Loading branch information
shane-circuithub committed Jul 5, 2021
1 parent f36c733 commit 1fb2f67
Show file tree
Hide file tree
Showing 14 changed files with 655 additions and 19 deletions.
4 changes: 4 additions & 0 deletions rel8.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ library
, base ^>= 4.14 || ^>=4.15
, bytestring
, case-insensitive
, categories
, comonad
, contravariant
, hasql ^>= 1.4.5.1
Expand Down Expand Up @@ -55,6 +56,8 @@ library
other-modules:
Rel8.Aggregate

Rel8.Category.Projection

Rel8.Column
Rel8.Column.ADT
Rel8.Column.Either
Expand Down Expand Up @@ -87,6 +90,7 @@ library
Rel8.Generic.Construction.ADT
Rel8.Generic.Construction.Record
Rel8.Generic.Map
Rel8.Generic.Projection
Rel8.Generic.Record
Rel8.Generic.Rel8able
Rel8.Generic.Table
Expand Down
6 changes: 6 additions & 0 deletions src/Rel8.hs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ module Rel8
, nullaryFunction
, binaryOperator

-- ** Projection
, Projection
, project

-- * Queries
, Query
, showQuery
Expand Down Expand Up @@ -278,6 +282,7 @@ import Prelude ()

-- rel8
import Rel8.Aggregate
import Rel8.Category.Projection
import Rel8.Column
import Rel8.Column.ADT
import Rel8.Column.Either
Expand All @@ -298,6 +303,7 @@ import Rel8.Expr.Ord
import Rel8.Expr.Order
import Rel8.Expr.Serialize
import Rel8.Expr.Sequence
import Rel8.Generic.Projection ()
import Rel8.Generic.Rel8able ( KRel8able, Rel8able )
import Rel8.Order
import Rel8.Query
Expand Down
Loading

0 comments on commit 1fb2f67

Please sign in to comment.