module Jikka.Common.Parse.Read where

import Data.Text (Text, unpack)
import Text.Read (readEither)

run :: Read program => FilePath -> Text -> Either String program
run :: FilePath -> Text -> Either FilePath program
run FilePath
_ Text
input = FilePath -> Either FilePath program
forall a. Read a => FilePath -> Either FilePath a
readEither (FilePath -> Either FilePath program)
-> FilePath -> Either FilePath program
forall a b. (a -> b) -> a -> b
$ Text -> FilePath
unpack Text
input