Conversation
ocramz
commented
Apr 9, 2020
- Add 'text' dependency
- Add 'CHANGELOG.md'
- Moved common types to Data.Align.Types
- Add type signatures in Data.Align.Demo
- Small cosmetic refactorings in Data.Align
- bump package version to 0.2
robinp
left a comment
There was a problem hiding this comment.
Thanks for the changes! Minor comments, looks good otherwise.
Optional for bonus points (in separate PR): think up & add some property tests with hedgehog.
|
|
||
| tappend :: (Functor f, Num s) => | ||
| f (Trace a s) -> Trace a s -> f (Trace a s) | ||
| mt `tappend` (Trace z (t:_)) = |
There was a problem hiding this comment.
Please move to be a local helper at callsite, as mentioned in #2 .
There was a problem hiding this comment.
Good point, but we're now using this in Data.Align.Text as well. Perhaps an INLINE pragma would work instead?
| @@ -0,0 +1,60 @@ | |||
| {-# language RecordWildCards #-} | |||
There was a problem hiding this comment.
If you have even anecdotal knowledge, please add a few lines of comment about expectable gains vs using stringy version.
There was a problem hiding this comment.
I think better still would be to set up a benchmark suite.
|
Now I'm not even too sure about duplicating |
|
Is the duplication driven by an actual performance need? If not, can as well keep the listy module only, and convert at callsite. Otherwise, doing benchmarks on the real problem (against the simply-wrapping) with Not sure about the typeclass. A bit hackier, but an often employed trick (see Personally I never liked the trick, but the typeclass move is something to be made only if benchmark data verifies its positive effect (passing around dictionaries and whatnot). |