aboutsummaryrefslogtreecommitdiff
path: root/example-project/src
diff options
context:
space:
mode:
authorThibault Gagnaux <tgagnaux@gmail.com>2022-02-02 18:50:13 +0100
committerThibault Gagnaux <tgagnaux@gmail.com>2022-02-02 18:50:13 +0100
commit47f99d65a09660863cb5d6b25b239ead3389f3ac (patch)
treec1ca8819f6fa59f4fe481ce2406ffdb2250a193e /example-project/src
parentddf176c4d9ad16648ea8e2459694d34d6c68e5d7 (diff)
downloadfrege-gradle-plugin-47f99d65a09660863cb5d6b25b239ead3389f3ac.tar.gz
frege-gradle-plugin-47f99d65a09660863cb5d6b25b239ead3389f3ac.tar.bz2
frege-gradle-plugin-47f99d65a09660863cb5d6b25b239ead3389f3ac.zip
feat: simplifies the whole gradle plugin
- the `compileFregeTask` has a new optional input called `mainModuleName`. If it is set, it and only its dependencies will be compiled, otherwise all `.fr`files in the `mainSourceDir`will be compiled. - the internal `DependencyFregeTask` is deleted because it was only used by the vscode plugin and I decided to remove this gradle plugin as a dependency. - an example project folder was added to test the plugin manually.
Diffstat (limited to 'example-project/src')
-rw-r--r--example-project/src/main/frege/ch/fhnw/thga/Dep.fr3
-rw-r--r--example-project/src/main/frege/ch/fhnw/thga/Test.fr14
2 files changed, 17 insertions, 0 deletions
diff --git a/example-project/src/main/frege/ch/fhnw/thga/Dep.fr b/example-project/src/main/frege/ch/fhnw/thga/Dep.fr
new file mode 100644
index 0000000..1edc713
--- /dev/null
+++ b/example-project/src/main/frege/ch/fhnw/thga/Dep.fr
@@ -0,0 +1,3 @@
+module ch.fhnw.thga.Dep where
+
+square x = x * x \ No newline at end of file
diff --git a/example-project/src/main/frege/ch/fhnw/thga/Test.fr b/example-project/src/main/frege/ch/fhnw/thga/Test.fr
new file mode 100644
index 0000000..8467d11
--- /dev/null
+++ b/example-project/src/main/frege/ch/fhnw/thga/Test.fr
@@ -0,0 +1,14 @@
+module ch.fhnw.thga.Test where
+
+import ch.fhnw.thga.Dep
+
+frobnicate a = (square a, "Frege rocks")
+
+add a b = a + b
+
+sub a b = a - b
+
+mult a b = a * b
+
+main = do
+ println $ frobnicate 5 \ No newline at end of file