From 6722bb77093d16523db926f5894e7d987eeadbf1 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 8 Dec 2020 13:15:36 -0500 Subject: Slight refactor for clarity --- Biz/Devalloc.hs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'Biz/Devalloc.hs') diff --git a/Biz/Devalloc.hs b/Biz/Devalloc.hs index cb09f10..a806d65 100644 --- a/Biz/Devalloc.hs +++ b/Biz/Devalloc.hs @@ -230,11 +230,10 @@ data Analysis = Analysis instance Lucid.ToHtml Analysis where toHtmlRaw = Lucid.toHtml - toHtml analysis = - Lucid.toHtml <| render + toHtml = Lucid.toHtml . render where - render :: Lucid.Html () - render = + render :: Analysis -> Lucid.Html () + render analysis = Lucid.div_ <| do Lucid.h1_ "Analysis Results" Lucid.p_ (Lucid.toHtml <| Text.pack <| show <| targetRepo analysis) @@ -248,11 +247,7 @@ encodeParams = . Web.FormUrlEncoded.urlEncodeParams selectRepo :: Vector GitHub.Repo -> Lucid.Html () -selectRepo repos = - repos - |> Vector.toList - |> mapM_ render - |> Lucid.ul_ +selectRepo = Lucid.ul_ . mapM_ render . Vector.toList where render :: GitHub.Repo -> Lucid.Html () render repo = -- cgit v1.2.3