Skip to content

Commit

Permalink
Improve example in README.md (kowainik#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
chshersh authored Jun 7, 2020
1 parent d113e5d commit 69af0b3
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,22 @@ In order to start using `colourista` in your project, you will need to set it up

```haskell
build-depends: base ^>= 4.14
, colourista ^>= 0.0
, colourista ^>= 0.1
, ...
```
2. In the module where you wish to use the colourful output with `colourista`,
you should add the import:

```haskell
import Colourista (successMessage)
import Colourista (...)
```
3. Now you can use the functions from the library:
3. Now you can use the functions from the library. For example:

```haskell
import qualified Data.Text as Text

main :: IO ()
main = successMessage "All set up!"
main = successMessage $ Text.pack "All set up!"
```
### Usage with Stack

Expand All @@ -70,8 +73,8 @@ file:

```yaml
extra-deps:
- colourista-0.0.0.0
- ansi-terminal-0.10
- colourista-0.1.0.0
- ...
```
Then you can add it as a dependency in your `package.yaml` file as usual:
Expand Down

0 comments on commit 69af0b3

Please sign in to comment.