Coder Social home page Coder Social logo

Comments (3)

snoyberg avatar snoyberg commented on July 3, 2024

That error message is coming from GHC, not Hamlet. GHC is not able to print out the non-ASCII character. This is a known issue with Windows. I believe. By contrast, here's the output I get on my Linux box:

tabs.hs:4:10:
    Exception when trying to run compile-time code:
      "<table>
    <tr>
        <td>some text</td>

<ul>
 <li>K.Deniz Yılmaz
 <li>some other text
" (line 2, column 9):
Tabs are not allowed in Hamlet indentation
      Code: hamletFile "tabs.hamlet"
    In the expression: $(hamletFile "tabs.hamlet")
    In an equation for `main': main = $(hamletFile "tabs.hamlet")

from shakespeare.

Bulat-Ziganshin avatar Bulat-Ziganshin commented on July 3, 2024

from the POV of user it's not important. receiving such messages, i modified all my templates with tabs to not contain non-ascii chars, then spent time for discovering and reporting a bug

i know that it cannot be fixed in ghc (except for changing console code page), so it can be masked off in application either by catching an excpetion or checking OS before printing to the console

in the worst case, it may be added to FAQ so users don't spend time like me

from shakespeare.

snoyberg avatar snoyberg commented on July 3, 2024

The wiki is a good place to mention this. If you could do so, it would be appreciated. I'm not familiar enough with Windows to know how to detect if printing will fail. On my Windows system at least, the messages seem to print properly as well.

from shakespeare.

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.