Skip to content

Commit

Permalink
Fix hlint
Browse files Browse the repository at this point in the history
  • Loading branch information
tbidne committed Dec 13, 2024
1 parent 55117c6 commit c4711b6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion backend/src/Pacer/Chart/Data/Chart.hs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ mkCharts ::
List Chart
mkCharts runs = fmap (mkChart runs)

-- NOTE: HLint incorrectly thinks some brackets are unnecessary.
-- See NOTE: [Brackets with OverloadedRecordDot].
--
{- HLINT ignore "Redundant bracket" -}

-- | Turns a sequence of runs and a chart request into a chart.
mkChart ::
forall a.
Expand Down Expand Up @@ -188,10 +193,11 @@ mkChart (MkSomeRuns someRuns@((MkSomeRun @distUnit sd _) :<|| _)) request =
toYHelper axisType (MkSomeRun @distUnit2 s r) = case axisType of
YAxisDistance ->
withSingI s $ toℝ $ case finalDistUnit of
-- NOTE: [Brackets with OverloadedRecordDot]
Meter -> (Run.convertDistance @Kilometer r).distance.unDistance
Kilometer -> (Run.convertDistance @Kilometer r).distance.unDistance
Mile -> (Run.convertDistance @Mile r).distance.unDistance
YAxisDuration -> toℝ $ r.duration.unDuration
YAxisDuration -> toℝ r.duration.unDuration
YAxisPace ->
withSingI s $ toℝ $ case finalDistUnit of
Meter -> runToPace (Run.convertDistance @Kilometer r)
Expand Down

0 comments on commit c4711b6

Please sign in to comment.