DataCon workers and wrapers through GHC API

Is it possible to generate bindings for worker and wrapper of data constructor through GHC API? How can I do it? I want CoreBindings or StgBindings for workers and wrappers for all data constructors of the module... -- Victor Nazarov

Data constructor workers don't have bindings: they just stand for themselves. Wrappers do have bindings, but the easiest way to get them is to get them and ask for their unfolding (via unfoldingTemplate . idUnfolding). So you just need to get the Ids. You can get them from the global type environment. Simon | -----Original Message----- | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell- | users-bounces@haskell.org] On Behalf Of Victor Nazarov | Sent: 24 August 2010 17:22 | To: GHC List | Subject: DataCon workers and wrapers through GHC API | | Is it possible to generate bindings for worker and wrapper of data | constructor through GHC API? How can I do it? | I want CoreBindings or StgBindings for workers and wrappers for all | data constructors of the module... | | -- | Victor Nazarov | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (2)
-
Simon Peyton-Jones
-
Victor Nazarov