Cats: Remove fine-grained imports from docs

Created on 30 Nov 2018  路  5Comments  路  Source: typelevel/cats

Some of the doc pages use fine-grained imports, which we should discourage as it's very tricky (so tricky in fact that most advanced users don't even try) and is a source of discouraging problems and many questions on the Gitter channel. Can we go through the doc and remove them?

documentation help wanted low-hanging fruit small

Most helpful comment

@LukaJCB Ah, that makes sense! I can try to go through and find some of these to fix

All 5 comments

Hi @tpolecat do you have an example here? I'm guessing it's somewhere we can import ._ instead?

@calvinbrown085
In general when there's docs where anything apart from import cats.implicits._ is used, change it to cats.implicits._ instead. So e.g. in https://github.com/typelevel/cats/blob/master/docs/src/main/tut/typeclasses/applicative.md

you'll see this:

import cats.instances.list._
import cats.syntax.traverse._

That should be changed to just

import cats.implicits._

@LukaJCB Ah, that makes sense! I can try to go through and find some of these to fix

Is there anything else we need here? Or can we close this issue?

I think that this can be closed out now. Thanks, @calvinbrown085!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

durban picture durban  路  4Comments

LukaJCB picture LukaJCB  路  3Comments

chuwy picture chuwy  路  4Comments

davidabrahams picture davidabrahams  路  3Comments

kailuowang picture kailuowang  路  3Comments