[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] * scrutinizer.scm: Fix renaming issue with
Re: [Chicken-hackers] [PATCH] * scrutinizer.scm: Fix renaming issue with 'the'
Wed, 12 Dec 2018 12:27:23 +0200
mu4e 1.0; emacs 25.1.1
Peter Bex <address@hidden> writes:
> On Mon, Dec 10, 2018 at 09:24:57PM +0200, megane wrote:
>> > On 2018-12-02 18:02, megane wrote:
>> I think the biggest cost from typeenv comes from the two first tests in
>> 'match1. Here we check all symbols against the typeenv, which is a
>> linear search. If we use records, it's just one test.
> I have only been following this with half an eye, so I apologize if I'm
> being a complete idiot, but wouldn't it be more in line with the style
> of CHICKEN core to use a gensym for the type variable and attach a plist
> to it to hold the type variable information?
> The gensym itself would act both as a unique identifier and as the
> variable itself; when printing the type you'd only need to strip the
> syntax info and voila, you have a readable type.
I guess that could work.
Doesn't strip-syntax ultimately use ##core#real-name, which was the core
issue with #1563?
I think the current system is completely fine for the current
scrutinizer features, however.
If you want to daydream about new features for scrutinizer then I think
the record version is more beneficial.
If you allow a tv to unify with another tv then having fast way to deal
with tvs becomes important. This leads to tvs living longer and thus
there being more of them. Currently you'd be hard pressed to find a file
that takes more than 10ms to scrutinize.
If you allow this unification you need to rename the variables anyway
when printing to user. If get two type variables, whose original names
were "a", from different routes you want to print them with different
names if they really are different tvs.
I have allowed this tv-tv unification in my local branch so I'm not
completely talking out of my ass.
This is all daydreaming, though. There's more useful targets for
improvements in the scrutinizer.