th-nowq (empty) → 0.1.0.0
raw patch · 6 files changed
+116/−0 lines, 6 filesdep +basedep +template-haskelldep +th-nowqsetup-changed
Dependencies added: base, template-haskell, th-nowq, time
Files
- LICENSE +30/−0
- README.lhs +13/−0
- README.md +13/−0
- Setup.hs +2/−0
- src/Language/Haskell/TH/Now.hs +14/−0
- th-nowq.cabal +44/−0
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright Dmitry Dzhus (c) 2018++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++ * Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++ * Redistributions in binary form must reproduce the above+ copyright notice, this list of conditions and the following+ disclaimer in the documentation and/or other materials provided+ with the distribution.++ * Neither the name of Dmitry Dzhus nor the names of other+ contributors may be used to endorse or promote products derived+ from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ README.lhs view
@@ -0,0 +1,13 @@+# th-nowq++[](https://travis-ci.org/dzhus/th-nowq)+[](https://hackage.haskell.org/package/th-nowq)+[](http://packdeps.haskellers.com/feed?needle=th-nowq)++```haskell+{-# LANGUAGE TemplateHaskell #-}+import Language.Haskell.TH.Now++main :: IO ()+main = print $ "Running app compiled on " ++ $(nowQ)+```
+ README.md view
@@ -0,0 +1,13 @@+# th-nowq++[](https://travis-ci.org/dzhus/th-nowq)+[](https://hackage.haskell.org/package/th-nowq)+[](http://packdeps.haskellers.com/feed?needle=th-nowq)++```haskell+{-# LANGUAGE TemplateHaskell #-}+import Language.Haskell.TH.Now++main :: IO ()+main = print $ "Running app compiled on " ++ $(nowQ)+```
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ src/Language/Haskell/TH/Now.hs view
@@ -0,0 +1,14 @@+module Language.Haskell.TH.Now (nowQ)++where++import Data.Time.Clock+import Data.Time.Format+import Language.Haskell.TH++nowQ :: Q Exp+nowQ = runIO $ LitE . StringL <$> formattedTime+ where+ formattedTime =+ formatTime defaultTimeLocale (iso8601DateFormat (Just "%H:%M:%S%z")) <$>+ getCurrentTime
+ th-nowq.cabal view
@@ -0,0 +1,44 @@+name: th-nowq+version: 0.1.0.0+cabal-version: >=1.10+build-type: Simple+license: BSD3+license-file: LICENSE+maintainer: dima@dzhus.org+homepage: https://github.com/dzhus/th-nowq#readme+bug-reports: https://github.com/dzhus/th-nowq/issues+synopsis: Template Haskell splice that expands to current time+description:+ TH splice that expands to current time as a string literal in ISO-8601 format. Can be used to embed the compilation timestamp in your application.+category: Template Haskell+author: Dmitry Dzhus+extra-source-files:+ README.md++source-repository head+ type: git+ location: https://github.com/dzhus/th-nowq++library+ exposed-modules:+ Language.Haskell.TH.Now+ build-depends:+ base <5,+ template-haskell <2.13,+ time <1.9+ default-language: Haskell2010+ hs-source-dirs: src+ other-modules:+ Paths_th_nowq+ ghc-options: -Wall -Wcompat++test-suite readme+ type: exitcode-stdio-1.0+ main-is: README.lhs+ build-depends:+ base <5,+ th-nowq -any+ default-language: Haskell2010+ other-modules:+ Paths_th_nowq+ ghc-options: -Wall -Wcompat -pgmL markdown-unlit