, and it works in GHC-the-program?
>
>
>
> *From:* Simon Peyton Jones
> *Sent:* Wednesday, April 6, 2022 3:37 PM
> *To:* Erdi, Gergo
> *Cc:* Gergo Érdi ; GHC Devs ;
> clash-langu...@googlegroups.com
> *Subject:* [External] Re: Avoiding `OtherCon []` unfoldings, restoring
6, 2022 3:37 PM
To: Erdi, Gergo
Cc: Gergo Érdi ; GHC Devs ;
clash-langu...@googlegroups.com
Subject: [External] Re: Avoiding `OtherCon []` unfoldings, restoring
definitions from unfoldings
Hi Gergo
If you think GHC has a but, can you open a ticket about this? It's all
getting lost in a maze
doesn't, in
> certain cases.
>
> -Original Message-
> From: ghc-devs On Behalf Of Gergo Érdi
> Sent: Saturday, April 2, 2022 11:31 AM
> To: Simon Peyton Jones
> Cc: GHC Devs ; clash-langu...@googlegroups.com
> Subject: [External] Re: Avoiding `OtherCon []` unf
herCon []` unfoldings, restoring
definitions from unfoldings
I'm using Prep's output (mostly so that it's in ANF) in my full compilation
pipeline, so ideally I would save Prep'd Core in my .hi-equivalents so that I
don't have to rerun Prep on them every time I use them.
I'll get back to you wit
about.
Sebastian
-- Originalnachricht --
Von: "Ben Gamari"
An: "Simon Peyton Jones" ; "ÉRDI Gergő"
Cc: "GHC Devs" ; clash-langu...@googlegroups.com
Gesendet: 05.04.2022 15:53:02
Betreff: Re: Avoiding `OtherCon []` unfoldings, restoring defi
; "ÉRDI Gergő"
Cc: "GHC Devs" ; clash-langu...@googlegroups.com
Gesendet: 05.04.2022 15:53:02
Betreff: Re: Avoiding `OtherCon []` unfoldings, restoring definitions
from unfoldings
Simon Peyton Jones writes:
I don't think any top-level Ids should have OtherCon [] unfold
Simon Peyton Jones writes:
> I don't think any top-level Ids should have OtherCon [] unfoldings? If
> they do, can you give a repro case? OtherCon [] unfoldings usually mean "I
> know this variable is evaluated, but I don't know what its value is. E.g
>data T = MkT !a !a
> f (MkT x y) =
Merging with my other question about shadowing problems with
`toIface*`, in summary it seems that what I really should be doing, is
compiling up to Tidy, taking the `CoreBinding`s from there and using
`toIfaceBinding` on them to save the definitions.
It's hard for me to be helpful here, because
I'm using Prep's output (mostly so that it's in ANF) in my full
compilation pipeline, so ideally I would save Prep'd Core in my
.hi-equivalents so that I don't have to rerun Prep on them every time
I use them.
I'll get back to you with some concrete examples of `OtherCon []` vs.
meaningful
I don't think any top-level Ids should have OtherCon [] unfoldings? If
they do, can you give a repro case? OtherCon [] unfoldings usually mean "I
know this variable is evaluated, but I don't know what its value is. E.g
data T = MkT !a !a
f (MkT x y) = ...
here x and y have OtherCon []
On Fri, 1 Apr 2022, Sylvain Henry wrote:
The unfolding is present if you add `-fno-omit-interface-pragmas` and dump
with `-ddump-simpl`. CorePrep drops unfoldings, see Note [Drop unfoldings and
rules] in GHC.CoreToStg.Prep.
Thanks, I forgot to mention that I am already using
The unfolding is present if you add `-fno-omit-interface-pragmas` and
dump with `-ddump-simpl`. CorePrep drops unfoldings, see Note [Drop
unfoldings and rules] in GHC.CoreToStg.Prep.
The logic for unfolding exposition by Tidy is now in:
This doesn't quite match my experience. For example, the following
toplevel definition gets an `OtherCon []` unfolding:
nonEmptySubsequences :: [a] -> [[a]]
nonEmptySubsequences [] = []
nonEmptySubsequences (x:xs) = [x] : foldr f [] (nonEmptySubsequences xs)
where
f ys r = ys : (x:ys) : r
So if I understand correctly, OtherCon is only created here:
https://gitlab.haskell.org/ghc/ghc/-/blob/a952dd80d40bf6b67194a44ff71d7bf75957d29e/compiler/GHC/Core/Opt/Simplify.hs#L3071-3077
simplAlt env _ imposs_deflt_cons case_bndr' cont' (Alt DEFAULT bndrs rhs)
= assert (null bndrs) $
do
Hi,
I'm CC-ing the Clash mailing list because I believe they should have
encountered the same problem (and perhaps have found a solution to it
already!).
I'm trying to use `.hi` files compiled with `ExposeAllUnfoldings` set to
reconstruct full Core bindings for further processing. By and
15 matches
Mail list logo