Skip to content

Commit

Permalink
Adding string instance to EnvVarReader useful for FilePath type in lo…
Browse files Browse the repository at this point in the history
…gger.
  • Loading branch information
Montmorency committed Nov 29, 2022
1 parent d33879c commit 68c11b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion IHP/FrameworkConfig.hs
Expand Up @@ -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

Expand Down Expand Up @@ -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)
wrapWithCallStack exception = throwIO (ExceptionWithCallStack Stack.callStack exception)

0 comments on commit 68c11b5

Please sign in to comment.