Closed andrewheiss closed 4 years ago
And building with cabal seems to cause an error now, possibly because of the latest version of pandoc-types
(maybe because of this change?)
[1 of 1] Compiling Text.Pandoc.SideNote ( src/Text/Pandoc/SideNote.hs, dist/build/Text/Pandoc/SideNote.o )
src/Text/Pandoc/SideNote.hs:14:30: error:
• Couldn't match type ‘text-1.2.4.0:Data.Text.Internal.Text’
with ‘[Char]’
Expected type: Maybe String
Actual type: Maybe text-1.2.4.0:Data.Text.Internal.Text
• In the expression: Just text
In an equation for ‘getFirstStr’:
getFirstStr (Str text : _) = Just text
|
14 | getFirstStr (Str text : _) = Just text
| ^^^^^^^^^
src/Text/Pandoc/SideNote.hs:36:31: error:
• Couldn't match expected type ‘text-1.2.4.0:Data.Text.Internal.Text’
with actual type ‘[Char]’
• In the first argument of ‘Str’, namely ‘""’
In the expression: Str ""
In an equation for ‘deNote’: deNote (Note _) = Str ""
|
36 | deNote (Note _) = Str ""
| ^^
src/Text/Pandoc/SideNote.hs:54:33: error:
• Couldn't match expected type ‘text-1.2.4.0:Data.Text.Internal.Text’
with actual type ‘[Char]’
• In the first argument of ‘Format’, namely ‘"html"’
In the first argument of ‘RawInline’, namely ‘(Format "html")’
In the expression: RawInline (Format "html") labelHTML
|
54 | let label = RawInline (Format "html") labelHTML
| ^^^^^^
src/Text/Pandoc/SideNote.hs:54:41: error:
• Couldn't match expected type ‘text-1.2.4.0:Data.Text.Internal.Text’
with actual type ‘[Char]’
• In the second argument of ‘RawInline’, namely ‘labelHTML’
In the expression: RawInline (Format "html") labelHTML
In an equation for ‘label’:
label = RawInline (Format "html") labelHTML
|
54 | let label = RawInline (Format "html") labelHTML
| ^^^^^^^^^
src/Text/Pandoc/SideNote.hs:57:33: error:
• Couldn't match expected type ‘text-1.2.4.0:Data.Text.Internal.Text’
with actual type ‘[Char]’
• In the first argument of ‘Format’, namely ‘"html"’
In the first argument of ‘RawInline’, namely ‘(Format "html")’
In the expression: RawInline (Format "html") inputHTML
|
57 | let input = RawInline (Format "html") inputHTML
| ^^^^^^
src/Text/Pandoc/SideNote.hs:57:41: error:
• Couldn't match expected type ‘text-1.2.4.0:Data.Text.Internal.Text’
with actual type ‘[Char]’
• In the second argument of ‘RawInline’, namely ‘inputHTML’
In the expression: RawInline (Format "html") inputHTML
In an equation for ‘input’:
input = RawInline (Format "html") inputHTML
|
57 | let input = RawInline (Format "html") inputHTML
| ^^^^^^^^^
src/Text/Pandoc/SideNote.hs:61:28: error:
• Couldn't match expected type ‘text-1.2.4.0:Data.Text.Internal.Text’
with actual type ‘[Char]’
• In the expression: noteTypeCls
In the expression: [noteTypeCls]
In the first argument of ‘Span’, namely
‘(ident, [noteTypeCls], attrs)’
|
61 | let note = Span (ident, [noteTypeCls], attrs) content'
| ^^^^^^^^^^^
Thanks for writing this up. Unfortunately, I don’t regularly use pandoc-sidenote, so I won’t have the time to fix this any time soon. Happy to review any PRs that implement a fix. Usually these version upgrades are pretty rote, so if you want to tackle it, I don’t imagine you’ll find much resistance.
Pandoc 2.8.1 is built with pandoc-types 1.20, which doesn't work with the binary version installed through homebrew:
Pandoc information: