You seem to be mixing compiled Haskell (
import ...) with GHCi commands (top-level
Top-level definitions should all be given type signatures, e.g.,
sel3 :: (a, b, c) -> c
Try to break down your functions into semantically interesting (and therefore nameable) chunks. For instance,
(sel3 . toWeekDate) d /= 6 is a proposition on
Days to ensure it isn't Saturday. So say that.
-- Usage: isSaturday (fromWeekDate 2016 06 22) == False
-- isSaturday (fromWeekDate 2016 06 25) == True
isSaturday :: Day -> Bool
isSaturday d = weekday d == 6
weekday :: Day -> Int
weekday = sel3 . toWeekDate
Take advantage of available instances!
Days are instances of
Enum, so you can enumerate them directly without that messy
takeWhile you've got going on.
rangeWithoutSaturdays :: Day -> Day -> [Day]
rangeWithoutSaturdays start end = filter (not . isSaturday) [start .. end]