{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module PkgInfo where import Data.String (IsString) import Data.Monoid import Prelude hiding ((<>)) name :: IsString a => Maybe a name = Nothing tag :: IsString a => a tag = "" revision :: IsString a => a revision = "" branch :: IsString a => a branch = "" branch' :: IsString a => a branch' = "" vcsVersion :: IsString a => a vcsVersion = "" compiler :: IsString a => a compiler = "ghc-8.6.3" flags :: IsString a => [a] flags = [] optimisation :: IsString a => a optimisation = "none" arch :: IsString a => a arch = "x86_64-linux" license :: IsString a => a license = "MIT" licenseText :: IsString a => a licenseText = "Copyright (c) 2014 AlephCloud Systems, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" copyright :: IsString a => a copyright = "(c) 2019-2020 Colin Woodbury <colin@fosskers.ca>,\n(c) 2015-2020 Lars Kuhtz <lakuhtz@gmail.com>,\n(c) 2014-2015 AlephCloud, Inc." author :: IsString a => a author = "Lars Kuhtz <lakuhtz@gmail.com>" homepage :: IsString a => a homepage = "https://github.com/alephcloud/hs-configuration-tools" package :: IsString a => a package = "configuration-tools-0.5.0" packageName :: IsString a => a packageName = "configuration-tools" packageVersion :: IsString a => a packageVersion = "0.5.0" dependencies :: IsString a => [a] dependencies = ["Cabal-2.4.0.1","StateVar-1.2","aeson-1.4.7.1","ansi-terminal-0.10.3","ansi-wl-pprint-0.6.9","array-0.5.3.0","attoparsec-0.13.2.4","base-4.12.0.0","base-compat-0.11.1","base-compat-batteries-0.11.1","base-orphans-0.8.2","base-unicode-symbols-0.2.4.2","bifunctors-5.5.7","binary-0.8.6.0","bytestring-0.10.8.2","case-insensitive-1.2.1.0","colour-2.3.5","comonad-5.0.6","conduit-1.3.2","containers-0.6.0.1","contravariant-1.5.2","deepseq-1.4.4.0","directory-1.3.3.0","distributive-0.6.1","dlist-0.8.0.8","exceptions-0.10.4","filepath-1.4.2.1","ghc-boot-th-8.6.3","ghc-prim-0.5.3","hashable-1.3.0.0","integer-gmp-1.0.2.0","integer-logarithms-1.0.3","libyaml-0.1.2","mono-traversable-1.0.15.1","mtl-2.2.2","network-uri-2.6.3.0","optparse-applicative-0.15.1.0","parsec-3.1.13.0","pretty-1.1.3.6","primitive-0.7.0.1","process-1.6.3.0","profunctors-5.5.2","random-1.1","resourcet-1.2.3","rts-1.0","scientific-0.3.6.2","semigroupoids-5.3.4","semigroups-0.19.1","split-0.2.3.4","stm-2.5.0.0","tagged-0.8.6","template-haskell-2.14.0.0","text-1.2.3.1","th-abstraction-0.3.2.0","time-1.8.0.2","time-compat-1.9.3","transformers-0.5.5.0","transformers-compat-0.6.5","unix-2.7.2.2","unliftio-core-0.2.0.1","unordered-containers-0.2.10.0","uuid-types-1.0.3","vector-0.12.1.2","vector-algorithms-0.8.0.3","yaml-0.11.3.0"] dependenciesWithLicenses :: IsString a => [a] dependenciesWithLicenses = ["Cabal-2.4.0.1 [BSD-3-Clause, 2003-2018, Cabal Development Team (see AUTHORS file)]","StateVar-1.2 [BSD-3-Clause, Copyright (C) 2014-2015 Edward A. Kmett, 2009-2018 Sven Panne]","aeson-1.4.7.1 [BSD-3-Clause, (c) 2011-2016 Bryan O'Sullivan (c) 2011 MailRank, Inc.]","ansi-terminal-0.10.3 [BSD-3-Clause]","ansi-wl-pprint-0.6.9 [BSD-3-Clause]","array-0.5.3.0 [BSD-3-Clause]","attoparsec-0.13.2.4 [BSD-3-Clause]","base-4.12.0.0 [BSD-3-Clause]","base-compat-0.11.1 [MIT, (c) 2012-2018 Simon Hengel, (c) 2014-2018 Jo\227o Crist\243v\227o, (c) 2015-2018 Ryan Scott]","base-compat-batteries-0.11.1 [MIT, (c) 2012-2018 Simon Hengel, (c) 2014-2018 Jo\227o Crist\243v\227o, (c) 2015-2018 Ryan Scott]","base-orphans-0.8.2 [MIT, (c) 2012-2017 Simon Hengel, (c) 2014-2017 Jo\227o Crist\243v\227o, (c) 2015-2017 Ryan Scott]","base-unicode-symbols-0.2.4.2 [BSD-3-Clause, 2009\8211\&2019 Roel van Dijk <roel@lambdacube.nl>]","bifunctors-5.5.7 [BSD-3-Clause, Copyright (C) 2008-2016 Edward A. Kmett]","binary-0.8.6.0 [BSD-3-Clause]","bytestring-0.10.8.2 [BSD-3-Clause, Copyright (c) Don Stewart 2005-2009, (c) Duncan Coutts 2006-2015, (c) David Roundy 2003-2005, (c) Jasper Van der Jeugt 2010, (c) Simon Meier 2010-2013.]","case-insensitive-1.2.1.0 [BSD-3-Clause, 2011 Bas van Dijk]","colour-2.3.5 [MIT]","comonad-5.0.6 [BSD-3-Clause, Copyright (C) 2008-2014 Edward A. Kmett, Copyright (C) 2004-2008 Dave Menendez]","conduit-1.3.2 [MIT]","containers-0.6.0.1 [BSD-3-Clause]","contravariant-1.5.2 [BSD-3-Clause, Copyright (C) 2007-2015 Edward A. Kmett]","deepseq-1.4.4.0 [BSD-3-Clause]","directory-1.3.3.0 [BSD-3-Clause]","distributive-0.6.1 [BSD-3-Clause, Copyright (C) 2011-2016 Edward A. Kmett]","dlist-0.8.0.8 [BSD-3-Clause, 2006-2009 Don Stewart, 2013-2019 Sean Leather]","exceptions-0.10.4 [BSD-3-Clause, Copyright (C) 2013-2015 Edward A. Kmett Copyright (C) 2012 Google Inc.]","filepath-1.4.2.1 [BSD-3-Clause, Neil Mitchell 2005-2018]","ghc-boot-th-8.6.3 [BSD-3-Clause]","ghc-prim-0.5.3 [BSD-3-Clause]","hashable-1.3.0.0 [BSD-3-Clause]","integer-gmp-1.0.2.0 [BSD-3-Clause]","integer-logarithms-1.0.3 [MIT, (c) 2011 Daniel Fischer]","libyaml-0.1.2 [BSD-3-Clause]","mono-traversable-1.0.15.1 [MIT]","mtl-2.2.2 [BSD-3-Clause]","network-uri-2.6.3.0 [BSD-3-Clause]","optparse-applicative-0.15.1.0 [BSD-3-Clause, (c) 2012-2017 Paolo Capriotti <paolo@capriotti.io>]","parsec-3.1.13.0 [BSD-3-Clause]","pretty-1.1.3.6 [BSD-3-Clause]","primitive-0.7.0.1 [BSD-3-Clause, (c) Roman Leshchinskiy 2009-2012]","process-1.6.3.0 [BSD-3-Clause]","profunctors-5.5.2 [BSD-3-Clause, Copyright (C) 2011-2015 Edward A. Kmett]","random-1.1 [BSD-3-Clause]","resourcet-1.2.3 [BSD-3-Clause]","rts-1.0 [BSD-3-Clause]","scientific-0.3.6.2 [BSD-3-Clause]","semigroupoids-5.3.4 [BSD-3-Clause, Copyright (C) 2011-2015 Edward A. Kmett]","semigroups-0.19.1 [BSD-3-Clause, Copyright (C) 2011-2015 Edward A. Kmett]","split-0.2.3.4 [BSD-3-Clause, (c) Brent Yorgey, Louis Wasserman 2008-2012]","stm-2.5.0.0 [BSD-3-Clause]","tagged-0.8.6 [BSD-3-Clause, 2009-2015 Edward A. Kmett]","template-haskell-2.14.0.0 [BSD-3-Clause]","text-1.2.3.1 [BSD-2-Clause, 2009-2011 Bryan O'Sullivan, 2008-2009 Tom Harper]","th-abstraction-0.3.2.0 [ISC, 2017 Eric Mertens]","time-1.8.0.2 [BSD-3-Clause]","time-compat-1.9.3 [BSD-3-Clause]","transformers-0.5.5.0 [BSD-3-Clause]","transformers-compat-0.6.5 [BSD-3-Clause, Copyright (C) 2012-2015 Edward A. Kmett]","unix-2.7.2.2 [BSD-3-Clause]","unliftio-core-0.2.0.1 [MIT, 2017-2020 FP Complete]","unordered-containers-0.2.10.0 [BSD-3-Clause, 2010-2014 Johan Tibell 2010 Edward Z. Yang]","uuid-types-1.0.3 [BSD-3-Clause, (c) 2008-2014 Antoine Latter]","vector-0.12.1.2 [BSD-3-Clause, (c) Roman Leshchinskiy 2008-2012]","vector-algorithms-0.8.0.3 [BSD-3-Clause, (c) 2008,2009,2010,2011,2012,2013,2014,2015 Dan Doel (c) 2015 Tim Baumann]","yaml-0.11.3.0 [BSD-3-Clause]"] versionString :: (Monoid a, IsString a) => a versionString = case name of Nothing -> package <> " (revision " <> vcsVersion <> ")" Just n -> n <> "-" <> packageVersion <> " (package " <> package <> " revision " <> vcsVersion <> ")" info :: (Monoid a, IsString a) => a info = versionString <> "\n" <> copyright longInfo :: (Monoid a, IsString a) => a longInfo = info <> "\n\n" <> "Author: " <> author <> "\n" <> "License: " <> license <> "\n" <> "Homepage: " <> homepage <> "\n" <> "Build with: " <> compiler <> " (" <> arch <> ")" <> "\n" <> "Build flags: " <> mconcat (map (\x -> " " <> x) flags) <> "\n" <> "Optimisation: " <> optimisation <> "\n\n" <> "Dependencies:\n" <> mconcat (map (\x -> " " <> x <> "\n") dependenciesWithLicenses) pkgInfo :: (Monoid a, IsString a) => (a, a, a, a) pkgInfo = ( info , longInfo , versionString , licenseText )