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

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
Monoid Log Source # 
Instance details

Defined in Futhark.Util.Log

Methods

mempty :: Log #

mappend :: Log -> Log -> Log #

mconcat :: [Log] -> Log #

Semigroup Log Source # 
Instance details

Defined in Futhark.Util.Log

Methods

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

sconcat :: NonEmpty Log -> Log #

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

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 (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 #

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 pretty. 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 Text Source # 
Instance details

Defined in Futhark.Util.Log

Methods

toLog :: Text -> Log Source #

ToLog String Source # 
Instance details

Defined in Futhark.Util.Log

Methods

toLog :: String -> 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 #

MonadLogger IO Source # 
Instance details

Defined in Futhark.Util.Log

Methods

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

addLog :: Log -> IO () Source #

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

Defined in Futhark.Pass.ExtractKernels.DistributeNests

Methods

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

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

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 (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 #

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 #