aboutsummaryrefslogtreecommitdiff
path: root/sucl/pfun.dcl
diff options
context:
space:
mode:
authorjohnvg2011-05-10 13:45:26 +0000
committerjohnvg2011-05-10 13:45:26 +0000
commit851602809c397be0fa3bde9ed89eca0a9ebdd927 (patch)
treec2dd6a8facb349d1c78de019bc2d19822998f0b7 /sucl/pfun.dcl
parentdelete portToNewSyntax (diff)
delete sucl, the same files can be found in the branch sucl
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1940 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'sucl/pfun.dcl')
-rw-r--r--sucl/pfun.dcl58
1 files changed, 0 insertions, 58 deletions
diff --git a/sucl/pfun.dcl b/sucl/pfun.dcl
deleted file mode 100644
index 2f68103..0000000
--- a/sucl/pfun.dcl
+++ /dev/null
@@ -1,58 +0,0 @@
-definition module pfun
-
-// $Id$
-
-from StdString import toString
-from StdOverloaded import ==
-from cleanversion import String
-
-// Partial function abstract type
-:: Pfun dom ran
-
-// The empty partial function
-emptypfun :: .Pfun .dom .ran
-
-// Extend a partial function
-extend :: .dom .ran (Pfun .dom .ran) -> Pfun .dom .ran
-
-// Restrict a partial function (take away one mapping)
-restrict :: .dom (Pfun .dom .ran) -> Pfun .dom .ran
-
-// Overwrite partial function with a new one
-// first arg is the new p.f.
-// second arg is overwritten
-overwrite :: !(Pfun .dom .ran) (Pfun .dom .ran) -> (Pfun .dom .ran)
-
-// Modify a partial function by applying a function to all its results
-postcomp :: (.ran1 -> .ran2) !(Pfun .dom .ran1) -> Pfun .dom .ran2
-
-// Build a total function from a partial one by supplying a default value
-total :: .ran !(Pfun dom .ran) dom -> .ran | == dom
-
-// Apply partial function with a default value
-foldpfun :: (.ran1 -> .ran2) .ran2 !(Pfun dom .ran1) dom -> .ran2 | == dom
-
-// Domain restriction of a partial function
-domres :: !.[dom] .(Pfun dom ran) -> Pfun dom ran | == dom
-
-// Apply a partial function to an argument
-// getting a result that may fail
-apply :: !(Pfun dom .ran) dom -> (.Bool,.ran) | == dom
-
-// Partial functions are printable
-instance toString (Pfun dom ran) | toString dom & toString ran & == dom
-(writepfun) infixl :: *File .(Pfun dom ran) -> .File | ==,toString dom & toString ran
-
-showpfun ::
- (dom->String)
- (ran->String)
- (Pfun dom ran)
- -> String
- | == dom
-
-/* `Idpfun dom pfun' checks whether partial function `pfun' is the identity
- on the nodes in `dom' for which it is defined.
-*/
-idpfun :: !.[dom] .(Pfun dom dom) -> Bool | == dom
-
-instance == (Pfun dom ran) | == dom & == ran