RE: [Template-haskell] How to extract name and type of exported functions in modules

| First I thought I would examine the source code of template-haskell | (more specifically qLocation and qReify) to figure out how to do it | but got stuck. Obviously I have still much to learn when it comes to | Haskell. | | Could someone explain how Quasi works? Have you read the paper? Referred to from here http://www.haskell.org/ghc/docs/latest/html/users_guide/template-haskell.htm..., the particular bit you want is Section 10 of http://research.microsoft.com/~simonpj/papers/meta-haskell/notes2.ps | The only way this can work (as fast as I can see) is if where is | another instance of Quasi than Q and IO but I cannot find that | instance in the source code. Yes indeed there is -- the type checker monad! See TcSplice line 819. Simon
participants (1)
-
Simon Peyton-Jones