Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sol committed Jul 10, 2023
1 parent 5e15242 commit 9aa10b5
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.cabal linguist-generated=true
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,51 @@ Run it like so:

$ cabal configure --enable-tests && cabal build && cabal test

## Reordering code blocks

Code blocks that are tagged with `top` are moved to the beginning of the source
file.

**Example:**

## Introduction

```haskell top
{-# LANGUAGE OverloadedStrings #-}
module MyModule where
```

## Working with textual data

```haskell top
import qualified Data.Text as Text
```
```haskell
-- |
-- >>> foo
-- 3
foo :: Int
foo = Text.length "foo"
```

## Working with binary data

```haskell top
import qualified Data.ByteString as ByteString
```
```haskell
-- |
-- >>> bar
-- 3
bar :: Int
bar = ByteString.length "foo"
```

~~~
$ doctest -pgmL markdown-unlit MyModule.lhs
Examples: 2 Tried: 2 Errors: 0 Failures: 0
~~~

## Customizing

By default, `markdown-unlit` extracts all code that is marked with `haskell`,
Expand Down
4 changes: 2 additions & 2 deletions markdown-unlit.cabal

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: markdown-unlit
version: 0.5.1
version: 0.6.0
synopsis: Literate Haskell support for Markdown
category: Development
license: MIT
Expand Down

0 comments on commit 9aa10b5

Please sign in to comment.