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