-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fusion not working as advertised #202
Comments
including the failing example from haskell/text#202 It seems that in partilar `T.length` fails to fuse as advertised.
I did a more comprehensive test of testing properties of the
For most functions, the question of whether it fuses or not is a clear-cut yes/no question. An exception is This is tested with GHC-8.4 and text ==1.2.3.0. |
Automatic fusion has been disabled some time ago. |
Oh are they? Ah, found it: #348 |
The documentation of
Data.Text
statesbut (with GHC-8.0 or 8.2 and text-1.2.2.2) this is not true: Looking at
-ddump-simpl
I clearly see aText
value constructed of which the length is calculated.I assume that originally, the example from the introduction did fuse properly, and then it broke…
Do you have a test suite that somehow tests the fusion promises of
text
? I stumbled over this because I am thinking about a proper, structured way of testing such non-functional properties of code in test suites, based on first successes with usingghc-proofs
for that ingeneric-lens
, and maybetext
would be a good second case study.The text was updated successfully, but these errors were encountered: