From c308edcfefc17beaac63aacab8ebf1df14e3ed94 Mon Sep 17 00:00:00 2001 From: "Kai(luo) Wang" Date: Fri, 12 Jan 2018 11:30:41 -0500 Subject: [PATCH 1/2] added ammonite instructions to faq --- docs/src/main/tut/faq.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/src/main/tut/faq.md b/docs/src/main/tut/faq.md index 3ff0888fbd..6ca9395b5c 100644 --- a/docs/src/main/tut/faq.md +++ b/docs/src/main/tut/faq.md @@ -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) ## What imports do I need? @@ -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). +## 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: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. + + From 36955af5b46d6d52c0bf224adb5677a27bcedb7d Mon Sep 17 00:00:00 2001 From: "Kai(luo) Wang" Date: Fri, 12 Jan 2018 12:36:20 -0500 Subject: [PATCH 2/2] Update faq.md --- docs/src/main/tut/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/main/tut/faq.md b/docs/src/main/tut/faq.md index 6ca9395b5c..0c66717d25 100644 --- a/docs/src/main/tut/faq.md +++ b/docs/src/main/tut/faq.md @@ -264,7 +264,7 @@ Of course. [sbt-catalysts](https://github.com/typelevel/sbt-catalysts) is create 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:1.0.1`, cats.implicits._ +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.