Giter Site home page Giter Site logo

hasklig's Introduction

N.B. This is a fork of the Source Code Pro repository

Hasklig - Ligatures for Haskell code

Programming languages are limited to relatively few characters. As a result, combined character operators surfaced quite early, such as the widely used arrow (->), comprised of a hyphen and greater sign. It looks like an arrow if you know the analogy and squint a bit.

Composite glyphs are problematic in languages such as Haskell which utilize these complicated operators (=> -< >>= etc.) extensively. The readability of such complex code improves with pretty printing. Academic articles featuring Haskell code often use lhs2tex to achieve an appealing rendering, but it is of no use when programming.

Some Haskellers have resorted to Unicode symbols (, etc.), which are valid in the ghc. However they are one-character-wide and therefore eye-strainingly small. Furthermore, when displayed as substitutes to the underlying multi-character representation, as [vim2hs] (https://github.com/dag/vim2hs) does, the characters go out of alignment.

Hasklig solves the problem the way typographers have always solved ill-fitting characters which co-occur often: ligatures. The underlying code stays the same — only the representation changes.

Not only can multi-character glyphs be rendered more vividly, other problematic things in monospaced fonts, such as spacing can be corrected.

Download Hasklig Font Family v0.4

Hasklig

Hasklig Sample

Source Code Pro

Source Code Pro Sample

Release notes

  • v0.4: New ligatures: <* <*> <+> <$> *** <|> !! || === ==>, Powerline symbol support
  • v0.3: New ligatures: <<< >>> <> and +++
  • v0.2: Lengthened == and /= to match other equals signs
  • v0.1: Ligatures <- -> => >> << >>= =<< .. ... :: -< >- -<< >>- ++ /= and ==

Currently implemented symbols

<* <*> <+> <$> *** <|> !! || === ==> <<< >>> <> +++ <- -> => >> << >>= =<< .. ... :: -< >- -<< >>- ++ /= ==

Editor Support

Reports on the current state of support for code editors and terminals are much appreciated.

  • BBEdit 11 (Instructions)
  • Chocolat
  • Geany
  • gEdit
  • Kate
  • Konsole
  • KWrite
  • Leksah (x64 W8 reported not working)
  • Light Table (Instructions)
  • QtCreator (v.3.2.2 on GNU/Linux x64)
  • Smultron
  • TextEdit
  • TextMate (from version 2.0-alpha.9549 onwards)
  • Vico
  • RStudio

No support

Credits

Original idea, design and implementation of code ligatures by Ian Tuomi 2014-2015. This typeface extends Source Code Pro with ligatures.

hasklig's People

Contributors

miguelsousa avatar i-tu avatar pauldhunt avatar rsperberg avatar ppicazo avatar frankrolf avatar ryanstewart avatar statico avatar rojepp avatar dolmen avatar foxxmd avatar dasmoose avatar hyiltiz avatar gregwebs avatar djstevenson avatar dragn avatar codeman38 avatar michey avatar

Watchers

Даниил Пронин avatar

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.