DataCon workers and wrapers through GHC API

Simon Peyton-Jones simonpj at
Wed Aug 25 02:55:38 EDT 2010

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.


| -----Original Message-----
| From: glasgow-haskell-users-bounces at [mailto:glasgow-haskell-
| users-bounces at] 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 at

More information about the Glasgow-haskell-users mailing list