Safe Haskell | None |
---|---|
Language | Haskell2010 |
TODO Need to add additional type family instances as required.
TODO Need to have little order nats as well.
Synopsis
- fillTables :: forall bigOrder s ts. (bigOrder ~ BigOrderNats ts, EachBigOrder bigOrder ts, CountNumberOfCells 0 ts) => ts -> ST s (Mutated ts)
- class EachBigOrder (boNats :: [Nat]) ts where
- eachBigOrder :: Proxy boNats -> ts -> ST s [PerfCounter]
- class ThisBigOrder (boNat :: Nat) (thisOrder :: Bool) ts where
- thisBigOrder :: Proxy boNat -> Proxy thisOrder -> ts -> ST s ()
- getAllBounds :: Proxy boNat -> Proxy thisOrder -> ts -> [()]
- class EachSmallOrder (bigOrder :: Nat) (smallOrders :: [Nat]) ts i where
- eachSmallOrder :: Proxy bigOrder -> Proxy smallOrders -> ts -> i -> ST s ()
- class ThisSmallOrder (bigNat :: Nat) (smallNat :: Nat) (thisOrder :: Bool) ts i where
- thisSmallOrder :: Proxy bigNat -> Proxy smallNat -> Proxy thisOrder -> ts -> i -> ST s ()
- type BigOrderNats arr = Nub (Sort (BigOrderNats' arr))
- type family BigOrderNats' arr :: [Nat]
- type family IsThisBigOrder (n :: Nat) arr :: Bool
- type SmallOrderNats arr = Nub (Sort (SmallOrderNats' arr))
- type family SmallOrderNats' arr :: [Nat]
- type family IsThisSmallOrder (n :: Nat) arr :: Bool
- data Mutated ts = Mutated {
- mutatedTables :: !ts
- perfCounter :: !PerfCounter
- eachBigPerfCounter :: [PerfCounter]
- data PerfCounter = PerfCounter {
- picoSeconds :: !Integer
- seconds :: !Double
- numberOfCells :: !Integer
- showPerfCounter :: PerfCounter -> String
- class CountNumberOfCells (n :: Nat) t where
- countNumberOfCells :: Maybe (Proxy n) -> t -> Integer
Documentation
:: (bigOrder ~ BigOrderNats ts, EachBigOrder bigOrder ts, CountNumberOfCells 0 ts) | |
=> ts | The tables |
-> ST s (Mutated ts) |
class EachBigOrder (boNats :: [Nat]) ts where Source #
This type class instanciates to the specialized machinery for each
BigOrder Natural
number.
eachBigOrder :: Proxy boNats -> ts -> ST s [PerfCounter] Source #
Instances
EachBigOrder ([] :: [Nat]) ts Source # | No more big orders to handle. |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl eachBigOrder :: Proxy [] -> ts -> ST s [PerfCounter] Source # | |
(EachBigOrder ns ts, ThisBigOrder n (IsThisBigOrder n ts) ts, CountNumberOfCells n ts) => EachBigOrder (n ': ns) ts Source # | handle this big order. |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl eachBigOrder :: Proxy (n ': ns) -> ts -> ST s [PerfCounter] Source # |
class ThisBigOrder (boNat :: Nat) (thisOrder :: Bool) ts where Source #
thisBigOrder :: Proxy boNat -> Proxy thisOrder -> ts -> ST s () Source #
getAllBounds :: Proxy boNat -> Proxy thisOrder -> ts -> [()] Source #
Instances
ThisBigOrder boNat anyOrder Z Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl | |
ThisBigOrder n (IsThisBigOrder n ts) ts => ThisBigOrder n False (ts :. t) Source # | Go down the tables until we find the first table for our big order. |
(smallOrder ~ SmallOrderNats (ts :. TwITbl bo so m arr c i x), EachSmallOrder boNat smallOrder (ts :. TwITbl bo so m arr c i x) i, PrimArrayOps arr i x, IndexStream i) => ThisBigOrder boNat True (ts :. TwITbl bo so m arr c i x) Source # | We have found the first table for our big order. Extract the bounds and hand over to small order. We do not need to check for another big order with this nat, since all tables are now being filled by the small order. |
class EachSmallOrder (bigOrder :: Nat) (smallOrders :: [Nat]) ts i where Source #
Instances
EachSmallOrder bigOrder ([] :: [Nat]) ts i Source # | Went through all tables, nothing more to do. |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl | |
(EachSmallOrder bigOrder so ts i, isThisBigOrder ~ IsThisBigOrder bigOrder ts, isThisSmallOrder ~ IsThisSmallOrder s ts, isThisOrder ~ (isThisBigOrder && isThisSmallOrder), ThisSmallOrder bigOrder s isThisOrder ts i) => EachSmallOrder bigOrder (s ': so) ts i Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl |
class ThisSmallOrder (bigNat :: Nat) (smallNat :: Nat) (thisOrder :: Bool) ts i where Source #
Instances
ThisSmallOrder b s any Z i Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl | |
(PrimArrayOps arr i x, MPrimArrayOps arr i x, isThisBigOrder ~ IsThisBigOrder bigOrder ts, isThisSmallOrder ~ IsThisSmallOrder smallOrder ts, isThisOrder ~ (isThisBigOrder && isThisSmallOrder), ThisSmallOrder bigOrder smallOrder isThisOrder ts i) => ThisSmallOrder bigOrder smallOrder True (ts :. TwITbl bo so Id arr c i x) i Source # | TODO generalize from |
(isThisBigOrder ~ IsThisBigOrder bigOrder ts, isThisSmallOrder ~ IsThisSmallOrder smallOrder ts, isThisOrder ~ (isThisBigOrder && isThisSmallOrder), ThisSmallOrder bigOrder smallOrder isThisOrder ts i) => ThisSmallOrder bigOrder smallOrder False (ts :. t) i Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl |
type BigOrderNats arr = Nub (Sort (BigOrderNats' arr)) Source #
The set of arrays to fill is a tuple of the form (Z:.a:.b:.c)
. Here, we
extract the big order Nat
s. The set of Nat
s being returned is already
ordered with the smallest Nat
up front.
type family BigOrderNats' arr :: [Nat] Source #
Instances
type BigOrderNats' Z Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl | |
type BigOrderNats' (ts :. TwITbl bo so m arr c i x) Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl |
type family IsThisBigOrder (n :: Nat) arr :: Bool Source #
Instances
type IsThisBigOrder n Z Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl | |
type IsThisBigOrder n (ts :. TwITbl bo so m arr c i x) Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl |
type SmallOrderNats arr = Nub (Sort (SmallOrderNats' arr)) Source #
type family SmallOrderNats' arr :: [Nat] Source #
Instances
type SmallOrderNats' Z Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl | |
type SmallOrderNats' (ts :. TwITbl bo so m arr c i x) Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl |
type family IsThisSmallOrder (n :: Nat) arr :: Bool Source #
Instances
type IsThisSmallOrder n Z Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl | |
type IsThisSmallOrder n (ts :. TwITbl bo so m arr c i x) Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl |
Mutated | |
|
Instances
Eq ts => Eq (Mutated ts) Source # | |
Ord ts => Ord (Mutated ts) Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl | |
Show ts => Show (Mutated ts) Source # | |
Generic (Mutated ts) Source # | |
NFData ts => NFData (Mutated ts) Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl | |
type Rep (Mutated ts) Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl type Rep (Mutated ts) = D1 (MetaData "Mutated" "ADP.Fusion.Core.SynVar.FillTyLvl" "ADPfusion-0.6.0.0-4IFRXlyJait74rLMOZ899H" False) (C1 (MetaCons "Mutated" PrefixI True) (S1 (MetaSel (Just "mutatedTables") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ts) :*: (S1 (MetaSel (Just "perfCounter") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 PerfCounter) :*: S1 (MetaSel (Just "eachBigPerfCounter") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [PerfCounter])))) |
data PerfCounter Source #
PerfCounter | |
|
Instances
showPerfCounter :: PerfCounter -> String Source #
class CountNumberOfCells (n :: Nat) t where Source #
Instances
CountNumberOfCells n Z Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl | |
(CountNumberOfCells n ts, Index i, PrimArrayOps arr i x, KnownNat n, KnownNat bo) => CountNumberOfCells n (ts :. TwITbl bo so Id arr c i x) Source # | |
Defined in ADP.Fusion.Core.SynVar.FillTyLvl |