diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/tool/compiler/phase.lux | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/phase.lux b/stdlib/source/library/lux/tool/compiler/phase.lux index 48b08b54b..26e6e7637 100644 --- a/stdlib/source/library/lux/tool/compiler/phase.lux +++ b/stdlib/source/library/lux/tool/compiler/phase.lux @@ -23,35 +23,35 @@ (type: .public (Operation s o) (state.+State Try s o)) -(implementation: .public functor +(def: .public functor (All (_ s) (Functor (Operation s))) - - (def: (each f it) - (function (_ state) - (case (it state) - {try.#Success [state' output]} - {try.#Success [state' (f output)]} - - {try.#Failure error} - {try.#Failure error})))) - -(implementation: .public monad + (implementation + (def: (each f it) + (function (_ state) + (case (it state) + {try.#Success [state' output]} + {try.#Success [state' (f output)]} + + {try.#Failure error} + {try.#Failure error}))))) + +(def: .public monad (All (_ s) (Monad (Operation s))) - - (def: functor ..functor) - - (def: (in it) - (function (_ state) - {try.#Success [state it]})) - - (def: (conjoint it) - (function (_ state) - (case (it state) - {try.#Success [state' it']} - (it' state') - - {try.#Failure error} - {try.#Failure error})))) + (implementation + (def: functor ..functor) + + (def: (in it) + (function (_ state) + {try.#Success [state it]})) + + (def: (conjoint it) + (function (_ state) + (case (it state) + {try.#Success [state' it']} + (it' state') + + {try.#Failure error} + {try.#Failure error}))))) (type: .public (Phase s i o) (-> Archive i (Operation s o))) |