[commit: ghc] master: Code cleaning (9e238da)

Simon Marlow marlowsd at gmail.com
Thu Jan 26 17:20:24 CET 2012


On 26/01/2012 09:50, David Terei wrote:

> -When the UnlinkedBCOExpr is linked you get an HValue of type
> -        IO [HValue]
> -When you run it you get a list of HValues that should be
> -the same length as the list of names; add them to the ClosureEnv.
> +When the UnlinkedBCOExpr is linked you get an HValue of type *IO [HValue]* When
> +you run it you get a list of HValues that should be the same length as the list
> +of names; add them to the ClosureEnv.
>
> -A naked expression returns a singleton Name [it].
> -
> -        What you type                   The IO [HValue] that hscStmt returns
> -        -------------                   ------------------------------------
> -        let pat = expr          ==>      let pat = expr in return [coerce HVal x, coerce HVal y, ...]
> -                                        bindings: [x,y,...]
> -
> -        pat<- expr             ==>      expr>>= \ pat ->  return [coerce HVal x, coerce HVal y, ...]
> -                                        bindings: [x,y,...]
> -
> -        expr (of IO type)       ==>      expr>>= \ v ->  return [v]
> -          [NB: result not printed]      bindings: [it]
> -
> -
> -        expr (of non-IO type,
> -          result showable)      ==>      let v = expr in print v>>  return [v]
> -                                        bindings: [it]
> -
> -        expr (of non-IO type,
> -          result not showable)  ==>      error

You deleted this comment, but it looks useful to me.  Is it duplicated 
elsewhere?

Cheers,
	Simon



More information about the Cvs-ghc mailing list