Giter VIP home page Giter VIP logo

Comments (1)

mouse07410 avatar mouse07410 commented on May 18, 2024

After installing Pandoc via Stack (there was Cabal-built executable on the PATH before that), the errors changed, but still no success:

$ stack exec make
pandoc -c css/style.css --filter includes.hs --template template.html -s -f markdown -t html --standalone --toc --toc-depth=2 --mathjax="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" --highlight-style pygments -o 000_introduction.html 000_introduction.md

includes.hs:19:28: error:
    • Couldn't match type ‘Data.Text.Internal.Text’ with ‘[Char]’
      Expected type: Maybe String
        Actual type: Maybe Data.Text.Internal.Text
    • In the second argument of ‘(=<<)’, namely
        ‘lookup "upper" namevals’
      In a stmt of a 'do' block:
        upper <- readMaybe =<< lookup "upper" namevals
      In the second argument of ‘($)’, namely
        ‘do upper <- readMaybe =<< lookup "upper" namevals
            lower <- readMaybe =<< lookup "lower" namevals
            file <- lookup "slice" namevals
            return (upper, lower, file)’
   |
19 |     upper <- readMaybe =<< lookup "upper" namevals
   |                            ^^^^^^^^^^^^^^^^^^^^^^^

includes.hs:20:28: error:
    • Couldn't match type ‘Data.Text.Internal.Text’ with ‘[Char]’
      Expected type: Maybe String
        Actual type: Maybe Data.Text.Internal.Text
    • In the second argument of ‘(=<<)’, namely
        ‘lookup "lower" namevals’
      In a stmt of a 'do' block:
        lower <- readMaybe =<< lookup "lower" namevals
      In the second argument of ‘($)’, namely
        ‘do upper <- readMaybe =<< lookup "upper" namevals
            lower <- readMaybe =<< lookup "lower" namevals
            file <- lookup "slice" namevals
            return (upper, lower, file)’
   |
20 |     lower <- readMaybe =<< lookup "lower" namevals
   |                            ^^^^^^^^^^^^^^^^^^^^^^^

includes.hs:27:28: error:
    • Couldn't match type ‘Data.Text.Internal.Text’ with ‘[Char]’
      Expected type: FilePath
        Actual type: Data.Text.Internal.Text
    • In the first argument of ‘readFile’, namely ‘f’
      In a stmt of a 'do' block: contents <- readFile f
      In the expression:
        do contents <- readFile f
           let lns = unlines $ slice lower upper (lines contents)
           return (CodeBlock (id, classes, namevals) lns)
   |
27 |       contents <- readFile f
   |                            ^

includes.hs:29:49: 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 ‘CodeBlock’, namely ‘lns’
      In the first argument of ‘return’, namely
        ‘(CodeBlock (id, classes, namevals) lns)’
      In a stmt of a 'do' block:
        return (CodeBlock (id, classes, namevals) lns)
   |
29 |       return (CodeBlock (id, classes, namevals) lns)
   |                                                 ^^^

includes.hs:35:71: error:
    • Couldn't match type ‘[Char]’ with ‘Data.Text.Internal.Text’
      Expected type: IO Data.Text.Internal.Text
        Actual type: IO String
    • In the second argument of ‘(=<<)’, namely ‘readFile f’
      In the expression:
        return . (CodeBlock (id, classes, namevals)) =<< readFile f
      In a case alternative:
          Just f
            -> return . (CodeBlock (id, classes, namevals)) =<< readFile f
   |
35 |        Just f     -> return . (CodeBlock (id, classes, namevals)) =<< readFile f
   |                                                                       ^^^^^^^^^^

includes.hs:35:80: error:
    • Couldn't match type ‘Data.Text.Internal.Text’ with ‘[Char]’
      Expected type: FilePath
        Actual type: Data.Text.Internal.Text
    • In the first argument of ‘readFile’, namely ‘f’
      In the second argument of ‘(=<<)’, namely ‘readFile f’
      In the expression:
        return . (CodeBlock (id, classes, namevals)) =<< readFile f
   |
35 |        Just f     -> return . (CodeBlock (id, classes, namevals)) =<< readFile f
   |                                                                                ^

includes.hs:42:53: error:
    • Couldn't match type ‘[Char]’ with ‘Data.Text.Internal.Text’
      Expected type: IO Data.Text.Internal.Text
        Actual type: IO String
    • In the second argument of ‘(=<<)’, namely ‘readFile f’
      In the expression: return . (RawBlock "html") =<< readFile f
      In a case alternative:
          Just f -> return . (RawBlock "html") =<< readFile f
   |
42 |        Just f     -> return . (RawBlock "html") =<< readFile f
   |                                                     ^^^^^^^^^^

includes.hs:42:62: error:
    • Couldn't match type ‘Data.Text.Internal.Text’ with ‘[Char]’
      Expected type: FilePath
        Actual type: Data.Text.Internal.Text
    • In the first argument of ‘readFile’, namely ‘f’
      In the second argument of ‘(=<<)’, namely ‘readFile f’
      In the expression: return . (RawBlock "html") =<< readFile f
   |
42 |        Just f     -> return . (RawBlock "html") =<< readFile f
   |                                                              ^

includes.hs:53:51: 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 ‘($)’, namely ‘macros’
      In the expression:
        Div ("", [], [("style", "display:none")])
          . (: []) . Para . (: []) . Math DisplayMath
          $ macros
      In a case alternative:
          Format "html"
            -> Div ("", [], [("style", "display:none")])
                 . (: []) . Para . (: []) . Math DisplayMath
                 $ macros
   |
53 |               . Para . (:[]) . Math DisplayMath $ macros
   |                                                   ^^^^^^

includes.hs:54:46: 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 ‘RawBlock’, namely ‘macros’
      In the expression: RawBlock "latex" macros
      In a case alternative: Format "latex" -> RawBlock "latex" macros
   |
54 |           Format "latex" -> RawBlock "latex" macros
   |                                              ^^^^^^

includes.hs:55:45: 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 ‘RawBlock’, namely ‘macros’
      In the expression: RawBlock "latex" macros
      In a case alternative: Format "epub" -> RawBlock "latex" macros
   |
55 |           Format "epub" -> RawBlock "latex" macros
   |                                             ^^^^^^
Error running filter includes.hs:
Filter returned error status 1
make: *** [000_introduction.html] Error 83

Also, EPUB versions of this ebook, and or "What I Wish I Knew..." fail to properly display on MacOS and iOS - all the command examples and such are displayed as empty gray boxes. It would be great if you could re-generate EPUB versions. Pre-built PDF files appear OK.

from write-you-a-haskell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.