Safe Haskell | None |
---|---|
Language | Haskell2010 |
Utility methods for Predicate / methods for displaying the evaluation tree
Synopsis
- data TT a = TT {}
- tBool :: Lens (TT a) (TT b) (BoolT a) (BoolT b)
- tString :: Lens' (TT a) String
- tForest :: Lens' (TT a) (Forest PE)
- fixBoolT :: TT Bool -> TT Bool
- topMessage :: TT a -> String
- hasNoTree :: POpts -> Bool
- data BoolT a where
- class GetBoolT a (x :: BoolT a) | x -> a where
- _FailT :: Prism' (BoolT a) String
- _PresentT :: Prism' (BoolT a) a
- _FalseT :: Prism' (BoolT Bool) ()
- _TrueT :: Prism' (BoolT Bool) ()
- data PE
- pString :: Lens' PE String
- mkNode :: POpts -> BoolT a -> String -> [Holder] -> TT a
- mkNodeB :: POpts -> Bool -> String -> [Holder] -> TT Bool
- mkNodeSkipP :: Tree PE
- getValAndPE :: TT a -> (Either String a, Tree PE)
- getValLRFromTT :: TT a -> Either String a
- fromTT :: TT a -> Tree PE
- getValueLR :: POpts -> String -> TT a -> [Holder] -> Either (TT x) a
- fixLite :: forall a. Show a => POpts -> a -> Tree PE -> String
- fixit :: ((Int, x), TT a) -> TT a
- prefixMsg :: String -> TT a -> TT a
- splitAndAlign :: Show x => POpts -> String -> [((Int, x), TT a)] -> Either (TT w) [(a, (Int, x), TT a)]
- type POptsL = HOpts Last
- type POpts = HOpts Identity
- data Debug
- data Disp
- data Color
- isVerbose :: POpts -> Bool
- colorBoolT :: Show a => POpts -> BoolT a -> String
- colorBoolT' :: Show a => POpts -> BoolT a -> String
- setOtherEffects :: POpts -> String -> String
- type Color1 = OColor "color1" Default Blue Default Red Black Cyan Black Yellow
- type Color2 = OColor "color2" Default Magenta Default Red Black White Black Yellow
- type Color3 = OColor "color3" Default Blue Red Default White Default Black Yellow
- type Color4 = OColor "color4" Default Red Red Default Green Default Black Yellow
- type Color5 = OColor "color5" Blue Default Red Default Cyan Default Yellow Default
- type Other1 = OOther True Yellow Default
- type Other2 = OOther True Default Default
- type OZ = OAnsi :# (OColorOff :# OZero)
- type OL = OAnsi :# (OColorOff :# (OLite :# OWidth 200))
- type OAN = OAnsi :# (OColorOff :# (ONormal :# OWidth 100))
- type OANV = OAnsi :# (OColorOff :# (OVerbose :# OWidth 200))
- type OA = OAnsi :# (Color5 :# (ONormal :# (Other2 :# OWidth 100)))
- type OAB = OAnsi :# (Color1 :# (ONormal :# (Other1 :# OWidth 100)))
- type OU = OUnicode :# (Color5 :# (ONormal :# (Other2 :# OWidth 100)))
- type OUB = OUnicode :# (Color1 :# (ONormal :# (Other1 :# OWidth 100)))
- type OUV = OUnicode :# (Color5 :# (OVerbose :# (Other2 :# OWidth 200)))
- type OAV = OAnsi :# (Color5 :# (OVerbose :# (Other2 :# OWidth 200)))
- data HOpts f = HOpts {}
- data OptT
- class OptTC (k :: OptT) where
- type family OptTT (xs :: [OptT]) where ...
- getOptT :: forall o. OptTC o => POpts
- subopts :: POpts -> POpts
- show01 :: (Show a1, Show a2) => POpts -> String -> a1 -> a2 -> String
- show01' :: (Show a1, Show a2) => POpts -> String -> a1 -> String -> a2 -> String
- lit01 :: Show a1 => POpts -> String -> a1 -> String -> String -> String
- litVerbose :: POpts -> String -> String -> String
- showVerbose :: Show a => POpts -> String -> a -> String
- showL :: Show a => POpts -> a -> String
- litL :: POpts -> String -> String
- litBL :: POpts -> ByteString -> String
- litBS :: POpts -> ByteString -> String
- data ROpt
- compileRegex :: forall rs a. GetROpts rs => POpts -> String -> String -> [Holder] -> Either (TT a) Regex
- class GetROpts (os :: [ROpt]) where
- getROpts :: ([String], [PCREOption])
- data RReplace
- class GetReplaceFnSub (k :: ReplaceFnSub) where
- data ReplaceFnSub
- displayROpts :: [String] -> String
- type family ZwischenT (a :: Nat) (b :: Nat) (v :: Nat) :: Constraint where ...
- type family FailWhenT (b :: Bool) (msg :: ErrorMessage) :: Constraint where ...
- type family FailUnlessT (b :: Bool) (msg :: ErrorMessage) :: Constraint where ...
- type family AndT (b :: Bool) (b1 :: Bool) :: Bool where ...
- type family OrT (b :: Bool) (b1 :: Bool) :: Bool where ...
- type family NotT (b :: Bool) :: Bool where ...
- type family RepeatT (n :: Nat) (p :: k) :: [k] where ...
- type family IntersperseT (s :: Symbol) (xs :: [Symbol]) :: Symbol where ...
- type family LenT (xs :: [k]) :: Nat where ...
- class InductTupleC x where
- type InductTupleP x
- inductTupleC :: x -> InductTupleP x
- class InductListC (n :: Nat) a where
- type InductListP n a
- inductListC :: [a] -> InductListP n a
- type family FlipT (d :: k1 -> k -> k2) (p :: k) (q :: k1) :: k2 where ...
- type family IfT (b :: Bool) (t :: k) (f :: k) :: k where ...
- type family SumT (ns :: [Nat]) :: Nat where ...
- type family MapT (f :: k -> k1) (xs :: [k]) :: [k1] where ...
- type family ConsT s where ...
- type family (p :: k -> k1) %% (q :: k) :: k1 where ...
- type family (p :: k) %& (q :: k -> k1) :: k1 where ...
- type (<%>) s t = AppendSymbol s t
- type family AnyT :: k where ...
- nat :: forall n a. (KnownNat n, Num a) => a
- symb :: forall s. KnownSymbol s => String
- class GetNats as where
- class GetSymbs ns where
- class GetLen xs where
- class GetThese th where
- class GetOrdering (cmp :: Ordering) where
- class GetBool (a :: Bool) where
- data OrderingP
- class GetOrd (k :: OrderingP) where
- prtTreePure :: POpts -> Tree PE -> String
- prettyRational :: Rational -> String
- formatOMsg :: POpts -> String -> String
- (~>) :: Bool -> Bool -> Bool
- type family T4_1 x where ...
- type family T4_2 x where ...
- type family T4_3 x where ...
- type family T4_4 x where ...
- type family T5_1 x where ...
- type family T5_2 x where ...
- type family T5_3 x where ...
- type family T5_4 x where ...
- type family T5_5 x where ...
- data Holder
- hh :: TT w -> Holder
- showT :: forall (t :: Type). Typeable t => String
- showTK :: forall r. Typeable r => String
- prettyOrd :: Ordering -> String
- removeAnsi :: Show a => Either String a -> IO ()
- class Monad m => MonadEval m where
- errorInProgram :: HasCallStack => String -> x
- readField :: String -> ReadPrec a -> ReadPrec a
- showThese :: These a b -> String
- chkSize :: Foldable t => POpts -> String -> t a -> [Holder] -> Either (TT x) ()
- pureTryTest :: a -> IO (Either () a)
- pureTryTestPred :: (String -> Bool) -> a -> IO (Either String (Either () a))
- isPrime :: Int -> Bool
- unlessNull :: (Foldable t, Monoid m) => t a -> m -> m
TT
represents the evaluation tree for predicates
Instances
Foldable TT Source # | |
Defined in Predicate.Util fold :: Monoid m => TT m -> m # foldMap :: Monoid m => (a -> m) -> TT a -> m # foldr :: (a -> b -> b) -> b -> TT a -> b # foldr' :: (a -> b -> b) -> b -> TT a -> b # foldl :: (b -> a -> b) -> b -> TT a -> b # foldl' :: (b -> a -> b) -> b -> TT a -> b # foldr1 :: (a -> a -> a) -> TT a -> a # foldl1 :: (a -> a -> a) -> TT a -> a # elem :: Eq a => a -> TT a -> Bool # maximum :: Ord a => TT a -> a # | |
Show a => Show (TT a) Source # | |
topMessage :: TT a -> String Source #
BoolT
contains the typed result from evaluating the expression tree
Instances
Foldable BoolT Source # | |
Defined in Predicate.Util fold :: Monoid m => BoolT m -> m # foldMap :: Monoid m => (a -> m) -> BoolT a -> m # foldr :: (a -> b -> b) -> b -> BoolT a -> b # foldr' :: (a -> b -> b) -> b -> BoolT a -> b # foldl :: (b -> a -> b) -> b -> BoolT a -> b # foldl' :: (b -> a -> b) -> b -> BoolT a -> b # foldr1 :: (a -> a -> a) -> BoolT a -> a # foldl1 :: (a -> a -> a) -> BoolT a -> a # elem :: Eq a => a -> BoolT a -> Bool # maximum :: Ord a => BoolT a -> a # minimum :: Ord a => BoolT a -> a # | |
Eq a => Eq (BoolT a) Source # | |
Show a => Show (BoolT a) Source # | |
Semigroup (BoolT a) Source # | semigroup instance for |
GetBoolT x b => P (b :: BoolT x) a Source # | typelevel
|
type PP (b :: BoolT x) a Source # | |
Defined in Predicate.Core |
class GetBoolT a (x :: BoolT a) | x -> a where Source #
extracts the 'BoolT a' constructors from the typelevel
PE
represents the untyped evaluation tree for final display
create tree functions
mkNode :: POpts -> BoolT a -> String -> [Holder] -> TT a Source #
creates a Node for the evaluation tree
mkNodeB :: POpts -> Bool -> String -> [Holder] -> TT Bool Source #
creates a Boolean node for a predicate type
mkNodeSkipP :: Tree PE Source #
tree manipulation
getValueLR :: POpts -> String -> TT a -> [Holder] -> Either (TT x) a Source #
see getValueLRImpl
: add more detail to the tree if there are errors
splitAndAlign :: Show x => POpts -> String -> [((Int, x), TT a)] -> Either (TT w) [(a, (Int, x), TT a)] Source #
extract values from the trees or if there are errors return a tree with context
display options
how much detail to show in the expression tree
DZero | one line summary used mainly for testing |
DLite | one line summary with additional context from the head of the evaluation tree |
DNormal | outputs the evaluation tree but skips noisy subtrees |
DVerbose | outputs the entire evaluation tree |
display format for the tree
type Color1 = OColor "color1" Default Blue Default Red Black Cyan Black Yellow Source #
color palettes
customizable options for running a typelevel expression
HOpts | |
|
Display options
OWidth !Nat | set display width |
OMsg !Symbol | set text to add context to a failure message for refined types |
ORecursion !Nat | set recursion limit eg for regex |
OOther | set effects for messages |
OEmpty | mempty |
!OptT :# !OptT infixr 6 | mappend |
OColor | set color palette |
OColorOn | turn on colors |
OColorOff | turn off colors |
OAnsi | ansi display |
OUnicode | unicode display |
OZero | debug mode return nothing |
OLite | debug mode return one line |
ONormal | debug mode normal |
OVerbose | debug mode verbose |
OZ | composite: no messages |
OL | composite: lite version |
OAN | composite: ansi + no colors |
OANV | composite: ansi + no colors + verbose |
OA | composite: ansi + colors |
OAV | composite: ansi + colors + verbose |
OAB | composite: ansi + colors + background |
OU | composite: unicode + colors |
OUB | composite: unicode + colors + background |
OUV | composite: unicode + colors + verbose |
class OptTC (k :: OptT) where Source #
Instances
type family OptTT (xs :: [OptT]) where ... Source #
mconcat options at the type level
>>>
x = getOptT @(OptTT '[ 'OMsg "test", 'ORecursion 123, OU, OL, 'OMsg "field2"])
>>>
oMsg x
["test","field2"]>>>
oRecursion x
123
getOptT :: forall o. OptTC o => POpts Source #
convert typelevel options to POpts
>>>
(oDisp &&& fst . oColor &&& oWidth) (getOptT @(OA ':# OU ':# OA ':# 'OWidth 321 ':# Color4 ':# 'OMsg "test message"))
(Ansi,("color4",321))
>>>
oMsg (getOptT @('OMsg "abc" ':# 'OMsg "def"))
["abc","def"]
>>>
oOther (getOptT @('OOther 'False 'Red 'White ':# 'OOther 'True 'Red 'Black))
(True,Red,Black)
>>>
a = show (getOptT @('OEmpty ':# OU))
>>>
b = show (getOptT @(OU ':# 'OEmpty));
>>>
c = show (getOptT @OU)
>>>
a==b && b==c
True
formatting functions
litVerbose :: POpts -> String -> String -> String Source #
more restrictive: only display data in verbose debug mode
regular expressions
Regex options for Rescan Resplit Re etc
Anchored | Force pattern anchoring |
Auto_callout | Compile automatic callouts | Bsr_anycrlf -- R matches only CR, LF, or CrlF | Bsr_unicode -- ^ R matches all Unicode line endings |
Caseless | Do caseless matching |
Dollar_endonly | dollar not to match newline at end |
Dotall | matches anything including NL |
Dupnames | Allow duplicate names for subpatterns |
Extended | Ignore whitespace and # comments |
Extra | PCRE extra features (not much use currently) |
Firstline | Force matching to be before newline |
Multiline | caret and dollar match newlines within data | Newline_any -- ^ Recognize any Unicode newline sequence | Newline_anycrlf -- ^ Recognize CR, LF, and CrlF as newline sequences |
Newline_cr | Set CR as the newline sequence |
Newline_crlf | Set CrlF as the newline sequence |
Newline_lf | Set LF as the newline sequence |
No_auto_capture | Disable numbered capturing parentheses (named ones available) |
Ungreedy | Invert greediness of quantifiers |
Utf8 | Run in UTF--8 mode |
No_utf8_check | Do not check the pattern for UTF-8 validity |
Instances
Bounded ROpt Source # | |
Enum ROpt Source # | |
Eq ROpt Source # | |
Ord ROpt Source # | |
Show ROpt Source # | |
GetROpts ([] :: [ROpt]) Source # | |
Defined in Predicate.Util getROpts :: ([String], [PCREOption]) Source # | |
(Typeable r, GetROpt r, GetROpts rs) => GetROpts (r ': rs) Source # | |
Defined in Predicate.Util getROpts :: ([String], [PCREOption]) Source # |
compileRegex :: forall rs a. GetROpts rs => POpts -> String -> String -> [Holder] -> Either (TT a) Regex Source #
compile a regex using the type level symbol
class GetROpts (os :: [ROpt]) where Source #
extract the regex options from the type level list
getROpts :: ([String], [PCREOption]) Source #
used by ReplaceImpl
and sub
and gsub
to allow more flexible replacement
These parallel the RegexReplacement (not exported) class in Text.Regex.PCRE.Heavy but have overlappable instances which is problematic for this code so I use RReplace
class GetReplaceFnSub (k :: ReplaceFnSub) where Source #
extract replacement options from typelevel
Instances
GetReplaceFnSub RPrepend Source # | |
Defined in Predicate.Util | |
GetReplaceFnSub ROverWrite Source # | |
Defined in Predicate.Util | |
GetReplaceFnSub RAppend Source # | |
Defined in Predicate.Util |
data ReplaceFnSub Source #
simple regex string replacement options
Instances
Eq ReplaceFnSub Source # | |
Defined in Predicate.Util (==) :: ReplaceFnSub -> ReplaceFnSub -> Bool # (/=) :: ReplaceFnSub -> ReplaceFnSub -> Bool # | |
Show ReplaceFnSub Source # | |
Defined in Predicate.Util showsPrec :: Int -> ReplaceFnSub -> ShowS # show :: ReplaceFnSub -> String # showList :: [ReplaceFnSub] -> ShowS # | |
P (ReplaceAllStringT o p q r) x => P (ReplaceAllString o p q r :: Type) x Source # | |
Defined in Predicate.Prelude type PP (ReplaceAllString o p q r) x :: Type Source # eval :: MonadEval m => proxy (ReplaceAllString o p q r) -> POpts -> x -> m (TT (PP (ReplaceAllString o p q r) x)) Source # | |
type PP (ReplaceAllString o p q r :: Type) x Source # | |
Defined in Predicate.Prelude |
displayROpts :: [String] -> String Source #
useful type families
type family ZwischenT (a :: Nat) (b :: Nat) (v :: Nat) :: Constraint where ... Source #
type level Between
type family FailWhenT (b :: Bool) (msg :: ErrorMessage) :: Constraint where ... Source #
helper method that fails with a msg when True
type family FailUnlessT (b :: Bool) (msg :: ErrorMessage) :: Constraint where ... Source #
helper method that fails with msg when False
FailUnlessT True _ = () | |
FailUnlessT False e = TypeError e |
type family IntersperseT (s :: Symbol) (xs :: [Symbol]) :: Symbol where ... Source #
IntersperseT s '[] = "" | |
IntersperseT s '[x] = x | |
IntersperseT s (x ': (y ': xs)) = x <%> (s <%> IntersperseT s (y ': xs)) |
class InductTupleC x where Source #
takes a flat n-tuple and creates a reversed inductive tuple. see PrintT
>>>
inductTupleC (123,'x',False,"abc")
("abc",(False,('x',(123,()))))
>>>
inductTupleC (123,'x')
('x',(123,()))
type InductTupleP x Source #
inductTupleC :: x -> InductTupleP x Source #
Instances
(TypeError (Text "InductTupleC: inductive tuple cannot be empty") :: Constraint) => InductTupleC () Source # | |
Defined in Predicate.Util type InductTupleP () :: Type Source # inductTupleC :: () -> InductTupleP () Source # | |
InductTupleC (a, b) Source # | |
Defined in Predicate.Util type InductTupleP (a, b) :: Type Source # inductTupleC :: (a, b) -> InductTupleP (a, b) Source # | |
InductTupleC (a, b, c) Source # | |
Defined in Predicate.Util type InductTupleP (a, b, c) :: Type Source # inductTupleC :: (a, b, c) -> InductTupleP (a, b, c) Source # | |
InductTupleC (a, b, c, d) Source # | |
Defined in Predicate.Util type InductTupleP (a, b, c, d) :: Type Source # inductTupleC :: (a, b, c, d) -> InductTupleP (a, b, c, d) Source # | |
InductTupleC (a, b, c, d, e) Source # | |
Defined in Predicate.Util type InductTupleP (a, b, c, d, e) :: Type Source # inductTupleC :: (a, b, c, d, e) -> InductTupleP (a, b, c, d, e) Source # | |
InductTupleC (a, b, c, d, e, f) Source # | |
Defined in Predicate.Util type InductTupleP (a, b, c, d, e, f) :: Type Source # inductTupleC :: (a, b, c, d, e, f) -> InductTupleP (a, b, c, d, e, f) Source # | |
InductTupleC (a, b, c, d, e, f, g) Source # | |
Defined in Predicate.Util type InductTupleP (a, b, c, d, e, f, g) :: Type Source # inductTupleC :: (a, b, c, d, e, f, g) -> InductTupleP (a, b, c, d, e, f, g) Source # | |
InductTupleC (a, b, c, d, e, f, g, h) Source # | |
Defined in Predicate.Util type InductTupleP (a, b, c, d, e, f, g, h) :: Type Source # inductTupleC :: (a, b, c, d, e, f, g, h) -> InductTupleP (a, b, c, d, e, f, g, h) Source # | |
InductTupleC (a, b, c, d, e, f, g, h, i) Source # | |
Defined in Predicate.Util type InductTupleP (a, b, c, d, e, f, g, h, i) :: Type Source # inductTupleC :: (a, b, c, d, e, f, g, h, i) -> InductTupleP (a, b, c, d, e, f, g, h, i) Source # | |
InductTupleC (a, b, c, d, e, f, g, h, i, j) Source # | |
Defined in Predicate.Util type InductTupleP (a, b, c, d, e, f, g, h, i, j) :: Type Source # inductTupleC :: (a, b, c, d, e, f, g, h, i, j) -> InductTupleP (a, b, c, d, e, f, g, h, i, j) Source # | |
InductTupleC (a, b, c, d, e, f, g, h, i, j, k) Source # | |
Defined in Predicate.Util type InductTupleP (a, b, c, d, e, f, g, h, i, j, k) :: Type Source # inductTupleC :: (a, b, c, d, e, f, g, h, i, j, k) -> InductTupleP (a, b, c, d, e, f, g, h, i, j, k) Source # | |
InductTupleC (a, b, c, d, e, f, g, h, i, j, k, l) Source # | |
Defined in Predicate.Util type InductTupleP (a, b, c, d, e, f, g, h, i, j, k, l) :: Type Source # inductTupleC :: (a, b, c, d, e, f, g, h, i, j, k, l) -> InductTupleP (a, b, c, d, e, f, g, h, i, j, k, l) Source # |
class InductListC (n :: Nat) a where Source #
takes a list and converts to a reversed inductive tuple. see PrintL
>>>
inductListC @4 [10,12,13,1]
(1,(13,(12,(10,()))))
>>>
inductListC @2 ["ab","cc"]
("cc",("ab",()))
type InductListP n a Source #
inductListC :: [a] -> InductListP n a Source #
Instances
type family FlipT (d :: k1 -> k -> k2) (p :: k) (q :: k1) :: k2 where ... Source #
FlipT d p q = d q p |
type (<%>) s t = AppendSymbol s t infixr 7 Source #
extract values from the type level
symb :: forall s. KnownSymbol s => String Source #
gets the Symbol from the typelevel
>>>
symb @"abc"
"abc"
class GetNats as where Source #
get a list of Nats from the typelevel
>>>
getNats @'[10,12,1]
[10,12,1]
class GetSymbs ns where Source #
get a list of Symbols from the typelevel
>>>
getSymbs @'["abc","def","g"]
["abc","def","g"]
class GetLen xs where Source #
get the length of a typelevel container
>>>
getLen @'["abc","def","g"]
3
>>>
getLen @'[]
0
>>>
getLen @(9 ':| '[1,2,3])
4
>>>
getLen @('These 9 "Asfs")
1
>>>
getLen @('This 1)
0
Instances
GetLen ([] :: [k]) Source # | |
Defined in Predicate.Util | |
GetLen (Nothing :: Maybe a) Source # | |
Defined in Predicate.Util | |
GetLen (Just a2 :: Maybe a1) Source # | |
Defined in Predicate.Util | |
GetLen xs => GetLen (x ': xs :: [a]) Source # | |
Defined in Predicate.Util | |
GetLen xs => GetLen (x :| xs :: NonEmpty a) Source # | |
Defined in Predicate.Util | |
GetLen (Right a2 :: Either a1 b) Source # | |
Defined in Predicate.Util | |
GetLen (Left a2 :: Either a1 b) Source # | |
Defined in Predicate.Util | |
GetLen (That a2 :: These a1 b) Source # | |
Defined in Predicate.Util | |
GetLen (This a2 :: These a1 b) Source # | |
Defined in Predicate.Util | |
GetLen (These a2 b2 :: These a1 b1) Source # | |
Defined in Predicate.Util |
class GetThese th where Source #
get These
from typelevel
class GetOrdering (cmp :: Ordering) where Source #
get ordering from the typelevel
Instances
GetOrdering LT Source # | |
Defined in Predicate.Util | |
GetOrdering EQ Source # | |
Defined in Predicate.Util | |
GetOrdering GT Source # | |
Defined in Predicate.Util |
all the ways to compare two values
Instances
Bounded OrderingP Source # | |
Enum OrderingP Source # | |
Defined in Predicate.Util succ :: OrderingP -> OrderingP # pred :: OrderingP -> OrderingP # fromEnum :: OrderingP -> Int # enumFrom :: OrderingP -> [OrderingP] # enumFromThen :: OrderingP -> OrderingP -> [OrderingP] # enumFromTo :: OrderingP -> OrderingP -> [OrderingP] # enumFromThenTo :: OrderingP -> OrderingP -> OrderingP -> [OrderingP] # | |
Eq OrderingP Source # | |
Show OrderingP Source # | |
class GetOrd (k :: OrderingP) where Source #
extract OrderingP
from the typelevel
printing methods
prettyRational :: Rational -> String Source #
boolean methods
(~>) :: Bool -> Bool -> Bool infixr 1 Source #
boolean implication
>>>
True ~> False
False
>>>
True ~> True
True
>>>
False ~> False
True
>>>
False ~> True
True
extract from n-tuple
miscellaneous
removeAnsi :: Show a => Either String a -> IO () Source #
strip ansi characters from a string and print it (for doctests)
class Monad m => MonadEval m where Source #
a typeclass for choosing which monad to run in
runIO :: IO a -> m (Maybe a) Source #
catchit :: Exception e => a -> m (Either String a) Source #
catchitNF :: (Exception e, NFData a) => a -> m (Either String a) Source #
errorInProgram :: HasCallStack => String -> x Source #
pureTryTest :: a -> IO (Either () a) Source #
unlessNull :: (Foldable t, Monoid m) => t a -> m -> m Source #