-- |
-- Module     : Simulation.Aivika.GPSS.Block.Transfer
-- Copyright  : Copyright (c) 2017, David Sorokin <david.sorokin@gmail.com>
-- License    : BSD3
-- Maintainer : David Sorokin <david.sorokin@gmail.com>
-- Stability  : experimental
-- Tested with: GHC 8.0.2
--
-- This module defines the GPSS block TRANSFER.
--
module Simulation.Aivika.GPSS.Block.Transfer
       (transferBlock) where

import Simulation.Aivika
import Simulation.Aivika.GPSS.Block

-- | This is the GPSS construct
--
-- @TRANSFER ,New_Place@
transferBlock :: Block a ()
                 -- ^ a new place
                 -> Block a b
transferBlock :: Block a () -> Block a b
transferBlock Block a ()
x =
  Block :: forall a b. (a -> Process b) -> Block a b
Block { blockProcess :: a -> Process b
blockProcess = \a
a -> Process () -> Process b
forall a. Process () -> Process a
transferProcess (Block a () -> a -> Process ()
forall a b. Block a b -> a -> Process b
blockProcess Block a ()
x a
a) }