futhark-0.18.6: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Futhark.Util.Log

Description

Opaque type for an operations log that provides fast O(1) appends.

Synopsis

Documentation

data Log Source #

An efficiently catenable sequence of log entries.

Instances

Instances details
Semigroup Log Source # 
Instance details

Defined in Futhark.Util.Log

Methods

(<>) :: Log -> Log -> Log #

sconcat :: NonEmpty Log -> Log #

stimes :: Integral b => b -> Log -> Log #

Monoid Log Source # 
Instance details

Defined in Futhark.Util.Log

Methods

mempty :: Log #

mappend :: Log -> Log -> Log #

mconcat :: [Log] -> Log #

(Applicative m, Monad m) => MonadLogger (WriterT Log m) Source # 
Instance details

Defined in Futhark.Util.Log

Methods

logMsg :: ToLog a => a -> WriterT Log m () Source #

addLog :: Log -> WriterT Log m () Source #

(Applicative m, Monad m) => MonadLogger (RWST r Log s m) Source # 
Instance details

Defined in Futhark.Util.Log

Methods

logMsg :: ToLog a => a -> RWST r Log s m () Source #

addLog :: Log -> RWST r Log s m () Source #

(Applicative m, Monad m) => MonadLogger (RWST r Log s m) Source # 
Instance details

Defined in Futhark.Util.Log

Methods

logMsg :: ToLog a => a -> RWST r Log s m () Source #

addLog :: Log -> RWST r Log s m () Source #

toText :: Log -> Text Source #

Transform a log into text. Every log entry becomes its own line (or possibly more, in case of multi-line entries).

class ToLog a where Source #

Typeclass for things that can be turned into a single-entry log.

Methods

toLog :: a -> Log Source #

Instances

Instances details
ToLog String Source # 
Instance details

Defined in Futhark.Util.Log

Methods

toLog :: String -> Log Source #

ToLog Text Source # 
Instance details

Defined in Futhark.Util.Log

Methods

toLog :: Text -> Log Source #

class (Applicative m, Monad m) => MonadLogger m where Source #

Typeclass for monads that support logging.

Minimal complete definition

addLog

Methods

logMsg :: ToLog a => a -> m () Source #

Add one log entry.

addLog :: Log -> m () Source #

Append an entire log.

Instances

Instances details
MonadLogger PassM Source # 
Instance details

Defined in Futhark.Pass

Methods

logMsg :: ToLog a => a -> PassM () Source #

addLog :: Log -> PassM () Source #

MonadLogger FutharkM Source # 
Instance details

Defined in Futhark.Pipeline

Methods

logMsg :: ToLog a => a -> FutharkM () Source #

addLog :: Log -> FutharkM () Source #

(Applicative m, Monad m) => MonadLogger (WriterT Log m) Source # 
Instance details

Defined in Futhark.Util.Log

Methods

logMsg :: ToLog a => a -> WriterT Log m () Source #

addLog :: Log -> WriterT Log m () Source #

Monad m => MonadLogger (DistNestT lore m) Source # 
Instance details

Defined in Futhark.Pass.ExtractKernels.DistributeNests

Methods

logMsg :: ToLog a => a -> DistNestT lore m () Source #

addLog :: Log -> DistNestT lore m () Source #

(Applicative m, Monad m) => MonadLogger (RWST r Log s m) Source # 
Instance details

Defined in Futhark.Util.Log

Methods

logMsg :: ToLog a => a -> RWST r Log s m () Source #

addLog :: Log -> RWST r Log s m () Source #

(Applicative m, Monad m) => MonadLogger (RWST r Log s m) Source # 
Instance details

Defined in Futhark.Util.Log

Methods

logMsg :: ToLog a => a -> RWST r Log s m () Source #

addLog :: Log -> RWST r Log s m () Source #