summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2022-02-06 19:05:46 +0200
committerJan Tuomi <jans.tuomi@gmail.com>2022-02-06 20:03:27 +0200
commitd5fe35bb8a75a74c7b3616b864c4d35bafecaadd (patch)
tree410325cafa976dfa0596872d8c0582e1b36772c0
parentc2053ee0585280229375b10283cb9e8dbb903734 (diff)
Add proper cabal setup
-rw-r--r--.gitignore1
-rw-r--r--deps.sh6
-rwxr-xr-xrun.sh5
-rw-r--r--slam-interpreter.cabal41
-rw-r--r--src/Interpreter.hs (renamed from src/interpreter.hs)0
-rw-r--r--src/LTypes.hs (renamed from src/ltypes.hs)0
-rw-r--r--src/Main.hs (renamed from src/main.hs)0
-rw-r--r--src/Parser.hs (renamed from src/parser.hs)0
-rw-r--r--src/Utils.hs (renamed from src/utils.hs)0
9 files changed, 42 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index 1561641..ddbd9ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
*.o
interpreter
.git/
+dist-newstyle/
diff --git a/deps.sh b/deps.sh
deleted file mode 100644
index 3d4c73b..0000000
--- a/deps.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-set -euo pipefail
-
-cabal install --lib hashable
-cabal install --lib mtl
diff --git a/run.sh b/run.sh
deleted file mode 100755
index 460a851..0000000
--- a/run.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-set -uo pipefail
-ghc -v0 -o interpreter src/*.hs
-./interpreter $@
diff --git a/slam-interpreter.cabal b/slam-interpreter.cabal
new file mode 100644
index 0000000..2486274
--- /dev/null
+++ b/slam-interpreter.cabal
@@ -0,0 +1,41 @@
+cabal-version: 2.4
+name: slam-interpreter
+version: 0.1.0.0
+
+-- A short (one-line) description of the package.
+-- synopsis:
+
+-- A longer description of the package.
+-- description:
+
+-- A URL where users can report bugs.
+-- bug-reports:
+
+-- The license under which the package is released.
+-- license:
+author: Jan Tuomi
+maintainer: jans.tuomi@gmail.com
+
+-- A copyright notice.
+-- copyright:
+-- category:
+-- extra-source-files: CHANGELOG.md
+
+executable slam-interpreter
+ main-is: Main.hs
+
+ -- Modules included in this executable, other than Main.
+ other-modules: Interpreter,
+ LTypes,
+ Parser,
+ Utils
+
+ -- LANGUAGE extensions used by modules in this package.
+ -- other-extensions:
+ build-depends: base^>=4.14.1.0,
+ text^>=1.2.4.1,
+ mtl^>=2.2.2,
+ containers^>=0.6.5.1,
+ hashable^>=1.4.0.1
+ hs-source-dirs: src
+ default-language: Haskell2010
diff --git a/src/interpreter.hs b/src/Interpreter.hs
index cb71c62..cb71c62 100644
--- a/src/interpreter.hs
+++ b/src/Interpreter.hs
diff --git a/src/ltypes.hs b/src/LTypes.hs
index e3f9b59..e3f9b59 100644
--- a/src/ltypes.hs
+++ b/src/LTypes.hs
diff --git a/src/main.hs b/src/Main.hs
index b596a84..b596a84 100644
--- a/src/main.hs
+++ b/src/Main.hs
diff --git a/src/parser.hs b/src/Parser.hs
index 679f318..679f318 100644
--- a/src/parser.hs
+++ b/src/Parser.hs
diff --git a/src/utils.hs b/src/Utils.hs
index 96f5fcb..96f5fcb 100644
--- a/src/utils.hs
+++ b/src/Utils.hs