hsc2hs.git
8 years agoremove duplicate code ghc-7.2 ghc-7.2.1-release ghc-7.2.2-release
Simon Marlow [Wed, 20 Jul 2011 14:41:52 +0000 (15:41 +0100)] 
remove duplicate code

8 years agoRelax a dependency
Ian Lynagh [Wed, 6 Jul 2011 19:29:08 +0000 (20:29 +0100)] 
Relax a dependency

8 years agoUnicode fix for getExecPath on Windows
Max Bolingbroke [Sat, 14 May 2011 21:35:19 +0000 (22:35 +0100)] 
Unicode fix for getExecPath on Windows

8 years agoMore flag parser refactoring ghc-darcs-git-switchover
Ian Lynagh [Thu, 24 Mar 2011 14:16:12 +0000 (14:16 +0000)] 
More flag parser refactoring

8 years agoMore flag parser refactoring
Ian Lynagh [Thu, 24 Mar 2011 13:33:59 +0000 (13:33 +0000)] 
More flag parser refactoring

8 years agoStart refactoring the flag parsing
Ian Lynagh [Thu, 24 Mar 2011 13:28:01 +0000 (13:28 +0000)] 
Start refactoring the flag parsing

8 years agoAdd a log message
Ian Lynagh [Wed, 23 Mar 2011 23:08:38 +0000 (23:08 +0000)] 
Add a log message

8 years agoFix enum cross-compilation support
Ian Lynagh [Wed, 23 Mar 2011 23:02:37 +0000 (23:02 +0000)] 
Fix enum cross-compilation support
For:
    #{enum ControlOp, ControlOp
     , controlOpAdd    = EPOLL_CTL_ADD
     , controlOpModify = EPOLL_CTL_MOD
     , controlOpDelete = EPOLL_CTL_DEL
     }
we were generating something like:
    void _hsc2hs_test19()
    {
        static int test_array[( EPOLL_CTL_ADD) > 0 ? 2 : 1];
        (void)test_array;
        static int test_array[( EPOLL_CTL_MOD) > 0 ? 2 : 1];
        (void)test_array;
        static int test_array[( EPOLL_CTL_DEL) > 0 ? 2 : 1];
        (void)test_array;
    }
which gave errors like:
    EPoll.hsc:136: error: redeclaration of ‘test_array’ with no linkage

We now wrap each
    static int test_array[( EPOLL_CTL_ADD) > 0 ? 2 : 1];
    (void)test_array;
in { ... }

8 years agoAdd the cross-compilation flags to the options parser
Ian Lynagh [Wed, 23 Mar 2011 21:23:55 +0000 (21:23 +0000)] 
Add the cross-compilation flags to the options parser

8 years agoMove code around into a more logical hierarchy
Ian Lynagh [Wed, 23 Mar 2011 20:36:50 +0000 (20:36 +0000)] 
Move code around into a more logical hierarchy

8 years agoAdd CrossCodegen module, from Brian Bloniarz
Ian Lynagh [Wed, 23 Mar 2011 19:46:50 +0000 (19:46 +0000)] 
Add CrossCodegen module, from Brian Bloniarz

8 years agoMore refactoring
Ian Lynagh [Wed, 23 Mar 2011 18:40:28 +0000 (18:40 +0000)] 
More refactoring

8 years agoMore refactoring and moving code around
Ian Lynagh [Wed, 23 Mar 2011 18:30:52 +0000 (18:30 +0000)] 
More refactoring and moving code around

8 years agoSplit off a parseFile function
Ian Lynagh [Wed, 23 Mar 2011 18:15:50 +0000 (18:15 +0000)] 
Split off a parseFile function

8 years agoMove some more code around; part of the patch from Brian Bloniarz
Ian Lynagh [Wed, 23 Mar 2011 17:57:00 +0000 (17:57 +0000)] 
Move some more code around; part of the patch from Brian Bloniarz

8 years agoAdd a runParser function; part of the patch from Brian Bloniarz
Ian Lynagh [Wed, 23 Mar 2011 17:42:55 +0000 (17:42 +0000)] 
Add a runParser function; part of the patch from Brian Bloniarz

8 years agoCommandline parser refactoring; part of patch from Brian Bloniarz
Ian Lynagh [Wed, 23 Mar 2011 17:34:35 +0000 (17:34 +0000)] 
Commandline parser refactoring; part of patch from Brian Bloniarz

