From 268a298b5b8c26f6cc6d17923ba6fae3dbccbd4a Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Fri, 18 Sep 2020 19:22:08 +0200 Subject: [PATCH 1/2] Add note about why custom function dropLast is used --- src/Hie/Yaml.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Hie/Yaml.hs b/src/Hie/Yaml.hs index 3a53353..9040af1 100644 --- a/src/Hie/Yaml.hs +++ b/src/Hie/Yaml.hs @@ -50,6 +50,7 @@ fmtComponent (p, c) = <> "component: " <> dQuote c +-- Same as init but handle empty list without throwing errors. dropLast :: [a] -> [a] dropLast l = take (length l - 1) l From 9cd33b9e2795c8f3dd8a1cdbc0a80269ea038080 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Fri, 18 Sep 2020 13:28:24 -0400 Subject: [PATCH 2/2] Comment => doc comment --- src/Hie/Yaml.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Hie/Yaml.hs b/src/Hie/Yaml.hs index 9040af1..0f11682 100644 --- a/src/Hie/Yaml.hs +++ b/src/Hie/Yaml.hs @@ -50,7 +50,7 @@ fmtComponent (p, c) = <> "component: " <> dQuote c --- Same as init but handle empty list without throwing errors. +-- | Same as init but handle empty list without throwing errors. dropLast :: [a] -> [a] dropLast l = take (length l - 1) l