Re: How to set idScope properly when converting LhsExpr GhcPs to CoreExpr?

2021-09-10 Thread Yiyun Liu
Hi Richard, Thanks for the reply. The problem has something to do with how LH currently handles symbols. Internally, LH uses the idScope field to identify whether a symbol is exported and handles them differently (e.g. erase the unique id only when the symbol is exported). Ideally, we want

Re: How to set idScope properly when converting LhsExpr GhcPs to CoreExpr?

2021-08-31 Thread Richard Eisenberg
I took a look at this today. I found > Note [GlobalId/LocalId] > ~~~ > A GlobalId is > * always a constant (top-level) > * imported, or data constructor, or primop, or record selector > * has a Unique that is globally unique across the whole > GHC invocation (a

How to set idScope properly when converting LhsExpr GhcPs to CoreExpr?

2021-08-25 Thread Yiyun Liu
Hi all, We have a function in Liquidhaskell's code base for converting refinement expressions into GHC's core expressions using the GHC API. Its implementation is based on tcRnExpr except we keep