File: Transformer.hs

package info (click to toggle)
haskell-arrows 0.2-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 152 kB
  • ctags: 3
  • sloc: haskell: 664; makefile: 60; sh: 22
file content (31 lines) | stat: -rw-r--r-- 862 bytes parent folder | download | duplicates (3)
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
30
31
{-# OPTIONS_GHC -fglasgow-exts #-}

-----------------------------------------------------------------------------
-- |
-- 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 :  non-portable (multi-parameter type classes)
--
-- 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