{-# LANGUAGE PatternSynonyms, TypeFamilies, TypeOperators #-}
module Frames
( module Data.Readable
, module Data.Vinyl
, module Data.Vinyl.CoRec
, module Data.Vinyl.Derived
, module Data.Vinyl.Functor
, module Data.Vinyl.Lens
, module Data.Vinyl.TypeLevel
, module Frames.Col
, module Frames.ColumnUniverse
, module Frames.CSV
, module Frames.Exploration
, module Frames.Frame
, inCoreAoS, inCoreAoS', inCore, inCoreSoA
, I.toAoS, I.toFrame, I.filterFrame
, module Frames.Joins
, module Frames.Melt
, module Frames.Rec
, module Frames.RecF
, module Frames.TH
, module Frames.TypeLevel
, module Pipes.Safe, runSafeEffect
, Text
) where
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.Primitive
import Data.Readable (Readable(..))
import Data.Text (Text)
import Data.Vinyl ((<+>), Rec, rcast, rsubset, ElField)
import Data.Vinyl.CoRec (Field, onField, onCoRec)
import Data.Vinyl.Derived (rfield)
import Data.Vinyl.Functor ((:.))
import Data.Vinyl.Lens
import Data.Vinyl.TypeLevel (AllConstrained, AllSatisfied, AllAllSat,
RDelete, RecAll)
import Frames.Col ((:->), pattern Col)
import Frames.ColumnUniverse
import Frames.CSV (readTable, readTableOpt, readTableMaybe, pipeTable, pipeTableMaybe)
import Frames.Exploration
import Frames.Frame
import qualified Frames.InCore as I
import Frames.Melt (melt, meltRow)
import Frames.Rec (Record, RecordColumns, (&:), recUncons, recMaybe, showFields)
import Frames.Rec (rgetField, rputField)
import Frames.RecF
import Frames.TH (tableTypes, tableTypes', declareColumn)
import Frames.TypeLevel
import Frames.Joins
import Frames.ExtraInstances()
import qualified Pipes as P
import Pipes.Safe (MonadSafe, runSafeT, runSafeP, SafeT)
import qualified Pipes.Safe as PS
runSafeEffect :: (MonadIO m, PS.MonadMask m)
=> P.Effect (SafeT m) r -> m r
runSafeEffect :: Effect (SafeT m) r -> m r
runSafeEffect = SafeT m r -> m r
forall (m :: * -> *) r.
(MonadMask m, MonadIO m) =>
SafeT m r -> m r
runSafeT (SafeT m r -> m r)
-> (Effect (SafeT m) r -> SafeT m r) -> Effect (SafeT m) r -> m r
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Effect (SafeT m) r -> SafeT m r
forall (m :: * -> *) r. Monad m => Effect m r -> m r
P.runEffect
inCoreAoS :: (PrimMonad m, MonadIO m, PS.MonadMask m, I.RecVec rs)
=> P.Producer (Record rs) (PS.SafeT m) () -> m (FrameRec rs)
inCoreAoS :: Producer (Record rs) (SafeT m) () -> m (FrameRec rs)
inCoreAoS = SafeT m (FrameRec rs) -> m (FrameRec rs)
forall (m :: * -> *) r.
(MonadMask m, MonadIO m) =>
SafeT m r -> m r
runSafeT (SafeT m (FrameRec rs) -> m (FrameRec rs))
-> (Producer (Record rs) (SafeT m) () -> SafeT m (FrameRec rs))
-> Producer (Record rs) (SafeT m) ()
-> m (FrameRec rs)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Producer (Record rs) (SafeT m) () -> SafeT m (FrameRec rs)
forall (m :: * -> *) (rs :: [(Symbol, *)]).
(PrimMonad m, RecVec rs) =>
Producer (Record rs) m () -> m (FrameRec rs)
I.inCoreAoS
inCoreAoS' :: (PrimMonad m, MonadIO m, PS.MonadMask m, I.RecVec rs)
=> (Rec ((->) Int :. ElField) rs -> Rec ((->) Int :. ElField) ss)
-> P.Producer (Record rs) (SafeT m) () -> m (FrameRec ss)
inCoreAoS' :: (Rec ((->) Int :. ElField) rs -> Rec ((->) Int :. ElField) ss)
-> Producer (Record rs) (SafeT m) () -> m (FrameRec ss)
inCoreAoS' Rec ((->) Int :. ElField) rs -> Rec ((->) Int :. ElField) ss
f = SafeT m (FrameRec ss) -> m (FrameRec ss)
forall (m :: * -> *) r.
(MonadMask m, MonadIO m) =>
SafeT m r -> m r
runSafeT (SafeT m (FrameRec ss) -> m (FrameRec ss))
-> (Producer (Record rs) (SafeT m) () -> SafeT m (FrameRec ss))
-> Producer (Record rs) (SafeT m) ()
-> m (FrameRec ss)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Rec ((->) Int :. ElField) rs -> Rec ((->) Int :. ElField) ss)
-> Producer (Record rs) (SafeT m) () -> SafeT m (FrameRec ss)
forall (m :: * -> *) (rs :: [(Symbol, *)]) (ss :: [(Symbol, *)]).
(PrimMonad m, RecVec rs) =>
(Rec ((->) Int :. ElField) rs -> Rec ((->) Int :. ElField) ss)
-> Producer (Record rs) m () -> m (FrameRec ss)
I.inCoreAoS' Rec ((->) Int :. ElField) rs -> Rec ((->) Int :. ElField) ss
f
inCore :: (PrimMonad m, MonadIO m, PS.MonadMask m, I.RecVec rs, Monad n)
=> P.Producer (Record rs) (SafeT m) () -> m (P.Producer (Record rs) n ())
inCore :: Producer (Record rs) (SafeT m) () -> m (Producer (Record rs) n ())
inCore = SafeT m (Producer (Record rs) n ())
-> m (Producer (Record rs) n ())
forall (m :: * -> *) r.
(MonadMask m, MonadIO m) =>
SafeT m r -> m r
runSafeT (SafeT m (Producer (Record rs) n ())
-> m (Producer (Record rs) n ()))
-> (Producer (Record rs) (SafeT m) ()
-> SafeT m (Producer (Record rs) n ()))
-> Producer (Record rs) (SafeT m) ()
-> m (Producer (Record rs) n ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Producer (Record rs) (SafeT m) ()
-> SafeT m (Producer (Record rs) n ())
forall (m :: * -> *) (n :: * -> *) (rs :: [(Symbol, *)]).
(PrimMonad m, RecVec rs, Monad n) =>
Producer (Record rs) m () -> m (Producer (Record rs) n ())
I.inCore
inCoreSoA :: (PrimMonad m, MonadIO m, PS.MonadMask m, I.RecVec rs)
=> P.Producer (Record rs) (SafeT m) () -> m (Int, Rec ((->) Int :. ElField) rs)
inCoreSoA :: Producer (Record rs) (SafeT m) ()
-> m (Int, Rec ((->) Int :. ElField) rs)
inCoreSoA = SafeT m (Int, Rec ((->) Int :. ElField) rs)
-> m (Int, Rec ((->) Int :. ElField) rs)
forall (m :: * -> *) r.
(MonadMask m, MonadIO m) =>
SafeT m r -> m r
runSafeT (SafeT m (Int, Rec ((->) Int :. ElField) rs)
-> m (Int, Rec ((->) Int :. ElField) rs))
-> (Producer (Record rs) (SafeT m) ()
-> SafeT m (Int, Rec ((->) Int :. ElField) rs))
-> Producer (Record rs) (SafeT m) ()
-> m (Int, Rec ((->) Int :. ElField) rs)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Producer (Record rs) (SafeT m) ()
-> SafeT m (Int, Rec ((->) Int :. ElField) rs)
forall (m :: * -> *) (rs :: [(Symbol, *)]).
(PrimMonad m, RecVec rs) =>
Producer (Record rs) m () -> m (Int, Rec ((->) Int :. ElField) rs)
I.inCoreSoA