diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2017-03-02 07:12:28 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-03-02 07:12:28 -0700 |
commit | 405f19cb7ab834a7e19557782e394a7c13521a94 (patch) | |
tree | f80af2f8fed071f621b2e4e3c1f89059ca149ec7 /Brick | |
parent | 73c585d02d2ec7fc1bd6894192bad8f2b1138163 (diff) | |
download | sscan-405f19cb7ab834a7e19557782e394a7c13521a94.tar.gz |
fix compiler warnings about ambiguous types
Diffstat (limited to 'Brick')
-rw-r--r-- | Brick/Widgets/DefnList.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Brick/Widgets/DefnList.hs b/Brick/Widgets/DefnList.hs index 016a522..3bc4deb 100644 --- a/Brick/Widgets/DefnList.hs +++ b/Brick/Widgets/DefnList.hs @@ -45,13 +45,14 @@ defnList align attr defns = vBox $ line <$> defns <> (T.pack (gap label content) @@ V.defAttr) <> (T.pack content @@ V.defAttr) - gap a b + gap x y | align == AlignRight = - take (maxWidth - length a - length b - length sep) $ + take (maxWidth - length x - length y - length sep) $ repeat ' ' | align == AlignLeft = - take (maxLabelWidth - length a) $ + take (maxLabelWidth - length x) $ repeat ' ' + gap _ _ = " " maxWidth = maximum $ map (\(x,y) -> length sep + length x + length y) defns |