module Experimenter.Util where import qualified Data.Text as T tshow :: (Show a) => a -> T.Text tshow :: forall a. Show a => a -> Text tshow = String -> Text T.pack forall b c a. (b -> c) -> (a -> b) -> a -> c . forall a. Show a => a -> String show tread :: (Read a) => T.Text -> a tread :: forall a. Read a => Text -> a tread = forall a. Read a => String -> a read forall b c a. (b -> c) -> (a -> b) -> a -> c . Text -> String T.unpack fromEither :: b -> Either a b -> b fromEither :: forall b a. b -> Either a b -> b fromEither b def Left{} = b def fromEither b _ (Right b b) = b b