Re: [Haskell-cafe] Re: Haddock : parse error on input `{-# UNPACK'
2009/6/7 Dominic Steinitz domi...@steinitz.org: Ha! It's yet another of haddock's quirks. If I replace -- ^ by -- then haddock accepts {-#. I'll update the ticket you created. -- | The parse state data S = S {-# UNPACK #-} !BL.ByteString -- ^ input {-# UNPACK #-} !Int -- ^ bytes read {-# UNPACK #-} ![B.ByteString] {-# UNPACK #-} !Int -- ^ the failure depth -- | The parse state data S = S {-# UNPACK #-} !BL.ByteString -- input {-# UNPACK #-} !Int -- bytes read {-# UNPACK #-} ![B.ByteString] {-# UNPACK #-} !Int -- the failure depth Haddock doesn't actually support comments on individual constructor arguments. People often get confused by this, and the error message isn't especially useful. We have a ticket for giving better error messages: http://trac.haskell.org/haddock/ticket/94 We also have a ticket about the feature itself: http://trac.haskell.org/haddock/ticket/95 David ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Haddock : parse error on input `{-# UNPACK'
Erik de Castro Lopo mle+hs at mega-nerd.com writes: Dominic Steinitz wrote: Erik de Castro Lopo mle+hs at mega-nerd.com writes: src/Data/Binary/Strict/IncrementalGet.hs:106:11: parse error on input `{-# UNPACK' This is a haddock error and I presume a bug in haddock. Well I raised a bug here: http://trac.haskell.org/haddock/ticket/109 Thats actually not the problem. I'm trying to build a debian package for this thing and this haddock problem is preventing that. Erik This seems to be the problem: http://hackage.haskell.org/trac/hackage/ticket/230. There's obviously a work round for it as the haddock for the binary package builds (e.g. http://hackage.haskell.org/packages/archive/binary/0.5.0.1/doc/html/Data-Binary-Get.html) but I don't know what it is. What's even more frustrating is one of the authors of has tried: #ifndef __HADDOCK__ -- | The parse state data S = S {-# UNPACK #-} !BL.ByteString -- ^ input {-# UNPACK #-} !Int -- ^ bytes read {-# UNPACK #-} ![B.ByteString] {-# UNPACK #-} !Int -- ^ the failure depth #endif and haddock ignores this. And the binary package just has this (no ifdefs!): -- Our internal buffer type data Buffer = Buffer {-# UNPACK #-} !(ForeignPtr Word8) {-# UNPACK #-} !Int-- offset {-# UNPACK #-} !Int-- used bytes {-# UNPACK #-} !Int-- length left Perhaps one of the authors of binary can tell us their secret of success? Dominic. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Haddock : parse error on input `{-# UNPACK'
Dominic Steinitz dominic at steinitz.org writes: Erik de Castro Lopo mle+hs at mega-nerd.com writes: Dominic Steinitz wrote: Erik de Castro Lopo mle+hs at mega-nerd.com writes: src/Data/Binary/Strict/IncrementalGet.hs:106:11: parse error on input `{-# UNPACK' This is a haddock error and I presume a bug in haddock. Well I raised a bug here: http://trac.haskell.org/haddock/ticket/109 Ha! It's yet another of haddock's quirks. If I replace -- ^ by -- then haddock accepts {-#. I'll update the ticket you created. -- | The parse state data S = S {-# UNPACK #-} !BL.ByteString -- ^ input {-# UNPACK #-} !Int -- ^ bytes read {-# UNPACK #-} ![B.ByteString] {-# UNPACK #-} !Int -- ^ the failure depth -- | The parse state data S = S {-# UNPACK #-} !BL.ByteString -- input {-# UNPACK #-} !Int -- bytes read {-# UNPACK #-} ![B.ByteString] {-# UNPACK #-} !Int -- the failure depth Dominic. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haddock : parse error on input `{-# UNPACK'
Dominic Steinitz wrote: -- | The parse state data S = S {-# UNPACK #-} !BL.ByteString -- ^ input {-# UNPACK #-} !Int -- ^ bytes read {-# UNPACK #-} ![B.ByteString] {-# UNPACK #-} !Int -- ^ the failure depth -- | The parse state data S = S {-# UNPACK #-} !BL.ByteString -- input {-# UNPACK #-} !Int -- bytes read {-# UNPACK #-} ![B.ByteString] {-# UNPACK #-} !Int -- the failure depth Thanks Dominic. Thats a workaround I can use. Cheers, Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Haddock : parse error on input `{-# UNPACK'
Erik de Castro Lopo mle+hs at mega-nerd.com writes: src/Data/Binary/Strict/IncrementalGet.hs:106:11: parse error on input `{-# UNPACK' Is this a bug? Is there any way to work around it? This is a haddock error and I presume a bug in haddock. I don't know whether cabal installs things if haddock fails. You could do ghc-pkg list and see what's there. If it didn't install then you can install by hand: 1. Extract the sources and in that directory: 2. runghc Setup.lhs configure 3. runghc Setup.lhs build 4. runghc Setup.lhs install You might want to do configure with --user - that's what cabal defaults to. Dominic ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haddock : parse error on input `{-# UNPACK'
Dominic Steinitz wrote: Erik de Castro Lopo mle+hs at mega-nerd.com writes: src/Data/Binary/Strict/IncrementalGet.hs:106:11: parse error on input `{-# UNPACK' Is this a bug? Is there any way to work around it? This is a haddock error and I presume a bug in haddock. Well I raised a bug here: http://trac.haskell.org/haddock/ticket/109 I don't know whether cabal installs things if haddock fails. Thats actually not the problem. I'm trying to build a debian package for this thing and this haddock problem is preventing that. Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe