GithubHelp home page GithubHelp logo

nikita-volkov / ptr-poker Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 5.0 106 KB

Pointer poking action construction and composition toolkit

Home Page: http://hackage.haskell.org/package/ptr-poker

License: MIT License

Haskell 60.88% C 37.75% Makefile 1.37%
haskell ptr memory marshalling serialization

ptr-poker's People

Contributors

ailrun avatar awgn avatar ethercrow avatar github-actions[bot] avatar july541 avatar nikita-volkov avatar raehik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ptr-poker's Issues

Performance vs. `store`

I'm in the middle of replacing some low level serializing code. I mostly finished swapping to store, then found your ptr-poker library and noted it's a fair amount simpler (no parsing) and is used for efficient JSON serialization, which I was playing with.

Would you be able to compare performance with store? It seems the most related package to yours, slightly older, lots more code. Same idea throughout, but ptr-poker carries around less state and has a classic monoidal interface rather than store's monadic one, and store has a funky Size type which may "explicitly" ignore the argument (perhaps this lends itself to optimizations?).

Is poking opposite-endian integers byte by byte really faster than `pokeStorable . byteSwap`?

I got curious about some behaviour in this library and looked into it. In short, I feel the most efficient method of poking a machine integer with opposite endianness to the host should be to swap the byte order, then use host poke. It doesn't look like it makes much difference overall (unsurprised, most work is probably wrapping/unwrapping), but there appears to be a consistent marginal improvement on my 64-bit system (2%?): raehik@cf9cdbf

I disassembled GHC's output for big endian encoding Word64s on my x86_64 system and confirmed that using byteSwap64 translates to a single "inlined" BSWAP instruction, whereas the byte-by-byte approach is a bunch of MOVs and SHRs.

GHC 9.2 support

