Trait naan::HKT1

source ·
pub trait HKT1 {
    type T<A>;
}
Expand description

A marker that points to a type with 1 generic parameter.

use naan::prelude::*;

enum Maybe<A> {
  Just(A),
  Nothing,
}

struct MaybeHKT;

impl HKT1 for MaybeHKT {
  type T<A> = Maybe<A>;
}

Required Associated Types§

source

type T<A>

The generic type

Implementors§

source§

impl HKT1 for Id

§

type T<A> = Id<A>

source§

impl HKT1 for Option

§

type T<A> = Option<A>

source§

impl HKT1 for Vec

§

type T<A> = Vec<A, Global>

source§

impl HKT1 for IO

§

type T<A> = IO<A>

source§

impl<E> HKT1 for ResultOk<E>

§

type T<A> = Result<A, E>

source§

impl<K> HKT1 for BTreeMapValues<K>where K: Ord,

§

type T<A> = BTreeMap<K, A, Global>

source§

impl<K> HKT1 for HashMapValues<K>where K: Hash + Eq,

§

type T<A> = HashMap<K, A, RandomState>

source§

impl<M> HKT1 for JoinHKT<M>where M: HKT2,

§

type T<A> = Join<M, <M as HKT2>::T<A, A>, A>

source§

impl<const N: usize> HKT1 for ArrayVec<N>

§

type T<A> = ArrayVec<[Option<A>; N]>