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

Define smart constructors for Tasks.

This commit is contained in:
Rob Rix 2017-05-29 11:42:43 -04:00
parent 0888749f7c
commit 3b988ad32a

View File

@ -75,6 +75,15 @@ data TaskF output where
type Task = Freer TaskF
parse :: Parser term -> Source -> Task term
parse parser source = Parse parser source `Then` return
decorate :: Decorator term term' -> Source -> term -> Task term'
decorate decorator source term = Decorate decorator source term `Then` return
render :: Monoid output => Renderer input output -> input -> Task output
render renderer input = Render renderer input `Then` return
-- Internal
renderConcurrently :: (Monoid output, StringConv output ByteString) => (input -> IO output) -> [input] -> IO ByteString