1 {-# LANGUAGE RankNTypes, FlexibleContexts, NoMonomorphismRestriction, ScopedTypeVariables #-}
4 -- Module : GArrowAssTypes
6 -- License : public domain
8 -- Maintainer : Adam Megacz <megacz@acm.org>
9 -- Stability : experimental
11 -- | This module is a gigantic type inference hack; it redefines all of the
12 -- ga_functions with a slightly more specific type whereby each type g
13 -- which is a GArrow instance also has an *associated type* (GArrowTensor g)
14 -- for its tensor and (GArrowUnit g) for its unit.
16 -- DO import this module without qualification if you plan on
17 -- writing GArrow-expressions with as few annotations as possible.
19 -- DO NOT import this module without qualification if you plan on
20 -- creating new instances of GArrow. Use "import qualified" or
21 -- don't import it at all.
28 , module Control.GArrow
32 import qualified Control.GArrow as G
33 import Control.GArrow hiding (ga_copy, ga_drop, ga_swap)
36 ga_copy :: forall x . forall g . GArrowCopy g (GArrowTensor g) (GArrowUnit g) => g x (GArrowTensor g x x)
39 ga_drop :: forall x . forall g . GArrowDrop g (GArrowTensor g) (GArrowUnit g) => g x (GArrowUnit g)
42 ga_swap :: forall x y . forall g . GArrowSwap g (GArrowTensor g) (GArrowUnit g) => g (GArrowTensor g x y) (GArrowTensor g y x)
47 ga_copy :: forall x . forall g . GArrowCopy g (,) () => g x ((,) x x)
50 ga_drop :: forall x . forall g . GArrowDrop g (,) () => g x ()
53 ga_swap :: forall x y . forall g . GArrowSwap g (,) () => g ((,) x y) ((,) y x)