haskell / haskell/text

Inspection tests fail if -O0 is forced

Open
#634 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
421
Forks
163
PR merge metrics
No merged PRs in 30d

Description

Hackage builder for some reason enforces `-O0`, which causes inspection tests to fail:

```
$ cabal run test:tests --ghc-options='-O0' -- --hide-successes
All
Properties
folds-unfolds
folds
_S_foldl'_from_foldlM' ==~ _S_foldl': FAIL
LHS:
_S_foldl'_from_foldlM'
= ... \ (f :: a -> Char -> a) (x :: a) ->
. runIdentity
(foldlM'
$fMonadIdentity
((\ (i :: a) (c :: Char) -> f i c) `cast` :: ...)
x)
RHS: _S_foldl' = ... inline foldl'
Use -p '/_S_foldl'\''_from_foldlM'\'' ==~ _S_foldl'\''/' to rerun this test only.
lowlevel
misc
t_literal_foo
mentions none of Char, List: FAIL
t_literal_foo :: Text
t_literal_foo = pack lvl_sNbt

lvl_sNbs :: Addr#
lvl_sNbs = "foo"#

lvl_sNbt :: [Char]
lvl_sNbt = unpackCString# lvl_sNbs

Use -p '/mentions none of Char, List/' to rerun this test only.
uses none of pack, unstream, map, safe, streamList: FAIL
t_literal_foo :: Text
t_literal_foo = pack lvl_sNbt

lvl_sNbs :: Addr#
lvl_sNbs = "foo"#

lvl_sNbt :: [Char]
lvl_sNbt = unpackCString# lvl_sNbs

Use -p '/uses none of pack, unstream, map, safe, streamList/' to rerun this test only.
uses none of unpackCString#, unpackCStringUtf8#: FAIL
t_literal_foo :: Text
t_literal_foo = pack lvl_sNbt

lvl_sNbs :: Addr#
lvl_sNbs = "foo"#

lvl_sNbt :: [Char]
lvl_sNbt = unpackCString# lvl_sNbs

Use -p '/uses none of unpackCString#, unpackCStringUtf8#/' to rerun this test only.
```

...which is kinda expected, but annoying.

In the wild: https://hackage.haskell.org/package/text-2.1.2/reports/2

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.