The order if bindings generated by GHC

==================== STG syntax: ==================== Foo.zero = NO_CCS Foo.Zero! []; SRT(Foo.zero): [] Foo.one = NO_CCS Foo.Succ! [Foo.Zero]; SRT(Foo.one): [] Foo.ten = NO_CCS Foo.Succ! [Foo.one]; SRT(Foo.ten): [] Foo.Zero = NO_CCS Foo.Zero! []; SRT(Foo.Zero): [] Foo.Succ = \r [eta_s68] Foo.Succ [eta_s68]; SRT(Foo.Succ): []
In this output the dependecy is as follows: Foo.zero `depends_on` [] Foo.one `depends_on` [Foo.Zero] -- this is the source of my question Foo.ten `depends_on` [Foo.one] Foo.Zero `depends_on` [] Foo.Succ `depends_on` [] Foo.one here saves the Foo.Zero as an argument of constructor application, i. e. saves Foo.Zero's address in one of the allocated closure's field. So I think Foo.Zero must be defined before Foo.one. -- vir http://vir.comtv.ru/
participants (1)
-
Victor Nazarov