From b17c5d9d3db6df3dd449f042255823a7f1e4f172 Mon Sep 17 00:00:00 2001 From: Joscha Date: Tue, 24 Nov 2020 22:56:50 +0000 Subject: [PATCH] Set up simple stack project --- .gitignore | 3 +++ LICENSE | 18 ++++++++++++++++++ Setup.hs | 2 ++ app/Main.hs | 6 ++++++ package.yaml | 29 +++++++++++++++++++++++++++++ props.cabal | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/Props.hs | 4 ++++ stack.yaml | 5 +++++ stack.yaml.lock | 13 +++++++++++++ 9 files changed, 124 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 Setup.hs create mode 100644 app/Main.hs create mode 100644 package.yaml create mode 100644 props.cabal create mode 100644 src/Props.hs create mode 100644 stack.yaml create mode 100644 stack.yaml.lock diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..210965c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.stack-work/ +*~ +client_session_key.aes diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..dfba359 --- /dev/null +++ b/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2020 Garmelon + +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. diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/app/Main.hs b/app/Main.hs new file mode 100644 index 0000000..d94efcc --- /dev/null +++ b/app/Main.hs @@ -0,0 +1,6 @@ +module Main where + +import Props + +main :: IO () +main = putStrLn helloWorld diff --git a/package.yaml b/package.yaml new file mode 100644 index 0000000..d1f1575 --- /dev/null +++ b/package.yaml @@ -0,0 +1,29 @@ +name: props +version: 0.1.0.0 +license: MIT +author: Garmelon +copyright: 2020 Garmelon + +extra-source-files: +- README.md +- LICENSE + +extra-doc-files: +- README.md + +dependencies: +- base >= 4.7 && < 5 + +library: + source-dirs: src + +executables: + props: + main: Main.hs + source-dirs: app + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N + dependencies: + - props diff --git a/props.cabal b/props.cabal new file mode 100644 index 0000000..8063c21 --- /dev/null +++ b/props.cabal @@ -0,0 +1,44 @@ +cabal-version: 1.18 + +-- This file has been generated from package.yaml by hpack version 0.33.0. +-- +-- see: https://github.com/sol/hpack +-- +-- hash: 057a536ac3d0fd40b3122084eee53201158527bbcd0dbac7cec33d8fd06cf208 + +name: props +version: 0.1.0.0 +author: Garmelon +maintainer: Garmelon +copyright: 2020 Garmelon +license: MIT +license-file: LICENSE +build-type: Simple +extra-source-files: + README.md + LICENSE +extra-doc-files: + README.md + +library + exposed-modules: + Props + other-modules: + Paths_props + hs-source-dirs: + src + build-depends: + base >=4.7 && <5 + default-language: Haskell2010 + +executable props + main-is: Main.hs + other-modules: + Paths_props + hs-source-dirs: + app + ghc-options: -threaded -rtsopts -with-rtsopts=-N + build-depends: + base >=4.7 && <5 + , props + default-language: Haskell2010 diff --git a/src/Props.hs b/src/Props.hs new file mode 100644 index 0000000..8caf1dc --- /dev/null +++ b/src/Props.hs @@ -0,0 +1,4 @@ +module Props where + +helloWorld :: String +helloWorld = "Hello World!" diff --git a/stack.yaml b/stack.yaml new file mode 100644 index 0000000..602ebce --- /dev/null +++ b/stack.yaml @@ -0,0 +1,5 @@ +resolver: + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/23.yaml + +packages: +- . diff --git a/stack.yaml.lock b/stack.yaml.lock new file mode 100644 index 0000000..3d6911f --- /dev/null +++ b/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: 532832 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/23.yaml + sha256: fbb2a0519008533924c7753bd7164ddd1009f09504eb06674acad6049b46db09 + original: + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/23.yaml