type definition with strict products

Simon Marlow simonmar@microsoft.com
Wed, 30 Jan 2002 16:10:32 -0000


> I a file that is too large to post here completely, I have used:
>
> type Result  val s =3D (# val, Steps s #)
>=20
> and I get the error message:
>=20
>=20
> UU_Parsing.hs:391:
>     Illegal unboxed tuple type as function argument: (# val, Steps s
#)
>     In the type: (# val, Steps s #)
>     While checking the RHS of a type synonym declaration `Result'
>     In the type synonym declaration for `Result'

Function arguments of unboxed tuple type aren't allowed.  See

http://www.haskell.org/ghc/docs/latest/set/primitives.html#UNBOXED-TUPLE
S

(sorry about the garbled URL, I have no control over the fact that they
get arbitrarily chopped at 72 columns :-()

Older versions of GHC were less strict about checking for illegal uses
of unboxed tuples, with the result that some invalid programs got
further through the system leading to compiler crashes or invalid code
being generated.

Cheers,
	Simon