Closed jkozlowski closed 11 years ago
Where does this fail?
Sorry I meant to copy this in, and then I forgot:
src/Network/Kontiki/Types.hs:342:13:
No instance for (Show Builder)
arising from the 'deriving' clause of a data type declaration
Possible fix:
add an instance declaration for (Show Builder)
or use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Show (Command a))
Hmm... I guess it makes some sense Builder
no longer Has a Show
instance, but I'd dislike no longer having a Show
instance for Command
, mainly for debugging/tracing purposes, which is (I suppose) what you propose?
I'd say a hand-written instance with the CLog
value expanded in the result would be more useful?
I agree about the debugging and no Show
instance...
I just added the following to silence the compiler:
import Data.ByteString.Builder (toLazyByteString)
instance Show Builder
where show = show . toLazyByteString
That'd introduce an orphan instanc. We really shouldn't have those in any of the Kontiki library modules!
Ouch, gotcha. Still learning
No worries :smiley: Not sure how to work around though (except writing tedious instances by hand...)
Compiling against bytestring-0.10.4.0 (which happened to be released when I checked out code and tried to build) is missing Show instance for http://hackage.haskell.org/package/bytestring-0.10.4.0/docs/Data-ByteString-Builder.html.
I am thinking of trying this http://www.haskell.org/cabal/users-guide/developing-packages.html#conditional-compilation over the weekend to fix the build (effectively add conditional compilation). Unless you think that's an overkill?