aboutsummaryrefslogtreecommitdiff
path: root/sucl/hunt.icl
diff options
context:
space:
mode:
authorjohnvg2011-05-10 13:45:26 +0000
committerjohnvg2011-05-10 13:45:26 +0000
commit851602809c397be0fa3bde9ed89eca0a9ebdd927 (patch)
treec2dd6a8facb349d1c78de019bc2d19822998f0b7 /sucl/hunt.icl
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/hunt.icl')
-rw-r--r--sucl/hunt.icl57
1 files changed, 0 insertions, 57 deletions
diff --git a/sucl/hunt.icl b/sucl/hunt.icl
deleted file mode 100644
index 747230c..0000000
--- a/sucl/hunt.icl
+++ /dev/null
@@ -1,57 +0,0 @@
-implementation module hunt
-
-// $Id$
-
-/*
-
->|| Literal script "hunt.lit"
-
-> %export
-> findfiles
-> glob
-> readable
-> writable
-> getpath
-> expand
-
-> %include "basic.lit"
-
-> findfiles :: ([char]->bool) -> [[char]] -> [[char]] -> [char] -> [[char]]
-
-> findfiles goodmode exts paths base
-> = filter (goodmode.filemode) (expand exts paths base)
-
-> relative :: [char] -> bool
-> relative ('/':cs) = False
-> relative ccs = True
-
-> expand :: [[char]] -> [[char]] -> [char] -> [[char]]
-> expand exts paths base
-> = [path++'/':base++ext|path<-mkset paths;ext<-mkset exts], if relative base
-> = [base++ext|ext<-mkset exts], otherwise
-
-> readable :: [char] -> bool
-> readable ('d':rwx) = False
-> readable (d:'r':wx) = True
-> readable drwx = False
-
-> writable :: [char] -> bool
-> writable "" = True
-> writable ('d':rwx) = False
-> writable (d:r:'w':x) = True
-> writable drwx = False
-
-> getpath :: [[char]] -> [char] -> [[char]]
-> getpath syspath varname
-> = foldr (fill syspath) [] (split ':' (getenv varname))
-
-> fill syspath [] = (syspath++)
-> fill syspath = (:)
-
-> glob :: [char] -> [[char]]
-> glob pattern
-> = filter (~=[]) ((concat.map (split ' ').lines) stdout), if return=0
-> = error ("glob: "++stderr), otherwise
-> where (stdout,stderr,return) = system ("echo "++pattern)
-
-*/