module Polysemy.Time.Class.Instant where import Data.Time (Day, UTCTime(UTCTime)) class Instant i dt | i -> dt where dateTime :: i -> dt instance Instant UTCTime UTCTime where dateTime :: UTCTime -> UTCTime dateTime = UTCTime -> UTCTime forall a. a -> a id instance Instant Day UTCTime where dateTime :: Day -> UTCTime dateTime Day day = Day -> DiffTime -> UTCTime UTCTime Day day DiffTime 0