-- Copyright (c) 2012-2024, Chris Pressey, Cat's Eye Technologies.
-- This file is distributed under a 2-clause BSD license. See LICENSES/ dir.
-- SPDX-License-Identifier: LicenseRef-BSD-2-Clause-X-Robin
module Language.Robin.Facilities where
import Language.Robin.Expr
type Event = Either String [Expr]
type FacilityHandler = Expr -> IO [Expr]
type WaitForEvents = IO Event
data Facility = Facility {
handler :: FacilityHandler,
waiter :: WaitForEvents
}
nullWaiter :: WaitForEvents
nullWaiter = return $ Right []