glance/README.md

29 lines
1.5 KiB
Markdown
Raw Normal View History

# Glance
2016-12-10 01:20:49 +03:00
Glance is a visual syntax for the programming language Haskell. The goal of this project is to increase programmer happiness and productivity by allowing programmers to understand programs in new and different ways. Currently, the Glance executable produces a visual representation of your code in the form of an SVG image when given a textual Haskell source file. In the future, I hope to incorporate Glance into Haskell code editors, and to eventually create a visual editor for Haskell.
2016-12-10 01:06:56 +03:00
## Building
First install Graphviz. For instance, in Ubuntu run:
```sudo apt install graphviz```
Then build and execute glance:
```
stack build
2016-05-29 07:45:31 +03:00
stack exec glance-exe -- -o images/fact.svg -w 500 examples/fact.hs -
firefox images/fact.svg
```
2016-12-10 01:06:56 +03:00
## Issues
Glance is still in development, so for the time being, layout, routing, and icon design all have much room for improvement. Here are some specific issues:
* Text boxes may not display correctly with some SVG viewers.
2016-12-10 04:44:41 +03:00
* Images become very spread out when rendering medium to large functions.
2016-12-10 01:06:56 +03:00
* Only a subset of Haskell is rendered
2016-08-14 02:19:49 +03:00
2016-12-10 01:06:56 +03:00
## Getting started
2016-05-29 08:03:09 +03:00
Below is a getting started guide for Glance rendered by Glance itself ([source here](examples/tutorial.hs)). To generate this image run
2016-05-29 07:45:31 +03:00
`stack exec glance-exe -- -o examples/tutorial.svg -w 873 examples/tutorial.hs c`
2016-12-10 01:06:56 +03:00
Also, the [Glance wiki](../../wiki) has a brief introduction to the code architecture.
2016-12-10 00:37:55 +03:00
<img src="https://cdn.rawgit.com/rgleichman/glance/958611dde3827d650c56814f8c491ecf34f954da/examples/tutorial.svg" alt="Introduction to Glance" />