- [Todo] Support for extensible, pattern-matching bind on constrained context
- Enumeration (pattern match on individual values)
- Range (pattern match on range groups)
- [Todo] Utility abstractions (as value or context)
- Enum
- [Idea] Resilience primitives
- [Idea] Retries - doable via fallbacks
- [Idea] Circuit breakers
- [Idea] Bulkheads / semaphores
- [BREAKING CHANGE] Drop support for ClojureScript 1.9
- Due to
javax.xml.bind.DatatypeConverter
exceptions with Java 9+
- Due to
- [BREAKING CHANGE] Contexts holding value (e.g. failure and thrown) must implement
promenade.type/IHolder
- New protocol
promenade.type/IHolder
is introduced- To hold a value, as a substitute for
IDeref
- Because
clojure.lang.IDeref
is a Java interface - cannot be extended tojava.lang.Throwable
- To hold a value, as a substitute for
- Built-in failure and thrown implementations are updated to implement
promenade.type/IHolder
- New protocol
- Optimize exception handling by avoiding unwanted wrapping/unwrapping
- Overload
Throwable
(CLJ) andjs/Error
(CLJS) withIThrown
andIHolder
- Do not wrap exception as
Thrown
if already aThrown
(true in most cases)
- Overload
- Add fast, stackless alternative to
ex-info
- Drop-in replacement for
ex-info
- Add Java class and CLJS type
promenade.util.StacklessExceptionInfo
- descendant ofExceptionInfo
promenade.util/se-info
promenade.util/se-info?
promenade.util/!se-info
promenade.util/!wrap-se-info
- Drop-in replacement for
- Add custom entity and failure definition support
promenade.util/defentity
promenade.util/defailure
- Perf tests
- Documentation
- Add docs for version
0.8.0
- Docstring cross-ref
- Formatting for Cljdoc
- Add Cljdoc badge
- Add docs for version
- Fix buggy handling of context as initial expression in
*->
,*->>
,*as->
macros
- Allow
recur
at the tail position in code body (impacting the following macros)promenade.core/mdo
promenade.core/mlet
promenade.core/when-mlet
- Add reducing thread macros
reduce->
,reduce->>
,reduce-as->
- Support for early termination via
clojure.core/reduced
- Support for custom bind functions
- Support for early termination via
- [BREAKING CHANGE] Accept
nil
as argument inbind-maybe
nothing-handler- Consistent with other alt-handlers
- Base bind thread macros on reducing thread macros
either->
,either->>
,either-as->
maybe->
,maybe->>
,maybe-as->
- [BREAKING CHANGE] Nothing handler expression must handle the argument
trial->
,trial->>
,trial-as->
- Add
!wrap
macro to wrap functions to return thrown context on exception - Add support for reducing functions (that work with clojure.core/reduce, transducers)
refn
- construct a reducing function that terminates on encountering a contextrewrap
- wrap a reducing function such that it terminates on encountering a context
- Do not need to do
require-macros
at usage site (@awkay) - Improved documentation (@awkay)
- Factor out
doo
related namespaces into a separate directory - Make
Failure
,Nothing
andThrown
instances printable at the REPL- Default printing: Multi method
print-method
- Pretty printing using
clojure.pprint/pprint
: Multi methodsimple-dispatch
- Default printing: Multi method
- Utility functions
- Predicate:
free?
(to imply "context free" or "not context") - Branching:
branch
- Predicate:
- [BREAKING CHANGE] Do not implicitly return
nothing
(or any context, unless the user asks for it)mdo
(empty body)mlet
(empty body)when-mlet
(test fail, empty body)
- Doc: Improve section
Dealing with success and failure with Either
- Test with muliple CLJS versions
- Add
mdo
as an equivalent ofdo
form- Context values are returned as soon as encountered
- Retrofit other forms using
mdo
mlet
when-mlet
- Add arity to specify 'default'
mfailure
mthrown
- Fix issue where a context cannot be printed due to clash of types:
IPersistentMap
andIDeref
- Fix issue where matching macros do not consider a context value to be a non-match
mlet
if-mlet
when-mlet
cond-mlet
- Add context pattern matching support
- Matcher fns:
mfailure
,mnothing
,mthrown
- Bind macros:
mlet
,if-mlet
,when-mlet
,cond-mlet
- Matcher fns:
- Add utility fn
thrown
to wrap as thrown - Add predicate fns for context types
- Add ClojureScript support
- Make context types extensible
- Failure (Either): Protocol
promenade.type.IFailure
- Nothing (Maybe): Protocol
promenade.type.INothing
- Thrown (Trial): Protocol
promenade.type.IThrown
- Failure (Either): Protocol
- Context support
- Contract:
promenade.type.IContext
- Utilities:
deref-context
- Contract:
- Either (Success/Failure)
- Utilities:
failure
(constant),nil->failure
,fail
andex-fail
- Bind impl:
bind-either
- Threading:
either->
,either->>
andeither-as->
- Utilities:
- Maybe (Just/Nothing)
- Utilities:
nothing
(constant),nil->nothing
andvoid
- Bind impl:
bind-maybe
- Threading:
maybe->
,maybe->>
andmaybe-as->
- Utilities:
- Trial (Result/Exception)
- Utilities:
!
- Bind impl:
bind-trial
- Threading:
trial->
,trial->>
andtrial-as->
- Utilities: