-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I tried to (cabal) install slick-template, and in the last step, when ghc is compiling Main.hs,
I get two error messages about function buildPost (and cacheAction therein) being of the wrong type. I guess it's not a big thing, but I don't see what's going on yet, thanks.
/home/rx/work/site/Main.hs:101:21: error:
• Couldn't match type ‘()’ with ‘Post’
Expected type: Action Post
Actual type: Action ()
• In the expression:
cacheAction ("build" :: T.Text, srcPath)
$ do liftIO . putStrLn $ "Rebuilding post: " <> srcPath
postContent <- readFile' srcPath
postData <- markdownToHTML . T.pack $ postContent
let postUrl = T.pack . dropDirectory1 $ srcPath -<.> "html"
withPostUrl = _Object . at "url" ?~ String postUrl
....
In an equation for ‘buildPost’:
buildPost srcPath
= cacheAction ("build" :: T.Text, srcPath)
$ do liftIO . putStrLn $ "Rebuilding post: " <> srcPath
postContent <- readFile' srcPath
postData <- markdownToHTML . T.pack $ postContent
....
|
101 | buildPost srcPath = cacheAction ("build" :: T.Text, srcPath) $ do
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
/home/rx/work/site/Main.hs:101:33: error:
• Couldn't match type ‘(T.Text, FilePath)’ with ‘[Char]’
Expected type: String
Actual type: (T.Text, FilePath)
• In the first argument of ‘cacheAction’, namely
‘("build" :: T.Text, srcPath)’
In the expression: cacheAction ("build" :: T.Text, srcPath)
In the expression:
cacheAction ("build" :: T.Text, srcPath)
$ do liftIO . putStrLn $ "Rebuilding post: " <> srcPath
postContent <- readFile' srcPath
postData <- markdownToHTML . T.pack $ postContent
let postUrl = T.pack . dropDirectory1 $ srcPath -<.> "html"
withPostUrl = _Object . at "url" ?~ String postUrl
....
|
101 | buildPost srcPath = cacheAction ("build" :: T.Text, srcPath) $ do
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation exited abnormally with code 1 at Thu May 7 21:43:02
Metadata
Metadata
Assignees
Labels
No labels