add functor instance of product-tree.

This commit is contained in:
Kei Hibino 2016-08-16 15:14:29 +09:00
parent 0e95261200
commit 8f1232e73d

View File

@ -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