From 3d6c349e8280ec893df94fa79e65aeb51a821ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Hamal=20Dvo=C5=99=C3=A1k?= <mordae@anilinux.org> Date: Mon, 27 Jan 2020 01:55:13 +0100 Subject: [PATCH] Improve Action docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan Hamal Dvořák <mordae@anilinux.org> --- lib/Hikaru/Action.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Hikaru/Action.hs b/lib/Hikaru/Action.hs index 8b4bd55..541af39 100644 --- a/lib/Hikaru/Action.hs +++ b/lib/Hikaru/Action.hs @@ -80,8 +80,8 @@ module Hikaru.Action , throwError -- ** Localization - , setLanguages , getLanguages + , setLanguages -- ** Finalizing , registerFinalizer @@ -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. -- @@ -462,7 +462,7 @@ where -- just read until the limit is exceeded. -- -- 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. -- setBodyLimit :: (MonadAction m) => Int64 -> m () @@ -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 exn msg = liftIO $ throwIO (exn, msg) @@ -1005,10 +1005,10 @@ where -- | -- 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 - -- the localization tools found in the "Hikaru.Locale" module. + -- the localization tools found in the "Hikaru.Localize" module. -- getLanguages :: (MonadAction m) => m [Text] getLanguages = getActionField aeLanguages -- GitLab