mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-11-29 14:45:51 +03:00
add functor instance of product-tree.
This commit is contained in:
parent
0e95261200
commit
8f1232e73d
@ -1,3 +1,5 @@
|
||||
{-# LANGUAGE DeriveFunctor #-}
|
||||
|
||||
-- |
|
||||
-- Module : Database.Relational.Query.Internal.Sub
|
||||
-- Copyright : 2015 Kei Hibino
|
||||
@ -82,10 +84,10 @@ type QueryRestrictionsBuilder = DList (Projection Context.Flat (Maybe Bool))
|
||||
data ProductTree rs
|
||||
= Leaf QS
|
||||
| Join !(Node rs) !(Node rs) !rs
|
||||
deriving Show
|
||||
deriving (Show, Functor)
|
||||
|
||||
-- | Product node. node attribute and product tree.
|
||||
data Node rs = Node !NodeAttr !(ProductTree rs) deriving Show
|
||||
data Node rs = Node !NodeAttr !(ProductTree rs) deriving (Show, Functor)
|
||||
|
||||
-- | Product tree specialized by 'SubQuery'.
|
||||
type QueryProduct = ProductTree QueryRestrictionsBuilder
|
||||
|
Loading…
Reference in New Issue
Block a user