Early draft spec of Strict language pragma

Johan Tibell johan.tibell at gmail.com
Thu Jul 24 09:30:55 UTC 2014


On Thu, Jul 24, 2014 at 11:10 AM, Roman Cheplyaka <roma at ro-che.info> wrote:
> Will case with an irrefutable pattern force the scrutinee, too?
> I.e. will
>
>   case x of { pat -> y }
>
> desugar to
>
>   case x of { pat -> x `seq` y }
>
> ?

Yes. The user has to write ~x if he/she doesn't want that.

> Will tuples be considered to have strict fields? Since they are defined
> "externally" (by analogy with the Just example), they shouldn't, right?

They will have lazy fields. I think we consider them as already
defined in some other module (even though they are slightly magical in
practice).

-- Johan


More information about the ghc-devs mailing list