sutori-0.2.4: Sutori language compiler

Safe HaskellSafe
LanguageHaskell2010

Sutori.Logger

Description

Provides a common framework (class) to showSut sutori componentselementsconstructs.

Synopsis

Documentation

data SutLog Source #

Simple tree data structure to allow pretty printing of sutori logs

Constructors

SutLogLeave String

A final message

SutLogNode String [SutLog]

A message with children messages

Instances

Show SutLog Source #

SutLog can be pretty printed on a console

class SutShow a where Source #

Interface for pretty-printing Sutori constructs (token, actions, tables, ...)

Minimal complete definition

showSut

Methods

showSut :: a -> SutLog Source #

Allows to pretty-print a Sutori (internal or external) element

data SutLogger Source #

Sutori logger, where we register logs for reasons, via a WriterT

Constructors

SutLogger [SutLog] [SutLog] [(SutError, SutLog)] 

Instances

Show SutLogger Source #

The way we print the logs is to print info logs, then error logs.

Monoid SutLogger Source #

SutLogger must be a Monoid to be used with WriterT

fromLeave :: SutLog -> String Source #

Extract log strings