Re: Maybe String -> CoreExpr in a GHC plugin

2018-01-19 Thread Joachim Breitner
Hi, Am Dienstag, den 16.01.2018, 11:08 -0500 schrieb Joachim Breitner: > in a GHC plugin, I want to synthesize simple data structures, and > insert them into the code. What is the most idiomatic way of writing a > function, say, > > foo :: Maybe String -> CoreExpr > > or > > foo :: Maybe St

Maybe String -> CoreExpr in a GHC plugin

2018-01-16 Thread Joachim Breitner
Hi, in a GHC plugin, I want to synthesize simple data structures, and insert them into the code. What is the most idiomatic way of writing a function, say, foo :: Maybe String -> CoreExpr or foo :: Maybe String -> CoreM CoreExpr so that the resulting CoreExpr describes the input. Abstractl