packages feed

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 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++[![Travis CI build status](https://travis-ci.org/dzhus/th-nowq.svg)](https://travis-ci.org/dzhus/th-nowq)+[![Hackage](https://img.shields.io/hackage/v/th-nowq.svg?colorB=5e5184&style=flat)](https://hackage.haskell.org/package/th-nowq)+[![Hackage deps](https://img.shields.io/hackage-deps/v/th-nowq.svg)](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++[![Travis CI build status](https://travis-ci.org/dzhus/th-nowq.svg)](https://travis-ci.org/dzhus/th-nowq)+[![Hackage](https://img.shields.io/hackage/v/th-nowq.svg?colorB=5e5184&style=flat)](https://hackage.haskell.org/package/th-nowq)+[![Hackage deps](https://img.shields.io/hackage-deps/v/th-nowq.svg)](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