hsc2hs.git
11 years agoWe unconditionally import rawSystem, so it must be safe to use it
Ian Lynagh [Thu, 26 Jun 2008 13:44:44 +0000 (13:44 +0000)] 
We unconditionally import rawSystem, so it must be safe to use it
rather than falling back to system if we don't think we have it

11 years agoTweak whitespace
Ian Lynagh [Thu, 26 Jun 2008 13:38:36 +0000 (13:38 +0000)] 
Tweak whitespace

11 years agonhc98-as-cross-compiler
myself@sylvain-nahas.com [Sun, 6 Apr 2008 17:06:20 +0000 (17:06 +0000)] 
nhc98-as-cross-compiler
  This patch adds support for building nhc98 as a cross-compiler.
  It does so by differencing during the build process between local toolchain (gcc) and cross-toolchain.
  The configure script has been modified to accept a flag --target and some options becomes mandatory
  since they can not be guessed in cross-compile mode.
  The normal build is not impacted by these changes.

11 years agoghc-6.8.x requires more package flags
Malcolm.Wallace@cs.york.ac.uk [Thu, 6 Mar 2008 13:31:38 +0000 (13:31 +0000)] 
ghc-6.8.x requires more package flags

11 years agonhc98 now needs Control.Exception to build from .hc files too
Malcolm.Wallace@cs.york.ac.uk [Thu, 3 Jan 2008 15:42:59 +0000 (15:42 +0000)] 
nhc98 now needs Control.Exception to build from .hc files too

12 years agoneed -package filepath when building with nhc98
Malcolm.Wallace@cs.york.ac.uk [Wed, 4 Jul 2007 11:10:01 +0000 (11:10 +0000)] 
need -package filepath when building with nhc98

12 years agoreplace System.Directory.Internals with System.FilePath.Posix
Malcolm.Wallace@cs.york.ac.uk [Tue, 3 Jul 2007 13:14:48 +0000 (13:14 +0000)] 
replace System.Directory.Internals with System.FilePath.Posix

12 years agoadd -package directory and process to nhc98 builds
Malcolm.Wallace@cs.york.ac.uk [Fri, 25 May 2007 13:11:15 +0000 (13:11 +0000)] 
add -package directory and process to nhc98 builds

12 years agotrack movement of modules from base to new packages
Malcolm.Wallace@cs.york.ac.uk [Fri, 25 May 2007 09:43:47 +0000 (09:43 +0000)] 
track movement of modules from base to new packages

12 years agohsc2hs now depends on directory and process
Ross Paterson [Fri, 25 May 2007 08:39:25 +0000 (08:39 +0000)] 
hsc2hs now depends on directory and process

12 years agoUse version number from Cabal file
sven.panne@aedion.de [Sun, 25 Feb 2007 13:43:01 +0000 (13:43 +0000)] 
Use version number from Cabal file

Don't hardwire the version number into the Haskell code, use the one from the
Cabal file instead. Note that the nhc98 case is still not correct! The main
reason for this is that Data.Version is non-H98, which really, really sucks
and is unnecessary IMHO.

13 years agoadd more library dependencies dragged in by recent changes to System.Directory
Malcolm.Wallace@cs.york.ac.uk [Mon, 13 Nov 2006 10:58:05 +0000 (10:58 +0000)] 
add more library dependencies dragged in by recent changes to System.Directory

13 years agoneed -DBUILD_NHC for making bootstrapping .hc files as well
Malcolm.Wallace@cs.york.ac.uk [Thu, 12 Oct 2006 12:51:05 +0000 (12:51 +0000)] 
need -DBUILD_NHC for making bootstrapping .hc files as well

13 years agoalso requires System.Directory.Internals
Malcolm.Wallace@cs.york.ac.uk [Wed, 23 Aug 2006 11:01:50 +0000 (11:01 +0000)] 
also requires System.Directory.Internals

13 years agoneed to link with System.Directory and Control.Monad for nhc98 build via C
Malcolm.Wallace@cs.york.ac.uk [Tue, 22 Aug 2006 14:01:46 +0000 (14:01 +0000)] 
need to link with System.Directory and Control.Monad for nhc98 build via C

