diff options
author | Mart Lubbers | 2015-02-06 08:39:37 +0100 |
---|---|---|
committer | Mart Lubbers | 2015-02-06 08:39:37 +0100 |
commit | 379b6353396ca2401241d714733d570629835ffe (patch) | |
tree | 26652c854a79c627b5f50bc8ac26f9b84f8e196d /files/practicum/TupleOverloading.dcl | |
parent | Merge branch 'master' of https://github.com/dopefishh/fp1 (diff) |
added practicum files, updated gitignore
Diffstat (limited to 'files/practicum/TupleOverloading.dcl')
-rw-r--r-- | files/practicum/TupleOverloading.dcl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/files/practicum/TupleOverloading.dcl b/files/practicum/TupleOverloading.dcl new file mode 100644 index 0000000..6831948 --- /dev/null +++ b/files/practicum/TupleOverloading.dcl @@ -0,0 +1,25 @@ +definition module TupleOverloading
+
+import StdEnv
+
+instance + (a,b) | + a & + b
+instance + (a,b,c) | + a & + b & + c
+
+
+instance - (a,b) | - a & - b
+instance - (a,b,c) | - a & - b & - c
+
+instance * (a,b) | * a & * b
+instance * (a,b,c) | * a & * b & * c
+
+instance / (a,b) | / a & / b
+instance / (a,b,c) | / a & / b & / c
+
+instance zero (a,b) | zero a & zero b
+instance zero (a,b,c) | zero a & zero b & zero c
+
+instance one (a,b) | one a & one b
+instance one (a,b,c) | one a & one b & one c
+
+instance ~ (a,b) | ~ a & ~ b
+instance ~ (a,b,c) | ~ a & ~ b & ~ c
|