Re: Coercing a `ByteArray#` into a `MutableByteArray#`

2023-07-24 Thread chessai
Hi Adithya, The representations are the same. You can do this. I do this somewhat often. Just avoid mutating in places where it could result in funky stuffs. This is usually pretty easy to spot. Cheers, chessai On Mon, Jul 24, 2023, 12:59 Adithya Kumar wrote: > Hello all, > > I h

Re: Why and How the External STG interpreter is Useful (Online presentation, Dec 2, Friday, 17:00 UTC)

2021-12-02 Thread chessai
Hi, Will there be a recording? Thanks On Thu, Dec 2, 2021, 06:55 Csaba Hruska wrote: > It's on Thursday Dec 2 17:00 UTC. (Today) > Sorry for the confusion. > > On Thu, Dec 2, 2021 at 3:52 PM Csaba Hruska > wrote: > >> Hello, >> >> Today I'll do a presentation about the external stg

Re: Why base library changes are only discussed on GHC issue tracker and not on the libraries@ list?

2021-07-07 Thread chessai
FWIW, I do believe that changing Show @String needs to be discussed on the list and I pinged the proposer to do so. The ByteArray change was in my/Andrew Martin's opinion that it was straightforward and sensible enough to not need the mailing list. As has been pointed out by Oleg, on the library

Re: Give MonadTrans a QuantifiedConstraints superclass

2021-06-01 Thread chessai
I think you meant to forward to the libraries mailing list, not the ghc-devs one On Tue, Jun 1, 2021, 18:01 Baldur Blöndal wrote: > This is to advertise the proposal > (https://gitlab.haskell.org/ghc/ghc/-/issues/19922) to add a > superclass to the MonadTrans type class in Control.Monad.Trans.

Re: Coding style: Using StandaloneKindSignatures in GHC

2021-05-24 Thread chessai
GHC **and** base-library? > > I'm puzzled about ownership of base. Who have a final word about it? > ghc-devs, librar...@haskell.org, CLC, chessai alone, whoever is first? > > - Oleg > On 21.5.2021 23.21, Richard Eisenberg wrote: > > I agree with Chris here. > > Let m

Re: instance {Semigroup, Monoid} (Bag a) ?

2021-04-14 Thread chessai
+1 to add from me, seems sensible On Wed, Apr 14, 2021, 14:31 Viktor Dukhovni wrote: > On Wed, Apr 14, 2021 at 06:26:38PM +, Richard Eisenberg wrote: > > > In the work on simplifying the error-message infrastructure (heavy > > lifting by Alfredo, in cc), I've been tempted (twice!) to add >

Re: What's the modern way to apply a polymorphic function to a Dynamic value in GHC 8.8 and onwards?

2021-04-13 Thread chessai
Having more examples and docs in the corresponding module might be the best first step toward that. On Tue, Apr 13, 2021, 10:00 YueCompl via ghc-devs wrote: > A followup wish I have: > > ```hs > case io `eqTypeRep` typeRep @IO of > Just HRefl -> Dynamic TypeRep <$> monotypedAct > Nothing ->

scavenge_one failures on BCO objects

2020-04-09 Thread chessai .
Hi devs, A coworker is experiencing sporadic failures when reloading our project in GHCi, with ``` ghc: internal error: scavenge_one: strange object 23 (GHC version 8.6.5 for x86_64_unknown_linux) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug cabal: repl failed

Switch/Case optimisations

2019-10-14 Thread chessai .
I thought Andreas Klebinger in particular might find this interesting. The talk is here: https://youtu.be/IAdLwUXRUvg?t=1867 (timestamp is 31:07) basically, if you have an interpreter consisting of a switch statement inside an infinite loop, there's a mechanical transformation using GOTOs that

Re:

2019-07-01 Thread chessai .
Copying on ghc-devs, since i think that's what you wanted. On Mon, Jul 1, 2019, 11:14 AM Andrew Martin wrote: > To get GHC to raise an exception from an inline primop, I presume that I'd > need to jump to stg_raisezh. None of the existing inline primops do > anything quite like this. I see

Re: Commit searching

2019-05-12 Thread chessai .
nt for cherry-picks, the same change > with a different sha could have landed in a bugfix release. > > -Krzysztof > > On Sat, May 11, 2019 at 10:27 PM Artem Pelenitsyn > wrote: > >> Hi chessai, >> >> What I usually do for this is open up t

Commit searching

2019-05-11 Thread chessai .
Devs, Is there a way to take the sha1 of a git commit and find which released version of GHC contains that commit, without resorting to a manual cross-reference? Is it possible there could be some sort of webpage where this information could be made accessible, just by pasting in a commit?

Re: MR titles

2019-05-08 Thread chessai .
I agree that this is the way to go. This is part of our contributing guide at work, for the reasons you mentioned. Additionally it helps avoid the need to read the MR's contents (comments/code) before going into it, since reading relevant tickets is almost always something you want to do. Thanks

Recover role of a type variable in source Haskell

2019-04-07 Thread chessai .
Hi devs, Is it possible to programmatically recover the role of a type variable? Or, possibly, a list of the roles of the type variables from left to right? For example, if i have: data Foo a = Foo (1) newtype Bar a b = Bar (a -> b) (1) Getting the role list of (1) would give me [Phantom],

Re: MutVar# and GC

2019-01-17 Thread chessai .
Cheng, That's perfect. Thanks On Thu, Jan 17, 2019, 11:51 PM Shao, Cheng Hi, > > I believe it's mentioned here: > > > https://ghc.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage/GC/RememberedSets > > Regards, > Shao Cheng > > On Fri, Jan 18, 2019, 12:34

Re: MutVar# and GC

2019-01-17 Thread chessai .
t > mutable object to a mutable list that will be traversed in minor GCs along > with young generation roots. Additionally the write barrier will mark the > heap object as "dirty" to avoid adding it to the list more than once. > > Ryan > > On Thu, Jan 17, 2019 at 4:29

MutVar# and GC

2019-01-17 Thread chessai .
Devs, I've heard from a few friends that MutVars, TVars, etc. are more challenging for the garbage collector. I'm writing to ask if someone can answer: 1. Is this true, and 2: Why? I can't seem to find anything like a writeup or documentation that mentions this. The HeapObjects trac page also

Re: Drop into a nix shell with ghcHEAD

2019-01-16 Thread chessai .
Beautiful. Thanks for sharing On Wed, Jan 16, 2019 at 9:34 AM Matthew Pickering < matthewtpicker...@gmail.com> wrote: > Hi all, > > I have written a devastating new script which makes it easy to test > snippets and packages with build artefacts built by the gitlab CI. One > invocation of