13 years agofix previous patch to rawSystemWithStdOutL
Ross Paterson [Mon, 21 Aug 2006 08:06:00 +0000 (08:06 +0000)] 
fix previous patch to rawSystemWithStdOutL

13 years agoComplain more loudly if any of the hsc2hs phases fail
Malcolm.Wallace@cs.york.ac.uk [Fri, 18 Aug 2006 14:15:58 +0000 (14:15 +0000)] 
Complain more loudly if any of the hsc2hs phases fail
(From Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060703234356)
Previously hsc2hs just exits with a non-zero exit code, now if any of
the compilation, linking or runing phases fail then we get a message
saying so and the failing command is printed.

13 years agoworkaround for ghc-6.2.x not having System.Directory.findExecutable
Malcolm.Wallace@cs.york.ac.uk [Thu, 13 Jul 2006 11:03:13 +0000 (11:03 +0000)] 
workaround for ghc-6.2.x not having System.Directory.findExecutable

13 years agohack to avoid non-existent Paths_hsc2hs module for nhc98
Malcolm.Wallace@cs.york.ac.uk [Tue, 11 Jul 2006 16:24:56 +0000 (16:24 +0000)] 
hack to avoid non-existent Paths_hsc2hs module for nhc98

13 years agopointer to documentation
Ross Paterson [Fri, 2 Jun 2006 23:01:37 +0000 (23:01 +0000)] 
pointer to documentation

13 years agoboilerplate Setup.hs
Ross Paterson [Thu, 1 Jun 2006 16:42:47 +0000 (16:42 +0000)] 
boilerplate Setup.hs

13 years agostandalone version of hsc2hs
Ross Paterson [Thu, 1 Jun 2006 16:37:28 +0000 (16:37 +0000)] 
standalone version of hsc2hs
Set up hsc2hs to build using Cabal.

Also simplified #'ifdef's, sacrificing compatibility with versions prior
to GHC 5.04, nhc 1.17 and Hugs Mar 2005.

13 years agowhitespace only
Ross Paterson [Thu, 1 Jun 2006 16:07:08 +0000 (16:07 +0000)] 
whitespace only

