https://github.com/mxswd/editable
Derive editors for data types.
https://github.com/mxswd/editable
haskell
Last synced: about 1 month 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 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-05T04:00:09.000Z (over 11 years ago)
- Last Synced: 2025-04-07T06:18:09.299Z (10 months ago)
- Topics: haskell
- Language: Haskell
- Homepage:
- Size: 168 KB
- Stars: 28
- Watchers: 4
- 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 where
import Data.Editable
import GHC.Generics
data Foo = Bar String Int | Baz Int
deriving (Show, Generic)
instance Editable Foo
```

Setup
-----
```bash
cabal sandbox init
cabal install --only-dependencies
cabal exec ghci demo.hs
# main
```