Skip to content

"ghc --make Odhug.hs" encounter errors #39

@luckypoem

Description

@luckypoem

hi.

root@AR:/usr/local/odhug.github.com/source# ghc --make Odhug.hs
[1 of 1] Compiling Main ( Odhug.hs, Odhug.o )

Odhug.hs:136:46: error:
• Couldn't match type ‘unordered-containers-0.2.7.1:Data.HashMap.Base.HashMap
Data.Text.Internal.Text
aeson-0.11.2.1:Data.Aeson.Types.Internal.Value’
with ‘Map.Map [Char] [Char]’
Expected type: Map.Map [Char] [Char]
Actual type: Metadata
• In the second argument of ‘Map.lookup’, namely ‘metadata’
In the expression: Map.lookup "title" metadata
In the expression:
case Map.lookup "title" metadata of {
Just value -> "OdHUG - " ++ value
Nothing -> [] }

Odhug.hs:158:12: error:
Variable not in scope: replace :: [Char] -> [Char] -> [Char] -> b

Odhug.hs:159:13: error:
Variable not in scope:
replace :: [Char] -> [Char] -> String -> [Char]

Odhug.hs:165:52: error:
• Couldn't match type ‘unordered-containers-0.2.7.1:Data.HashMap.Base.HashMap
Data.Text.Internal.Text
aeson-0.11.2.1:Data.Aeson.Types.Internal.Value’
with ‘Map.Map [Char] String’
Expected type: Map.Map [Char] String
Actual type: Metadata
• In the second argument of ‘Map.lookup’, namely ‘mdata’
In the second argument of ‘($)’, namely
‘Map.lookup "eventDate" mdata’
In a stmt of a 'do' block:
dateStr <- hoistMaybe $ Map.lookup "eventDate" mdata

Odhug.hs:183:3: error:
• Variable not in scope: encode :: [b0] -> String
• Perhaps you meant ‘decode’ (imported from Data.String.UTF8)

Odhug.hs:184:5: error:
Variable not in scope: toJSObject :: [([Char], String)] -> b0
root@AR:/usr/local/odhug.github.com/source#

how to fix them?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions