Changes FactColumnType to use FactColumnKind datakind.
parent
29bafea95b
commit
6c87c59eb4
|
@ -3,6 +3,8 @@
|
||||||
{-# LANGUAGE GADTs #-}
|
{-# LANGUAGE GADTs #-}
|
||||||
{-# LANGUAGE Rank2Types #-}
|
{-# LANGUAGE Rank2Types #-}
|
||||||
{-# LANGUAGE StandaloneDeriving #-}
|
{-# LANGUAGE StandaloneDeriving #-}
|
||||||
|
{-# LANGUAGE DataKinds #-}
|
||||||
|
{-# LANGUAGE KindSignatures #-}
|
||||||
|
|
||||||
module Ringo.Types.Internal where
|
module Ringo.Types.Internal where
|
||||||
|
|
||||||
|
@ -78,23 +80,20 @@ data Fact = Fact
|
||||||
, factColumns :: ![FactColumn]
|
, factColumns :: ![FactColumn]
|
||||||
} deriving (Show)
|
} deriving (Show)
|
||||||
|
|
||||||
data FCTNone
|
data FactColumnKind = FCKNone | FCKTargetTable | FCKMaybeSourceColumn | FCKSourceColumn
|
||||||
data FCTTargetTable
|
|
||||||
data FCTMaybeSourceColumn
|
|
||||||
data FCTSourceColumn
|
|
||||||
|
|
||||||
data FactColumnType a where
|
data FactColumnType (a :: FactColumnKind) where
|
||||||
DimTime :: FactColumnType FCTNone
|
DimTime :: FactColumnType 'FCKNone
|
||||||
NoDimId :: FactColumnType FCTNone
|
NoDimId :: FactColumnType 'FCKNone
|
||||||
TenantId :: FactColumnType FCTNone
|
TenantId :: FactColumnType 'FCKNone
|
||||||
DimId :: { factColTargetTable :: !TableName } -> FactColumnType FCTTargetTable
|
DimId :: { factColTargetTable :: !TableName } -> FactColumnType 'FCKTargetTable
|
||||||
DimVal :: { factColTargetTable :: !TableName } -> FactColumnType FCTTargetTable
|
DimVal :: { factColTargetTable :: !TableName } -> FactColumnType 'FCKTargetTable
|
||||||
FactCount :: { factColMaybeSourceColumn :: !(Maybe ColumnName) } -> FactColumnType FCTMaybeSourceColumn
|
FactCount :: { factColMaybeSourceColumn :: !(Maybe ColumnName) } -> FactColumnType 'FCKMaybeSourceColumn
|
||||||
FactCountDistinct :: { factColMaybeSourceColumn :: !(Maybe ColumnName) } -> FactColumnType FCTMaybeSourceColumn
|
FactCountDistinct :: { factColMaybeSourceColumn :: !(Maybe ColumnName) } -> FactColumnType 'FCKMaybeSourceColumn
|
||||||
FactSum :: { factColSourceColumn :: !ColumnName } -> FactColumnType FCTSourceColumn
|
FactSum :: { factColSourceColumn :: !ColumnName } -> FactColumnType 'FCKSourceColumn
|
||||||
FactAverage :: { factColSourceColumn :: !ColumnName } -> FactColumnType FCTSourceColumn
|
FactAverage :: { factColSourceColumn :: !ColumnName } -> FactColumnType 'FCKSourceColumn
|
||||||
FactMax :: { factColSourceColumn :: !ColumnName } -> FactColumnType FCTSourceColumn
|
FactMax :: { factColSourceColumn :: !ColumnName } -> FactColumnType 'FCKSourceColumn
|
||||||
FactMin :: { factColSourceColumn :: !ColumnName } -> FactColumnType FCTSourceColumn
|
FactMin :: { factColSourceColumn :: !ColumnName } -> FactColumnType 'FCKSourceColumn
|
||||||
|
|
||||||
deriving instance Show (FactColumnType a)
|
deriving instance Show (FactColumnType a)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue