Skip to content

Conversation

@Shimuuar
Copy link
Contributor

This reimplements most of test as proposed by @nomeata except for slices. There're some questions on how slices should work.

Test suite uses memory allocation in order to check that no intemediate vectors are constructed. It requires that GHC compiles code down to nonallocating loops and it could only reliably happen with -O2

Fixes #229

Draft since it contains failing test for enumFromThenTo. It's implemented in terms of list. And failing test for concatMap which I haven't investigated yet.

@Shimuuar
Copy link
Contributor Author

enumFromThenTo allocates because it wraps enumFromThenTo from Enum type class. There's quite elaborate system of rewrite rules for creating fast specializations for enumFromTo. I think it could be simplified and

concatMap indeed does not well and produces intermediate vectors. Fixing it not easy and clearly out of scope for PR. I'm going to disable these tests.

This reimplements most of test as proposed by @nomeata except for slices.
There're some questions on how slices should work.

Test suite uses memory allocation in order to check that no intemediate vectors
are constructed. It requires that GHC compiles code down to nonallocating loops
and it could only reliably happen with -O2

Fixes haskell#229
@Shimuuar Shimuuar force-pushed the inspection-test branch 3 times, most recently from 3b0253c to 7bf8185 Compare September 26, 2025 10:22
Let keep test for older GHC but ignore their failures
@Shimuuar Shimuuar marked this pull request as ready for review September 26, 2025 10:48
@Shimuuar
Copy link
Contributor Author

It's done. I replace conditional compilation with ignoring result failures for older GHC.

@Shimuuar Shimuuar merged commit 8430e8e into haskell:master Sep 29, 2025
22 checks passed
@Shimuuar Shimuuar deleted the inspection-test branch September 29, 2025 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A test suite for fusion

1 participant