Querying Core for information about variables

2020-07-13 Thread Siddharth Bhat
Hello, I'm trying to understand how to query information about `Var`s from a Core plugin. Consider the snippet of haskell: ``` {-# LANGUAGE MagicHash #-} import GHC.Prim fib :: Int# -> Int# fib i = case i of 0# -> i; 1# -> i; _ -> (fib i) +# (fib (i -# 1#)) main :: IO (); main = let x = fib 10

Cleanly setting C compiler options when building RTS

2019-07-11 Thread Siddharth Bhat
Hello all, I was interested in building the GHC RTS with GCC's AddressSanitizer and Ubsan enabled. What I want to do very specifically is to pass "-fsanitize=address -fsanitize=undefined" when compiling the RTS. What's the "correct" way to set this up in the build system? Is there a configure fl

Re: ZuriHac 2019 - GHC Track

2019-04-30 Thread Siddharth Bhat
I'm not sure if this is the right place, but I'm putting this out there at any rate: I'd be interested in a deep dive into STG and related shenanigans "within the compiler", since my understanding is that a decent amount has changed since the last paper on STG (eval/apply). This is out of an inter

Re: [GHC] #14005: Explore moving from pretty to prettyprinter

2017-07-22 Thread Siddharth Bhat
Ben, Thank you for the fix :) However, the link appears to be broken? On Sat, 22 Jul 2017 at 23:15 GHC wrote: > #14005: Explore moving from pretty to prettyprinter > -+- > Reporter: bgamari |

Re: Interested to help with error messages

2017-06-06 Thread Siddharth Bhat
Elm has a interesting take on this: a collection of all error messages ( https://github.com/elm-lang/error-message-catalog). I created an empty repo ( https://github.com/bollu/hask-error-messages-catalog) and shot an email to haskell-cafe asking for examples where GHC generates unintuitive error m

Interested to help with error messages

2017-06-03 Thread Siddharth Bhat
Hello all, Thanks for all the work that's put into GHC :) I've tried to get into GHC development before, but I was unsuccessful, mostly because I didn't dedicate enough time to understanding the problem at hand & exploring the codebase. I'd like to give it another shot. This time, I think I have

Re: [GHC] #12636: ProfHeap's printf modifiers are incorrect

2017-02-11 Thread Siddharth Bhat
I believe the guarantee at that chunk of code is that void_total of the era will be >= 0. I could add an asset at those sections of code if need be. If not, what is the correct type to be used here? I think size_t is reasonable as none of them are supposed to be negative in the first place. On S