Building dictionary terms in Core?

2019-01-06 Thread Ömer Sinan Ağacan
Hi, In #15646 (recent discussion in Gitlab MR 55) we need dictionary arguments in Core (in desugarer) to apply to functions like `fromRational :: Fractional a => Rational -> a`, but we don't know how to build the dictionary term (`Fractional a`) in Core. Can anyone who know help us in the MR?

GitLab forks and submodules

2019-01-06 Thread Moritz Angermann
Hi *, so what do we do with submodules? If you point someone to a fork of ghc, say: gitlab.haskell.org/foo/ghc and they try to check it out, they will run into issues because foo didn't clone all the submodules. So how is one supposed to clone a forked ghc repository? Cheers, Moritz

Re: How to use Data.Compact.Serialize

2019-01-06 Thread Edward Z. Yang
Yes this looks good to me. It is NOT necessary to statically link libc, since the only pointers embedded in compact regions are only ever info table pointers, e.g., stuff that GHC generated, not arbitrary functions in libc. Edward Excerpts from Christopher Done's message of 2018-12-19 10:31:28

Re: Blocking a task indefinitely in the RTS

2019-01-06 Thread John Lato
Can you use an os-level structure? E.g. block on a file descriptor, socket, or something like that? On Sun, Jan 6, 2019, 10:37 Phyx Hi All, > > I'm looking for a way to block a task indefinitely until it is woken up by > an external event in both the threaded and non-threaded RTS and returns a >

Re: Blocking a task indefinitely in the RTS

2019-01-06 Thread Phil Ruffwind
What if you wrap the MVar in a foreign closure? import Control.Concurrent.MVar (newEmptyMVar, putMVar, takeMVar) import Control.Exception (bracket) import Foreign.Ptr (FunPtr, freeHaskellFunPtr) foreign import ccall "wrapper" wrapAwaken :: IO () -> IO (FunPtr (IO ())) main =

Re: GitLab CI for patches across submodules

2019-01-06 Thread Simon Jakobi via ghc-devs
Am Sa., 5. Jan. 2019 um 22:18 Uhr schrieb Ben Gamari : However, we can certainly use the upstream repo during CI builds. I have opened !78 which should hopefully fix this. Perhaps you could rebase on topp of this and check? > Thanks, Ben, that works for me. What I hadn't realized before, is

Re: Glasgow Haskell Compiler | Fix #16133 by checking for TypeApplications in rnExpr (!77)

2019-01-06 Thread Brandon Allbery
For what it's worth, the !77 seems to mean https://gitlab.haskell.org/ghc/ghc/merge_requests/77 which is also the "View it on GitLab" link target. And in general the "!" seems to indicate a merge request, per reference to "!82" mentioning this one. So this does seem to be a new merge request, and

RE: Glasgow Haskell Compiler | Fix #16133 by checking for TypeApplications in rnExpr (!77)

2019-01-06 Thread Simon Peyton Jones via ghc-devs
I am now getting lots of email from GitLab, and I’m trying to figure out what they all mean. They come in various forms. Here’s one puzzler: * what does the email below mean? Is it a new merge request? * what is the “!77”? * What does “RyanGlScott/ghc:wip/T16133 → ghc/ghc:master”

Blocking a task indefinitely in the RTS

2019-01-06 Thread Phyx
Hi All, I'm looking for a way to block a task indefinitely until it is woken up by an external event in both the threaded and non-threaded RTS and returns a value that was stored/passed. MVar works great for the threaded RTS, but for the non-threaded there's a bunch of deadlock detection in the

Re: Better DWARF info for Cmm procedures?

2019-01-06 Thread Ömer Sinan Ağacan
> However, there is also a slightly more fundamental issue here: GHC's NCG > handles DWARF information with block granularity. Fixing this will be a > bit more involved. See compiler/nativeGen/Dwarf.hs for details. > > One alternative would be to just finish debug information in the LLVM > backend

Re: Better DWARF info for Cmm procedures?

2019-01-06 Thread Ben Gamari
Ömer Sinan Ağacan writes: > Hi, > > Currently debugging Cmm is a bit painful because we don't have enough debug > information to map assembly to Cmm lines, so I have do the mapping manually. > However I realized that when building .cmm files we actually generates some > debug information, in