[project @ 1996-01-08 20:28:12 by partain]
[ghc.git] / ghc / compiler / tests / ccall / cc001.stderr
1 Typechecked:
2 lit.t444 = D# 2.0000000000000000##
3 lit.t443 = F# 1.0000000000000000#
4 AbsBinds [] [] [(a.t439, Test.a{-r79-})]
5     {- nonrec -}
6     a.t439 :: IoWorld -> (Int, IoWorld)
7     a.t439
8         = ccall  a [Int] 
9 {- nonrec -}
10 {- nonrec -}
11 AbsBinds [] [] [(b.t440, Test.b{-r80-})]
12     {- nonrec -}
13     b.t440 :: Int -> IoWorld -> (Int, IoWorld)
14     b.t440
15         x.r212 = ccall  b [Int, Int] x.r212
16 {- nonrec -}
17 {- nonrec -}
18 AbsBinds [] [] [(c.t441, Test.c{-r81-})]
19     {- nonrec -}
20     c.t441 :: Int -> Char -> Float -> Double -> IoWorld -> (Float, IoWorld)
21     c.t441
22         x1.r213 x2.r214 x3.r215 x4.r216
23                 = ccall  c [Float, Int, Char, Float, Double]
24                       x1.r213 x2.r214 x3.r215 x4.r216
25 {- nonrec -}
26 {- nonrec -}
27 AbsBinds [] [] [(d.t442, Test.d{-r82-})]
28     {- nonrec -}
29     d.t442 :: IoWorld -> (Float, IoWorld)
30     d.t442
31         = (thenIO{-r102-} [Int, Float])
32               Test.a{-r79-}
33               (\ x.r217 -> (thenIO{-r102-} [Int, Float])
34                                (Test.b{-r80-} x.r217)
35                                (\ y.r218 -> Test.c{-r81-}
36                                                 y.r218 'f' lit.t443 lit.t444))
37 {- nonrec -}
38 {- nonrec -}
39 Desugared:
40 {- plain CoRec -}
41 lit.t444 :: Double
42 _NI_
43 lit.t444 = (\ tpl.d0# -> D#! tpl.d0#) 2.0000000000000000##
44 lit.t443 :: Float
45 _NI_
46 lit.t443 = (\ tpl.d1# -> F#! tpl.d1#) 1.0000000000000000#
47 Test.a{-r79-} :: IoWorld -> (Int, IoWorld)
48 _NI_
49 Test.a{-r79-} =
50     \ ds.d2 ->
51         case
52             (case
53                  (case ds.d2 of {
54                     IoWorld ds.d3# -> ds.d3#
55                   })
56              of {
57                a.d8# -> ( _CCALL_ a [] Int# )! a.d8#
58              })
59         of {
60           IntPrimAndIoWorld ds.d4#  ds.d5# ->
61               let {
62                 a.d6 :: Int
63                 _NI_
64                 a.d6 = I#! ds.d4# } in
65               let {
66                 a.d7 :: IoWorld
67                 _NI_
68                 a.d7 = IoWorld! ds.d5#
69               } in  Tup2! Int IoWorld a.d6 a.d7
70         }
71 Test.b{-r80-} :: Int -> IoWorld -> (Int, IoWorld)
72 _NI_
73 Test.b{-r80-} =
74     \ x.r212  ds.d9 ->
75         case
76             (case
77                  (case ds.d9 of {
78                     IoWorld ds.d10# -> ds.d10#
79                   })
80              of {
81                a.d16# ->
82                    case
83                        (case x.r212 of {
84                           I# ds.d11# -> ds.d11#
85                         })
86                    of {
87                      a.d17# -> ( _CCALL_ b [Int#] Int# )! a.d16# a.d17#
88                    }
89              })
90         of {
91           IntPrimAndIoWorld ds.d12#  ds.d13# ->
92               let {
93                 a.d14 :: Int
94                 _NI_
95                 a.d14 = I#! ds.d12# } in
96               let {
97                 a.d15 :: IoWorld
98                 _NI_
99                 a.d15 = IoWorld! ds.d13#
100               } in  Tup2! Int IoWorld a.d14 a.d15
101         }
102 Test.c{-r81-} :: Int -> Char -> Float -> Double -> IoWorld -> (Float, IoWorld)
103 _NI_
104 Test.c{-r81-} =
105     \ x1.r213  x2.r214  x3.r215  x4.r216  ds.d18 ->
106         case
107             (case
108                  (case ds.d18 of {
109                     IoWorld ds.d19# -> ds.d19#
110                   })
111              of {
112                a.d28# ->
113                    case
114                        (case x1.r213 of {
115                           I# ds.d20# -> ds.d20#
116                         })
117                    of {
118                      a.d29# ->
119                          case
120                              (case x2.r214 of {
121                                 C# ds.d21# -> ds.d21#
122                               })
123                          of {
124                            a.d30# ->
125                                case
126                                    (case x3.r215 of {
127                                       F# ds.d22# -> ds.d22#
128                                     })
129                                of {
130                                  a.d31# ->
131                                      case
132                                          (case x4.r216 of {
133                                             D# ds.d23# -> ds.d23#
134                                           })
135                                      of {
136                                        a.d32# ->
137                                            ( _CCALL_ c [Int#,
138                                                         Char#,
139                                                         Float#,
140                                                         Double#] Float# )!
141                                                a.d28#
142                                                a.d29#
143                                                a.d30#
144                                                a.d31#
145                                                a.d32#
146                                      }
147                                }
148                          }
149                    }
150              })
151         of {
152           FloatPrimAndIoWorld ds.d24#  ds.d25# ->
153               let {
154                 a.d26 :: Float
155                 _NI_
156                 a.d26 = F#! ds.d24# } in
157               let {
158                 a.d27 :: IoWorld
159                 _NI_
160                 a.d27 = IoWorld! ds.d25#
161               } in  Tup2! Float IoWorld a.d26 a.d27
162         }
163 Test.d{-r82-} :: IoWorld -> (Float, IoWorld)
164 _NI_
165 Test.d{-r82-} =
166     let {
167       a.d36 :: Int -> IoWorld -> (Float, IoWorld)
168       _NI_
169       a.d36 =
170           \ x.r217 ->
171               let {
172                 a.d35 :: Int -> IoWorld -> (Float, IoWorld)
173                 _NI_
174                 a.d35 =
175                     \ y.r218 ->
176                         (let {
177                            a.d33 :: Char
178                            _NI_
179                            a.d33 = C#! 'f'#
180                          } in  Test.c{-r81-} y.r218 a.d33) lit.t443 lit.t444
181               } in 
182                 (let {
183                    a.d34 :: IoWorld -> (Int, IoWorld)
184                    _NI_
185                    a.d34 = Test.b{-r80-} x.r217
186                  } in  ((thenIO{-r102-} Int) Float) a.d34) a.d35
187     } in  ((thenIO{-r102-} Int) Float) Test.a{-r79-} a.d36
188 {- end plain CoRec -}