# [Haskell] + [Data.Dates](https://hackage.haskell.org/package/dates-0.2.2.1/docs/Data-Dates.html), 55 bytes

    import Data.Dates
    succ.dateWeekDay<$>getCurrentDateTime

[Try it online!](https://tio.run/##y0gszk7Nyfn/PzO3IL@oRMElsSRRD0ikFnPlJmbm2RaUFqWqKBaXJifrpQBFw1NTs10SK21U7NJTS5xLi4pS80pAqkMyc1P//wcA "Haskell – Try It Online") 

This uses the fact that Sunday is the last day of the week. `dateWeekDay` returns the day of the week as a `WeekDay` type, which is simply defined as

    data WeekDay = Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday

`WeekDay` is an instance of `Enum`, thus we can use `succ` and `pred` to get the successor or predecessor of a weekday, e.g. `succ Monday` yields `Tuesday`.

However, `Sunday` is the last enum entry, so calling `succ Sunday` results in the following error:

    fail_on_sunday.hs: succ{WeekDay}: tried to take `succ' of last tag in enumeration
    CallStack (from HasCallStack):
      error, called at .\Data\Dates.hs:56:34 in dates-0.2.2.1-6YwCvjmBci55IfacFLnAPe:Data.Dates

*Edit 1: Thanks to nimi for -3 bytes!*  
*Edit 2: -11 bytes now that functions are allowed.*

____

### Full program: <s>88</s> <s>81</s> <s>74</s> <s>69</s> 66 bytes

    import Data.Dates
    main=pure$!succ.dateWeekDay<$>getCurrentDateTime

[Try it online!](https://tio.run/##y0gszk7Nyfn/PzO3IL@oRMElsSRRD0ikFnPlJmbm2RaUFqWqKBaXJifrpQBFw1NTs10SK21U7NJTS5xLi4pS80pAqkMyc1P//wcA "Haskell – Try It Online")

`pure` is needed to lift the resulting `WeekDay` back into the IO Monad. However, Haskell sees that the value is not output in any way by the program, so lazy as it is, the expression is not evaluated, so even on Sundays the program would not fail. This is why `$!` is needed, which forces the evaluation even if Haskell would normally not evaluate the expression.
_______

### Previous approach with `Data.Time`: <s>127</s> 124 bytes

<!-- language-all: lang-hs -->

    import Data.Time.Clock
    import Data.Time.Calendar.WeekDate
    c(_,_,d)|d<7=d
    main=getCurrentTime>>=(pure$!).c.toWeekDate.utctDay

[Try it online!][TIO-jc1xh0mf] These are some impressive imports. Change `d<7` to e.g. `d/=5` to test failure on a Friday. Fails with the following exception: `Non-exhaustive patterns in function c`.

[Haskell]: https://www.haskell.org/
[TIO-jc1xh0mf]: https://tio.run/##Zcu9CoMwEADgPU9hoYOC3OrSuOgjFDrKkRw15E/Oy1Dou6d2cHL94Ftx9xRCrS5umaWZURCeLhJMIRuvroyBkkWGF5E/mJRpl37pbfe1j0FbFdEl/SaZCjMl@adx1O1WmO63DgxIPisUMTLjp9Yf