
Hi, I’d like to use Annotations to transport some meta-information from the Haskell source to GHC Plugins (as they are meant to be, right?). But I am struggling expressing annotations that relate different symbols. Here are some hypthetical examples what I want to express: foo :: String -> String foo = … bar :: [(String,String), (String, String)] {-# ANN bar (TestCasesFor 'foo) #-} rec :: Natural -> (a -> a) -> a -> a {-# ANN rec (RecurserFor 'Natural) $-} This code actually works (with TemplateHaskell). It will put a TH.Name into the annotations, but when I am in Core, I need a core Name. Is there a good way of transporting such references in Annotations so that the desugarer (or the renamer) will do the necessary name changes for me? And slightly related: Do Annotations keep bindings alive? (It seems so, but then it should be documented in https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/extending_gh... Thanks, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de https://www.joachim-breitner.de/
participants (1)
-
Joachim Breitner