8 years agoAdd --keep-files flag; patch from Brian Bloniarz
Ian Lynagh [Wed, 23 Mar 2011 17:18:56 +0000 (17:18 +0000)] 
Add --keep-files flag; patch from Brian Bloniarz

8 years agoMove a little more code around
Ian Lynagh [Wed, 23 Mar 2011 17:12:41 +0000 (17:12 +0000)] 
Move a little more code around

8 years agoFork off a DirectCodegen module; no code changes
Ian Lynagh [Wed, 23 Mar 2011 16:46:19 +0000 (16:46 +0000)] 
Fork off a DirectCodegen module; no code changes

8 years agoFork off an HSCParser module
Ian Lynagh [Wed, 23 Mar 2011 03:11:17 +0000 (03:11 +0000)] 
Fork off an HSCParser module
No code changes.

8 years agoTweak some ifdeffery
Ian Lynagh [Wed, 23 Mar 2011 02:42:56 +0000 (02:42 +0000)] 
Tweak some ifdeffery

8 years agoFollow changes in the GHC build system
Ian Lynagh [Sat, 5 Feb 2011 15:51:46 +0000 (15:51 +0000)] 
Follow changes in the GHC build system

8 years agoFollow GHC build system changes
Ian Lynagh [Fri, 7 Jan 2011 02:32:58 +0000 (02:32 +0000)] 
Follow GHC build system changes

