<commit_before>module NetHack.Screens where

import Control.Monad
import NetHack.Monad.NHAction
import NetHack.LogicPlumbing
import System.IO.Unsafe
import qualified Terminal as T

ifIn :: NHAction Bool -> NHAction a -> NHAction (Either a ())
ifIn testaction dothis = do
  result <- testaction
  if result then liftM left dothis
            else return $ Right ()

ifNotIn :: NHAction Bool -> NHAction a -> NHAction (Either a ())
ifNotIn testaction dothis = do
  result <- testaction
  if not result then liftM left dothis<commit_msg>Fix an oops introduced by last commit that broke the build.<commit_after>module NetHack.Screens where

import Control.Monad
import NetHack.Monad.NHAction
import NetHack.LogicPlumbing
import System.IO.Unsafe
import qualified Terminal as T

ifIn :: NHAction Bool -> NHAction a -> NHAction (Either a ())
ifIn testaction dothis = do
  result <- testaction
  if result then liftM Left dothis
            else return $ Right ()

ifNotIn :: NHAction Bool -> NHAction a -> NHAction (Either a ())
ifNotIn testaction dothis = do
  result <- testaction
  if not result then liftM Left dothis
{'fraction_non_alphanumeric': 0.07091561938958707, 'fraction_numerical': 0.0, 'mean_word_length': 3.847826086956522, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7021401', 'n_tokens_mistral': 366, 'n_tokens_neox': 335, 'n_words': 129}