module Unison.PatternMatchCoverage.EffectHandler where import Unison.ConstructorReference (ConstructorReference) import Unison.PatternMatchCoverage.Pretty import Unison.Prelude import Unison.PrettyPrintEnv (PrettyPrintEnv) import Unison.Util.Pretty data EffectHandler = NoEffect | Effect ConstructorReference deriving stock (Int -> EffectHandler -> ShowS [EffectHandler] -> ShowS EffectHandler -> String (Int -> EffectHandler -> ShowS) -> (EffectHandler -> String) -> ([EffectHandler] -> ShowS) -> Show EffectHandler forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a $cshowsPrec :: Int -> EffectHandler -> ShowS showsPrec :: Int -> EffectHandler -> ShowS $cshow :: EffectHandler -> String show :: EffectHandler -> String $cshowList :: [EffectHandler] -> ShowS showList :: [EffectHandler] -> ShowS Show, EffectHandler -> EffectHandler -> Bool (EffectHandler -> EffectHandler -> Bool) -> (EffectHandler -> EffectHandler -> Bool) -> Eq EffectHandler forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: EffectHandler -> EffectHandler -> Bool == :: EffectHandler -> EffectHandler -> Bool $c/= :: EffectHandler -> EffectHandler -> Bool /= :: EffectHandler -> EffectHandler -> Bool Eq, Eq EffectHandler Eq EffectHandler => (EffectHandler -> EffectHandler -> Ordering) -> (EffectHandler -> EffectHandler -> Bool) -> (EffectHandler -> EffectHandler -> Bool) -> (EffectHandler -> EffectHandler -> Bool) -> (EffectHandler -> EffectHandler -> Bool) -> (EffectHandler -> EffectHandler -> EffectHandler) -> (EffectHandler -> EffectHandler -> EffectHandler) -> Ord EffectHandler EffectHandler -> EffectHandler -> Bool EffectHandler -> EffectHandler -> Ordering EffectHandler -> EffectHandler -> EffectHandler forall a. Eq a => (a -> a -> Ordering) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> a) -> (a -> a -> a) -> Ord a $ccompare :: EffectHandler -> EffectHandler -> Ordering compare :: EffectHandler -> EffectHandler -> Ordering $c< :: EffectHandler -> EffectHandler -> Bool < :: EffectHandler -> EffectHandler -> Bool $c<= :: EffectHandler -> EffectHandler -> Bool <= :: EffectHandler -> EffectHandler -> Bool $c> :: EffectHandler -> EffectHandler -> Bool > :: EffectHandler -> EffectHandler -> Bool $c>= :: EffectHandler -> EffectHandler -> Bool >= :: EffectHandler -> EffectHandler -> Bool $cmax :: EffectHandler -> EffectHandler -> EffectHandler max :: EffectHandler -> EffectHandler -> EffectHandler $cmin :: EffectHandler -> EffectHandler -> EffectHandler min :: EffectHandler -> EffectHandler -> EffectHandler Ord, (forall x. EffectHandler -> Rep EffectHandler x) -> (forall x. Rep EffectHandler x -> EffectHandler) -> Generic EffectHandler forall x. Rep EffectHandler x -> EffectHandler forall x. EffectHandler -> Rep EffectHandler x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cfrom :: forall x. EffectHandler -> Rep EffectHandler x from :: forall x. EffectHandler -> Rep EffectHandler x $cto :: forall x. Rep EffectHandler x -> EffectHandler to :: forall x. Rep EffectHandler x -> EffectHandler Generic) prettyEffectHandler :: PrettyPrintEnv -> EffectHandler -> Pretty ColorText prettyEffectHandler :: PrettyPrintEnv -> EffectHandler -> Pretty ColorText prettyEffectHandler PrettyPrintEnv ppe = \case EffectHandler NoEffect -> Pretty ColorText "pure" Effect ConstructorReference cr -> PrettyPrintEnv -> ConstructorReference -> Pretty ColorText prettyConstructorReference PrettyPrintEnv ppe ConstructorReference cr