8 years agowrite the output file in binary mode (#3837)
Simon Marlow [Wed, 22 Dec 2010 09:14:55 +0000 (09:14 +0000)] 
write the output file in binary mode (#3837)

8 years agoReplace uses of the old catch function with the new one
Ian Lynagh [Sat, 18 Dec 2010 21:35:41 +0000 (21:35 +0000)] 
Replace uses of the old catch function with the new one

8 years agoRemove haskell98 dependency
Ian Lynagh [Wed, 13 Oct 2010 19:44:18 +0000 (19:44 +0000)] 
Remove haskell98 dependency

8 years agoBump dependencies
Ian Lynagh [Fri, 17 Sep 2010 18:38:26 +0000 (18:38 +0000)] 
Bump dependencies

9 years agoUse the stage-specific CONF_CC_OPTS variables
Ian Lynagh [Fri, 23 Jul 2010 13:23:23 +0000 (13:23 +0000)] 
Use the stage-specific CONF_CC_OPTS variables

9 years agoWhen linking, put flags after the .o file.
Duncan Coutts [Sat, 5 Jun 2010 15:26:49 +0000 (15:26 +0000)] 
When linking, put flags after the .o file.
Should fix ticket #4115
Do the same for the compiler flags, mainly for consistency.

9 years agoWhen executing a program fails, also print the exit code
Duncan Coutts [Sat, 5 Jun 2010 15:29:36 +0000 (15:29 +0000)] 
When executing a program fails, also print the exit code
Should help slightly when tracking down problems, e.g. ticket 4110

9 years agoDon't put the $(TOP) path in the installed hsc2hs wrapper
Ian Lynagh [Sat, 29 May 2010 11:24:09 +0000 (11:24 +0000)] 
Don't put the $(TOP) path in the installed hsc2hs wrapper

9 years agoDon't give an empty template flag argument if there is no flag; trac #4014
Ian Lynagh [Tue, 27 Apr 2010 15:45:46 +0000 (15:45 +0000)] 
Don't give an empty template flag argument if there is no flag; trac #4014

9 years agoMakefile wibbles for nhc98
Malcolm.Wallace@cs.york.ac.uk [Sat, 24 Apr 2010 07:02:43 +0000 (07:02 +0000)] 
Makefile wibbles for nhc98

9 years agoLook for an inplace gcc on Windows (#3929)
Simon Marlow [Tue, 20 Apr 2010 13:46:17 +0000 (13:46 +0000)] 
Look for an inplace gcc on Windows (#3929)

9 years agoStrip out ^M characters to stop gcc getting confused
Ian Lynagh [Wed, 24 Mar 2010 00:06:55 +0000 (00:06 +0000)] 
Strip out ^M characters to stop gcc getting confused

9 years agoadd a comment
Simon Marlow [Mon, 22 Mar 2010 13:55:55 +0000 (13:55 +0000)] 
add a comment

9 years agoProcess the file in binary mode so we pass though UTF-8 (#3837)
Simon Marlow [Fri, 19 Mar 2010 21:56:57 +0000 (21:56 +0000)] 
Process the file in binary mode so we pass though UTF-8 (#3837)
Maybe strictly speaking it would be better to encode/decode UTF-8, but
it would be a fiddle and I don't think it really matters for hsc2hs.

9 years agoFix the in-tree hsc2hs
Ian Lynagh [Fri, 8 Jan 2010 12:52:52 +0000 (12:52 +0000)] 
Fix the in-tree hsc2hs
It only had a -I flag for an inplace directory that doesn't exist.
Now it also has one for the in-tree $(TOP)/includes.

9 years agomake single-argument hsc2hs macros variadic; fixes trac #590
Ian Lynagh [Sat, 2 Jan 2010 21:52:27 +0000 (21:52 +0000)] 
make single-argument hsc2hs macros variadic; fixes trac #590
This means that the macro works even if the argument contains a comma

9 years agoDon't set HSC2HS_EXTRA= when we get a --cc= flag; fixes trac #3681
Ian Lynagh [Tue, 1 Dec 2009 12:47:16 +0000 (12:47 +0000)] 
Don't set HSC2HS_EXTRA= when we get a --cc= flag; fixes trac #3681
On OS X, we need to specify -m32 or -m64 in order to get gcc to
build binaries for the right target. We do that by putting it in
HSC2HS_EXTRA. When cabal runs hsc2hs, it passes a flag saying which
gcc to use, so if we set HSC2HS_EXTRA= then we don't get binaries
for the right platform. So for now we just don't set HSC2HS_EXTRA=
but we probably want to revisit how this works in the future.

9 years agoThe getopt package was remerged with base, after being temporarily split.
Malcolm.Wallace@cs.york.ac.uk [Mon, 23 Nov 2009 07:36:10 +0000 (07:36 +0000)] 
The getopt package was remerged with base, after being temporarily split.

9 years agofix Description markup
Ross Paterson [Sat, 14 Nov 2009 00:48:41 +0000 (00:48 +0000)] 
fix Description markup

9 years agoAdd C and linker flags to hsc2hs; fixes trac #3400
Ian Lynagh [Sat, 7 Nov 2009 19:44:49 +0000 (19:44 +0000)] 
Add C and linker flags to hsc2hs; fixes trac #3400

9 years agoGHC build system: Make *nix installation work in paths containing spaces
Ian Lynagh [Thu, 5 Nov 2009 16:06:06 +0000 (16:06 +0000)] 
GHC build system: Make *nix installation work in paths containing spaces

9 years agoAdd a /. to the $$(dir $$@) to stop make normalising away the trailing /
Ian Lynagh [Sun, 4 Oct 2009 19:13:26 +0000 (19:13 +0000)] 
Add a /. to the $$(dir $$@) to stop make normalising away the trailing /

9 years agoUse the " | $$(dir $$@)" in ghc.mk
Ian Lynagh [Sat, 3 Oct 2009 21:55:51 +0000 (21:55 +0000)] 
Use the " | $$(dir $$@)" in ghc.mk

9 years agoput template-hsc.h in $(topdir) in an installation (on Unix)
Simon Marlow [Thu, 17 Sep 2009 09:39:14 +0000 (09:39 +0000)] 
put template-hsc.h in $(topdir) in an installation (on Unix)
and make sure hsc2hs can find it

9 years agoremove old version of hsc2hs.wrapper, not used now
Simon Marlow [Thu, 17 Sep 2009 09:37:44 +0000 (09:37 +0000)] 
remove old version of hsc2hs.wrapper, not used now

10 years agoonly emit {-# INCLUDE #-} pragmas for GHC < 6.10
Simon Marlow [Sun, 2 Aug 2009 19:03:45 +0000 (19:03 +0000)] 
only emit {-# INCLUDE #-} pragmas for GHC < 6.10

10 years agoUpdate Makefile for the new GHC build system
Ian Lynagh [Sun, 5 Jul 2009 16:50:19 +0000 (16:50 +0000)] 
Update Makefile for the new GHC build system

10 years agoRemove now-redundant "return ()"s
Ian Lynagh [Sat, 4 Jul 2009 21:19:57 +0000 (21:19 +0000)] 
Remove now-redundant "return ()"s

10 years agoSupport for -fwarn-unused-do-bind and -fwarn-wrong-do-bind, as per #3263
Max Bolingbroke [Wed, 1 Jul 2009 20:04:14 +0000 (20:04 +0000)] 
Support for -fwarn-unused-do-bind and -fwarn-wrong-do-bind, as per #3263

10 years agoFollow the gmp move in the GHC build system 2009-06-25
Ian Lynagh [Sun, 14 Jun 2009 18:32:34 +0000 (18:32 +0000)] 
Follow the gmp move in the GHC build system

10 years agoInclude hsc2hs in GHC bindists
Ian Lynagh [Sat, 13 Jun 2009 16:17:37 +0000 (16:17 +0000)] 
Include hsc2hs in GHC bindists

10 years agoQuote program paths in ghc.mk
Ian Lynagh [Sun, 31 May 2009 00:37:36 +0000 (00:37 +0000)] 
Quote program paths in ghc.mk

10 years agoUse the more portable %lu rather than %zu
Ian Lynagh [Sun, 24 May 2009 13:58:28 +0000 (13:58 +0000)] 
Use the more portable %lu rather than %zu
We now also need to cast the values to (unsigned long), as on some
platforms sizeof returns (unsigned int).

10 years agoFix warnings when template-hsc.h is used
Ian Lynagh [Sat, 23 May 2009 22:38:51 +0000 (22:38 +0000)] 
Fix warnings when template-hsc.h is used

10 years agoFix make install DESTDIR=
Duncan Coutts [Tue, 28 Apr 2009 18:12:35 +0000 (18:12 +0000)] 
Fix make install DESTDIR=
It was installing the template data file directly
to $(datadir) rather than to $(DESTDIR)$(datadir)

10 years agoonly depend on gmp/libgmp.a if $(HaveLibGmp)=="NO"
Simon Marlow [Fri, 24 Apr 2009 12:25:08 +0000 (12:25 +0000)] 
only depend on gmp/libgmp.a if $(HaveLibGmp)=="NO"

10 years agoTweak new build system
Ian Lynagh [Sat, 4 Apr 2009 20:44:02 +0000 (20:44 +0000)] 
Tweak new build system

10 years agoGHC new build system fixes
Ian Lynagh [Sun, 29 Mar 2009 15:31:30 +0000 (15:31 +0000)] 
GHC new build system fixes

10 years agoNew GHC build system: Build gmp before hsc2hs is built
Ian Lynagh [Fri, 27 Mar 2009 16:57:04 +0000 (16:57 +0000)] 
New GHC build system: Build gmp before hsc2hs is built
And thus, before it is used.

10 years agoadd a dependency to ensure libgmp.a gets built early enough
Simon Marlow [Wed, 1 Apr 2009 11:45:32 +0000 (11:45 +0000)] 
add a dependency to ensure libgmp.a gets built early enough

10 years agorestore the old-build-system Makefile
Simon Marlow [Tue, 24 Mar 2009 09:47:11 +0000 (09:47 +0000)] 
restore the old-build-system Makefile

10 years agonew GHC build system: update for new location of template-hsc.h
Simon Marlow [Mon, 23 Mar 2009 16:42:48 +0000 (16:42 +0000)] 
new GHC build system: update for new location of template-hsc.h

10 years agonew GHC build system: clean up
Simon Marlow [Mon, 23 Mar 2009 15:20:28 +0000 (15:20 +0000)] 
new GHC build system: clean up

10 years agoTweak new build system
Ian Lynagh [Sun, 22 Mar 2009 16:22:29 +0000 (16:22 +0000)] 
Tweak new build system

10 years agoNew GHC build system: build+install a copy of hsc2hs with the stage1 compiler
Ian Lynagh [Sun, 22 Mar 2009 15:44:13 +0000 (15:44 +0000)] 
New GHC build system: build+install a copy of hsc2hs with the stage1 compiler

10 years agoMake it build with nhc98 again, now using System.Posix.Internals.
Malcolm.Wallace@cs.york.ac.uk [Mon, 16 Mar 2009 13:47:26 +0000 (13:47 +0000)] 
Make it build with nhc98 again, now using System.Posix.Internals.

10 years agoAdd a -I flag with the path to HsFFI.h
Ian Lynagh [Tue, 17 Feb 2009 20:24:07 +0000 (20:24 +0000)] 
Add a -I flag with the path to HsFFI.h
This can still be overridden by adding a -I flag to the commandline,
but it means that hsc2hs will work if no flags are given.

10 years agoFix building on Windows in the new build system
Ian Lynagh [Mon, 12 Jan 2009 17:33:21 +0000 (17:33 +0000)] 
Fix building on Windows in the new build system

10 years agofor the new GHC build system
Simon Marlow [Wed, 17 Dec 2008 13:41:47 +0000 (13:41 +0000)] 
for the new GHC build system

10 years agoAdd "#!/bin/sh" to hsc2hs.wrapper 6_10_branch_has_been_forked
Ian Lynagh [Sun, 14 Sep 2008 15:34:46 +0000 (15:34 +0000)] 
Add "#!/bin/sh" to hsc2hs.wrapper

10 years agofollow library changes
Ian Lynagh [Wed, 3 Sep 2008 22:35:38 +0000 (22:35 +0000)] 
follow library changes

10 years agorevise .hc file list for new location of GetOpt
Malcolm.Wallace@cs.york.ac.uk [Tue, 2 Sep 2008 10:06:35 +0000 (10:06 +0000)] 
revise .hc file list for new location of GetOpt

10 years agoAdd base4 support
Ian Lynagh [Mon, 25 Aug 2008 12:10:16 +0000 (12:10 +0000)] 
Add base4 support

11 years agoFix warnings
Ian Lynagh [Thu, 21 Aug 2008 17:32:37 +0000 (17:32 +0000)] 
Fix warnings

11 years agohsc2hs needs Control.Exception.Base now (for nhc98 Makefile)
Malcolm.Wallace@cs.york.ac.uk [Thu, 14 Aug 2008 08:15:48 +0000 (08:15 +0000)] 
hsc2hs needs Control.Exception.Base now (for nhc98 Makefile)

11 years agoFix making bindists
Ian Lynagh [Sun, 10 Aug 2008 14:52:15 +0000 (14:52 +0000)] 
Fix making bindists

11 years agonhc98 bootstrap build via C now requires Data/Typeable.hc as well.
Malcolm.Wallace@cs.york.ac.uk [Wed, 6 Aug 2008 14:07:05 +0000 (14:07 +0000)] 
nhc98 bootstrap build via C now requires Data/Typeable.hc as well.

11 years agoFix up the Paths_hsc2hs story for nhc98.
Malcolm.Wallace@cs.york.ac.uk [Mon, 28 Jul 2008 11:12:53 +0000 (11:12 +0000)] 
Fix up the Paths_hsc2hs story for nhc98.
The difference between #if !BUILD_NHC and #ifndef BUILD_NHC is subtle but real.

11 years agouse valid Haskell'98 indentation in do-blocks
Malcolm.Wallace@cs.york.ac.uk [Sun, 27 Jul 2008 14:23:19 +0000 (14:23 +0000)] 
use valid Haskell'98 indentation in do-blocks

11 years agoRemove the dependency on Cabal
Ian Lynagh [Thu, 24 Jul 2008 17:07:58 +0000 (17:07 +0000)] 
Remove the dependency on Cabal
We now use Data.Version.showVersion rather than display

11 years agoThe default compiler is now always just "gcc"
Ian Lynagh [Wed, 23 Jul 2008 17:42:49 +0000 (17:42 +0000)] 
The default compiler is now always just "gcc"

11 years agoModernise the Cabal file
Ian Lynagh [Wed, 23 Jul 2008 14:00:38 +0000 (14:00 +0000)] 
Modernise the Cabal file

11 years agoAdd hsc2hs.wrapper from GHC's fork
Ian Lynagh [Wed, 23 Jul 2008 14:00:06 +0000 (14:00 +0000)] 
Add hsc2hs.wrapper from GHC's fork

11 years agoAdd a Makefile for GHC's build system
Ian Lynagh [Tue, 22 Jul 2008 20:39:00 +0000 (20:39 +0000)] 
Add a Makefile for GHC's build system

11 years agoSync with GHC's fork of the hsc2hs Main.hs
Ian Lynagh [Tue, 22 Jul 2008 20:37:36 +0000 (20:37 +0000)] 
Sync with GHC's fork of the hsc2hs Main.hs

11 years agoWhitespace only
Ian Lynagh [Thu, 26 Jun 2008 13:46:45 +0000 (13:46 +0000)] 
Whitespace only

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