Commit 10521d84 authored by partain's avatar partain
Browse files

[project @ 1996-01-11 14:06:51 by partain]

parent 7fa716e2
......@@ -65,26 +65,35 @@ done
# OK, now make the \`real' Makefiles
for i in @DoingGHC@ @DoingHappy@ @DoingHaggis@ @DoingNoFib@ ; do
passed_in_setup="-S @MkWorldSetup@"
for i in @DoingGHC@ @DoingHappy@ @DoingHaggis@ @DoingNoFib@ EndOfList ; do
if [ $i = nofib ] ; then
setup=$passed_in_setup
else
setup=''
fi
if [ -d $i ] ; then
( set -e; \
cd $i ; \
echo '' ; \
echo "*** configuring $i ..." ; \
make -f Makefile.BOOT BOOT_DEFINES="-P $i -S @MkWorldSetup@ -C mkworld -DTopDirPwd=$hardtop"; \
make -f Makefile.BOOT BOOT_DEFINES="-P $i $setup -C mkworld -DTopDirPwd=$hardtop"; \
echo '' ; \
echo "*** making Makefiles in $i ..." ; \
make Makefile ; \
make Makefiles \
)
else
echo warning: $i is not a directory -- doing nothing for it
if [ $i != EndOfList ] ; then
echo warning: $i is not a directory -- doing nothing for it
fi
fi
done
# Finally, the dependencies
for i in @DoingGHC@ @DoingHappy@ @DoingHaggis@ @DoingNoFib@ ; do
for i in @DoingGHC@ @DoingHappy@ @DoingHaggis@ @DoingNoFib@ EndOfList ; do
if [ -d $i ] ; then
( set -e; \
cd $i ; \
......@@ -93,7 +102,9 @@ for i in @DoingGHC@ @DoingHappy@ @DoingHaggis@ @DoingNoFib@ ; do
make depend \
)
else
echo warning: $i is not a directory -- doing nothing for it
if [ $i != EndOfList ] ; then
echo warning: $i is not a directory -- doing nothing for it
fi
fi
done
......@@ -101,14 +112,16 @@ echo ''
echo '*******************************************************************'
echo "* Looking good! All you should need to do now is... *"
echo '* *'
for i in @DoingGHC@ @DoingHappy@ @DoingHaggis@ @DoingNoFib@ ; do
echo " cd $i"
if [ $i = nofib ] ; then
echo ' make all # or...'
echo ' make runtests'
else
echo ' make all'
echo ' make install # if you are so inclined...'
for i in @DoingGHC@ @DoingHappy@ @DoingHaggis@ @DoingNoFib@ EndOfList ; do
if [ $i != EndOfList ] ; then
echo " cd $i"
if [ $i = nofib ] ; then
echo ' make all # or...'
echo ' make runtests'
else
echo ' make all'
echo ' make install # if you are so inclined...'
fi
fi
done
echo '* *'
......
......@@ -386,9 +386,12 @@ mips-sgi-irix*)
HostVendor_CPP='sgi'
HostOS_CPP='irix'
;;
rs6000-ibm-aix*)
HostPlatform_CPP='rs6000_ibm_aix'
HostArch_CPP='rs6000'
powerpc-ibm-aix*)
HostPlatform=powerpc-ibm-aix
TargetPlatform=powerpc-ibm-aix #hack
BuildPlatform=powerpc-ibm-aix #hack
HostPlatform_CPP='powerpc_ibm_aix'
HostArch_CPP='powerpc'
HostVendor_CPP='ibm'
HostOS_CPP='aix'
;;
......@@ -502,8 +505,12 @@ glafp-utils/perl-4.035-fixes to your 4.035 perl.
"
fi
else
echo "I'm not sure if your version of perl will work,"
echo "but it's worth a shot, eh?"
if egrep "version 5" conftest.out >/dev/null 2>&1; then
:
else
echo "I'm not sure if your version of perl will work,"
echo "but it's worth a shot, eh?"
fi
fi
rm -fr conftest*
fi
......@@ -898,6 +905,9 @@ GhcBuild_l='NO'
GhcBuild_m='NO'
GhcBuild_n='NO'
GhcBuild_o='NO'
GhcBuild_A='NO'
GhcBuild_B='NO'
# More could be added here...
AC_ARG_ENABLE(normal-build,
[
......@@ -1219,6 +1229,30 @@ dnl exit 1
dnl ;;
dnl esac])
dnl
dnl AC_ARG_ENABLE(user-way-A,
dnl [--enable-user-way-A build for \`user way A' (mostly for implementors)],
dnl [case "$enableval" in
dnl yes) GhcBuild_A='YES'
dnl ;;
dnl no) GhcBuild_A='NO'
dnl ;;
dnl *) echo "I don't understand this option: --enable-user-way-A=$enableval"
dnl exit 1
dnl ;;
dnl esac])
dnl
dnl AC_ARG_ENABLE(user-way-B,
dnl [--enable-user-way-B build for \`user way B' (mostly for implementors)],
dnl [case "$enableval" in
dnl yes) GhcBuild_B='YES'
dnl ;;
dnl no) GhcBuild_B='NO'
dnl ;;
dnl *) echo "I don't understand this option: --enable-user-way-B=$enableval"
dnl exit 1
dnl ;;
dnl esac])
dnl
AC_SUBST(GhcBuild_normal)
AC_SUBST(GhcBuild_p)
AC_SUBST(GhcBuild_t)
......@@ -1246,6 +1280,8 @@ dnl AC_SUBST(GhcBuild_l)
dnl AC_SUBST(GhcBuild_m)
dnl AC_SUBST(GhcBuild_n)
dnl AC_SUBST(GhcBuild_o)
dnl AC_SUBST(GhcBuild_A)
dnl AC_SUBST(GhcBuild_B)
#---------------------------------------------------------------
#
......@@ -1336,7 +1372,7 @@ AC_ARG_ENABLE(portable-C,
if test $GhcWithRegisterised = 'YES'; then
case $HostPlatform in
alpha-* | hppa1.1-* | i386-* | m68k-* | mips-* | sparc-* )
alpha-* | hppa1.1-* | i386-* | m68k-* | mips-* | powerpc-* | sparc-* )
;;
*)
echo "Don't know non-portable C tricks for this platform: $HostPlatform"
......@@ -1428,7 +1464,7 @@ AC_ARG_ENABLE(native-code-generator,
esac])
if test $GhcWithNativeCodeGen = 'YES'; then
case $TargetPlatform in
sparc-sun-sunos4 | sparc-sun-solaris2 | alpha-dec-osf1 )
i386-* | alpha-* | sparc-* )
;;
*)
echo "Don't have a native-code generator for this platform: $TargetPlatform"
......@@ -1645,6 +1681,34 @@ fi
#
# -------------------------------------------------------------------------
dnl
dnl * `Literate' CONFIGURATION STUFF
if test "xxx$DoingLiterate" = 'xxxliterate' ; then
# a very big "if"!
BuildInfoUtils='NO'
AC_ARG_ENABLE(info-utils,
[
*******************************************************************
** Literate programming system OPTIONS:
--enable-info-utils build GNU info/makeinfo utilities],
[case "$enableval" in
yes) BuildInfoUtils='YES'
;;
no) BuildInfoUtils='NO'
;;
*) echo "I don't understand this option: --enable-info-utils=$enableval"
exit 1
;;
esac])
AC_SUBST(BuildInfoUtils)
# here ends a very big if DoingLiterate = 'literate' ...
fi
#
# -------------------------------------------------------------------------
dnl
dnl * `NoFib' CONFIGURATION STUFF
if test "xxx$DoingNoFib" = 'xxxnofib' ; then
......@@ -1726,8 +1790,8 @@ AC_SUBST(WithNoFibHcType)
dnl ** what mkworld \`setup' should be used?
AC_ARG_WITH(setup,
[
What mkworld \`setup' should be used?
Choices: ghc, hbc, nhc
--with-setup=<setup> : What mkworld \`setup' should be used?
Choices: ghc, hbc, nhc
],
[case "$withval" in
ghc ) MkWorldSetup='ghc'
......@@ -1736,7 +1800,7 @@ Choices: ghc, hbc, nhc
;;
nhc ) MkWorldSetup='nhc'
;;
*) echo "I don't understand this option: --with-hc-for-nofib=$withval"
*) echo "I don't understand this option: --with-setup=$withval"
exit 1
;;
esac])
......
I've collected all the Haskell modes for GNU Emacs that I could lay my
hands on -- there are billions. A list is attached, grouped by
"family".
I don't like "mode junk" myself, so I don't use any of them. I will
include advertising or testimonials from happy users if they send them
along...
Will Partain
partain@dcs.glasgow.ac.uk
95/12/05
=======================================================================
* "Chalmers Haskell mode family" -- "Major mode for editing Haskell",
by Lars Bo Nielsen and Lennart Augustsson.
chalmers/original -- the original -- version 0.1.
chalmers/thiemann -- Peter Thiemann added "indentation stuff"
and fontification -- version 0.2.
chalmers/sof -- Sigbjorn Finne's <sof@dcs.glasgow.ac.uk> hacked
version of Thiemann's.
.......................................................................
* "Glasgow Haskell mode family" -- originally written by Richard McPhee
et al., at Glasgow University, as a student project, for Kevin
Hammond.
glasgow/original : version 1.0, now maintained by
gem@minster.york.ac.uk
.......................................................................
* "Simon Marlow Haskell mode family" -- This is the one that comes
with GHC, versions 0.16 up to at least 0.26.
simonm/real : the real thing
simonm/ghc : the one distributed with GHC 0.16-0.26; no particular
reason to prefer this one...
.......................................................................
* "Yale Haskell mode family" -- Especially good for chatting to a
Yale-Haskell inferior process :-)
yale/original : the real thing
yale/chak : "extended by Manuel M.T. Chakravarty with rudimentary
editing features (including better syntax table) and support
for the font-lock-mode." Via Hans Wolfgang Loidl
<hwloidl@dcs.glasgow.ac.uk>
;; haskell-mode.el. Major mode for editing Haskell.
;; Copyright (C) 1989, Free Software Foundation, Inc., Lars Bo Nielsen
;; and Lennart Augustsson
;; This file is not officially part of GNU Emacs.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY. No author or distributor
;; accepts responsibility to anyone for the consequences of using it
;; or for whether it serves any particular purpose or works at all,
;; unless he says so in writing. Refer to the GNU Emacs General Public
;; License for full details.
;; Everyone is granted permission to copy, modify and redistribute
;; GNU Emacs, but only under the conditions described in the
;; GNU Emacs General Public License. A copy of this license is
;; supposed to have been given to you along with GNU Emacs so you
;; can know your rights and responsibilities. It should be in a
;; file named COPYING. Among other things, the copyright notice
;; and this notice must be preserved on all copies.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Haskell Mode. A major mode for editing and running Haskell. (Version 0.0)
;; =================================================================
;;
;; This is a mode for editing and running Haskell.
;; It is very much based on the sml mode for GNU Emacs. It
;; features:
;;
;; - Inferior shell running Haskell. No need to leave emacs, just
;; keep right on editing while Haskell runs in another window.
;;
;; - Automatic "load file" in inferior shell. Send regions of code
;; to the Haskell program.
;;
;;
;; 1. HOW TO USE THE Haskell-MODE
;; ==========================
;;
;; Here is a short introduction to the mode.
;;
;; 1.1 GETTING STARTED
;; -------------------
;;
;; If you are an experienced user of Emacs, just skip this section.
;;
;; To use the haskell-mode, insert this in your "~/.emacs" file (Or ask your
;; emacs-administrator to help you.):
;;
;; (setq auto-mode-alist (cons '("\\.hs$" . haskell-mode) (cons '("\\.lhs$" . haskell-mode)
;; auto-mode-alist)))
;; (autoload 'haskell-mode "haskell-mode" "Major mode for editing Haskell." t)
;;
;; Now every time a file with the extension `.hs' or `.lhs' is found, it is
;; automatically started up in haskell-mode.
;;
;; You will also have to specify the path to this file, so you will have
;; to add this as well:
;;
;; (setq load-path (cons "/usr/me/emacs" load-path))
;;
;; where "/usr/me/emacs" is the directory where this file is.
;;
;; You may also want to compile the this file (M-x byte-compile-file)
;; for speed.
;;
;; You are now ready to start using haskell-mode. If you have tried other
;; language modes (like lisp-mode or C-mode), you should have no
;; problems. There are only a few extra functions in this mode.
;;
;; 1.2. EDITING COMMANDS.
;; ----------------------
;;
;; The following editing and inferior-shell commands can ONLY be issued
;; from within a buffer in haskell-mode.
;;
;; LFD (reindent-then-newline-and-indent).
;; This is probably the function you will be using the most (press
;; CTRL while you press Return, press C-j or press Newline). It
;; will reindent the line, then make a new line and perform a new
;; indentation.
;;
;; M-; (indent-for-comment).
;; Like in other language modes, this command will give you a comment
;; at the of the current line. The column where the comment starts is
;; determined by the variable comment-column (default: 40).
;;
;; C-c C-v (haskell-mode-version).
;; Get the version of the haskell-mode.
;;
;;
;; 1.3. COMMANDS RELATED TO THE INFERIOR SHELL
;; -------------------------------------------
;;
;; C-c C-s (haskell-pop-to-shell).
;; This command starts up an inferior shell running haskell. If the shell
;; is running, it will just pop up the shell window.
;;
;; C-c C-u (haskell-save-buffer-use-file).
;; This command will save the current buffer and send a "load file",
;; where file is the file visited by the current buffer, to the
;; inferior shell running haskell.
;;
;; C-c C-f (haskell-run-on-file).
;; Will send a "load file" to the inferior shell running haskell,
;; prompting you for the file name.
;;
;; C-c C-r (haskell-send-region).
;; Will send region, from point to mark, to the inferior shell
;; running haskell.
;;
;; C-c C-b (haskell-send-buffer).
;; Will send whole buffer to inferior shell running haskell.
;;
;; 2. INDENTATION
;; ================
;; Not yet.
;;
;; 3. INFERIOR SHELL.
;; ==================
;;
;; The mode for Standard ML also contains a mode for an inferior shell
;; running haskell. The mode is the same as the shell-mode, with just one
;; extra command.
;;
;; 3.1. INFERIOR SHELL COMMANDS
;; ----------------------------
;;
;; C-c C-f (haskell-run-on-file). Send a `load file' to the process running
;; haskell.
;;
;; 3.2. CONSTANTS CONTROLLING THE INFERIOR SHELL MODE
;; --------------------------------------------------
;;
;; Because haskell is called differently on various machines, and the
;; haskell-systems have their own command for reading in a file, a set of
;; constants controls the behavior of the inferior shell running haskell (to
;; change these constants: See CUSTOMIZING YOUR Haskell-MODE below).
;;
;; haskell-prog-name (default "hbi").
;; This constant is a string, containing the command to invoke
;; Standard ML on your system.
;;
;; haskell-use-right-delim (default "\"")
;; haskell-use-left-delim (default "\"")
;; The left and right delimiter used by your version of haskell, for
;; `use file-name'.
;;
;; haskell-process-name (default "Haskell").
;; The name of the process running haskell. (This will be the name
;; appearing on the mode line of the buffer)
;;
;; NOTE: The haskell-mode functions: haskell-send-buffer, haskell-send-function and
;; haskell-send-region, creates temporary files (I could not figure out how
;; to send large amounts of data to a process). These files will be
;; removed when you leave emacs.
;;
;;
;; 4. CUSTOMIZING YOUR Haskell-MODE
;; ============================
;;
;; If you have to change some of the constants, you will have to add a
;; `hook' to the haskell-mode. Insert this in your "~/.emacs" file.
;;
;; (setq haskell-mode-hook 'my-haskell-constants)
;;
;; Your function "my-haskell-constants" will then be executed every time
;; "haskell-mode" is invoked. Now you only have to write the emacs-lisp
;; function "my-haskell-constants", and put it in your "~/.emacs" file.
;;
;; Say you are running a version of haskell that uses the syntax `load
;; ["file"]', is invoked by the command "OurHaskell" and you don't want the
;; indentation algorithm to indent according to open parenthesis, your
;; function should look like this:
;;
;; (defun my-haskell-constants ()
;; (setq haskell-prog-name "OurHaskell")
;; (setq haskell-use-left-delim "[\"")
;; (setq haskell-use-right-delim "\"]")
;; (setq haskell-paren-lookback nil))
;;
;; The haskell-shell also runs a `hook' (haskell-shell-hook) when it is invoked.
;;
;;
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;
;; ORIGINAL AUTHOR
;; Lars Bo Nielsen
;; Aalborg University
;; Computer Science Dept.
;; 9000 Aalborg
;; Denmark
;;
;; lbn@iesd.dk
;; or: ...!mcvax!diku!iesd!lbn
;; or: mcvax!diku!iesd!lbn@uunet.uu.net
;;
;; MODIFIED FOR Haskell BY
;; Lennart Augustsson
;;
;;
;; Please let me know if you come up with any ideas, bugs, or fixes.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defconst haskell-mode-version-string
"HASKELL-MODE, Version 0.1")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; CONSTANTS CONTROLLING THE MODE.
;;;
;;; These are the constants you might want to change
;;;
;; The command used to start up the haskell-program.
(defconst haskell-prog-name "hbi" "*Name of program to run as haskell.")
;; The left delimmitter for `load file'
(defconst haskell-use-left-delim "\""
"*The left delimiter for the filename when using \"load\".")
;; The right delimmitter for `load file'
(defconst haskell-use-right-delim "\""
"*The right delimiter for the filename when using \"load\".")
;; A regular expression matching the prompt pattern in the inferior
;; shell
(defconst haskell-shell-prompt-pattern "^> *"
"*The prompt pattern for the inferion shell running haskell.")
;; The template used for temporary files, created when a region is
;; send to the inferior process running haskell.
(defconst haskell-tmp-template "/tmp/haskell.tmp."
"*Template for the temporary file, created by haskell-simulate-send-region.")
;; The name of the process running haskell (This will also be the name of
;; the buffer).
(defconst haskell-process-name "Haskell" "*The name of the Haskell-process")
;;;
;;; END OF CONSTANTS CONTROLLING THE MODE.
;;;
;;; If you change anything below, you are on your own.
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar haskell-mode-syntax-table nil "The syntax table used in haskell-mode.")
(defvar haskell-mode-map nil "The mode map used in haskell-mode.")
(defun haskell-mode ()
"Major mode for editing Haskell code.
Tab indents for Haskell code.
Comments are delimited with --
Paragraphs are separated by blank lines only.
Delete converts tabs to spaces as it moves back.
Key bindings:
=============
\\[haskell-pop-to-shell]\t Pop to the haskell window.
\\[haskell-save-buffer-use-file]\t Save the buffer, and send a \"load file\".
\\[haskell-send-region]\t Send region (point and mark) to haskell.
\\[haskell-run-on-file]\t Send a \"load file\" to haskell.
\\[haskell-send-buffer]\t Send whole buffer to haskell.
\\[haskell-mode-version]\t Get the version of haskell-mode.
\\[haskell-evaluate-expression]\t Prompt for an expression and evalute it.
Mode map
========
\\{haskell-mode-map}
Runs haskell-mode-hook if non nil."
(interactive)
(kill-all-local-variables)
(if haskell-mode-map
()
(setq haskell-mode-map (make-sparse-keymap))
(define-key haskell-mode-map "\C-c\C-v" 'haskell-mode-version)
(define-key haskell-mode-map "\C-c\C-u" 'haskell-save-buffer-use-file)
(define-key haskell-mode-map "\C-c\C-s" 'haskell-pop-to-shell)
(define-key haskell-mode-map "\C-c\C-r" 'haskell-send-region)
(define-key haskell-mode-map "\C-c\C-m" 'haskell-region)
(define-key haskell-mode-map "\C-c\C-f" 'haskell-run-on-file)
(define-key haskell-mode-map "\C-c\C-b" 'haskell-send-buffer)
(define-key haskell-mode-map "\C-ce" 'haskell-evaluate-expression)
(define-key haskell-mode-map "\C-j" 'reindent-then-newline-and-indent)
(define-key haskell-mode-map "\177" 'backward-delete-char-untabify))
(use-local-map haskell-mode-map)
(setq major-mode 'haskell-mode)
(setq mode-name "Haskell")
(define-abbrev-table 'haskell-mode-abbrev-table ())
(setq local-abbrev-table haskell-mode-abbrev-table)
(if haskell-mode-syntax-table
()
(setq haskell-mode-syntax-table (make-syntax-table))
(modify-syntax-entry ?\( "()1" haskell-mode-syntax-table)
(modify-syntax-entry ?\) ")(4" haskell-mode-syntax-table)
(modify-syntax-entry ?\\ "." haskell-mode-syntax-table)
(modify-syntax-entry ?* ". 23" haskell-mode-syntax-table)
;; Special characters in haskell-mode to be treated as normal
;; characters:
(modify-syntax-entry ?_ "w" haskell-mode-syntax-table)
(modify-syntax-entry ?\' "w" haskell-mode-syntax-table)
)
(set-syntax-table haskell-mode-syntax-table)
(make-local-variable 'require-final-newline) ; Always put a new-line
(setq require-final-newline t) ; in the end of file
(make-local-variable 'indent-line-function)
(setq indent-line-function 'haskell-indent-line)
(make-local-variable 'comment-start)
(setq comment-start "-- ")
(make-local-variable 'comment-end)
(setq comment-end "")
(make-local-variable 'comment-column)
(setq comment-column 39) ; Start of comment in this column
(make-local-variable 'comment-start-skip)
(setq comment-start-skip "(\\*+[ \t]?") ; This matches a start of comment
(make-local-variable 'comment-indent-hook)
(setq comment-indent-hook 'haskell-comment-indent)
;;
;; Adding these will fool the matching of parens. I really don't
;; know why. It would be nice to have comments treated as
;; white-space
;;
;; (make-local-variable 'parse-sexp-ignore-comments)
;; (setq parse-sexp-ignore-comments t)
;;
(run-hooks 'haskell-mode-hook)) ; Run the hook
(defun haskell-mode-version ()
(interactive)
(message haskell-mode-version-string))