Closed Bodigrim closed 1 year ago
Clever! There is something fishy though:
import Data.Int
runBuffer \b -> b |>& (-1 :: Int32)
-- "ffffffff"
runBuffer \b -> b |>. '?' |>& (-1 :: Int32)
-- "7ffffffff"
It helps to update the tests as in #11.
When fixed, we should benchmark to check for the relevance of rewrite rules.
Good catch, should be better now. Could you possibly try rebasing your branch with tests atop of this?
I'd rather avoid rewrite rules, in the worst case scenario we can dispatch by types similarly to https://github.com/Bodigrim/linear-builder/blob/d8ae7d89c09b8c748bbb04cddf23e33fd5189b5c/src/Data/Text/Builder/Linear/Dec.hs#L130-L143
@Bodigrim Done, see #11.
Superseded by #11.
@wismill this is what I meant in https://github.com/Bodigrim/linear-builder/pull/11#pullrequestreview-1608329738. Is it sufficient?