From 21dfa1e77f9413ebb090e612d30803e07972cf9b Mon Sep 17 00:00:00 2001 From: Bram Date: Tue, 16 Jan 2024 16:05:34 +0100 Subject: [PATCH] Fix documentation standards --- elm.json | 19 +++++++++++++++++++ src/Internal/Config/Leaks.elm | 2 ++ src/Internal/Config/Log.elm | 14 ++++++++++---- src/Internal/Config/Text.elm | 3 +++ 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/elm.json b/elm.json index 78baf2d..5025f40 100644 --- a/elm.json +++ b/elm.json @@ -5,6 +5,25 @@ "license": "EUPL-1.1", "version": "2.1.0", "exposed-modules": [ + "Internal.Config.Default", + "Internal.Config.Leaks", + "Internal.Config.Log", + "Internal.Config.Phantom", + "Internal.Config.Text", + "Internal.Tools.DecodeExtra", + "Internal.Tools.EncodeExtra", + "Internal.Tools.Hashdict", + "Internal.Tools.Iddict", + "Internal.Tools.Json", + "Internal.Tools.Mashdict", + "Internal.Tools.Timestamp", + "Internal.Tools.VersionControl", + "Internal.Values.Context", + "Internal.Values.Envelope", + "Internal.Values.Event", + "Internal.Values.Settings", + "Internal.Values.StateManager", + "Internal.Values.Vault", "Matrix", "Matrix.Event", "Matrix.Settings" diff --git a/src/Internal/Config/Leaks.elm b/src/Internal/Config/Leaks.elm index f3125ca..6562b0a 100644 --- a/src/Internal/Config/Leaks.elm +++ b/src/Internal/Config/Leaks.elm @@ -48,6 +48,8 @@ accessToken = "elm-sdk-placeholder-access-token-leaks" +{-| Complete set of all leaking values. Commonly using for testing purposes. +-} allLeaks : Set String allLeaks = Set.union diff --git a/src/Internal/Config/Log.elm b/src/Internal/Config/Log.elm index b23ce17..90a7abd 100644 --- a/src/Internal/Config/Log.elm +++ b/src/Internal/Config/Log.elm @@ -1,7 +1,4 @@ -module Internal.Config.Log exposing - ( Log, log - , caughtError, debug, error, info, securityWarn, warn - ) +module Internal.Config.Log exposing (Log, log) {-| @@ -21,10 +18,19 @@ without triggering a major update. -- @docs caughtError, debug, error, info, securityWarn, warn +{-| Common pattern for a log message. The log message consists of a log channel +like `debug`, `warn`, `error`, etc. and the content of the message. + +These logs are completely optional: they can be ignored, they can be sent to the +console, or a dialog may be created that presents the log messages. + +-} type alias Log = { channel : String, content : String } +{-| Create a log message of various log types. +-} log : { caughtError : String -> Log , debug : String -> Log diff --git a/src/Internal/Config/Text.elm b/src/Internal/Config/Text.elm index c86bd4c..745b15b 100644 --- a/src/Internal/Config/Text.elm +++ b/src/Internal/Config/Text.elm @@ -81,6 +81,9 @@ accessTokenInvalid = "Matrix API rejected access token as invalid" +{-| Logs when the JSON decoder detects that an imported dictionary contained +duplicate keys. +-} decodedDictSize : Int -> Int -> String decodedDictSize from to = String.concat