Îõ³h&F´      Safe-InferredâÄ env-guard3The expectation for an environment variable lookup. env-guardÍExpect that the environment variable is set (i.e. contents can be anything). env-guardÙExpect that the environment variable is set and the contents equals the string. This is case-insensitive. env-guardÖExpect that the environment variable is set and its contents satisfies the predicate. env-guardÔGuards an action behind an environment variable according to the given expectation.ExamplessetEnv "FOO" "bar">withGuard "FOO" (ExpectEnvEquals "baz") (putStrLn "succeeded")Nothing3withGuard "FOO" ExpectEnvSet (putStrLn "succeeded") succeededJust () env-guard Variant of  that ignores the return value. env-guardguardOrElse var expect m1 m2 is equivalent to withGuard var expect m1 except that it runs m2 if m1 is not run.ExamplessetEnv "FOO" "bar"=guardOrElse "FOO" ExpectEnvSet (pure True) (pure "not found") Right True=guardOrElse "BAR" ExpectEnvSet (pure True) (pure "not found")Left "not found" env-guard; specialized to the same type so that we always return an a7. This can also be used to ignore the return value i.e. %guardOrElse' var expect (void m1) m2 ExamplessetEnv "FOO" "bar"8guardOrElse' "FOO" ExpectEnvSet (pure True) (pure False)True8guardOrElse' "BAR" ExpectEnvSet (pure True) (pure False)FalseÉguardOrElse' "BAR" ExpectEnvSet (void $ pure True) (putStrLn "not found") not found env-guard var io runs io iff The environment variable var is set.  var ===   var ( ) Examples.guardSet "NOT_SET" (putStrLn "ran io" $> True)NothingsetEnv "SET" "foo"*guardSet "SET" (putStrLn "ran io" $> True)ran io Just True  env-guard Variant of  that ignores the return value.  env-guard  var expected io runs io iff The environment variable var is set.var's value equals expected . This is case-insensitive.   var expected ===   var (\a b ->   a ==   b) Examples7guardEquals "NOT_SET" "val" (putStrLn "ran io" $> True)NothingsetEnv "WRONG_VAL" "good_val"=guardEquals "WRONG_VAL" "bad_val" (putStrLn "ran io" $> True)NothingsetEnv "WILL_RUN" "val"8guardEquals "WILL_RUN" "VAL" (putStrLn "ran io" $> True)ran io Just True  env-guard Variant of   that ignores the return value.  env-guard Variant of   that ignores the return value.  env-guardÀThis is the most general way to check an environment variable.   var p io runs io iff The environment variable var is set.var's value satisfies predicate p.ExamplesÁguardPredicate "NOT_SET" (const True) (putStrLn "ran io" $> True)NothingsetEnv "CASE_WRONG" "VAL"ÂguardPredicate "CASE_WRONG" (== "val") (putStrLn "ran io" $> True)NothingsetEnv "WILL_RUN" "VAL"ÀguardPredicate "WILL_RUN" (== "VAL") (putStrLn "ran io" $> True)ran io Just True env-guard env-guardThe environment variable. env-guardThe expectation. env-guard.The action to run if the expectation succeeds. env-guard+The action to run if the expectation fails. env-guard The result. env-guardThe environment variable. env-guardThe expectation. env-guard.The action to run if the expectation succeeds. env-guard+The action to run if the expectation fails. env-guard The result.   Safe-Inferredõ”  env-guardÔGuards an action behind an environment variable according to the given expectation.ExamplessetEnv "FOO" "bar">withGuard "FOO" (ExpectEnvEquals "baz") (putStrLn "succeeded")Nothing3withGuard "FOO" ExpectEnvSet (putStrLn "succeeded") succeededJust () env-guard Variant of  that ignores the return value. env-guardguardOrElse var expect io1 io2 is equivalent to withGuard var expect io1 except that it runs io2 if io1 is not run.ExamplessetEnv "FOO" "bar"=guardOrElse "FOO" ExpectEnvSet (pure True) (pure "not found") Right True=guardOrElse "BAR" ExpectEnvSet (pure True) (pure "not found")Left "not found" env-guard; specialized to the same type so that we always return an a7. This can also be used to ignore the return value i.e. 'guardOrElse' var expect (void io1) io2 ExamplessetEnv "FOO" "bar"8guardOrElse' "FOO" ExpectEnvSet (pure True) (pure False)True8guardOrElse' "BAR" ExpectEnvSet (pure True) (pure False)FalseÉguardOrElse' "BAR" ExpectEnvSet (void $ pure True) (putStrLn "not found") not found env-guard var io runs io iff The environment variable var is set.  var ===  var ( ) Examples.guardSet "NOT_SET" (putStrLn "ran io" $> True)NothingsetEnv "SET" "foo"*guardSet "SET" (putStrLn "ran io" $> True)ran io Just True env-guard Variant of  that ignores the return value. env-guard var expected io runs io iff The environment variable var is set.var's value equals expected . This is case-insensitive.  var expected ===  var (\a b ->   a ==   b) Examples7guardEquals "NOT_SET" "val" (putStrLn "ran io" $> True)NothingsetEnv "WRONG_VAL" "good_val"=guardEquals "WRONG_VAL" "bad_val" (putStrLn "ran io" $> True)NothingsetEnv "WILL_RUN" "val"8guardEquals "WILL_RUN" "VAL" (putStrLn "ran io" $> True)ran io Just True env-guard Variant of  that ignores the return value. env-guard Variant of  that ignores the return value. env-guardÀThis is the most general way to check an environment variable.  var p io runs io iff The environment variable var is set.var's value satisfies predicate p.ExamplesÁguardPredicate "NOT_SET" (const True) (putStrLn "ran io" $> True)NothingsetEnv "CASE_WRONG" "VAL"ÂguardPredicate "CASE_WRONG" (== "val") (putStrLn "ran io" $> True)NothingsetEnv "WILL_RUN" "VAL"ÀguardPredicate "WILL_RUN" (== "VAL") (putStrLn "ran io" $> True)ran io Just True env-guardThe environment variable. env-guardThe expectation. env-guard.The action to run if the expectation succeeds. env-guard+The action to run if the expectation fails. env-guard The result. env-guardThe environment variable. env-guardThe expectation. env-guard.The action to run if the expectation succeeds. env-guard+The action to run if the expectation fails. env-guard The result.          env-guard-0.2-inplaceSystem.Environment.Guard.LiftedSystem.Environment.Guard Data.ChartoLower ExpectEnv ExpectEnvSetExpectEnvEqualsExpectEnvPredicate withGuard withGuard_ guardOrElse guardOrElse'guardSet guardSet_ guardEquals guardEquals_guardPredicate_guardPredicate$fShowExpectEnvbaseGHC.Baseconstghc-prim GHC.TypesTruefmap GHC.Unicode