neural-0.1.1.0: Neural Networks in native Haskell

Copyright(c) Lars Brünjes, 2016
LicenseMIT
Maintainerbrunjlar@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010
Extensions
  • Arrows
  • RankNTypes
  • ExplicitForAll

Data.Utils.Arrow

Description

This module defines utility functions for arrows.

Synopsis

Documentation

class Arrow a => ArrowConvolve a where Source

Arrows implementing ArrowConvolve can be mapped over containers. This means that every functor (f :: Hask -> Hask) lifts to a functor (a -> a).

Instances should satisfy the following laws:

  • convolve id = id
  • convolve (g . h) = convolve g . convolve h
  • convolve . arr = arr . fmap

Methods

convolve :: forall f b c. Functor f => a b c -> a (f b) (f c) Source

fmapArr :: Arrow a => (c -> d) -> a b c -> a b d Source

A function suitable to define the canonical Functor instance for arrows.

pureArr :: Arrow a => c -> a b c Source

A function to define pure for arrows. Combining this with apArr, the canonical Applicative instance for arrows can easily be defined.

apArr :: Arrow a => a b (c -> d) -> a b c -> a b d Source

A function to define (<*>) for arrows. Combining this with pureArr, the canonical Applicative instance for arrows can easily be defined.

dimapArr :: Arrow a => (b -> c) -> (d -> e) -> a c d -> a b e Source

A function suitable to define the canonical Profunctor instance for arrows.