13 years agoMake hsc2hs emit the full path name in {-# LINE #-} pagmas Fork_of_hsc2hs_for_independent_use
Duncan Coutts [Sun, 22 Jan 2006 01:18:31 +0000 (01:18 +0000)] 
Make hsc2hs emit the full path name in {-# LINE #-} pagmas
For one thing this is the right thing to do anyway, it's what other tools do.
Secondly it allows haddock to produce accurate source code links.

14 years ago#ifdef cleanups
panne [Sat, 21 May 2005 15:07:26 +0000 (15:07 +0000)] 
#ifdef cleanups
While acting as warning police, I tried to clean up the #ifdef chaos a
little bit, I hope nothing has been broken due to that... :-]

14 years agoFix and hopefully rationalise the #ifdefs for rawSystem/system/runProcess
simonmar [Wed, 18 May 2005 09:43:50 +0000 (09:43 +0000)] 
Fix and hopefully rationalise the #ifdefs for rawSystem/system/runProcess

14 years agouse runProcess instead of system if appropriate
krasimir [Tue, 17 May 2005 09:48:27 +0000 (09:48 +0000)] 
use runProcess instead of system if appropriate
Use runProcess instead of system if the former is available and we would like
to redirect stdout of the new process. system is unsafe if you have spaces
in the file path or you have / instead of \ on Windows.

14 years agoDefine __CYGWIN32__ for nhc98 build of hsc2hs
malcolm [Thu, 10 Mar 2005 17:58:43 +0000 (17:58 +0000)] 
Define __CYGWIN32__ for nhc98 build of hsc2hs

14 years agoOops, misspelled OPTIONS_GHC
ross [Sat, 29 Jan 2005 12:15:33 +0000 (12:15 +0000)] 
Oops, misspelled OPTIONS_GHC

14 years agoreplacements for OPTIONS
ross [Fri, 28 Jan 2005 16:28:56 +0000 (16:28 +0000)] 
replacements for OPTIONS
from 6.3, generate INCLUDE instead of OPTIONS -#include and GHC_OPTIONS
instead of OPTIONS.

14 years agoRationalise the BUILD,HOST,TARGET defines
simonmar [Fri, 28 Jan 2005 12:56:27 +0000 (12:56 +0000)] 
Rationalise the BUILD,HOST,TARGET defines
Recall that:

  - build is the platform we're building on
  - host is the platform we're running on
  - target is the platform we're generating code for

The change is that now we take these definitions as applying from the
point of view of the particular source code being built, rather than
the point of view of the whole build tree.

For example, in RTS and library code, we were previously testing the
TARGET platform.  But under the new rule, the platform on which this
code is going to run is the HOST platform.  TARGET only makes sense in
the compiler sources.

In practical terms, this means that the values of BUILD, HOST & TARGET
may vary depending on which part of the build tree we are in.

Actual changes:

 - new file: includes/ghcplatform.h contains platform defines for
   the RTS and library code.

 - new file: includes/ghcautoconf.h contains the autoconf settings
   only (HAVE_BLAH).  This is so that we can get hold of these
   settings independently of the platform defines when necessary
   (eg. in GHC).

 - ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h.

 - MachRegs.h, which is included into both the compiler and the RTS,
   now has to cope with the fact that it might need to test either
   _TARGET_ or _HOST_ depending on the context.

 - the compiler's Makefile now generates
     stage{1,2,3}/ghc_boot_platform.h
   which contains platform defines for the compiler.  These differ
   depending on the stage, of course: in stage2, the HOST is the
   TARGET of stage1.  This was wrong before.

 - The compiler doesn't get platform info from Config.hs any more.
   Previously it did (sometimes), but unless we want to generate
   a new Config.hs for each stage we can't do this.

 - GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically
   in CPP'd Haskell source.

 - ghcplatform.h defines *_TARGET_* for backwards compatibility
   (ghcplatform.h is included by ghcconfig.h, which is included by
   config.h, so code which still #includes config.h will get the TARGET
   settings as before).

 - The Users's Guide is updated to mention *_HOST_* rather than
   *_TARGET_*.

 - coding-style.html in the commentary now contains a section on
   platform defines.  There are further doc updates to come.

Thanks to Wolfgang Thaller for pointing me in the right direction.

14 years agomore standard treatment of -D
ross [Thu, 27 Jan 2005 12:38:49 +0000 (12:38 +0000)] 
more standard treatment of -D
turn -Dfoo into
#define foo 1
(like C compilers do) instead of
#define foo

14 years agomake hsc2hs work with Hugs
ross [Mon, 24 Jan 2005 00:36:03 +0000 (00:36 +0000)] 
make hsc2hs work with Hugs

14 years agoRemove dead branch of #elif
malcolm [Thu, 6 Jan 2005 14:55:02 +0000 (14:55 +0000)] 
Remove dead branch of #elif

14 years agofind the best rawSystem
malcolm [Thu, 6 Jan 2005 14:54:17 +0000 (14:54 +0000)] 
find the best rawSystem
When built as a ghc utility, Compat.RawSystem is always available.
When built as an nhc98 utility, -DBUILD_NHC symbol allows for getting
the best otherwise-available version of rawSystem.

14 years agoAdd System.Cmd to c-files dependencies
malcolm [Thu, 6 Jan 2005 11:55:12 +0000 (11:55 +0000)] 
Add System.Cmd to c-files dependencies

14 years agotweaks to finding rawSystem
malcolm [Thu, 6 Jan 2005 10:44:14 +0000 (10:44 +0000)] 
tweaks to finding rawSystem
It seems that ghc-6.2.x doesn't have Compat.RawSystem, so should use
System.Cmd instead.  And ghc-5.04.x doesn't export rawSystem from
there either, so should use the simple inline definition.

14 years agorecent non-GHCs can use System.Cmd.rawSystem
ross [Wed, 5 Jan 2005 15:06:25 +0000 (15:06 +0000)] 
recent non-GHCs can use System.Cmd.rawSystem

14 years ago`rawSystem` is only available in GHC
malcolm [Wed, 5 Jan 2005 11:17:46 +0000 (11:17 +0000)] 
`rawSystem` is only available in GHC

14 years agoUse rawSystem where appropriate
simonmar [Wed, 5 Jan 2005 10:26:46 +0000 (10:26 +0000)] 
Use rawSystem where appropriate

15 years agoMerge backend-hacking-branch onto HEAD. Yay!
simonmar [Fri, 13 Aug 2004 13:11:23 +0000 (13:11 +0000)] 
Merge backend-hacking-branch onto HEAD.  Yay!

15 years agoAvoid string gaps in CPP'd source
simonmar [Thu, 12 Aug 2004 12:12:55 +0000 (12:12 +0000)] 
Avoid string gaps in CPP'd source

15 years agoWorkaround for hbc
panne [Tue, 29 Jun 2004 17:14:01 +0000 (17:14 +0000)] 
Workaround for hbc
It compiles matching against 0-ary constructors in list comprehensions
into wrong code, e.g.

   [ () | True <- [False] ]

results in something like

   Error: No match in I4680Pinteractive

when issued in hbi.

15 years agoSmall syntactic changes to please hbc's interpretation of the layout rule and records
panne [Sun, 27 Jun 2004 20:41:07 +0000 (20:41 +0000)] 
Small syntactic changes to please hbc's interpretation of the layout rule and records

15 years agoMove Makefiles for nhc98's build here, prior to grafting the directory
malcolm [Fri, 11 Jun 2004 11:10:57 +0000 (11:10 +0000)] 
Move Makefiles for nhc98's build here, prior to grafting the directory

15 years agoComments only
simonpj [Wed, 3 Mar 2004 17:11:51 +0000 (17:11 +0000)] 
Comments only

15 years agohack for .exe extension
panne [Sun, 15 Feb 2004 12:20:27 +0000 (12:20 +0000)] 
hack for .exe extension
I'm giving up here: The various quoting-related changes in rawSystem &
friends make it impossible to pass $(exeext) with double quotes via
cpp to Main.hs in a backwards-compatible way, so we revert to a cruel
hack here.  >:-(  Improvements are highly welcome...

15 years agoonly uses FFI, not glasgow-exts, and updated ffi syntax
ross [Mon, 9 Feb 2004 17:23:20 +0000 (17:23 +0000)] 
only uses FFI, not glasgow-exts, and updated ffi syntax

15 years agoSome hints about compiling hsc2hs with nhc98
malcolm [Mon, 9 Feb 2004 15:04:20 +0000 (15:04 +0000)] 
Some hints about compiling hsc2hs with nhc98

15 years agoSimplifications + small steps towards a stand-alone hsc2hs
panne [Sat, 7 Feb 2004 16:37:07 +0000 (16:37 +0000)] 
Simplifications + small steps towards a stand-alone hsc2hs
 * Replaced Config module by a simple CPP macro
 * Don't #include configuration header
 * Bumped version number
 * Warning police

16 years agooutCLine: Use "#line n <filename>", not "# n <filename>"
sof [Wed, 1 Oct 2003 16:45:10 +0000 (16:45 +0000)] 
outCLine: Use "#line n <filename>", not "# n <filename>"
The latter isn't ISO (and causes breakage when compiling output with MSVC.)

16 years agoadd -? and -V options
panne [Wed, 27 Aug 2003 14:11:17 +0000 (14:11 +0000)] 
add -? and -V options
* Added short option -? for --help and -V for --version.
* Small cleanup

16 years agoadd arguments to main()
stolz [Tue, 20 May 2003 11:07:54 +0000 (11:07 +0000)] 
add arguments to main()
Generate
  int main (int argc, char *argv [])
instead of
  int main (void)

Suggested by: Nicolas Oury

16 years agoMake -t option to the script override the template file
ross [Thu, 1 May 2003 10:46:19 +0000 (10:46 +0000)] 
Make -t option to the script override the template file
(just as -c overrides the compiler) as the documentation implies.
(Formerly -t added an extra template file, which is not so useful.)

16 years agoUse old-style foreign import for bkwd compatibility
simonpj [Fri, 21 Feb 2003 13:35:18 +0000 (13:35 +0000)] 
Use old-style foreign import for bkwd compatibility

16 years agoTighten up prev commit
sof [Tue, 11 Feb 2003 04:32:06 +0000 (04:32 +0000)] 
Tighten up prev commit
- win32: only add default --template=... option if the template file
  exists.
- if user has supplied --cc=.., use it as a default for 'ld'.

16 years agohelp the program find things at runtime
sof [Fri, 7 Feb 2003 21:55:36 +0000 (21:55 +0000)] 
help the program find things at runtime
- default linker is now 'ghc' (i.e., consistent with the default compiler.)
- new option, -v/--verbose, which makes the tool less inscrutable about what
  external commands it actually ends up exec'ing.
- under Win32, try locating the default 'ghc' to run by looking in the dir
  where 'hsc2hs' resides (which they do in a binary install.)
- make the default --template arg story actually work (win32 only.)

17 years agoMake imports work for pre-504
simonpj [Tue, 29 Oct 2002 10:50:54 +0000 (10:50 +0000)] 
Make imports work for pre-504

17 years agoUse getExecDir, just like in ghc-pkg and SysTools
simonpj [Mon, 28 Oct 2002 10:11:17 +0000 (10:11 +0000)] 
Use getExecDir, just like in ghc-pkg and SysTools

17 years agoRemove Win32 library dependency
mthomas [Sun, 27 Oct 2002 10:38:33 +0000 (10:38 +0000)] 
Remove Win32 library dependency

17 years agoBuild without hslibs on GHC >= 5.04
simonmar [Mon, 9 Sep 2002 11:39:43 +0000 (11:39 +0000)] 
Build without hslibs on GHC >= 5.04

17 years agoadd `size` macro
krasimir [Sun, 28 Jul 2002 13:55:32 +0000 (13:55 +0000)] 
add `size` macro

17 years agoAdd #offset for just grabbing the byte offset of a struct field
simonmar [Wed, 24 Jul 2002 09:44:37 +0000 (09:44 +0000)] 
Add #offset for just grabbing the byte offset of a struct field

17 years agoUse HOSTPLATFORM / *_HOST_OS to examine properties of the environment/compiler we...
sof [Wed, 29 May 2002 22:32:50 +0000 (22:32 +0000)] 
Use HOSTPLATFORM / *_HOST_OS to examine properties of the environment/compiler we're using

17 years agoCheck the exit status of the generated C program when we run it
simonmar [Thu, 18 Apr 2002 12:15:56 +0000 (12:15 +0000)] 
Check the exit status of the generated C program when we run it
and exit if it failed (partly from Axel Simon).

17 years agodosifyPath before opening files
simonpj [Wed, 13 Feb 2002 10:39:36 +0000 (10:39 +0000)] 
dosifyPath before opening files

If you call
hsc2hs foo/baz

you get the amazing response:

'foo' is not recognized as an internal or external command,
operable program or batch file.

On the other hand
hsc2hs foo\baz

works fine.  Solution: call dosifyPath before opening or writing the file.

Somehow we should make it less easy to trip up when doing file I/O on
Windows.  And provide a library of path-manipulation primitives.

17 years agooutHFile not outHName
simonmar [Tue, 12 Feb 2002 15:17:36 +0000 (15:17 +0000)] 
outHFile not outHName

17 years agoremove KludgedSystem
sof [Thu, 17 Jan 2002 08:38:00 +0000 (08:38 +0000)] 
remove KludgedSystem
- removed KludgedSystem; no longer needed.
- be path separator savvy.

18 years agoMake -c actually working (as --cc)
qrczak [Fri, 14 Sep 2001 16:54:13 +0000 (16:54 +0000)] 
Make -c actually working (as --cc)

18 years agoDo the ifdefery properly so it works on Unix
rrt [Wed, 12 Sep 2001 11:52:58 +0000 (11:52 +0000)] 
Do the ifdefery properly so it works on Unix

18 years agoMake hsc2hs find template-hsc.h on Windows
rrt [Wed, 12 Sep 2001 11:16:05 +0000 (11:16 +0000)] 
Make hsc2hs find template-hsc.h on Windows
This involves putting Main.hs through cpp; to avoid the string gap
problem preprocessing __GLASGOW_HASKELL__ into its value inside strings,
make judicious use of ++ (hope that's OK, Marcin; there seemed very
little point in putting it all in KludgedSystem this time).

18 years agoFixed punctuation typo
ken [Tue, 24 Jul 2001 05:49:32 +0000 (05:49 +0000)] 
Fixed punctuation typo

18 years agousage message, #def fix
ken [Mon, 23 Jul 2001 23:08:04 +0000 (23:08 +0000)] 
usage message, #def fix
Rearranged the usage help message to move --no-compile to the bottom.

More importantly-- Fixed: hsc2hs was translating

    #def inline ... function(...) { ... }

into (assuming defined(__GNUC__))

    [in the _hsc.h file:]  extern inline ... function(...)
    [in the _hsc.c file:]  inline ... function(...)

while it should really be translated into

    [in the _hsc.h file:]  extern inline ... function(...)
    [in the _hsc.c file:]  ... function(...)

(without the "inline" in the _hsc.c file).  Quoting the gcc documentation
for "inline":

>    If you specify both `inline' and `extern' in the function
> definition, then the definition is used only for inlining.  In no case
> is the function compiled on its own, not even if you refer to its
> address explicitly.  Such an address becomes an external reference, as
> if you had only declared the function, and had not defined it.
>
>    This combination of `inline' and `extern' has almost the effect of a
> macro.  The way to use it is to put a function definition in a header
> file with these keywords, and put another copy of the definition
> (lacking `inline' and `extern') in a library file.  The definition in
> the header file will cause most calls to the function to be inlined.
> If any uses of the function remain, they will refer to the single copy
> in the library.

18 years agoFix paths in installed hsc2hs driver
qrczak [Mon, 16 Jul 2001 06:33:22 +0000 (06:33 +0000)] 
Fix paths in installed hsc2hs driver

18 years agoUn-break on Unix
sewardj [Wed, 4 Jul 2001 09:18:38 +0000 (09:18 +0000)] 
Un-break on Unix

18 years agoPlumb top-level --with-gcc=... value around the place
sewardj [Tue, 3 Jul 2001 16:57:03 +0000 (16:57 +0000)] 
Plumb top-level --with-gcc=... value around the place

18 years agoAdd .exe to progName on Windows
rrt [Mon, 2 Apr 2001 16:10:05 +0000 (16:10 +0000)] 
Add .exe to progName on Windows

18 years agoGenerated C files are named *_hsc.h and *_hsc.c (again)
qrczak [Thu, 29 Mar 2001 17:56:18 +0000 (17:56 +0000)] 
Generated C files are named *_hsc.h and *_hsc.c (again)

18 years agoadd -D -o -s options
qrczak [Thu, 29 Mar 2001 08:03:21 +0000 (08:03 +0000)] 
add -D -o -s options
Allow specifying output filenames explicitly.
Add -D --define option.

18 years agoTransform *.hsc into *.hs and optionally Hs*.h and Hs*.c
qrczak [Thu, 29 Mar 2001 00:01:18 +0000 (00:01 +0000)] 
Transform *.hsc into *.hs and optionally Hs*.h  and Hs*.c
(used to be          *.hs and optionally *.hs.h and *.hs.c).

Old names interacted badly with Makefile rules of the form
'%: %.o' and looked ugly.

18 years agoMake it work on Windows with recent GCCs
rrt [Tue, 27 Mar 2001 16:33:17 +0000 (16:33 +0000)] 
Make it work on Windows with recent GCCs

18 years agoRemove INLINE pragmas
qrczak [Fri, 16 Mar 2001 09:07:41 +0000 (09:07 +0000)] 
Remove INLINE pragmas
They actually degrade performance by 2%.

18 years agoAdd Config.hs generation to Makefile to make TMPDIR work in KludgedSystem
rrt [Wed, 14 Mar 2001 12:13:02 +0000 (12:13 +0000)] 
Add Config.hs generation to Makefile to make TMPDIR work in KludgedSystem

18 years agoUse TMPDIR, not /tmp
rrt [Tue, 13 Mar 2001 17:46:56 +0000 (17:46 +0000)] 
Use TMPDIR, not /tmp

18 years agoUse custom parser monad instead of Parsec
qrczak [Mon, 5 Mar 2001 00:07:23 +0000 (00:07 +0000)] 
Use custom parser monad instead of Parsec
It remembers the text which has been parsed, so it needs not to be
reconstructed after parsing.

Operators containing '--' are now handled correctly. '#' triggers
special processing only if it's not a part of an operator, i.e. if
a varsym token is exactly a single '#'.

Backslash-newline pairs in C lexical world are now handled correctly
(removed at an early stage).

Option --keep replaced with --no-compile (stop after writing *.hs_make.c).

18 years agoFix #{stuff} parsing when stuff contains end of line
qrczak [Sun, 4 Mar 2001 11:18:03 +0000 (11:18 +0000)] 
Fix #{stuff} parsing when stuff contains end of line

18 years agoadd self-delimited #{stuff}
qrczak [Thu, 1 Mar 2001 20:32:51 +0000 (20:32 +0000)] 
add self-delimited #{stuff}
#{stuff} is equivalent to #stuff except that it's self-delimited and
thus needs not to be placed at the end of line or in some brackets.

18 years agoadd some options
qrczak [Thu, 22 Feb 2001 22:39:56 +0000 (22:39 +0000)] 
add some options
Add --keep option to not delete *.hs_make.c.
Add -c -l -C -L -i as synonyms for --cc --ld --cflag --lflag --include.

18 years agoNo, please don't pass hsc2hs/Main.hs through cpp :-)
qrczak [Tue, 13 Feb 2001 17:40:37 +0000 (17:40 +0000)] 
No, please don't pass hsc2hs/Main.hs through cpp :-)
It corrupts __GLASGOW_HASKELL__ in strings (because of string gaps).

I moved the system-dependent thing to KludgedSystem (it should be
named better as it no longer contains only the system function)
so it does not require cpp.

(I keep it in sync with QForeign, which is easier if the same source
can work in both places.)

18 years agoMake work again on Windows
rrt [Tue, 13 Feb 2001 16:11:27 +0000 (16:11 +0000)] 
Make work again on Windows
Main.hs has to be passed through CPP now.

18 years agomove #ifdefed defaultCompiler
qrczak [Tue, 13 Feb 2001 15:53:10 +0000 (15:53 +0000)] 
move #ifdefed defaultCompiler
Main.hs is not passed through cpp, so I moved #ifdefed defaultCompiler
to module KludgedSystem which is passed through cpp.

18 years agoMake it work on Cygwin
rrt [Tue, 13 Feb 2001 15:09:02 +0000 (15:09 +0000)] 
Make it work on Cygwin
Story of my life.

18 years agoMove kludgedSystem (renamed to system) to a separate module
qrczak [Sat, 10 Feb 2001 10:43:25 +0000 (10:43 +0000)] 
Move kludgedSystem (renamed to system) to a separate module
This avoids ugly interactions with the C preprocessor (string gaps,
__GLASGOW_HASKELL__ in strings).

18 years agoWorks under Linux again - Posix was not needed
qrczak [Mon, 5 Feb 2001 22:02:18 +0000 (22:02 +0000)] 
Works under Linux again - Posix was not needed

18 years agoMake it work on Windows
rrt [Mon, 5 Feb 2001 18:01:39 +0000 (18:01 +0000)] 
Make it work on Windows

18 years agoAdd #warning support
qrczak [Wed, 24 Jan 2001 22:37:15 +0000 (22:37 +0000)] 
Add #warning support

18 years agoRemove semicolon which was causing a syntax error on sparc-solaris /bin/sh
sewardj [Wed, 17 Jan 2001 10:11:17 +0000 (10:11 +0000)] 
Remove semicolon which was causing a syntax error on sparc-solaris /bin/sh

18 years agoImplemented #enum construct
qrczak [Mon, 15 Jan 2001 07:33:02 +0000 (07:33 +0000)] 
Implemented #enum construct

18 years agoRemove extra '(' from case statement
simonmar [Sun, 14 Jan 2001 15:34:31 +0000 (15:34 +0000)] 
Remove extra '(' from case statement
Patterns in the case statement didn't work on my FreeBSD box due to a
bogus-looking extra '(', so I removed it.  Hope I haven't broken anything.

18 years agoDon't output so many unnecessary C line markers
qrczak [Sat, 13 Jan 2001 23:10:45 +0000 (23:10 +0000)] 
Don't output so many unnecessary C line markers