logger-0.1.0.0: Fast & extensible logging framework

Copyright(C) 2015 Flowbox
LicenseApache-2.0
MaintainerWojciech Daniło <wojciech.danilo@gmail.com>
Stabilitystable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

System.Log.Data

Description

 

Documentation

log :: (Show pri, Enum pri, MonadRecord (Data Lvl, (Data Msg, r)) m) => RecordBuilder r -> pri -> String -> m () Source

newtype RecordBuilder a Source

Constructors

RecordBuilder 

Fields

fromRecordBuilder :: a
 

appData :: (a ~ DataOf base) => base -> a -> RecordBuilder as -> RecordBuilder (Data base, as) Source

data Data base Source

Constructors

Data 

Fields

recBase :: base
 
recData :: DataOf base
 

Instances

(Functor m, Applicative m, DataGetter y m, LogBuilderProto () m ys) => LogBuilderProto () m (Data y, ys) 
LookupDataSet base as => LookupDataSet base (Data b, as) 
LookupDataSet base (Data base, as) 
(Show (DataOf base), Show base) => Show (Data base) 
(LogBuilderProto (Data x, xs) m ys, LogBuilderProto xs m (Data y, ()), Monad m) => LogBuilderProto (Data x, xs) m (Data y, ys) 
(LogBuilderProto xs m ys, Functor m) => LogBuilderProto (Data x, xs) m (Data x, ys) 

class DataGetter base m where Source

Methods

getData :: m (Data base) Source

Instances

type family DataOf a :: * Source

Instances

type DataOf Loc = LocData 
type DataOf Lvl = LevelData 
type DataOf Msg = String 
type DataOf Time = UTCTime 

class LogBuilderProto a m b where Source

Methods

buildLogProto :: RecordBuilder a -> m (Log b) Source

Instances

Monad m => LogBuilderProto a m () 
(Functor m, Applicative m, DataGetter y m, LogBuilderProto () m ys) => LogBuilderProto () m (Data y, ys) 
(LogBuilderProto (Data x, xs) m ys, LogBuilderProto xs m (Data y, ()), Monad m) => LogBuilderProto (Data x, xs) m (Data y, ys) 
(LogBuilderProto xs m ys, Functor m) => LogBuilderProto (Data x, xs) m (Data x, ys) 

class Lookup base s where Source

Methods

lookup :: base -> s -> Data base Source

Instances

LookupDataSet base r => Lookup base (RecordBuilder r) 
LookupDataSet base l => Lookup base (Log l) 

readData :: Lookup a l => a -> l -> DataOf a Source

class LookupDataSet base s where Source

Methods

lookupDataSet :: base -> s -> Data base Source

Instances

LookupDataSet base as => LookupDataSet base (Data b, as) 
LookupDataSet base (Data base, as) 

data Time Source

Constructors

Time 

Instances

data Msg Source

Constructors

Msg 

Instances

data Lvl Source

Constructors

Lvl 

Instances

mkLevel :: (Show a, Enum a) => a -> LevelData Source

type Pos = (Int, Int) Source

data LocData Source

Constructors

LocData 

data Loc Source

Constructors

Loc 

Instances