Const.hs 345 Bytes
Newer Older
1 2 3 4 5
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
module Control.Arrow.Const where

import Control.Arrow
6
import Data.Profunctor
7

Sven Keidel's avatar
Sven Keidel committed
8
-- | Arrow-based interface that gives access to a constant value.
9
class (Arrow c, Profunctor c) => ArrowConst r c | c -> r where
10

Sven Keidel's avatar
Sven Keidel committed
11
  -- | Retrieve the constant value.
12
  askConst :: c () r