lpsmith / bytestring-builder Goto Github PK
View Code? Open in Web Editor NEWThe new bytestring builder, packaged outside of GHC
License: Other
The new bytestring builder, packaged outside of GHC
License: Other
I believe this was introduced with cc5b229. Prior to that change, you couldn't install bytestring-builder with bytestring 0.10.2.*, so this would never come up.
I imagine this case is rare, but I have seen it in the wild, and now that blaze-builder-0.4 uses bytestring Builder
s I think rare cases are going to come up more often.
name: bytestring-builder-test
version: 0.1.0.0
build-type: Simple
cabal-version: >=1.10
executable bytestring-builder-test
main-is: main.hs
build-depends: base
, bytestring == 0.10.2.*
, bytestring-builder
default-language: Haskell2010
import Data.ByteString.Builder.Extra
main = return ()
main.hs:1:8:
Ambiguous module name `Data.ByteString.Builder.Extra':
it was found in multiple packages:
bytestring-0.10.2.0 bytestring-builder-0.10.4.1.1
Not sure if this still matters (old ghc after all), but on ghc 7.4.2 building fails with:
src/Data/ByteString/Builder/Prim.hs:553:13:
Illegal bang-pattern (use -XBangPatterns):
! br'
Bizarrely, if we compile with --builddir=foo
compilation succeeds! I've opened a ghc ticket about this at https://ghc.haskell.org/trac/ghc/ticket/12655 , but if you care about old ghc versions you might want to work-around this.
Current master fails to compile with ghc-7.0.1
with the error included at the bottom.
Looks like it's a bit nasty to fix, but it'd be nice if bytestring-builder
would compile with that version of ghc
.
Building bytestring-builder-0.10.8.1.0...
Preprocessing library bytestring-builder-0.10.8.1.0...
[ 9 of 13] Compiling Data.ByteString.Builder.Internal ( src/Data/ByteString/Builder/Internal.hs, dist/build/Data/ByteString/Builder/Internal.o )
ghc: panic! (the 'impossible' happened)
(GHC version 7.0.1 for x86_64-unknown-linux):
dsLet: unlifted
AbsBinds
[b{tv a2jk} [sk]]
[]
[ip'{v a22y} [lid] <= [b{tv a2jk} [sk]] ip'{v a2jj} [lid]]
ip'{v a22y} [lid]
:: forall b{tv a2jk} [sk]. base:GHC.Ptr.Ptr{tc 33A} b{tv a2jk} [sk]
[LclId]
{ {831:15-46}
{831:15-46}
!((ip'{v a2jj} [lid] :: base:GHC.Ptr.Ptr{tc 33A} b{tv a2jk} [sk]))
= {831:22-46}
{831:25-33}
(base:GHC.Ptr.plusPtr{v rdH} [gid]) @ base:GHC.Word.Word8{tc 32U}
@ b{tv a2jk} [sk]
ip{v a22s} [lid] outRemaining{v a22v} [lid] }
EvBinds{{}}
base:GHC.Base.${v 019} [gid]
@ (bytestring-builder-0.10.8.1.0:Data.ByteString.Builder.Internal.BuildSignal{tc r1Yb}
a{tv a2iU} [sk])
@ (ghc-prim:GHC.Types.IO{tc 32I}
(bytestring-builder-0.10.8.1.0:Data.ByteString.Builder.Internal.BuildSignal{tc r1Yb}
a{tv a2iU} [sk]))
(base:GHC.Base.return{v 01T} [gid[ClassOp]]
@ <nt>ghc-prim:GHC.Types.IO{tc 32I}
$dMonad{v a2jl} [lid]
@ (bytestring-builder-0.10.8.1.0:Data.ByteString.Builder.Internal.BuildSignal{tc r1Yb}
a{tv a2iU} [sk]))
(bytestring-builder-0.10.8.1.0:Data.ByteString.Builder.Internal.bufferFull{v r1YP} [lid]
@ a{tv a2iU} [sk]
(ghc-prim:GHC.Types.I#{(w) v 6d} [gid[DataCon]] 1)
ope{v a22u} [lid]
(go{v a2iW} [lid]
(ip'{v a22y} [lid] @ base:GHC.Word.Word8{tc 32U})))
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
See https://travis-ci.org/sjakobi/path/jobs/138399070#L589.
The next build on GHC-7.0.4 succeeded because cabal chose v0.10.8.1.0 instead.
Could this be resolved by deprecating v0.10.4.0 and possibly other known-bad versions on hackage?
The bug that affected bytestring
sadly affects this package as well, see
haskell/bytestring@4f52849 for more details
See https://ghc.haskell.org/~hvr/buildreports/bytestring-builder.html
src/Data/ByteString/Short/Internal.hs:139:10:
No instance for (GHC.Generics.Generic ShortByteString)
arising from a use of ‘Control.DeepSeq.$gdmrnf’
In the expression: Control.DeepSeq.$gdmrnf
In an equation for ‘rnf’: rnf = Control.DeepSeq.$gdmrnf
In the instance declaration for ‘NFData ShortByteString’
If I try to install this package with ghc 7.6.3 on my Mac, it builds nothing. Only if I manually edit the bytestring_has_builder
flag in the .cabal
file to False
does anything actually happen. This is preventing me from being able to resolve haskell/aeson#177 and its associated fix, haskell/aeson#178 — please help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.