Skip to content

Commit

Permalink
added ammonite instructions to faq (#2153)
Browse files Browse the repository at this point in the history
* added ammonite instructions to faq

* Update faq.md
  • Loading branch information
kailuowang authored Jan 12, 2018
1 parent 5f30a73 commit 75052a0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/src/main/tut/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ position: 40
* [How can I test instances against their type classes' laws?](#law-testing)
* [How can I help?](#contributing)
* [Is there a sbt plugin that facilitate projects based on the Cats ecosystem libraries?](#sbt-catalysts)
* [How to try cats in a REPL?](#ammonite)

## <a id="what-imports" href="#what-imports"></a>What imports do I need?

Expand Down Expand Up @@ -258,3 +259,13 @@ See the [contributing guide]({{ site.baseurl }}/contributing.html) for more info

Of course. [sbt-catalysts](https://github.com/typelevel/sbt-catalysts) is created particularly for this purpose. It also provides a g8 template so that you can run `sbt new typelevel/sbt-catalysts.g8` to quickly set up a project using Cats ecosystem libraries through this plugin. For more details, go to [sbt-catalysts](https://github.com/typelevel/sbt-catalysts).

## <a id="ammonite" href="#ammonite"></a>How to try Cats in a REPL?

The easiest way is probably using [Ammonite-REPL](http://ammonite.io/). Install it following the instructions there. Then in the amm console you can type in
```scala
interp.configureCompiler(_.settings.YpartialUnification.value = true)
import $ivy.`org.typelevel::cats-core:1.0.1`, cats.implicits._
```
Or if you want, you can add these lines to `~/.ammonite/predef.sc` so that they are enabled every ammonite session.


0 comments on commit 75052a0

Please sign in to comment.