unison-parser-typechecker-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Result

Documentation

type Result notes = ResultT notes Identity Source #

type ResultT notes f = MaybeT (WriterT notes f) Source #

data Note v loc Source #

Instances

Instances details
(Show loc, Var v, Ord loc) => Show (Note v loc) Source # 
Instance details

Defined in Unison.Result

Methods

showsPrec :: Int -> Note v loc -> ShowS #

show :: Note v loc -> String #

showList :: [Note v loc] -> ShowS #

data CompilerBug v loc Source #

Instances

Instances details
(Show loc, Var v, Ord loc) => Show (CompilerBug v loc) Source # 
Instance details

Defined in Unison.Result

Methods

showsPrec :: Int -> CompilerBug v loc -> ShowS #

show :: CompilerBug v loc -> String #

showList :: [CompilerBug v loc] -> ShowS #

result :: Result notes a -> Maybe a Source #

pattern Result :: w -> Maybe a -> MaybeT (WriterT w Identity) a Source #

makeResult :: Applicative m => notes -> Maybe a -> ResultT notes m a Source #

isSuccess :: Functor f => ResultT note f a -> f Bool Source #

isFailure :: Functor f => ResultT note f a -> f Bool Source #

toMaybe :: Functor f => ResultT note f a -> f (Maybe a) Source #

runResultT :: ResultT notes f a -> f (Maybe a, notes) Source #

getResult :: Functor f => ResultT notes f a -> f (Result notes a) Source #

toEither :: Functor f => ResultT notes f a -> ExceptT notes f a Source #

tell1 :: Monad f => note -> ResultT (Seq note) f () Source #

fromParsing :: Monad f => Either (Err v) a -> ResultT (Seq (Note v loc)) f a Source #

tellAndFail :: Monad f => note -> ResultT (Seq note) f a Source #

compilerBug :: Monad f => CompilerBug v loc -> ResultT (Seq (Note v loc)) f a Source #

hoist :: (Monad f, Monoid notes) => (forall a. f a -> g a) -> ResultT notes f b -> ResultT notes g b Source #