• Stars
    star
    105
  • Rank 328,196 (Top 7 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 7 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Visually describe Haskell/Purescript/Elm types

typedraw

An experimental visualization of types.

Type visualization 1 Type visualization 2

Installation

Install Fira Code. Clone this repository, then:

npm -g install .

Usage

typedraw <typemap.json> <out.png>

typedraw reads from stdin, i.e. you can do the following:

cat examples/foreach | typedraw examples/typemap2.json out.png

typedraw replaces all occurences of a type with a visual shape described in a typemap.

Typemaps

Typemaps are simple json files that describe how to render a given type (i.e. st):

{
  "st": [
    [ "rect", "#333", 0, 0, 1, 1 ],
    [ "rect", "#D4145A", 0.25, 0.25, 0.5, 0.5 ]
  ],

  "s": [
    [ "circle", "#D4145A", 0.5, 0.5, 0.25 ]
  ],
}

Only two shapes are supported currently, rects:

[ "rect", color, x, y, width, height ] // coordinates are in the 0 - 1 range

and circles:

[ "circle", color, x, y, radius ] // coordinates are in the 0 - 1 range

Check out the example typemap1.json and typemap2.json files.

More Repositories

1

atea

A minimalistic menu bar time tracker for MacOS
Clojure
613
star
2

leerraum.js

A PDF typesetting library with exact positioning and hyphenated line breaking
TypeScript
231
star
3

concur-replica

Server-side VDOM UI framework for Concur
Haskell
138
star
4

replica

A remote virtual DOM library for Haskell
Haskell
132
star
5

concur-static

Generate semi-dynamic UIs with Concur
Haskell
58
star
6

purescript-refract

Optical Purescript UI library based on React and the Elm architecture, but without the boilerplate.
PureScript
48
star
7

knit

Ties the knot on data structures that reference each other by unique keys
Haskell
46
star
8

sherlock

Structured json log viewer in the browser
JavaScript
20
star
9

synchron

Synchronous programming in Haskell
Haskell
15
star
10

formulae

Mirror of ftp://ftp.cs.uni-sb.de/formulae - "A Functional Description of TeX's Formula Layout"
Standard ML
12
star
11

atea-contrib

User contributed content for Atea
8
star
12

ytools

A set of structured composable unix tools
Haskell
8
star
13

purescript-interop

Generate Purescript types from Haskell
Haskell
7
star
14

memdb

Efficient in memory indexed database
Haskell
6
star
15

fbookmark

A file based bookmark plugin for Pentadactyl
JavaScript
6
star
16

usercfg

usercfg — remote account configuration protocol
Haskell
5
star
17

purescript-trace

Easily trace function arguments in Purescript.
JavaScript
4
star
18

bookkeeper-permissions

Permissions for bookkeeper records
Haskell
4
star
19

quadtree

Mutable and immutable fast quadtrees
Haskell
3
star
20

refract-replica

Refract backend for Replica
Haskell
3
star
21

purescript-thermite-login-component

Login component for purescript-thermite based on purescript-sync-websockets
PureScript
3
star
22

atea.vim

Atea vim plugin
Vim Script
3
star
23

hyde

A simple Haskell HTML templating engine
Haskell
2
star
24

quadtree-acid

Haskell quad tree experiments
Haskell
2
star
25

elm-gen

Autogenerate Elm plumbing
Elm
2
star
26

leibniz

Approximating nested GADTs/Leibniz equality
Haskell
2
star
27

tellme_api

API backend for telll.me
Erlang
2
star
28

concur-replica-components

Haskell
2
star
29

tellme

A minimalist 1on1 web chat
Clojure
2
star
30

TC

Haskell
2
star
31

dotfiles

Vim Script
2
star
32

distributed-stm

Haskell
2
star
33

concur-core

Testable Concur core model
Haskell
2
star
34

generative-purescript

Generative art experiments in Purescript
JavaScript
2
star
35

typesafe-query

Haskell
1
star
36

typesafe-query-mongodb

Haskell
1
star
37

purescript-relational

PureScript
1
star
38

purescript-sync-websockets

Purescript client for sync-websockets
JavaScript
1
star
39

users-remote

User auth microservice based on users-postgresql-simple and msgpack
Haskell
1
star
40

reentrant

Experiments related to http://www.reddit.com/r/haskell/comments/344x6d/manage_nonreentrant_blocking_code
Haskell
1
star
41

elm-refactor

Haskell
1
star
42

raycaster

JavaScript
1
star
43

react-optics

Haskell
1
star
44

purescript-refract-todomvc

purescript-refract Todo MVC example.
CSS
1
star
45

safedata-aeson

Haskell
1
star
46

bptree

B+ tree in Typescript (ported from Haskell)
Haskell
1
star
47

ocean

WebGL ocean demo
Java
1
star
48

channels-websockets

Haskell
1
star
49

allseeingeye

Experimental code similarity detection tool
Haskell
1
star
50

stm-store

Transactional database experiment based on Haskell's STM (and unsafeIOToSTM)
Haskell
1
star
51

sync-websockets

Synchronous websocket communication
Haskell
1
star
52

haskell-ajax-cont

Asynchronous http requests using the continuation monad
Haskell
1
star
53

safedata-bson

Haskell
1
star
54

jdic-macos-tray

A low-level JNI MacOS menu bar integration for Java
Objective-C
1
star