From c41d8aa43e7183d0f3d85bd1d8799d03db58be74 Mon Sep 17 00:00:00 2001 From: Dennis Frieberg Date: Tue, 22 Sep 2020 12:11:10 +0200 Subject: [PATCH] refactored aeson instance in own package, this is now a multi-package project --- stack.yaml | 3 +- tickLeiste-aeson/.gitignore | 2 + tickLeiste-aeson/ChangeLog.md | 3 + LICENSE => tickLeiste-aeson/LICENSE | 0 tickLeiste-aeson/README.md | 1 + Setup.hs => tickLeiste-aeson/Setup.hs | 0 tickLeiste-aeson/app/Main.hs | 6 ++ tickLeiste-aeson/package.yaml | 52 +++++++++++++ .../src}/Data/Aeson/TickLeiste.hs | 0 tickLeiste-aeson/src/Lib.hs | 6 ++ {test => tickLeiste-aeson/test}/Spec.hs | 0 tickLeiste-aeson/tickLeiste-aeson.cabal | 73 +++++++++++++++++++ ChangeLog.md => tickLeiste/ChangeLog.md | 0 tickLeiste/LICENSE | 30 ++++++++ README.md => tickLeiste/README.md | 0 tickLeiste/Setup.hs | 2 + package.yaml => tickLeiste/package.yaml | 0 {src => tickLeiste/src}/Data/TickLeiste.hs | 0 tickLeiste/stack.yaml.lock | 13 ++++ tickLeiste/test/Spec.hs | 2 + .../tickLeiste.cabal | 0 21 files changed, 192 insertions(+), 1 deletion(-) create mode 100644 tickLeiste-aeson/.gitignore create mode 100644 tickLeiste-aeson/ChangeLog.md rename LICENSE => tickLeiste-aeson/LICENSE (100%) create mode 100644 tickLeiste-aeson/README.md rename Setup.hs => tickLeiste-aeson/Setup.hs (100%) create mode 100644 tickLeiste-aeson/app/Main.hs create mode 100644 tickLeiste-aeson/package.yaml rename {src => tickLeiste-aeson/src}/Data/Aeson/TickLeiste.hs (100%) create mode 100644 tickLeiste-aeson/src/Lib.hs rename {test => tickLeiste-aeson/test}/Spec.hs (100%) create mode 100644 tickLeiste-aeson/tickLeiste-aeson.cabal rename ChangeLog.md => tickLeiste/ChangeLog.md (100%) create mode 100644 tickLeiste/LICENSE rename README.md => tickLeiste/README.md (100%) create mode 100644 tickLeiste/Setup.hs rename package.yaml => tickLeiste/package.yaml (100%) rename {src => tickLeiste/src}/Data/TickLeiste.hs (100%) create mode 100644 tickLeiste/stack.yaml.lock create mode 100644 tickLeiste/test/Spec.hs rename tickLeiste.cabal => tickLeiste/tickLeiste.cabal (100%) diff --git a/stack.yaml b/stack.yaml index aa72cf0..41feb9d 100644 --- a/stack.yaml +++ b/stack.yaml @@ -30,7 +30,8 @@ resolver: # - auto-update # - wai packages: -- . +- tickLeiste +- tickLeiste-aeson # Dependency packages to be pulled from upstream that are not in the resolver. # These entries can reference officially published versions as well as # forks / in-progress versions pinned to a git hash. For example: diff --git a/tickLeiste-aeson/.gitignore b/tickLeiste-aeson/.gitignore new file mode 100644 index 0000000..c368d45 --- /dev/null +++ b/tickLeiste-aeson/.gitignore @@ -0,0 +1,2 @@ +.stack-work/ +*~ \ No newline at end of file diff --git a/tickLeiste-aeson/ChangeLog.md b/tickLeiste-aeson/ChangeLog.md new file mode 100644 index 0000000..dce1625 --- /dev/null +++ b/tickLeiste-aeson/ChangeLog.md @@ -0,0 +1,3 @@ +# Changelog for tickLeiste-aeson + +## Unreleased changes diff --git a/LICENSE b/tickLeiste-aeson/LICENSE similarity index 100% rename from LICENSE rename to tickLeiste-aeson/LICENSE diff --git a/tickLeiste-aeson/README.md b/tickLeiste-aeson/README.md new file mode 100644 index 0000000..a49f84b --- /dev/null +++ b/tickLeiste-aeson/README.md @@ -0,0 +1 @@ +# tickLeiste-aeson diff --git a/Setup.hs b/tickLeiste-aeson/Setup.hs similarity index 100% rename from Setup.hs rename to tickLeiste-aeson/Setup.hs diff --git a/tickLeiste-aeson/app/Main.hs b/tickLeiste-aeson/app/Main.hs new file mode 100644 index 0000000..de1c1ab --- /dev/null +++ b/tickLeiste-aeson/app/Main.hs @@ -0,0 +1,6 @@ +module Main where + +import Lib + +main :: IO () +main = someFunc diff --git a/tickLeiste-aeson/package.yaml b/tickLeiste-aeson/package.yaml new file mode 100644 index 0000000..dc642a4 --- /dev/null +++ b/tickLeiste-aeson/package.yaml @@ -0,0 +1,52 @@ +name: tickLeiste-aeson +version: 0.1.0.0 +github: "githubuser/tickLeiste-aeson" +license: BSD3 +author: "Author name here" +maintainer: "example@example.com" +copyright: "2020 Author name here" + +extra-source-files: +- README.md +- ChangeLog.md + +# Metadata used when publishing your package +# synopsis: Short description of your package +# category: Web + +# To avoid duplicated efforts in documentation and dealing with the +# complications of embedding Haddock markup inside cabal files, it is +# common to point users to the README.md file. +description: Please see the README on GitHub at + +dependencies: +- base >= 4.7 && < 5 +- tickLeiste +- uuid +- aeson +- text + +library: + source-dirs: src + +executables: + tickLeiste-aeson-exe: + main: Main.hs + source-dirs: app + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N + dependencies: + - tickLeiste-aeson + +tests: + tickLeiste-aeson-test: + main: Spec.hs + source-dirs: test + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N + dependencies: + - tickLeiste-aeson diff --git a/src/Data/Aeson/TickLeiste.hs b/tickLeiste-aeson/src/Data/Aeson/TickLeiste.hs similarity index 100% rename from src/Data/Aeson/TickLeiste.hs rename to tickLeiste-aeson/src/Data/Aeson/TickLeiste.hs diff --git a/tickLeiste-aeson/src/Lib.hs b/tickLeiste-aeson/src/Lib.hs new file mode 100644 index 0000000..d36ff27 --- /dev/null +++ b/tickLeiste-aeson/src/Lib.hs @@ -0,0 +1,6 @@ +module Lib + ( someFunc + ) where + +someFunc :: IO () +someFunc = putStrLn "someFunc" diff --git a/test/Spec.hs b/tickLeiste-aeson/test/Spec.hs similarity index 100% rename from test/Spec.hs rename to tickLeiste-aeson/test/Spec.hs diff --git a/tickLeiste-aeson/tickLeiste-aeson.cabal b/tickLeiste-aeson/tickLeiste-aeson.cabal new file mode 100644 index 0000000..d670bd1 --- /dev/null +++ b/tickLeiste-aeson/tickLeiste-aeson.cabal @@ -0,0 +1,73 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.34.2. +-- +-- see: https://github.com/sol/hpack + +name: tickLeiste-aeson +version: 0.1.0.0 +description: Please see the README on GitHub at +homepage: https://github.com/githubuser/tickLeiste-aeson#readme +bug-reports: https://github.com/githubuser/tickLeiste-aeson/issues +author: Author name here +maintainer: example@example.com +copyright: 2020 Author name here +license: BSD3 +license-file: LICENSE +build-type: Simple +extra-source-files: + README.md + ChangeLog.md + +source-repository head + type: git + location: https://github.com/githubuser/tickLeiste-aeson + +library + exposed-modules: + Data.Aeson.TickLeiste + Lib + other-modules: + Paths_tickLeiste_aeson + hs-source-dirs: + src + build-depends: + aeson + , base >=4.7 && <5 + , text + , tickLeiste + , uuid + default-language: Haskell2010 + +executable tickLeiste-aeson-exe + main-is: Main.hs + other-modules: + Paths_tickLeiste_aeson + hs-source-dirs: + app + ghc-options: -threaded -rtsopts -with-rtsopts=-N + build-depends: + aeson + , base >=4.7 && <5 + , text + , tickLeiste + , tickLeiste-aeson + , uuid + default-language: Haskell2010 + +test-suite tickLeiste-aeson-test + type: exitcode-stdio-1.0 + main-is: Spec.hs + other-modules: + Paths_tickLeiste_aeson + hs-source-dirs: + test + ghc-options: -threaded -rtsopts -with-rtsopts=-N + build-depends: + aeson + , base >=4.7 && <5 + , text + , tickLeiste + , tickLeiste-aeson + , uuid + default-language: Haskell2010 diff --git a/ChangeLog.md b/tickLeiste/ChangeLog.md similarity index 100% rename from ChangeLog.md rename to tickLeiste/ChangeLog.md diff --git a/tickLeiste/LICENSE b/tickLeiste/LICENSE new file mode 100644 index 0000000..e637cde --- /dev/null +++ b/tickLeiste/LICENSE @@ -0,0 +1,30 @@ +Copyright Author name here (c) 2020 + +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 Author name here 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. diff --git a/README.md b/tickLeiste/README.md similarity index 100% rename from README.md rename to tickLeiste/README.md diff --git a/tickLeiste/Setup.hs b/tickLeiste/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/tickLeiste/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/package.yaml b/tickLeiste/package.yaml similarity index 100% rename from package.yaml rename to tickLeiste/package.yaml diff --git a/src/Data/TickLeiste.hs b/tickLeiste/src/Data/TickLeiste.hs similarity index 100% rename from src/Data/TickLeiste.hs rename to tickLeiste/src/Data/TickLeiste.hs diff --git a/tickLeiste/stack.yaml.lock b/tickLeiste/stack.yaml.lock new file mode 100644 index 0000000..857b03e --- /dev/null +++ b/tickLeiste/stack.yaml.lock @@ -0,0 +1,13 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + size: 532383 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/10.yaml + sha256: 469d781ab6d2a4eceed6b31b6e4ec842dcd3cd1d11577972e86902603dce24df + original: + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/10.yaml diff --git a/tickLeiste/test/Spec.hs b/tickLeiste/test/Spec.hs new file mode 100644 index 0000000..cd4753f --- /dev/null +++ b/tickLeiste/test/Spec.hs @@ -0,0 +1,2 @@ +main :: IO () +main = putStrLn "Test suite not yet implemented" diff --git a/tickLeiste.cabal b/tickLeiste/tickLeiste.cabal similarity index 100% rename from tickLeiste.cabal rename to tickLeiste/tickLeiste.cabal