[Haskell-cafe] How to ensure optimization for large immutable vectors to be shared w.r.t. Referential Transparency

Henning Thielemann lemming at henning-thielemann.de
Tue Apr 6 12:50:20 UTC 2021


On Tue, 6 Apr 2021, YueCompl wrote:

> ```hsλ> let !v = VS.fromList [3,2,5] in isSameVector (SomeVector v) (SomeVector v)
> False
> λ> 
> λ> let !v = SomeVector (VS.fromList [3,2,5]) in isSameVector v v
> True
> λ> 
> ```

Then I have no idea.

Maybe ghc-heap-view/ghc-vis can reveal the mystery.

https://github.com/nomeata/haskell-bytes-bobkonf2021


More information about the ghc-devs mailing list