From 94042ae4f2f6983a04d1ff2c99144330562b6301 Mon Sep 17 00:00:00 2001 From: Michele Tartara <mtartara@google.com> Date: Wed, 6 Feb 2013 09:16:01 +0000 Subject: [PATCH] Fix improperly formatted docstring Change the docstring of chompPrefix to prevent the error "doc comment parse failed" that was raised by some version of haddock while generating the documentation for this function. Signed-off-by: Michele Tartara <mtartara@google.com> Reviewed-by: Helga Velroyen <helgav@google.com> --- src/Ganeti/Utils.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Ganeti/Utils.hs b/src/Ganeti/Utils.hs index cfaaaab2f..74377aa43 100644 --- a/src/Ganeti/Utils.hs +++ b/src/Ganeti/Utils.hs @@ -318,19 +318,19 @@ clockTimeToString (TOD t _) = show t (which is assumed to be a separator) to be absent from the string if the string terminates there. ->>> chompPrefix "foo:bar:" "a:b:c" +\>>> chompPrefix \"foo:bar:\" \"a:b:c\" Nothing ->>> chompPrefix "foo:bar:" "foo:bar:baz" -Just "baz" +\>>> chompPrefix \"foo:bar:\" \"foo:bar:baz\" +Just \"baz\" ->>> chompPrefix "foo:bar:" "foo:bar:" -Just "" +\>>> chompPrefix \"foo:bar:\" \"foo:bar:\" +Just \"\" ->>> chompPrefix "foo:bar:" "foo:bar" -Just "" +\>>> chompPrefix \"foo:bar:\" \"foo:bar\" +Just \"\" ->>> chompPrefix "foo:bar:" "foo:barbaz" +\>>> chompPrefix \"foo:bar:\" \"foo:barbaz\" Nothing -} chompPrefix :: String -> String -> Maybe String -- GitLab