aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpacien2019-12-21 19:28:58 +0100
committerpacien2019-12-21 19:28:58 +0100
commitbbae6ddb97c0825f6b0b689f4d9eeac67515d1c1 (patch)
treefcf7b89c21b56a6587e53a1cb8e7678cba0b79bb
parent91d3148f97ca59769648f9307f3d7e65b1bd7e95 (diff)
downloadldgallery-bbae6ddb97c0825f6b0b689f4d9eeac67515d1c1.tar.gz
compiler: init stack project
-rw-r--r--compiler/.gitignore3
-rw-r--r--compiler/Setup.hs2
-rw-r--r--compiler/app/Main.hs6
-rw-r--r--compiler/package.yaml48
-rw-r--r--compiler/readme.md1
-rw-r--r--compiler/src/Lib.hs6
-rw-r--r--compiler/stack.yaml66
-rw-r--r--compiler/test/Spec.hs2
8 files changed, 134 insertions, 0 deletions
diff --git a/compiler/.gitignore b/compiler/.gitignore
new file mode 100644
index 0000000..778e7ef
--- /dev/null
+++ b/compiler/.gitignore
@@ -0,0 +1,3 @@
1.stack-work/
2ldgallery-compiler.cabal
3*~ \ No newline at end of file
diff --git a/compiler/Setup.hs b/compiler/Setup.hs
new file mode 100644
index 0000000..9a994af
--- /dev/null
+++ b/compiler/Setup.hs
@@ -0,0 +1,2 @@
1import Distribution.Simple
2main = defaultMain
diff --git a/compiler/app/Main.hs b/compiler/app/Main.hs
new file mode 100644
index 0000000..de1c1ab
--- /dev/null
+++ b/compiler/app/Main.hs
@@ -0,0 +1,6 @@
1module Main where
2
3import Lib
4
5main :: IO ()
6main = someFunc
diff --git a/compiler/package.yaml b/compiler/package.yaml
new file mode 100644
index 0000000..7cd0178
--- /dev/null
+++ b/compiler/package.yaml
@@ -0,0 +1,48 @@
1name: ldgallery-compiler
2version: 0.1.0.0
3github: "githubuser/ldgallery-compiler"
4license: BSD3
5author: "Author name here"
6maintainer: "example@example.com"
7copyright: "2019 Author name here"
8
9extra-source-files:
10- README.md
11- ChangeLog.md
12
13# Metadata used when publishing your package
14# synopsis: Short description of your package
15# category: Web
16
17# To avoid duplicated efforts in documentation and dealing with the
18# complications of embedding Haddock markup inside cabal files, it is
19# common to point users to the README.md file.
20description: Please see the README on GitHub at <https://github.com/githubuser/ldgallery-compiler#readme>
21
22dependencies:
23- base >= 4.7 && < 5
24
25library:
26 source-dirs: src
27
28executables:
29 ldgallery-compiler-exe:
30 main: Main.hs
31 source-dirs: app
32 ghc-options:
33 - -threaded
34 - -rtsopts
35 - -with-rtsopts=-N
36 dependencies:
37 - ldgallery-compiler
38
39tests:
40 ldgallery-compiler-test:
41 main: Spec.hs
42 source-dirs: test
43 ghc-options:
44 - -threaded
45 - -rtsopts
46 - -with-rtsopts=-N
47 dependencies:
48 - ldgallery-compiler
diff --git a/compiler/readme.md b/compiler/readme.md
new file mode 100644
index 0000000..3aa053c
--- /dev/null
+++ b/compiler/readme.md
@@ -0,0 +1 @@
# ldgallery-compiler
diff --git a/compiler/src/Lib.hs b/compiler/src/Lib.hs
new file mode 100644
index 0000000..d36ff27
--- /dev/null
+++ b/compiler/src/Lib.hs
@@ -0,0 +1,6 @@
1module Lib
2 ( someFunc
3 ) where
4
5someFunc :: IO ()
6someFunc = putStrLn "someFunc"
diff --git a/compiler/stack.yaml b/compiler/stack.yaml
new file mode 100644
index 0000000..29f8539
--- /dev/null
+++ b/compiler/stack.yaml
@@ -0,0 +1,66 @@
1# This file was automatically generated by 'stack init'
2#
3# Some commonly used options have been documented as comments in this file.
4# For advanced use and comprehensive documentation of the format, please see:
5# https://docs.haskellstack.org/en/stable/yaml_configuration/
6
7# Resolver to choose a 'specific' stackage snapshot or a compiler version.
8# A snapshot resolver dictates the compiler version and the set of packages
9# to be used for project dependencies. For example:
10#
11# resolver: lts-3.5
12# resolver: nightly-2015-09-21
13# resolver: ghc-7.10.2
14#
15# The location of a snapshot can be provided as a file or url. Stack assumes
16# a snapshot provided as a file might change, whereas a url resource does not.
17#
18# resolver: ./custom-snapshot.yaml
19# resolver: https://example.com/snapshots/2018-01-01.yaml
20resolver: lts-14.17
21
22# User packages to be built.
23# Various formats can be used as shown in the example below.
24#
25# packages:
26# - some-directory
27# - https://example.com/foo/bar/baz-0.0.2.tar.gz
28# subdirs:
29# - auto-update
30# - wai
31packages:
32- .
33# Dependency packages to be pulled from upstream that are not in the resolver.
34# These entries can reference officially published versions as well as
35# forks / in-progress versions pinned to a git hash. For example:
36#
37# extra-deps:
38# - acme-missiles-0.3
39# - git: https://github.com/commercialhaskell/stack.git
40# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
41#
42# extra-deps: []
43
44# Override default flag values for local packages and extra-deps
45# flags: {}
46
47# Extra package databases containing global packages
48# extra-package-dbs: []
49
50# Control whether we use the GHC we find on the path
51# system-ghc: true
52#
53# Require a specific version of stack, using version ranges
54# require-stack-version: -any # Default
55# require-stack-version: ">=2.1"
56#
57# Override the architecture used by stack, especially useful on Windows
58# arch: i386
59# arch: x86_64
60#
61# Extra directories used by stack for building
62# extra-include-dirs: [/path/to/dir]
63# extra-lib-dirs: [/path/to/dir]
64#
65# Allow a newer minor version of GHC than the snapshot specifies
66# compiler-check: newer-minor
diff --git a/compiler/test/Spec.hs b/compiler/test/Spec.hs
new file mode 100644
index 0000000..cd4753f
--- /dev/null
+++ b/compiler/test/Spec.hs
@@ -0,0 +1,2 @@
1main :: IO ()
2main = putStrLn "Test suite not yet implemented"