shiftr_w16 (W16# w) (I# i) = W16# (w `uncheckedShiftRL#` i)
shiftr_w32 (W32# w) (I# i) = W32# (w `uncheckedShiftRL#` i)

These lines are broken in GHC 9.2 as the version requires Word16# and Word32# respectively for W16# and W32# instead of Word#. They require uncheckedShiftRLWord16# and uncheckedShiftRLWord32# instead.

Suggestion: Unbox `Poke`

Partial followup to haskell-perf/strict-bytestring-builders#6 .

ptr-poker uses the following type for low-level pokes:

Ptr Word8 -> IO (Ptr Word8)

I believe unboxing would improve performance:

Addr# -> State# RealWorld -> (# State# RealWorld, Addr# #) }

Ptrs are data boxed, so this should remove some indirection. We have to unbox IO because it's not levity-polymorphic.

This representation gave me consistent better performance both over in https://github.com/haskell-perf/strict-bytestring-builders and in a less synthetic benchmark here, serializing lots of Word8s and ByteStrings. Main code is currently here. (Some tests in that repo also assert basic soundness.)

What do you think? If you found it appealing I would gladly merge my code in here. Otherwise I'd like to publish my lib on Hackage with attribution for the idea.

Test failure on GHC 9.2.2 (MacOS x64)

Hi! I see the follwoing test failure during a nix build of the package from this nixpkgs checkout, it has the current ptr-poker hackage release.

building '/nix/store/snxcrhrchlpvlm1am9vdpcaqycj38l7g-ptr-poker-0.1.2.5.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/48pqkyk38pnhh59r3i5kpf6zbr3alyxg-ghc-9.2.2.
unpacking sources
unpacking source archive /nix/store/b275dkhq7ipzl9zfnm7laxw957qz6abl-ptr-poker-0.1.2.5.tar.gz
source root is ptr-poker-0.1.2.5
setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file ptr-poker-0.1.2.5/test/Main.hs
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/private/tmp/nix-build-ptr-poker-0.1.2.5.drv-0/setup-package.conf.d -j8 -threaded -rtsopts
[1 of 1] Compiling Main             ( /nix/store/4mdp8nhyfddh7bllbi7xszz7k9955n79-Setup.hs, /private/tmp/nix-build-ptr-poker-0.1.2.5.drv-0/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/7zjdwfpb2r7xw6iah3nyrr8id4crzsmr-ptr-poker-0.1.2.5 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/kyzr36ay5irj1r8npwpm530g9510s8dh-ptr-poker-0.1.2.5-doc/share/doc/ptr-poker-0.1.2.5 --with-gcc=clang --package-db=/private/tmp/nix-build-ptr-poker-0.1.2.5.drv-0/package.conf.d --ghc-options=-j8 --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-options=-haddock --extra-lib-dirs=/nix/store/qy1a2f9m58nnzvamp5ccgs2nac93ls8c-ncurses-6.3/lib --extra-lib-dirs=/nix/store/ifmi19kb21m5d9xd20mvs9ijn5h4ddm8-libffi-3.4.2/lib --extra-lib-dirs=/nix/store/4z9qpfjx3cjh9fz2vn7257g0viy16p90-gmp-with-cxx-6.2.1/lib --extra-include-dirs=/nix/store/fr99y7zjmmgixn3nylwzqcxnlglvfpcp-libiconv-50/include --extra-lib-dirs=/nix/store/fr99y7zjmmgixn3nylwzqcxnlglvfpcp-libiconv-50/lib --extra-include-dirs=/nix/store/6j8qja90dlvylirrcy0zidl0272zwp1y-libcxx-11.1.0-dev/include --extra-lib-dirs=/nix/store/2588d9hkbvqids8vbmcbq7xngpj26r2b-libcxx-11.1.0/lib --extra-include-dirs=/nix/store/0wqmicjzi3jbhapw39xwxbj9fgyl9mqx-libcxxabi-11.1.0-dev/include --extra-lib-dirs=/nix/store/f5hl8liigwf0qji8jgdsid9chr4cjs5j-libcxxabi-11.1.0/lib --extra-include-dirs=/nix/store/p42c0gz6xjl72b8r6p9pn2l04aacbna2-compiler-rt-libc-11.1.0-dev/include --extra-lib-dirs=/nix/store/b7fl0wk0dd739imdb5wgb2rssx750pzi-compiler-rt-libc-11.1.0/lib --extra-framework-dirs=/nix/store/w0j1smy35j2il8grml3832lbaf6rksis-swift-corefoundation-unstable-2018-09-14/Library/Frameworks
Using Parsec parser
Configuring ptr-poker-0.1.2.5...
Dependency base >=4.11 && <5: using base-4.16.1.0
Dependency bytestring >=0.10 && <0.12: using bytestring-0.11.3.0
Dependency scientific >=0.3.6.2 && <0.4: using scientific-0.3.7.0
Dependency text >=1 && <3: using text-1.2.5.0
Dependency hedgehog >=1.0.3 && <2: using hedgehog-1.0.5
Dependency numeric-limits >=0.1 && <0.2: using numeric-limits-0.1.0.0
Dependency ptr-poker: using ptr-poker-0.1.2.5
Dependency rerebase >=1.10.0.1 && <2: using rerebase-1.15.0.3
Source component graph:
    component lib
    component test:test dependency lib
Configured component graph:
    component ptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH
        include base-4.16.1.0
        include bytestring-0.11.3.0
        include scientific-0.3.7.0-K34z0f68OWX4CywPTIH4u3
        include text-1.2.5.0
    component ptr-poker-0.1.2.5-3sLopcjeTXS15vkavj6luT-test
        include hedgehog-1.0.5-29yvajpNsoe1A06ZXVJkMc
        include numeric-limits-0.1.0.0-FQGbjjVr1Yv6JfoVo0BnfR
        include ptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH
        include rerebase-1.15.0.3-BueFWNpCTSiUFqy3AJEgM
Linked component graph:
    unit ptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH
        include base-4.16.1.0
        include bytestring-0.11.3.0
        include scientific-0.3.7.0-K34z0f68OWX4CywPTIH4u3
        include text-1.2.5.0
        PtrPoker.Poke=ptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH:PtrPoker.Poke,PtrPoker.Size=ptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH:PtrPoker.Size,PtrPoker.Write=ptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH:PtrPoker.Write
    unit ptr-poker-0.1.2.5-3sLopcjeTXS15vkavj6luT-test
        include hedgehog-1.0.5-29yvajpNsoe1A06ZXVJkMc
        include numeric-limits-0.1.0.0-FQGbjjVr1Yv6JfoVo0BnfR
        include ptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH
        include rerebase-1.15.0.3-BueFWNpCTSiUFqy3AJEgM
Ready component graph:
    definite ptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH
        depends base-4.16.1.0
        depends bytestring-0.11.3.0
        depends scientific-0.3.7.0-K34z0f68OWX4CywPTIH4u3
        depends text-1.2.5.0
    definite ptr-poker-0.1.2.5-3sLopcjeTXS15vkavj6luT-test
        depends hedgehog-1.0.5-29yvajpNsoe1A06ZXVJkMc
        depends numeric-limits-0.1.0.0-FQGbjjVr1Yv6JfoVo0BnfR
        depends ptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH
        depends rerebase-1.15.0.3-BueFWNpCTSiUFqy3AJEgM
Using Cabal-3.6.3.0 compiled by ghc-9.2
Using compiler: ghc-9.2.2
Using install prefix:
/nix/store/7zjdwfpb2r7xw6iah3nyrr8id4crzsmr-ptr-poker-0.1.2.5
Executables installed in:
/nix/store/7zjdwfpb2r7xw6iah3nyrr8id4crzsmr-ptr-poker-0.1.2.5/bin
Libraries installed in:
/nix/store/7zjdwfpb2r7xw6iah3nyrr8id4crzsmr-ptr-poker-0.1.2.5/lib/ghc-9.2.2/x86_64-osx-ghc-9.2.2/ptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH
Dynamic Libraries installed in:
/nix/store/7zjdwfpb2r7xw6iah3nyrr8id4crzsmr-ptr-poker-0.1.2.5/lib/ghc-9.2.2/x86_64-osx-ghc-9.2.2
Private executables installed in:
/nix/store/7zjdwfpb2r7xw6iah3nyrr8id4crzsmr-ptr-poker-0.1.2.5/libexec/x86_64-osx-ghc-9.2.2/ptr-poker-0.1.2.5
Data files installed in:
/nix/store/7zjdwfpb2r7xw6iah3nyrr8id4crzsmr-ptr-poker-0.1.2.5/share/x86_64-osx-ghc-9.2.2/ptr-poker-0.1.2.5
Documentation installed in:
/nix/store/kyzr36ay5irj1r8npwpm530g9510s8dh-ptr-poker-0.1.2.5-doc/share/doc/ptr-poker-0.1.2.5
Configuration files installed in:
/nix/store/7zjdwfpb2r7xw6iah3nyrr8id4crzsmr-ptr-poker-0.1.2.5/etc
No alex found
Using ar found on system at:
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ar
No c2hs found
No cpphs found
No doctest found
Using gcc version 11.1.0 given by user at:
/nix/store/jnm93vsz7i25zby30d4z7wwrzqbsakdj-clang-wrapper-11.1.0/bin/clang
Using ghc version 9.2.2 found on system at:
/nix/store/48pqkyk38pnhh59r3i5kpf6zbr3alyxg-ghc-9.2.2/bin/ghc
Using ghc-pkg version 9.2.2 found on system at:
/nix/store/48pqkyk38pnhh59r3i5kpf6zbr3alyxg-ghc-9.2.2/bin/ghc-pkg-9.2.2
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.26.0 found on system at:
/nix/store/48pqkyk38pnhh59r3i5kpf6zbr3alyxg-ghc-9.2.2/bin/haddock-ghc-9.2.2
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.68 found on system at:
/nix/store/48pqkyk38pnhh59r3i5kpf6zbr3alyxg-ghc-9.2.2/bin/hpc
Using hsc2hs version 0.68.8 found on system at:
/nix/store/48pqkyk38pnhh59r3i5kpf6zbr3alyxg-ghc-9.2.2/bin/hsc2hs
Using hscolour version 1.24 found on system at:
/nix/store/li60s2yc4h3ny8snalwjk3pf0sgpfdnv-hscolour-1.24.4/bin/HsColour
No jhc found
Using ld found on system at:
/nix/store/5b9jn0wcnkbvjhkgmw5bmd4zgg97j6v8-cctools-binutils-darwin-wrapper-949.0.1/bin/ld
No pkg-config found
Using runghc version 9.2.2 found on system at:
/nix/store/48pqkyk38pnhh59r3i5kpf6zbr3alyxg-ghc-9.2.2/bin/runghc-9.2.2
Using strip found on system at:
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/strip
Using tar found on system at:
/nix/store/rdv54a5m4392psvpb4dmjl0bzvm5kagb-gnutar-1.34/bin/tar
No uhc found
building
Preprocessing library for ptr-poker-0.1.2.5..
Building library for ptr-poker-0.1.2.5..
[ 1 of 10] Compiling PtrPoker.Prelude ( library/PtrPoker/Prelude.hs, dist/build/PtrPoker/Prelude.o, dist/build/PtrPoker/Prelude.dyn_o )
[ 2 of 10] Compiling PtrPoker.IO.ByteString ( library/PtrPoker/IO/ByteString.hs, dist/build/PtrPoker/IO/ByteString.o, dist/build/PtrPoker/IO/ByteString.dyn_o )
[ 3 of 10] Compiling PtrPoker.Ffi     ( library/PtrPoker/Ffi.hs, dist/build/PtrPoker/Ffi.o, dist/build/PtrPoker/Ffi.dyn_o )
ld: warning: /nix/store/fr99y7zjmmgixn3nylwzqcxnlglvfpcp-libiconv-50/lib/libiconv.dylib, ignoring unexpected dylib file
ld: warning: /nix/store/fr99y7zjmmgixn3nylwzqcxnlglvfpcp-libiconv-50/lib/libiconv.dylib, ignoring unexpected dylib file
[ 4 of 10] Compiling PtrPoker.Text    ( library/PtrPoker/Text.hs, dist/build/PtrPoker/Text.o, dist/build/PtrPoker/Text.dyn_o )
[ 5 of 10] Compiling PtrPoker.Size    ( library/PtrPoker/Size.hs, dist/build/PtrPoker/Size.o, dist/build/PtrPoker/Size.dyn_o )
[ 6 of 10] Compiling PtrPoker.ByteString ( library/PtrPoker/ByteString.hs, dist/build/PtrPoker/ByteString.o, dist/build/PtrPoker/ByteString.dyn_o )
[ 7 of 10] Compiling PtrPoker.UncheckedShifting ( library/PtrPoker/UncheckedShifting.hs, dist/build/PtrPoker/UncheckedShifting.o, dist/build/PtrPoker/UncheckedShifting.dyn_o )
[ 8 of 10] Compiling PtrPoker.IO.Prim ( library/PtrPoker/IO/Prim.hs, dist/build/PtrPoker/IO/Prim.o, dist/build/PtrPoker/IO/Prim.dyn_o )
[ 9 of 10] Compiling PtrPoker.Poke    ( library/PtrPoker/Poke.hs, dist/build/PtrPoker/Poke.o, dist/build/PtrPoker/Poke.dyn_o )
[10 of 10] Compiling PtrPoker.Write   ( library/PtrPoker/Write.hs, dist/build/PtrPoker/Write.o, dist/build/PtrPoker/Write.dyn_o )
[ 1 of 10] Compiling PtrPoker.Prelude ( library/PtrPoker/Prelude.hs, dist/build/PtrPoker/Prelude.p_o )
ld: warning: /nix/store/fr99y7zjmmgixn3nylwzqcxnlglvfpcp-libiconv-50/lib/libiconv.dylib, ignoring unexpected dylib file
[ 2 of 10] Compiling PtrPoker.IO.ByteString ( library/PtrPoker/IO/ByteString.hs, dist/build/PtrPoker/IO/ByteString.p_o )
ld: warning: /nix/store/fr99y7zjmmgixn3nylwzqcxnlglvfpcp-libiconv-50/lib/libiconv.dylib, ignoring unexpected dylib file
[ 3 of 10] Compiling PtrPoker.Ffi     ( library/PtrPoker/Ffi.hs, dist/build/PtrPoker/Ffi.p_o )
ld: warning: /nix/store/fr99y7zjmmgixn3nylwzqcxnlglvfpcp-libiconv-50/lib/libiconv.dylib, ignoring unexpected dylib file
[ 4 of 10] Compiling PtrPoker.Text    ( library/PtrPoker/Text.hs, dist/build/PtrPoker/Text.p_o )
ld: warning: /nix/store/fr99y7zjmmgixn3nylwzqcxnlglvfpcp-libiconv-50/lib/libiconv.dylib, ignoring unexpected dylib file
[ 5 of 10] Compiling PtrPoker.Size    ( library/PtrPoker/Size.hs, dist/build/PtrPoker/Size.p_o )
ld: warning: /nix/store/fr99y7zjmmgixn3nylwzqcxnlglvfpcp-libiconv-50/lib/libiconv.dylib, ignoring unexpected dylib file
[ 6 of 10] Compiling PtrPoker.ByteString ( library/PtrPoker/ByteString.hs, dist/build/PtrPoker/ByteString.p_o )
ld: warning: /nix/store/fr99y7zjmmgixn3nylwzqcxnlglvfpcp-libiconv-50/lib/libiconv.dylib, ignoring unexpected dylib file
[ 7 of 10] Compiling PtrPoker.UncheckedShifting ( library/PtrPoker/UncheckedShifting.hs, dist/build/PtrPoker/UncheckedShifting.p_o )
ld: warning: /nix/store/fr99y7zjmmgixn3nylwzqcxnlglvfpcp-libiconv-50/lib/libiconv.dylib, ignoring unexpected dylib file
[ 8 of 10] Compiling PtrPoker.IO.Prim ( library/PtrPoker/IO/Prim.hs, dist/build/PtrPoker/IO/Prim.p_o )
ld: warning: /nix/store/fr99y7zjmmgixn3nylwzqcxnlglvfpcp-libiconv-50/lib/libiconv.dylib, ignoring unexpected dylib file
[ 9 of 10] Compiling PtrPoker.Poke    ( library/PtrPoker/Poke.hs, dist/build/PtrPoker/Poke.p_o )
ld: warning: /nix/store/fr99y7zjmmgixn3nylwzqcxnlglvfpcp-libiconv-50/lib/libiconv.dylib, ignoring unexpected dylib file
[10 of 10] Compiling PtrPoker.Write   ( library/PtrPoker/Write.hs, dist/build/PtrPoker/Write.p_o )
ld: warning: /nix/store/fr99y7zjmmgixn3nylwzqcxnlglvfpcp-libiconv-50/lib/libiconv.dylib, ignoring unexpected dylib file
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(longlong.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(Disassembler.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(LdvProfile.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(OldARMAtomic.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(ProfilerReport.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(ProfilerReportJson.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(Profiling.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(RetainerProfile.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(RetainerSet.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(RtsDllMain.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(SpinLock.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(Trace.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(TraverseHeap.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(TraverseHeapTest.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(Evac_thr.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(Sanity.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(Scav_thr.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(Elf.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(PEi386.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(elf_got.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(elf_plt.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(elf_plt_aarch64.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(elf_plt_arm.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(elf_reloc.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(elf_reloc_aarch64.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(elf_tlsgd.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(elf_util.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(plt.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(plt_aarch64.o) has no symbols
/nix/store/fjd0p8rk93db76l7wnk2jxh32x9yadfw-cctools-binutils-darwin-949.0.1/bin/ranlib: file: dist/build/libHSptr-poker-0.1.2.5-Lkte7Kr7XdHCsH3ggtknNH-ghc9.2.2.a(StgCRunAsm.o) has no symbols
Preprocessing test suite 'test' for ptr-poker-0.1.2.5..
Building test suite 'test' for ptr-poker-0.1.2.5..
[1 of 1] Compiling Main             ( test/Main.hs, dist/build/test/test-tmp/Main.o, dist/build/test/test-tmp/Main.dyn_o )
Linking dist/build/test/test ...
running tests
Running 1 test suites...
Test suite test: RUNNING...
━━━ Main ━━━
  ✓ prop_word64Size passed 999 tests.
  ✓ prop_int64Size passed 999 tests.
  ✓ prop_wordAsciiDec passed 999 tests.
  ✓ prop_intAsciiDec passed 999 tests.
  ✓ prop_doubleAsciiDec passed 999 tests.
  ✓ prop_realZeroNonRealDoubleAsciiDec passed 999 tests.
  ✓ prop_nonRealZeroNonRealDoubleAsciiDec passed 99 tests.
  ✗ prop_sizeOfTextUtf8 failed at test/Main.hs:83:9
    after 29 tests and 8 shrinks.
  
       ┏━━ test/Main.hs ━━━
    78 ┃ prop_sizeOfTextUtf8 =
    79 ┃   withTests 999 $
    80 ┃     property $ do
    81 ┃       a <- forAll (Gen.text (Range.exponential 0 9999) (Gen.choice [Gen.ascii, Gen.unicode]))
       ┃       │ "\NUL\NUL\NUL\NUL\65536"
    82 ┃       Size.textUtf8 a
    83 ┃         === Char8ByteString.length (Text.encodeUtf8 a)
       ┃         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       ┃         │ ━━━ Failed (- lhs) (+ rhs) ━━━
       ┃         │ - 87832
       ┃         │ + 8
  
    This failure can be reproduced by running:
    > recheck (Size 28) (Seed 2277891120612188954 3285761025659271049) prop_sizeOfTextUtf8
  
  ✓ prop_sizeOfTextASCII passed 999 tests.
  ✓ prop_textASCII passed 999 tests.
  ✗ prop_textUtf8 failed at test/Main.hs:104:9
    after 47 tests and 27 shrinks.
  
        ┏━━ test/Main.hs ━━━
     99 ┃ prop_textUtf8 =
    100 ┃   withTests 999 $
    101 ┃     property $ do
    102 ┃       a <- forAll (Gen.text (Range.exponential 0 9999) (Gen.choice [Gen.ascii, Gen.unicode]))
        ┃       │ "\2048\NUL\NUL\NUL\NUL\NUL\NUL\NUL\65536\NUL"
    103 ┃       Write.writeToByteString (Write.textUtf8 a)
    104 ┃         === Text.encodeUtf8 a
        ┃         ^^^^^^^^^^^^^^^^^^^^^
        ┃         │ ━━━ Failed (- lhs) (+ rhs) ━━━
        ┃         │ - "\224\160\128\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NULB\NUL\NUL\NUL!\150"
        ┃         │ + "\224\160\128\NUL\NUL\NUL\NUL\NUL\NUL\NUL\240\144\128\128\NUL"
  
    This failure can be reproduced by running:
    > recheck (Size 46) (Seed 17755634936836980416 16706775619960621721) prop_textUtf8
  
  ✗ 2 failed, 9 succeeded.

Test suite test: FAIL
Test suite logged to: dist/test/ptr-poker-0.1.2.5-test.log
0 of 1 test suites (0 of 1 test cases) passed.
error: builder for '/nix/store/snxcrhrchlpvlm1am9vdpcaqycj38l7g-ptr-poker-0.1.2.5.drv' failed with exit code 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.