File: Transformer.hs

package info (click to toggle)
haskell-arrows 0.4.4.2-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 152 kB
  • sloc: haskell: 917; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 830 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
-----------------------------------------------------------------------------
-- |
-- Module      :  Control.Arrow.Transformer
-- Copyright   :  (c) Ross Paterson 2003
-- License     :  BSD-style (see the LICENSE file in the distribution)
--
-- Maintainer  :  ross@soi.city.ac.uk
-- Stability   :  experimental
-- Portability :  portable
--
-- Arrow transformers, for making new arrow types out of old ones.

module Control.Arrow.Transformer (
        ArrowTransformer(..)
    ) where

import Control.Arrow

-- | Construct a new arrow from an existing one.
class (Arrow a, Arrow (f a)) => ArrowTransformer f a where

    -- | A transformation of arrows, preserving 'arr', '>>>' and 'first'.
    --
    -- Typical usage in arrow notation:
    --
    -- >    proc p -> ...
    -- >        (|lift cmd|)

    lift :: a b c -> f a b c