{-# OPTIONS_HADDOCK hide #-}
module Raaz.Core.Types.Copying
( Src(..), Dest(..), source, destination
) where
import Raaz.Core.Prelude
newtype Src a = Src { forall a. Src a -> a
unSrc :: a }
source :: a -> Src a
source :: forall a. a -> Src a
source = a -> Src a
forall a. a -> Src a
Src
instance Functor Src where
fmap :: forall a b. (a -> b) -> Src a -> Src b
fmap a -> b
f = b -> Src b
forall a. a -> Src a
Src (b -> Src b) -> (Src a -> b) -> Src a -> Src b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> b
f (a -> b) -> (Src a -> a) -> Src a -> b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Src a -> a
forall a. Src a -> a
unSrc
newtype Dest a = Dest { forall a. Dest a -> a
unDest :: a }
destination :: a -> Dest a
destination :: forall a. a -> Dest a
destination = a -> Dest a
forall a. a -> Dest a
Dest
instance Functor Dest where
fmap :: forall a b. (a -> b) -> Dest a -> Dest b
fmap a -> b
f = b -> Dest b
forall a. a -> Dest a
Dest (b -> Dest b) -> (Dest a -> b) -> Dest a -> Dest b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> b
f (a -> b) -> (Dest a -> a) -> Dest a -> b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Dest a -> a
forall a. Dest a -> a
unDest