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 t

Re: primitive (byte) string literal with length?

2021-08-25 Thread Viktor Dukhovni
On Wed, Aug 25, 2021 at 07:05:58PM +0300, Oleg Grenrus wrote: > The newew proposal [1] is tagged as "needs revision". It doesn't > include(# Int#, Addr# #), but those are easy to get from ByteArray# > which has negligible overhead. > [...] > [1] https://github.com/ghc-proposals/ghc-proposals/pull/

Re: primitive (byte) string literal with length?

2021-08-25 Thread Oleg Grenrus
There are bytearray literal proposals [1,2]. My older proposal [2] idea that the literal prim literal strings could generate also ByteArray# and (# Int#, Addr# #), but as it was proposing to change how literal Haskell Strings are compiled the proposal got stalled. The newew proposal [1] is tagged a

Re: primitive (byte) string literal with length?

2021-08-25 Thread Viktor Dukhovni
On Tue, Aug 24, 2021 at 09:03:30AM -0400, Viktor Dukhovni wrote: I originally wrote: > > >Is there any GHC syntax for constructing a primitive string literal > > >with a known (not hand coded) byte count? > > >With `"some bytes"#` I get just the `Addr#` pointer, but not the size. > > > > > >If th