[1 of 1] Compiling Snipcheck ( src/Snipcheck.hs, dist/build/Snipcheck.o, dist/build/Snipcheck.dyn_o )
src/Snipcheck.hs:75:22: 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 ‘elem’, namely ‘secs’
In the expression: hName `elem` secs
In a stmt of a pattern guard for
an equation for ‘acceptSection’:
hName `elem` secs
|
75 | | hName `elem` secs = GoodSection
| ^^^^
src/Snipcheck.hs:81:39: error:
• Couldn't match type ‘Data.Text.Internal.Text’ with ‘[Char]’
Expected type: Map.Map [Char] Pandoc.MetaValue
Actual type: Map.Map Data.Text.Internal.Text Pandoc.MetaValue
• In the second argument of ‘Map.lookup’, namely ‘meta’
In the expression: Map.lookup "sc_check-sections" meta
In the expression:
case Map.lookup "sc_check-sections" meta of
Just (Pandoc.MetaList ss) -> join $ unMetaString <$> ss
_ -> []
|
81 | case Map.lookup "sc_check-sections" meta of
| ^^^^
src/Snipcheck.hs:86:42: error:
• Couldn't match type ‘Data.Text.Internal.Text’ with ‘[Char]’
Expected type: String
Actual type: Data.Text.Internal.Text
• In the expression: s
In the expression: [s]
In an equation for ‘unMetaString’:
unMetaString (Pandoc.MetaString s) = [s]
|
86 | unMetaString (Pandoc.MetaString s) =[s]
| ^
src/Snipcheck.hs:90:32: error:
• Couldn't match type ‘Data.Text.Internal.Text’ with ‘[Char]’
Expected type: Maybe String
Actual type: Maybe Data.Text.Internal.Text
• In the expression: Just s
In an equation for ‘unMetaStr’: unMetaStr (Pandoc.Str s) = Just s
In an equation for ‘findSections’:
findSections (Pandoc.unMeta -> meta)
= case Map.lookup "sc_check-sections" meta of
Just (Pandoc.MetaList ss) -> join $ unMetaString <$> ss
_ -> []
where
unMetaString :: Pandoc.MetaValue -> [String]
unMetaString (Pandoc.MetaString s) = [s]
unMetaString (Pandoc.MetaInlines is) = mapMaybe unMetaStr is
unMetaString _ = []
unMetaStr :: Pandoc.Inline -> Maybe String
unMetaStr (Pandoc.Str s) = Just s
unMetaStr _ = Nothing
|
90 | unMetaStr (Pandoc.Str s) = Just s
| ^^^^^^
src/Snipcheck.hs:98:20: 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: "shell" `elem` classes
In a stmt of a pattern guard for
an equation for ‘check’:
"shell" `elem` classes
|
98 | | "shell" `elem` classes = do
| ^^^^^^^
src/Snipcheck.hs:99:40: 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 ‘extractCommands’, namely ‘content’
In the expression: extractCommands content
In a pattern binding: Right cmds = extractCommands content
|
99 | let Right cmds = extractCommands content
| ^^^^^^^