1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 21:31:48 +03:00

Define a Message type for logging.

This commit is contained in:
Rob Rix 2017-07-21 11:37:54 -04:00
parent dec0de378c
commit 03862a33f5

View File

@ -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