Ways and Build Tags for Optimisation

Simon Marlow simonmar@microsoft.com
Thu, 29 May 2003 10:16:22 +0100


=20
> I'd like to include three different flavours of my HBase=20
> package, with=20
> these combinations of optimisation and profiling:
>=20
>   release:   optimised (with -O -fvia-C)
>   profiling: optimised and profiled
>   quick:     neither
>=20
> The release and profiling flavours take forever to compile, so it's=20
> useful to have a "quick" flavour to speed up the development=20
> cycle. The=20
> trouble is, any Haskell program using the release flavour of=20
> HBase also=20
> compiles very slowly, even if it itself does not use -O. If nothing=20
> else, this may be due to the huge interface file for the root import:
>=20
> $ ls -Al HBase.*hi
> -rw-r--r--    1 ashley   ashley    2117554 May 28 04:04 HBase.hi
> -rw-r--r--    1 ashley   ashley    2119865 May 28 08:15 HBase.p_hi
> -rw-r--r--    1 ashley   ashley      72669 May 28 16:20 HBase.q_hi

Wow :-)

There is some ancient support for "user-ways" in the compiler, but as
far as I know it doesn't currently work.  The only ways that the
compiler knows about are the built-in ones (profiling, ticky, parallel
etc.).

I think the best way to achieve what you want is to have two completely
separate packages, say hbase and hbase_q.  The hbase package can have
profiling support, but the hbase_q package need not.

Cheers,
	Simon