type definition with strict products

S. Doaitse Swierstra doaitse@cs.uu.nl
Wed, 30 Jan 2002 16:52:10 +0100


--============_-1199716562==_ma============
Content-Type: text/plain; charset="us-ascii" ; format="flowed"

I a file that is too large to post here completely, I have used:

type Result  val s = (# val, Steps s #)

and I get the error message:

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'

using version "The Glorious Glasgow Haskell Compilation System, 
version 5.02.2".

Runningan earlier version of the compiler I get on the same file the 
following error message:
ghc-5.00.2: panic! (the `impossible' happened, GHC version 5.00.2):
         dsExpr: tuple pattern:
let {
   fail_d9jc
     = PrelErr.patError
         @ (b r,
            UU_Parsing.Steps a,
            UU_Parsing.Steps a,
            UU_Parsing.Exp a,
            UU_Parsing.Steps a)
         (PrelBase.unpackCString# "UU_Parsing.hs:735|case")
} in
   case ds_d9iL of wild_B1 { (# v, ds_d9iR #) ->
   case ds_d9iR of wild_B1 {
     UU_Parsing.Best l m f r -> (v, l, m, f, r); __DEFAULT -> fail_d9jc
   }
   }

Please report it as a compiler bug to glasgow-haskell-bugs@haskell.org,
or http://sourceforge.net/projects/ghc/.

which is not very informative either.

My questions are:

- is this type definition really forbidden, and what does the phrase 
"function argument " in the error message refer to?

- was there a restriction introduced about what one may write at the 
rhs of a type defintion between version  5.00.2 and  5.02.2?

  Thanks for looking into this,
  Doaitse Swierstra





-- 
__________________________________________________________________________
S. Doaitse Swierstra, Department of Computer Science, Utrecht University
                       P.O.Box 80.089, 3508 TB UTRECHT,   the Netherlands
                       Mail:  mailto:doaitse@cs.uu.nl          
                       WWW:   http://www.cs.uu.nl/

                       tel:    +31 30 253 3962
                       fax:    +31 30 251 3791
                       mobile: +31 6 2880 1680
__________________________________________________________________________
--============_-1199716562==_ma============
Content-Type: text/html; charset="us-ascii"

<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>type definition with strict
products</title></head><body>
<div>I a file that is too large to post here completely, I have
used:</div>
<div><br></div>
<div><font color="#FF0000">type Result&nbsp; val s = (# val, Steps s
#)</font><br>
</div>
<div>and I get the error message:</div>
<div><br></div>
<div><font color="#007700">UU_Parsing.hs:391:</font></div>
<div><font color="#007700">&nbsp;&nbsp;&nbsp; Illegal unboxed tuple
type as</font><font color="#FF0000"> function argument</font><font
color="#007700">: (# val, Steps s #)<br>
&nbsp;&nbsp;&nbsp; In the type: (# val, Steps s #)<br>
&nbsp;&nbsp;&nbsp; While checking the RHS of a type synonym
declaration `Result'<br>
&nbsp;&nbsp;&nbsp; In the type synonym declaration for
`Result'</font></div>
<div><br></div>
<div>using version &quot;The Glorious Glasgow Haskell Compilation
System, version 5.02.2&quot;.</div>
<div><br></div>
<div>Runningan earlier version of the compiler I get on the same file
the following error message:</div>
<div><font color="#007700">ghc-5.00.2: panic! (the `impossible'
happened, GHC version 5.00.2):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dsExpr: tuple pattern:<br>
let {<br>
&nbsp; fail_d9jc<br>
&nbsp;&nbsp;&nbsp; = PrelErr.patError<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @ (b r,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
UU_Parsing.Steps a,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
UU_Parsing.Steps a,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
UU_Parsing.Exp a,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
UU_Parsing.Steps a)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (PrelBase.unpackCString#
&quot;UU_Parsing.hs:735|case&quot;)<br>
} in<br>
&nbsp; case ds_d9iL of wild_B1 { (# v, ds_d9iR #) -&gt;<br>
&nbsp; case ds_d9iR of wild_B1 {<br>
&nbsp;&nbsp;&nbsp; UU_Parsing.Best l m f r -&gt; (v, l, m, f, r);
__DEFAULT -&gt; fail_d9jc<br>
&nbsp; }<br>
&nbsp; }<br>
<br>
Please report it as a compiler bug to
glasgow-haskell-bugs@haskell.org,<br>
or http://sourceforge.net/projects/ghc/.</font></div>
<div><br></div>
<div>which is not very informative either.</div>
<div><br></div>
<div>My questions are:</div>
<div><br></div>
<div>- is this type definition really forbidden, and what does the
phrase &quot;function argument &quot; in the error message refer
to?</div>
<div><br></div>
<div>- was there a restriction introduced about what one may write at
the rhs of a type defintion between version&nbsp; 5.00.2 and&nbsp;
5.02.2?</div>
<div><br></div>
<div>&nbsp;Thanks for looking into this,</div>
<div>&nbsp;Doaitse Swierstra</div>
<div><br></div>
<div>&nbsp;</div>
<div><br></div>
<div><br></div>
<div><br></div>
<x-sigsep><pre>-- 
</pre></x-sigsep>
<div><font size="-1"
color="#000000"
>____________________________________________________________________<span
></span>______<br>
S. Doaitse Swierstra, Department of Computer Science, Utrecht
University</font></div>
<div><font size="-1"
color="#000000"
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
P.O.Box 80.089, 3508 TB UTRECHT,&nbsp;&nbsp; the Netherlands<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Mail:&nbsp;
mailto:doaitse@cs.uu.nl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
></span>&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
WWW:&nbsp;&nbsp; http://www.cs.uu.nl/</font></div>
<div><font size="-1" color="#000000"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
tel:&nbsp;&nbsp;&nbsp; +31 30 253 3962</font></div>
<div><font size="-1"
color="#000000"
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
fax:&nbsp;&nbsp;&nbsp; +31 30 251 3791</font></div>
<div><font size="-1"
color="#000000"
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mobile: +31 6 2880 1680<br>
_____________________________________________________________________<span
></span>_____</font></div>
</body>
</html>
--============_-1199716562==_ma============--