on master help sign in
fix hlint suggestions
2edb739AgentM
src/lib/ProjectM36/DataFrame.hs+3−3
@@ -124,12 +124,12 @@ data DataFrameExpr = DataFrameExpr {
124dataFrameAsHTML :: DataFrame -> T.Text
124dataFrameAsHTML :: DataFrame -> T.Text
125-- web browsers don't display tables with empty cells or empty headers, so we have to insert some placeholders- it's not technically the same, but looks as expected in the browser
125-- web browsers don't display tables with empty cells or empty headers, so we have to insert some placeholders- it's not technically the same, but looks as expected in the browser
126dataFrameAsHTML df
126dataFrameAsHTML df
127− | length (tuples df) == 1 && length (attributes df) == 0 = style <>
127+ | length (tuples df) == 1 && null (attributes df) = style <>
128 tablestart <>
128 tablestart <>
129 "<tr><th></th></tr>" <>
129 "<tr><th></th></tr>" <>
130 "<tr><td></td></tr>" <>
130 "<tr><td></td></tr>" <>
131 tablefooter <> "</table>"
131 tablefooter <> "</table>"
132− | length (tuples df) == 0 && length (attributes df) == 0 = style <>
132+ | null (tuples df) && null (attributes df) = style <>
133 tablestart <>
133 tablestart <>
134 "<tr><th></th></tr>" <>
134 "<tr><th></th></tr>" <>
135 tablefooter <>
135 tablefooter <>
@@ -147,7 +147,7 @@ dataFrameAsHTML df
147 tablestart = "<table class=\"pm36dataframe\"\">"
147 tablestart = "<table class=\"pm36dataframe\"\">"
148
148
149tuplesAsHTML :: [DataFrameTuple] -> T.Text
149tuplesAsHTML :: [DataFrameTuple] -> T.Text
150−tuplesAsHTML tups = foldr folder "" tups
150+tuplesAsHTML = foldr folder ""
151 where
151 where
152 folder tuple acc = acc <> tupleAsHTML tuple
152 folder tuple acc = acc <> tupleAsHTML tuple
153
153