lima: Convert between Haskell, Markdown, Literate Haskell, TeX

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:

See the README.md


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.0.4, 0.1.0.5, 0.1.0.6, 0.2.0.0, 0.2.1.0, 0.2.1.1, 0.2.1.2, 0.2.1.3, 0.3.0.0, 0.3.0.0
Change log None available
Dependencies base (>=4 && <5), data-default, microlens, microlens-th, string-interpolate, text [details]
License MIT
Author Fabian Schneider
Maintainer Danila Danko
Category Productivity
Bug tracker https://github.com/deemp/lima/issues
Source repo head: git clone https://github.com/deemp/lima
Uploaded by deemp at 2023-07-21T17:53:14Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for lima-0.3.0.0

[back to package description]

lima

Sync your README with your Haskell codebase.

Supported formats

Convert files between:

Scope

lima focuses on converting documents between formats and allows to concatenate documents.

Other scenarios, e.g., inlining a document into a document, may require specialized tools.

Demo

Markdown

.hs and .md

demo

TeX

.hs and .lhs and .tex

demo

Ideas

Suggested setup

  1. Create a test suite. README.hs may be its main file.

  2. Add lima and text to its dependencies.

  3. Create a test module. It may have the following content.

    import Lima.Converter (Format (..), convertTo, def)
    import Data.Text.IO qualified as T
    
    main :: IO ()
    main = T.readFile "README.hs" >>= T.writeFile "README.md" . (Hs `convertTo` Md) def
    

This package has three such test suites:

Suggested workflow

Here's a suggested workflow for Haskell and Markdown:

  1. Edit the code in a README.hs using Haskell Language Server.
  2. Convert README.hs to a README.md. Comments from README.hs become text in README.md.
  3. Edit the text in README.md using markdownlint.
  4. Convert README.md back to the README.hs to keep files in sync. Text from README.md becomes comments in README.hs.
  5. Repeat.

Contribute

Clone this repo and enter lima.

git clone https://github.com/deemp/lima
cd lima

cabal

Build

cabal update
cabal build

nix

  1. Install Nix.

  2. Run a devshell and build lima using the project's cabal:

    nix develop nix-dev/
    cabal build
    
  3. Optionally, start VSCodium:

    nix run nix-dev/#writeSettings
    nix run nix-dev/#codium .
    
  4. Open a Haskell file there, hover over a term and wait until HLS shows hints.

  5. Troubleshoot if necessary.