Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions project/build.properties → build.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#Project properties
#Fri Apr 29 16:16:06 EDT 2011
project.organization=com.comonad
project.name=ad
sbt.version=0.7.4
Expand Down
7 changes: 7 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name := "ad"

version := "0.1"

scalaVersion := "2.11.4"

libraryDependencies += "org.scalaz" %% "scalaz-core" % "7.1.1"
7 changes: 0 additions & 7 deletions project/build/ad.scala

This file was deleted.

3 changes: 0 additions & 3 deletions project/build/target/scala_2.7.7/analysis/dependencies

This file was deleted.

4 changes: 0 additions & 4 deletions project/build/target/scala_2.7.7/analysis/external

This file was deleted.

3 changes: 0 additions & 3 deletions project/build/target/scala_2.7.7/analysis/generated_files

This file was deleted.

3 changes: 0 additions & 3 deletions project/build/target/scala_2.7.7/analysis/hashes

This file was deleted.

3 changes: 0 additions & 3 deletions project/build/target/scala_2.7.7/analysis/projects

This file was deleted.

Binary file removed project/build/target/scala_2.7.7/classes/ad.class
Binary file not shown.
18 changes: 18 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
**Usage**

With sbt:

```scala
$ sbt console
...
scala> import scalaz._
scala> import scalaz.Scalaz._
scala> import ad._

scala> def test = diffa(new FF[Id,Id,Double] {
| def apply[S[_]](x: AD[S, Double])(implicit mode: Mode[S, Double]): AD[S, Double] = sin(x)
| })

scala> test(0)
scala> res11: (Double, Double) = (0.0,1.0)
```
4 changes: 2 additions & 2 deletions src/main/scala/ad.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package object ad {

def grada[F[_]:Traverse, A:Numeric](f: FU[F, A]): F[A] => (A, F[A]) = error("TODO")
def grad[F[_]:Traverse, A:Numeric](f: FU[F, A]): F[A] => F[A] = error("TODO")
def grads[F[_]:Traverse, A:Numeric](f: FU[F, A]): F[A] => Cofree_[F,A] = error("TODO")
def jacobians[F[_]:Traverse, G[_]:Functor, A:Numeric](f: FF[F, G, A]): F[A] => G[Cofree_[F,A]] = error("TODO")
def grads[F[_]:Traverse, A:Numeric](f: FU[F, A]): F[A] => Cofree[F,A] = error("TODO")
def jacobians[F[_]:Traverse, G[_]:Functor, A:Numeric](f: FF[F, G, A]): F[A] => G[Cofree[F,A]] = error("TODO")

implicit def lift[S[_], A](a: A)(implicit mode: Mode[S, A], A: Numeric[A]): AD[S, A] = AD[S,A](mode.lift(a))

Expand Down