mpc
Haskell-like feature supports in C++
|
#include <functional>
#include <variant>
#include <mpc/control/alternative.hpp>
#include <mpc/control/monad.hpp>
#include <mpc/prelude.hpp>
#include <mpc/utility/alternative_value_t.hpp>
#include <mpc/utility/single.hpp>
Go to the source code of this file.
Classes | |
struct | mpc::nothing_t |
struct | mpc::detail::is_maybe_impl< class > |
struct | mpc::detail::is_maybe_impl< maybe< T > > |
struct | mpc::functor_traits< maybe< T1 > > |
struct | mpc::functor_traits< maybe< T1 > >::fmap_op |
fmap :: (a -> b) -> f a -> f b More... | |
struct | mpc::functor_traits< maybe< T1 > >::replace2nd_op |
replace2nd :: a -> f b -> f a More... | |
struct | mpc::monad_traits< maybe< T1 > > |
struct | mpc::monad_traits< maybe< T1 > >::bind_op |
bind :: forall a b. m a -> (a -> m b) -> m b More... | |
struct | mpc::applicative_traits< maybe< T1 > > |
struct | mpc::applicative_traits< maybe< T1 > >::pure_op |
pure :: a -> f a More... | |
struct | mpc::applicative_traits< maybe< T1 > >::seq_apply_op |
seq_apply :: f (a -> b) -> f a -> f b More... | |
struct | mpc::applicative_traits< maybe< T1 > >::liftA2_op |
liftA2 :: (a -> b -> c) -> f a -> f b -> f c More... | |
struct | mpc::alternative_traits< maybe< T1 > > |
struct | mpc::alternative_traits< maybe< T1 > >::empty_op |
struct | mpc::alternative_traits< maybe< T1 > >::combine_op |
Namespaces | |
namespace | mpc::detail |
Implementation details are here. | |
Typedefs | |
template<class T > | |
using | mpc::just_t = single< T, nothing_t > |
template<class T > | |
using | mpc::maybe = std::variant< nothing_t, just_t< T > > |
data Maybe a = Nothing | Just a | |
Functions | |
template<class T > | |
constexpr just_t< std::unwrap_ref_decay_t< T > > | mpc::make_just (T &&t) |
Variables | |
constexpr nothing_t | mpc::nothing |