mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Define smart constructors for Tasks.
This commit is contained in:
parent
0888749f7c
commit
3b988ad32a
@ -75,6 +75,15 @@ data TaskF output where
|
|||||||
type Task = Freer TaskF
|
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
|
-- Internal
|
||||||
|
|
||||||
renderConcurrently :: (Monoid output, StringConv output ByteString) => (input -> IO output) -> [input] -> IO ByteString
|
renderConcurrently :: (Monoid output, StringConv output ByteString) => (input -> IO output) -> [input] -> IO ByteString
|
||||||
|
Loading…
Reference in New Issue
Block a user