read


License

License

MIT
GroupId

GroupId

io.chrisdavenport
ArtifactId

ArtifactId

read_2.12
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

read
read
Project URL

Project URL

https://github.com/ChristopherDavenport/read
Project Organization

Project Organization

io.chrisdavenport
Source Code Management

Source Code Management

https://github.com/ChristopherDavenport/read

Download read_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/io.chrisdavenport/read_2.12/ -->
<dependency>
    <groupId>io.chrisdavenport</groupId>
    <artifactId>read_2.12</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.chrisdavenport/read_2.12/
implementation 'io.chrisdavenport:read_2.12:0.1.0'
// https://jarcasting.com/artifacts/io.chrisdavenport/read_2.12/
implementation ("io.chrisdavenport:read_2.12:0.1.0")
'io.chrisdavenport:read_2.12:jar:0.1.0'
<dependency org="io.chrisdavenport" name="read_2.12" rev="0.1.0">
  <artifact name="read_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.chrisdavenport', module='read_2.12', version='0.1.0')
)
libraryDependencies += "io.chrisdavenport" % "read_2.12" % "0.1.0"
[io.chrisdavenport/read_2.12 "0.1.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.8

test (2)

Group / Artifact Type Version
org.typelevel : cats-testkit_2.12 jar 1.6.0
org.typelevel : discipline_2.12 jar 0.11.0

Project Modules

There are no modules declared in this project.

read Build Status Maven Central

Read Typeclass for Scala. Controversial? Yes. Problematic? Yes. Better than watching your friends write string.toInt and calling it good enough? Absolutely!

Quickstart

To use read in an existing SBT project with Scala 2.11 or a later version, add the following dependency to your build.sbt:

libraryDependencies += "io.chrisdavenport" %% "read" % "<version>"

Examples

import io.chrisdavenport.read.Read
import io.chrisdavenport.read.implicits._

"1".read[Int] // Right(1)

"Foo".read[Int] // Left

// For Those Who Want Haskell's Read
Read[Int].unsafeRead("1") // 1: Int

Versions

Version
0.1.0
0.0.2
0.0.1