diagrams / diagrams-haddock

Preprocessor for including inline diagrams in Haddock documentation
Other
10 stars 4 forks source link

Compilation failure due to missing Show instance #20

Closed snoyberg closed 10 years ago

snoyberg commented 10 years ago

Running:

cabal install diagrams-haddock --constraint 'diagrams-builder==0.4.2'

Results in:

src/Diagrams/Haddock.hs:454:9:
    No instance for (Show (Options SVG Diagrams.TwoD.Types.R2))
      arising from a use of `buildDiagram'
    Possible fix:
      add an instance declaration for
      (Show (Options SVG Diagrams.TwoD.Types.R2))
    In a stmt of a 'do' block:
      buildDiagram
        SVG
        zeroV
        (SVGOptions (mkSizeSpec w h) Nothing)
        (map (view codeBlockCode) neededCode)
        (url ^. diagramName)
        []
        ["Diagrams.Backend.SVG"]
        (hashedRegenerate (\ _ opts -> opts) cacheDir)
    In the second argument of `($)', namely
      `do { createDirectoryIfMissing True cacheDir;
            when (not dataURIs) $ createDirectoryIfMissing True outputDir;
            logStr $ "[ ] " ++ (url ^. diagramName);
            IO.hFlush IO.stdout;
            .... }'
    In a stmt of a 'do' block:
      res <- liftIO
             $ do { createDirectoryIfMissing True cacheDir;
                    when (not dataURIs) $ createDirectoryIfMissing True outputDir;
                    logStr $ "[ ] " ++ (url ^. diagramName);
                    IO.hFlush IO.stdout;
                    .... }
Failed to install diagrams-haddock-0.2.1.6
cabal: Error: some packages failed to install:
diagrams-haddock-0.2.1.6 failed during the building phase. The exception was:
ExitFailure 1
byorgey commented 10 years ago

Whoops, sorry, I'm in the middle of updating some packages and thought (incorrectly) that I had reached a stable stopping point. I know exactly what the problem is, an updated diagrams-haddock will follow later today. Thanks for the report!

snoyberg commented 10 years ago

No problem, hopefully the report was helpful. I've been in this exact situation plenty of times before :)

byorgey commented 10 years ago

Fixed by diagrams-haddock-0.2.2.