changeset-time (empty) → 0.2
raw patch · 4 files changed
+112/−0 lines, 4 filesdep +basedep +changesetdep +time
Dependencies added: base, changeset, time
Files
- CHANGELOG.md +5/−0
- LICENSE +20/−0
- changeset-time.cabal +72/−0
- src/Data/Monoid/RightAction/Time/Orphans.hs +15/−0
+ CHANGELOG.md view
@@ -0,0 +1,5 @@+# Revision history for changeset++## 0.2++* First version. `RightAction` and `RightTorsor` instances for `UTCTime`.
+ LICENSE view
@@ -0,0 +1,20 @@+Copyright (c) 2023 Manuel Bärenz++Permission is hereby granted, free of charge, to any person obtaining+a copy of this software and associated documentation files (the+"Software"), to deal in the Software without restriction, including+without limitation the rights to use, copy, modify, merge, publish,+distribute, sublicense, and/or sell copies of the Software, and to+permit persons to whom the Software is furnished to do so, subject to+the following conditions:++The above copyright notice and this permission notice shall be included+in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ changeset-time.cabal view
@@ -0,0 +1,72 @@+cabal-version: 2.4+name: changeset-time+version: 0.2+synopsis: Stateful monad transformer based on monoidal actions+description:+ A general state monad transformer with separate types for the state and the possible changes.+ It can be defined for any monoid action.+ The monoid represents "changes", "updates", "edits" or "diffs" on the state.+ This package provides orphan instances for the time types from the time package.++license: MIT+license-file: LICENSE+author: Manuel Bärenz+maintainer: programming@manuelbaerenz.de+copyright: MIT+category: Control+build-type: Simple+extra-doc-files: CHANGELOG.md++source-repository head+ type: git+ location: https://github.com/turion/changeset++flag dev+ description: Enable warnings as errors. Active on ci.+ default: False+ manual: True++common opts+ ghc-options:+ -Wall++ if flag(dev)+ ghc-options:+ -Werror+ default-extensions:+ BangPatterns+ DeriveFunctor+ DeriveGeneric+ DeriveTraversable+ DerivingStrategies+ DerivingVia+ FlexibleContexts+ FlexibleInstances+ FunctionalDependencies+ GADTs+ GeneralizedNewtypeDeriving+ KindSignatures+ LambdaCase+ MultiParamTypeClasses+ NamedFieldPuns+ QuantifiedConstraints+ RankNTypes+ ScopedTypeVariables+ StandaloneDeriving+ StrictData+ TupleSections+ TypeApplications+ TypeOperators++library+ import: opts+ exposed-modules:+ Data.Monoid.RightAction.Time.Orphans++ build-depends:+ base >=4.12 && <4.22,+ changeset ==0.2,+ time >=1.12 && <1.16,++ hs-source-dirs: src+ default-language: Haskell2010
+ src/Data/Monoid/RightAction/Time/Orphans.hs view
@@ -0,0 +1,15 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}++module Data.Monoid.RightAction.Time.Orphans where++-- time+import Data.Time++-- changeset+import Data.Monoid.RightAction++instance RightAction NominalDiffTime UTCTime where+ actRight = flip addUTCTime++instance RightTorsor NominalDiffTime UTCTime where+ differenceRight = diffUTCTime