Roman | ||
RomanMM | ||
.gitignore | ||
build.sh | ||
buildAll.sh | ||
features.family | ||
features.tables | ||
FontMenuNameDB | ||
GlyphOrderAndAliasDB | ||
GlyphOrderAndAliasDB_TT | ||
hasklig_example.png | ||
Hasklig_relnotes.txt | ||
LICENSE.txt | ||
ReadMe.html | ||
README.md | ||
relnotes.txt | ||
Roadmap.txt | ||
SourceCodePro.enc | ||
SourceCodeProLSample.png | ||
SourceCodeProSample.png | ||
widthsAdjust.mark |
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 of a limited character set, 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 (over 100 in lens
alone!). The readability of this kind of complex code improves considerably with some kind of pretty printing.
Some Haskell programmers have resorted to unicode symbols in code as a solution (⇒
, ←
etc.). However, these symbols are one-character-wide and therefore eye-strainingly small.
Hasklig solves this 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.
Download Hasklig Font Family v0.4
Hasklig
Source Code Pro
Editors and Terminals with support
- Atom (add
text-rendering: optimizeLegibility;
to your.editor
css.) - Chocolat
- Geany
- gEdit
- Kate
- Konsole
- KWrite
- Leksah (x64 W8 reported not working)
- Smultron
- TextEdit
- TextMate (from version 2.0-alpha.9549)
No support
- Aquamacs
- gVim (output corrupted)
- iTerm2
- MacVim
- Sublime Text (Vote for the enhancement here)
- Terminal (OSX)
Release notes
- v0.4: New ligatures:
<*
,<*>
,<+>
,<$>
,***
,<|>
,!!
,||
,===
,==>
. Powerline symbols (in case you need them) - v0.3: New ligatures:
<<<
,>>>
,<>
and+++
- v0.2: Lengthened
==
and/=
to match other equals signs - v0.1: Ligatures
<-
,->
,=>
>>
,<<
,>>=
,=<<
,..
,...
,::
,-<
,>-
,-<<
,>>-
,++
,/=
and==
Alternatives
- Vim: vim2hs and HaskellConceal do this but a ligature takes up one less space, changing vertical alignment
- Emacs: haskell-mode does the same as vim2hs, but emacs reportedly supports adjusting the font for ligatures so that proper spacing is maintained Instructions (note: I haven't been able to get this to work myself on OSX)