Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mxswd/editable
Derive editors for data types.
https://github.com/mxswd/editable
haskell
Last synced: 3 months ago
JSON representation
Derive editors for data types.
- Host: GitHub
- URL: https://github.com/mxswd/editable
- Owner: mxswd
- License: bsd-2-clause
- Created: 2014-05-17T08:18:07.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-05T04:00:09.000Z (about 10 years ago)
- Last Synced: 2024-09-29T21:03:34.756Z (3 months ago)
- Topics: haskell
- Language: Haskell
- Homepage:
- Size: 168 KB
- Stars: 28
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
editable
========Derive editors for data types.
Add `deriving Generic` and `instance Editable Foo` to your
data type, and you can launch an editor for it with
`editor :: Editable a => a -> IO a`.```hs
{-# LANGUAGE DeriveGeneric #-}
module Demo whereimport Data.Editable
import GHC.Genericsdata Foo = Bar String Int | Baz Int
deriving (Show, Generic)instance Editable Foo
```![example](https://cloud.githubusercontent.com/assets/136101/3006789/f235419e-de4d-11e3-8a4e-796d5b9ae49c.png)
Setup
-----```bash
cabal sandbox init
cabal install --only-dependencies
cabal exec ghci demo.hs
# main
```