Packages

The Phi Programming Language

Current section

Files

Jump to
phi lib System IO Types.hm
Raw

lib/System/IO/Types.hm

-----------------------------------------------------------------------------
-- |
-- Module : System.IO.Types
-- Copyright : (c) 2020-2021 EMQ Technologies Co., Ltd.
-- License : BSD-style (see the LICENSE file)
--
-- Maintainer : Feng Lee, feng@emqx.io
-- Yang M, yangm@emqx.io
-- Stability : experimental
-- Portability : portable
--
-- The System IO types.
--
-----------------------------------------------------------------------------
module System.IO.Types where
type FilePath = String
foreign import data IODevice :: Type
data IOMode
= ReadMode
| WriteMode
| AppendMode
| ReadWriteMode
data SeekMode
= AbsoluteSeek
-- ^ Absolute seek
| RelativeSeek
-- ^ Seek from the current position
| SeekFromEnd
-- ^ Seek from the end of file