agda-stdlib icon indicating copy to clipboard operation
agda-stdlib copied to clipboard

Deprecate `inspect` function in favour of new `with ... in` construct

Open MatthewDaggitt opened this issue 4 years ago • 2 comments

@gallais added the inspect idiom as a first class language construct in Agda 2.6.2. We should consider using it in the library to simplify our code, and possibly deprecating the old inspect function to encourage other people to migrate as well.

MatthewDaggitt avatar Aug 19 '21 06:08 MatthewDaggitt

I hope this would also (eventually) get rid of the imported [_] from PropositionalEquality which clashes with list singletons and others.

ajrouvoet avatar Oct 18 '21 14:10 ajrouvoet

You're not the only one who has expressed this wish, @jamesmckinna also mentioned this. It will be deprecated first, but yes eventually it'll be removed.

MatthewDaggitt avatar Oct 18 '21 14:10 MatthewDaggitt

Suggest closing this now, after the merge of #1930, notwithstanding the issues of strictness of inspect vs. laziness of with ... in ... raised by agda#5833

jamesmckinna avatar Aug 10 '23 09:08 jamesmckinna

The saga continues,unfortunately: https://github.com/agda/agda/issues/6841 so, no, we should probably keep this open,even though the stdlib uses of inspect have been successfully massaged away, the deprecation itself might have to be reverted for the time being... sigh.

jamesmckinna avatar Sep 13 '23 11:09 jamesmckinna

For v2.0: suggest removing the deprecation warning?

jamesmckinna avatar Sep 26 '23 08:09 jamesmckinna

Opened a PR undeprecating it, and have moved this to Agda-future

MatthewDaggitt avatar Sep 27 '23 03:09 MatthewDaggitt