Skip to content
Permalink
Browse files

Add headers in each cats README example

  • Loading branch information
ruippeixotog committed May 21, 2017
1 parent 0e63078 commit 3d4aab1c83b81d04bf9d083c66c404fefbee0062
Showing with 8 additions and 0 deletions.
  1. +4 −0 modules/cats/README.md
  2. +4 −0 modules/cats/src/main/tut/README.md
@@ -13,6 +13,8 @@ libraryDependencies += "com.github.pureconfig" %% "pureconfig-cats" % "0.7.1"

## Example

### Reading cats data structures from a config

To load a `NonEmptyList[Int]` into a configuration, we need a class to hold our configuration:

```scala
@@ -45,6 +47,8 @@ loadConfig[MyVecConfig](conf)
// res2: Either[pureconfig.error.ConfigReaderFailures,MyVecConfig] = Right(MyVecConfig(NonEmptyVector(1, 2, 3)))
```

### Using cats type class instances for readers and writers

In order to to put in scope the `cats` type classes for our readers and writers and extend the latter with the extra
operations provided by `cats`, we need some extra imports:

@@ -13,6 +13,8 @@ libraryDependencies += "com.github.pureconfig" %% "pureconfig-cats" % "0.7.1"

## Example

### Reading cats data structures from a config

To load a `NonEmptyList[Int]` into a configuration, we need a class to hold our configuration:

```tut:silent
@@ -41,6 +43,8 @@ then load the config:
loadConfig[MyVecConfig](conf)
```

### Using cats type class instances for readers and writers

In order to to put in scope the `cats` type classes for our readers and writers and extend the latter with the extra
operations provided by `cats`, we need some extra imports:

0 comments on commit 3d4aab1

Please sign in to comment.
You can’t perform that action at this time.