Rewrite fasta in more idiomatic Haskell

Authored by tdammers on Jun 18 2018, 6:40 AM.


Group Reviewers
Restricted Owners Package(Owns No Changed Paths)

Previously, fasta would produce incorrect output when compiled with -fno-state-hack; this isn't too strange, considering how it used a dangerous combination of unsafeUseAsCString and poke, something the documentation for unsafeUseAsCString explicitly warns about.

Unlike the existing implementation, this version is both correct and (at least somewhat) idiomatic Haskell.

Test Plan

run nofib

Diff Detail

rNOFIB nofib
No Linters Available
No Unit Test Coverage
Build Status
Buildable 21381
Build 48404: arc lint + arc unit
tdammers created this revision.Jun 18 2018, 6:40 AM
Owners added a reviewer: Restricted Owners Package.Jun 18 2018, 6:40 AM
tdammers retitled this revision from Summary: Rewrite fasta in more idiomatic Haskell to Rewrite fasta in more idiomatic Haskell.Jun 18 2018, 6:44 AM
tdammers edited the summary of this revision. (Show Details)

Out of curiosity, have you compare the performance of this to the previous version (with -fstate-hack, of course)?

dfeuer accepted this revision.Jun 18 2018, 1:36 PM
dfeuer added a subscriber: dfeuer.

Although it's unfortunate to change benchmark source in general, I think it's pretty clearly justified this time.

This revision is now accepted and ready to land.Jun 18 2018, 1:36 PM