Skip to content

Commit

Permalink
Merge pull request #1276 from ceedubs/attributions
Browse files Browse the repository at this point in the history
Some attribution work
  • Loading branch information
ceedubs authored Aug 10, 2016
2 parents 8d5140a + 4117f4e commit f2bfecb
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ possible:
* Binh Nguyen
* Bobby Rauchenberg
* Brendan McAdams
* Brian McKenna
* Cody Allen
* Colt Frederickson
* Dale Wijnand
Expand Down Expand Up @@ -98,6 +99,13 @@ possible:
* yilinwei
* Zach Abbott

Cats has been heavily inspired by many libraries, including [Scalaz](https://github.com/scalaz/scalaz),
Haskell's [Prelude](https://hackage.haskell.org/package/base-4.9.0.0/docs/Prelude.html), and others.
In particular, some Cats code is only a slightly modified version of code originating in
Scalaz. Therefore, we'd also like to credit and thank all of the
[Scalaz contributors](https://github.com/scalaz/scalaz/graphs/contributors) for
their work.

We've tried to include everyone, but if you've made a contribution to
Cats and are not listed, please feel free to open an issue or pull
request with your name and contribution.
Expand Down
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ Write about type class methods on data structures as described in https://github

Write about https://github.com/typelevel/cats/pull/36#issuecomment-72892359

### Attributions

If your contribution has been derived from or inspired by other work, please
state this in its ScalaDoc comment and provide proper attribution. When
possible, include the original authors' names and a link to the original work.

### Write tests

- Tests for cats-core go into the tests module, under the `cats.tests` package.
Expand Down
4 changes: 4 additions & 0 deletions core/src/main/scala/cats/FlatMapRec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import cats.data.Xor
*
* Based on Phil Freeman's
* [[http://functorial.com/stack-safety-for-free/index.pdf Stack Safety for Free]].
*
* This Scala implementation of `FlatMapRec` and its usages are derived from
* [[https://github.com/scalaz/scalaz/blob/series/7.3.x/core/src/main/scala/scalaz/BindRec.scala Scalaz's BindRec]],
* originally written by Brian McKenna.
*/
@typeclass trait FlatMapRec[F[_]] extends FlatMap[F] {

Expand Down
6 changes: 6 additions & 0 deletions core/src/main/scala/cats/NotNull.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ package cats
*
* This can be useful in preventing `Null` from being inferred when a type
* parameter is omitted.
*
* This trait is used along with ambiguous implicits to achieve the goal of
* preventing inference of `Null`. This ambiguous implicit trick has been used
* in the Scala community for some time. [[https://gist.github.com/milessabin/de58f3ba7024d51dcc1a Here]]
* is an early example of such a trick being used in a similar way to prevent a
* `Nothing` type.
*/
sealed trait NotNull[A]

Expand Down
4 changes: 4 additions & 0 deletions core/src/main/scala/cats/data/Validated.scala
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,10 @@ trait ValidatedFunctions {
* scala> Validated.catchOnly[NumberFormatException] { "foo".toInt }
* res0: Validated[NumberFormatException, Int] = Invalid(java.lang.NumberFormatException: For input string: "foo")
* }}}
*
* This method and its usage of [[NotNull]] are inspired by and derived from
* the `fromTryCatchThrowable` method [[https://github.com/scalaz/scalaz/pull/746/files contributed]]
* to Scalaz by Brian McKenna.
*/
def catchOnly[T >: Null <: Throwable]: CatchOnlyPartiallyApplied[T] = new CatchOnlyPartiallyApplied[T]

Expand Down
4 changes: 4 additions & 0 deletions core/src/main/scala/cats/data/Xor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,10 @@ trait XorFunctions {
* scala> Xor.catchOnly[NumberFormatException] { "foo".toInt }
* res0: Xor[NumberFormatException, Int] = Left(java.lang.NumberFormatException: For input string: "foo")
* }}}
*
* This method and its usage of [[NotNull]] are inspired by and derived from
* the `fromTryCatchThrowable` method [[https://github.com/scalaz/scalaz/pull/746/files contributed]]
* to Scalaz by Brian McKenna.
*/
def catchOnly[T >: Null <: Throwable]: CatchOnlyPartiallyApplied[T] =
new CatchOnlyPartiallyApplied[T]
Expand Down

0 comments on commit f2bfecb

Please sign in to comment.