Skip to content

Commit

Permalink
Add more type annotations and fmap instead of zipWith3, #536.
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Apr 23, 2021
1 parent 2041002 commit 6a8b4c9
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions lang-haskell/mask/library/Flight/Mask/Tag/Double.hs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,14 @@ instance GeoTagInterpolate Double a => GeoTag Double a where
task@Task{zones, speedSection, startGates}
MarkedFixes{mark0, fixes}
indices =
(selected, nominees, SelectedStart selectedStart, NomineeStarts dedupStarts, excluded)

( SelectedCrossings selected
, nominees
, SelectedStart selectedStart
, NomineeStarts dedupStarts
, excluded
)

where
sepZs = separatedZones @Double @Double e

Expand Down Expand Up @@ -286,15 +293,16 @@ instance GeoTagInterpolate Double a => GeoTag Double a where
yss' :: [[Crossing]]
yss' = (fmap . fmap) unOrdCrossing yss

selected = SelectedCrossings $
zipWith3
(\timecheck selector ys ->
selected :: [Maybe ZoneCross]
selected =
let tsys :: [(TimePass, [Crossing] -> Maybe Crossing, [Crossing])]
tsys = zip3 timechecks selectors yss'

pickTag (timecheck, selector, ys) =
let prover = proveCrossing timecheck mark0 fixes
in selectZoneCross prover selector ys)
in selectZoneCross prover selector ys

timechecks
selectors
yss'
in fmap pickTag tsys

fs =
(\x ->
Expand Down

0 comments on commit 6a8b4c9

Please sign in to comment.