GithubHelp home page GithubHelp logo

cats's Introduction

Cats

Overview

Cats is a proof-of-concept library intended to provide abstractions for functional programming in Scala.

The name is a playful shortening of the word category.

cats image

Getting Started

Cats is not currently published, so you'll need to check out this repository to try it out. (In fact, you will need to do a publish-local on algebra in order to have that dependency available.)

To build Cats you should have sbt installed. Run sbt, and then use any of the following commands:

  • compile: compile the code.
  • console: launch a REPL
  • test: run the tests

Gitter

Design

The goal is to provide a lightweight, modular, and extensible library that is approachable and powerful. The library will use modern best practices:

  • simulacrum for minimizing typeclass boilerplate
  • machinist for optimizing implicit operators
  • scalacheck for property-based testing
  • discipline for encoding and testing laws
  • kind-projector for type lambda syntax
  • algebra for shared algebraic structures
  • ...and of course a pure functional subset of the Scala language.

Another design goal is to support Miniboxing in a fork.

Currently Cats is experimenting with providing laziness via a type constructor, rather than via ad-hoc by-name parameters. This design may change if it ends up being impractical.

The goal is to make Cats as efficient as possible for both strict and lazy evaluation. There are also issues around by-name parameters that mean they are not well-suited to all situations where laziness is desirable.

Modules

Cats will be split into modules, both to keep the size of the artifacts down and also to avoid unnecessarily tight coupling between type classes and data types.

Initially Cats will support the following modules:

  • core: Almost exclusively definitions for widely-used type classes.
  • std: Standard type class instances and other useful data types.
  • data: Data types and corresponding type class instances.
  • laws: The encoded laws for type classes, exported to assist third-party testing.
  • tests: Verifies the laws, and runs any other tests. Not published.

As the type class families grow, it's possible that additional modules will be added as well. Modules which depend on other libraries (e.g. Shapeless-based type class derivation) may be added as well.

Contributing

Discussion around Cats is currently happening in the Gitter channel.

Feel free to open an issue if you notice a bug, have an idea for a feature, or have a question about the code. Pull requests are also gladly accepted.

People are expected to follow the Typelevel Code of Conduct when discussing Cats on the Github page, Gitter channel, or other venues.

Concerns or issues can be sent to Erik Osheim ([email protected]).

Related Projects

Cats is closely-related to Structures; both projects are descended from Scalaz.

There are many related Haskell libraries, for example:

Copyright and License

All code is available to you under the MIT license, available at http://opensource.org/licenses/mit-license.php and also in the COPYING file. The design is informed by many other projects, in particular Scalaz.

Copyright Erik Osheim, 2015.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.