pandoc-include
pandoc-include copied to clipboard
'cabal update' followed by 'cabal install pandoc-include' fails to build
I've tried several times over a couple of days to the same effect:
macOS 10.14 (18A391)
Any ideas how to fix this?
I confirm that in macOS 10.13.6 today, after cabal update
.
Same on Ubuntu 18.04.2 LTS
Doesn't work:
$ cabal install pandoc-include Resolving dependencies...
Configuring pandoc-include-0.0.1...
Building pandoc-include-0.0.1...
Failed to install pandoc-include-0.0.1
Build log ( /home/nikhil/.cabal/logs/pandoc-include-0.0.1.log ):
cabal: Entering directory '/tmp/cabal-tmp-30507/pandoc-include-0.0.1'
Configuring pandoc-include-0.0.1...
Warning: 'hs-source-dirs: src' directory does not exist.
Building pandoc-include-0.0.1...
Preprocessing library pandoc-include-0.0.1...
Preprocessing executable 'pandoc-include' for pandoc-include-0.0.1...
[1 of 1] Compiling Main ( IncludeFilter.hs, dist/build/pandoc-include/pandoc-include-tmp/Main.o )
IncludeFilter.hs:71:53: error:
* Couldn't match type `[Char]' with `Data.Text.Internal.Text'
Expected type: Data.Text.Internal.Text
Actual type: String
* In the second argument of `readMarkdown', namely `content'
In the second argument of `($!)', namely `readMarkdown def content'
In the expression: return $! readMarkdown def content
cabal: Leaving directory '/tmp/cabal-tmp-30507/pandoc-include-0.0.1'
cabal: Error: some packages failed to install:
pandoc-include-0.0.1 failed during the building phase. The exception was:
ExitFailure 1
It's a bit heavy-weight, but I do this sort of thing now via the pandocs API and classes, which is a joy but there are quirks. http://hackage.haskell.org/package/readme-lhs is an example.
Same on Ubuntu 20.10
Same here on OSX 11.1
Resolving dependencies...
Build profile: -w ghc-8.10.3 -O1
In order, the following will be built (use -v for more details):
- pandoc-include-0.0.1 (exe:pandoc-include) (requires build)
Starting pandoc-include-0.0.1 (exe:pandoc-include)
Building pandoc-include-0.0.1 (exe:pandoc-include)
Failed to build exe:pandoc-include from pandoc-include-0.0.1.
Build log ( /Users/dfu/.cabal/logs/ghc-8.10.3/pndc-ncld-0.0.1-ef6aa3ce.log ):
Configuring executable 'pandoc-include' for pandoc-include-0.0.1..
Warning: 'hs-source-dirs: src' directory does not exist.
Preprocessing executable 'pandoc-include' for pandoc-include-0.0.1..
Building executable 'pandoc-include' for pandoc-include-0.0.1..
[1 of 1] Compiling Main ( IncludeFilter.hs, dist/build/pandoc-include/pandoc-include-tmp/Main.o )
IncludeFilter.hs:71:53: error:
• Couldn't match type ‘[Char]’ with ‘Data.Text.Internal.Text’
Expected type: Data.Text.Internal.Text
Actual type: String
• In the second argument of ‘readMarkdown’, namely ‘content’
In the second argument of ‘($!)’, namely ‘readMarkdown def content’
In the expression: return $! readMarkdown def content
|
71 | ioReadMarkdown content = return $! readMarkdown def content
| ^^^^^^^
IncludeFilter.hs:91:22: error:
• Couldn't match type ‘Data.Text.Internal.Text’ with ‘[Char]’
Expected type: [[Char]]
Actual type: [Data.Text.Internal.Text]
• In the second argument of ‘elem’, namely ‘classes’
In the expression: "include" `elem` classes
In a stmt of a pattern guard for
an equation for ‘doInclude’:
"include" `elem` classes
|
91 | | "include" `elem` classes = do
| ^^^^^^^
IncludeFilter.hs:92:44: error:
• Couldn't match type ‘Data.Text.Internal.Text’ with ‘[Char]’
Expected type: String
Actual type: Data.Text.Internal.Text
• In the first argument of ‘getProcessableFileList’, namely ‘list’
In the expression: getProcessableFileList list
In an equation for ‘toProcess’:
toProcess = getProcessableFileList list
|
92 | let toProcess = getProcessableFileList list
| ^^^^
cabal: Failed to build exe:pandoc-include from pandoc-include-0.0.1. See the
build log above for details.
cabal install --force-reinstalls pandoc pandoc-include --constraint 'pandoc < 2'