cln: hlint: Remove if warnings.
This commit is contained in:
		
							parent
							
								
									d2beb89eba
								
							
						
					
					
						commit
						1e69fd81ea
					
				| @ -63,7 +63,6 @@ | |||||||
| - ignore: {name: "Redundant flip"} | - ignore: {name: "Redundant flip"} | ||||||
| - ignore: {name: "Use replicate"} | - ignore: {name: "Use replicate"} | ||||||
| - ignore: {name: "Use void"} | - ignore: {name: "Use void"} | ||||||
| - ignore: {name: "Use if"} |  | ||||||
| - ignore: {name: "Use bimap"} | - ignore: {name: "Use bimap"} | ||||||
| - ignore: {name: "Use newtype instead of data"} | - ignore: {name: "Use newtype instead of data"} | ||||||
| - ignore: {name: "Use elemIndex"} | - ignore: {name: "Use elemIndex"} | ||||||
|  | |||||||
| @ -206,9 +206,9 @@ fitText mminwidth mmaxwidth ellipsify rightside = clip . pad | |||||||
|       case mmaxwidth of |       case mmaxwidth of | ||||||
|         Just w |         Just w | ||||||
|           | textWidth s > w -> |           | textWidth s > w -> | ||||||
|             case rightside of |             if rightside | ||||||
|               True  -> textTakeWidth (w - T.length ellipsis) s <> ellipsis |               then textTakeWidth (w - T.length ellipsis) s <> ellipsis | ||||||
|               False -> ellipsis <> T.reverse (textTakeWidth (w - T.length ellipsis) $ T.reverse s) |               else ellipsis <> T.reverse (textTakeWidth (w - T.length ellipsis) $ T.reverse s) | ||||||
|           | otherwise -> s |           | otherwise -> s | ||||||
|           where |           where | ||||||
|             ellipsis = if ellipsify then ".." else "" |             ellipsis = if ellipsify then ".." else "" | ||||||
| @ -218,9 +218,9 @@ fitText mminwidth mmaxwidth ellipsify rightside = clip . pad | |||||||
|       case mminwidth of |       case mminwidth of | ||||||
|         Just w |         Just w | ||||||
|           | sw < w -> |           | sw < w -> | ||||||
|             case rightside of |             if rightside | ||||||
|               True  -> s <> T.replicate (w - sw) " " |               then s <> T.replicate (w - sw) " " | ||||||
|               False -> T.replicate (w - sw) " " <> s |               else T.replicate (w - sw) " " <> s | ||||||
|           | otherwise -> s |           | otherwise -> s | ||||||
|         Nothing -> s |         Nothing -> s | ||||||
|       where sw = textWidth s |       where sw = textWidth s | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user