mirror of
https://github.com/github/semantic.git
synced 2024-12-21 05:41:54 +03:00
Define a Message type for logging.
This commit is contained in:
parent
dec0de378c
commit
03862a33f5
@ -2,6 +2,7 @@
|
||||
module Semantic.Task
|
||||
( Task
|
||||
, RAlgebra
|
||||
, Message(..)
|
||||
, Differ
|
||||
, readBlobs
|
||||
, readBlobPairs
|
||||
@ -44,6 +45,13 @@ data TaskF output where
|
||||
-- | A high-level task producing some result, e.g. parsing, diffing, rendering. 'Task's can also specify explicit concurrency via 'distribute', 'distributeFor', and 'distributeFoldMap'
|
||||
type Task = Freer TaskF
|
||||
|
||||
-- | A log message at a specific level.
|
||||
data Message
|
||||
= Error ByteString
|
||||
| Warning ByteString
|
||||
| Debug ByteString
|
||||
deriving (Eq, Show)
|
||||
|
||||
-- | A function to compute the 'Diff' for a pair of 'Term's with arbitrary syntax functor & annotation types.
|
||||
type Differ f a = Both (Term f a) -> Diff f a
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user