Skip to content
Snippets Groups Projects
Verified Commit 3d6c349e authored by jan.hamal.dvorak's avatar jan.hamal.dvorak
Browse files

Improve Action docs

parent ba544e38
No related branches found
No related tags found
No related merge requests found
...@@ -80,8 +80,8 @@ module Hikaru.Action ...@@ -80,8 +80,8 @@ module Hikaru.Action
, throwError , throwError
-- ** Localization -- ** Localization
, setLanguages
, getLanguages , getLanguages
, setLanguages
-- ** Finalizing -- ** Finalizing
, registerFinalizer , registerFinalizer
...@@ -427,7 +427,7 @@ where ...@@ -427,7 +427,7 @@ where
-- | -- |
-- Returns HTTP @Referrer@ header or just @/@. -- Obtain HTTP @Referrer@ header or just @/@.
-- --
-- Useful for redirects back to where the user came from. -- Useful for redirects back to where the user came from.
-- --
...@@ -462,7 +462,7 @@ where ...@@ -462,7 +462,7 @@ where
-- just read until the limit is exceeded. -- just read until the limit is exceeded.
-- --
-- Precise enforcement is more expensive, so we may allow slightly -- Precise enforcement is more expensive, so we may allow slightly
-- more (up to 32kb) than the limit set here where the request -- more (up to 32kb) than the limit set here when the request
-- length is not known beforehand. -- length is not known beforehand.
-- --
setBodyLimit :: (MonadAction m) => Int64 -> m () setBodyLimit :: (MonadAction m) => Int64 -> m ()
...@@ -994,7 +994,7 @@ where ...@@ -994,7 +994,7 @@ where
-- | -- |
-- Same as 'throwError', but with a message. -- Same an IO exception in the form of ('RequestError', 'Text').
-- --
throwError :: (MonadAction m) => RequestError -> Text -> m a throwError :: (MonadAction m) => RequestError -> Text -> m a
throwError exn msg = liftIO $ throwIO (exn, msg) throwError exn msg = liftIO $ throwIO (exn, msg)
...@@ -1005,10 +1005,10 @@ where ...@@ -1005,10 +1005,10 @@ where
-- | -- |
-- Get list of languages in order of their preference to be used -- Get list of languages in order of their preference to be used
-- when localizing the result of the action. -- for localization.
-- --
-- Languages must be set using the 'setLanguages' function or through -- Languages must be set using the 'setLanguages' function or through
-- the localization tools found in the "Hikaru.Locale" module. -- the localization tools found in the "Hikaru.Localize" module.
-- --
getLanguages :: (MonadAction m) => m [Text] getLanguages :: (MonadAction m) => m [Text]
getLanguages = getActionField aeLanguages getLanguages = getActionField aeLanguages
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment