From 68c11b5a09fd340786cfc7db7b396107a827ad4f Mon Sep 17 00:00:00 2001 From: Montmorency Date: Tue, 29 Nov 2022 10:15:46 +0000 Subject: [PATCH] Adding string instance to EnvVarReader useful for FilePath type in logger. --- IHP/FrameworkConfig.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/IHP/FrameworkConfig.hs b/IHP/FrameworkConfig.hs index 2bfff0bbe..b37dec13c 100644 --- a/IHP/FrameworkConfig.hs +++ b/IHP/FrameworkConfig.hs @@ -236,6 +236,9 @@ instance EnvVarReader Int where instance EnvVarReader Text where envStringToValue string = Right (cs string) +instance EnvVarReader String where + envStringToValue string = Right (cs string) + instance EnvVarReader ByteString where envStringToValue string = Right string @@ -555,4 +558,4 @@ instance Exception ExceptionWithCallStack configIO :: (MonadIO monad, HasCallStack) => IO result -> monad result configIO action = liftIO (action `catch` wrapWithCallStack) where - wrapWithCallStack exception = throwIO (ExceptionWithCallStack Stack.callStack exception) \ No newline at end of file + wrapWithCallStack exception = throwIO (ExceptionWithCallStack Stack.callStack exception)