use fail::*;

use super::*;

/// Execution context.
pub trait Context<'a>: FunctorContext<'a, T = Self::_Tm> {
    /// Type to provide for [Monad]ic representation of computation, mostly that of resolution ([`Resolution`]).
    type _Tm: Monad<'a>;

    type Fallible: MonadFailAny<'a, T = Self::T>;

    /// See [`Diagnostic`].
    type D: Diagnostic<'a, Self::T>;

    /// Type to represent resolution errors mainly arising in [`Resolver::resolve`].
    type LookupError: 'a + Error;

    /// Get [type@Hash] of a slice, mostly for use in [`Point`].
    fn hash(s: &[u8]) -> Hash;
}