This README and further docs are in progress.
To provide a finite Naperian functor based interface to hasktorch
.
To build, clone Hasktorch 0.2.0.0
into the same parent directory and build.
Then run stack build
in the top level of this project.
The resulting binary requires some shared objects.
One way to run the binary is to copy it to the top-level hasktorch
directory
and execute source setenv
while in bash
.
The official Google Summer of Code project has ended.
The module Data.Naperian
contains:
- Instances of
Enum
andBounded
for(a, b)
andEither a b
. Naperian
instances forProduct
andCompose
.- A newtype wrapper around
Naperian
to deriveApplicative
. - The definition of
FiniteNaperian
. FiniteNaperian
instances forProduct
andCompose
.- A newtype wrapper around
FiniteNaperian
to deriveFoldable
,Dimension
,Eq1
,Ord1
, andShow1
. Also included is a default definition oftraverse
to defineTraversable
(which cannot be derived withDerivingVia
). - The definition of
FiniteHyper
multidimensional version ofFiniteNaperian
, which is indexed by a heterogeneous listHList [a1, ..., an]
. - Various instances for
HList [a1, ..., an]
includingBounded
andEnum
. - Instances for
FiniteHyper
includingFiniteNaperian
.
The module Data.Naperian.Tree
implements some type indexed trees and gives
their finite Naperian instances.
Additionally, it uses the category of indexed functors to define a form of
catamorphisms.
Finally, it uses some extra structure of the trees to allow a mapAccum
style
function to be defined.
The module Data.Naperian.Examples
shows how to define your own finite Naperian
functor.
The module Torch.Naperian
shows some functions which are similar to Torch
functions, and are implemented in pure Haskell.
The main portion of the is the Dim
data type and functions for interacting
with it.
The module Torch.Naperian.Examples
shows how to perform a simple linear
regression using finite Naperian functors and the ad
library for it's gradient
descent function.
It also uses indexed trees to create a Tree LSTM.