Sorry, I put the wrong code. The generated code is:

Rec {
Teste.mapp :: forall t_a5D u_a5E. (t_a5D -> u_a5E) -> [t_a5D] -> [u_a5E]
[GlobalId]
[Arity 2
 NoCafRefs
 Str: DmdType LS]
Teste.mapp =
  \ (@ t_aap) (@ u_aaq) (ds_dat :: t_aap -> u_aaq) (ds1_dau :: [t_aap]) ->
    case ds1_dau of wild_B1 {
      [] -> GHC.Base.[] @ u_aaq;
      : x_a5I xs_a5J ->
    GHC.Base.: @ u_aaq (ds_dat x_a5I) (Teste.mapp @ t_aap @ u_aaq ds_dat
xs_a5J)
    }
end Rec }

2008/2/19, Guilherme Avelino <[EMAIL PROTECTED]>:
>
> Hi, I´m trying to use the Core representation by -ddump-simpl, because the
> code generated is simpler than  -fext-core.
> But I don´t understand the meaning of some informations.
>
> I compile the code:
>
> mapp::(t->u)->[t]->[u]
> mapp _ [] = []
> mapp f (x:xs) = (f x):(mapp f xs)
>
>
> is generated:
>
> Teste.t :: GHC.Base.Int -> GHC.Base.Int
> [GlobalId]
> [Arity 1
>  NoCafRefs
>  Str: DmdType U(L)m]
> Teste.t =
>   \ (a_a5L :: GHC.Base.Int) ->
>     case a_a5L of wild_abr { GHC.Base.I# x_abt ->
>     let {
>       x1_abj [Just L] :: GHC.Prim.Int#
>       [Str: DmdType]
>       x1_abj = GHC.Prim.+# x_abt 3
>     } in
>       GHC.Base.I#
>     (GHC.Prim.-#
>        (GHC.Prim.*#
>           (GHC.Prim.-# (GHC.Prim.*# x1_abj (GHC.Prim.*# x1_abj x_abt)) 4)
> x_abt)
>        1)
>     }
>
> What is the meaning of the colored informations s?
> Is a good approach to use the code generated by -ddump-simpl?
>
> Thanks.
>
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to