/usr/share/doc/libghc-strict-doc/html/strict.txt is in libghc-strict-doc 0.3.2-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | -- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Strict data types and String IO.
--
-- This package provides strict versions of some standard Haskell data
-- types (pairs, Maybe and Either). It also contains strict IO
-- operations.
@package strict
@version 0.3.2
-- | The standard IO input functions using strict IO.
module System.IO.Strict
-- | Computation <a>hGetContents</a> <tt>hdl</tt> returns the list of
-- characters corresponding to the unread portion of the channel or file
-- managed by <tt>hdl</tt>, which is immediate closed.
--
-- Items are read strictly from the input Handle.
--
-- This operation may fail with:
--
-- <ul>
-- <li><tt>isEOFError</tt> if the end of file has been reached.</li>
-- </ul>
hGetContents :: Handle -> IO String
-- | The <a>getContents</a> operation returns all user input as a single
-- string, which is read stirctly (same as <a>hGetContents</a>
-- <tt>stdin</tt>).
getContents :: IO String
-- | The <a>readFile</a> function reads a file and returns the contents of
-- the file as a string. The file is read strictly, as with
-- <a>getContents</a>.
readFile :: FilePath -> IO String
-- | The <a>interact</a> function takes a function of type
-- <tt>String->String</tt> as its argument. The entire input from the
-- standard input device is passed to this function as its argument, and
-- the resulting string is output on the standard output device.
interact :: (String -> String) -> IO ()
-- | Strict <tt>Either</tt>.
--
-- Same as the standard Haskell <tt>Either</tt>, but <tt>Left _|_ = Right
-- _|_ = _|_</tt>
module Data.Strict.Either
-- | The strict choice type.
data Either a b
Left :: !a -> Either a b
Right :: !b -> Either a b
-- | Case analysis: if the value is <tt><a>Left</a> a</tt>, apply the first
-- function to <tt>a</tt>; if it is <tt><a>Right</a> b</tt>, apply the
-- second function to <tt>b</tt>.
either :: (a -> c) -> (b -> c) -> Either a b -> c
-- | Yields <a>True</a> iff the argument is of the form <tt>Left _</tt>.
isLeft :: Either a b -> Bool
-- | Yields <a>True</a> iff the argument is of the form <tt>Right _</tt>.
isRight :: Either a b -> Bool
-- | Extracts the element out of a <a>Left</a> and throws an error if the
-- argument is a <a>Right</a>.
fromLeft :: Either a b -> a
-- | Extracts the element out of a <a>Right</a> and throws an error if the
-- argument is a <a>Left</a>.
fromRight :: Either a b -> b
instance (Eq a, Eq b) => Eq (Either a b)
instance (Ord a, Ord b) => Ord (Either a b)
instance (Read a, Read b) => Read (Either a b)
instance (Show a, Show b) => Show (Either a b)
instance Functor (Either a)
-- | Strict <tt>Maybe</tt>.
--
-- Same as the standard Haskell <tt>Maybe</tt>, but <tt>Just _|_ =
-- _|_</tt>
--
-- Note that strict <tt>Maybe</tt> is not a monad since <tt> return _|_
-- >>= f = _|_ </tt> which is not necessarily the same as <tt>f
-- _|_</tt>.
module Data.Strict.Maybe
-- | The type of strict optional values.
data Maybe a
Nothing :: Maybe a
Just :: !a -> Maybe a
-- | Yields <a>True</a> iff the argument is of the form <tt>Just _</tt>.
isJust :: Maybe a -> Bool
-- | Yields <a>True</a> iff the argument is <a>Nothing</a>.
isNothing :: Maybe a -> Bool
-- | Extracts the element out of a <a>Just</a> and throws an error if the
-- argument is <a>Nothing</a>.
fromJust :: Maybe a -> a
-- | Given a default value and a <a>Maybe</a>, yield the default value if
-- the <a>Maybe</a> argument is <a>Nothing</a> and extract the value out
-- of the <a>Just</a> otherwise.
fromMaybe :: a -> Maybe a -> a
-- | Given a default value, a function and a <a>Maybe</a> value, yields the
-- default value if the <a>Maybe</a> value is <a>Nothing</a> and applies
-- the function to the value stored in the <a>Just</a> otherwise.
maybe :: b -> (a -> b) -> Maybe a -> b
instance Eq a => Eq (Maybe a)
instance Ord a => Ord (Maybe a)
instance Show a => Show (Maybe a)
instance Read a => Read (Maybe a)
instance Functor Maybe
-- | Strict pairs.
--
-- Same as regular Haskell pairs, but <tt>(x :*: _|_) = (_|_ :*: y) =
-- _|_</tt>
module Data.Strict.Tuple
-- | The type of strict pairs.
data Pair a b
(:!:) :: !a -> !b -> Pair a b
type (:!:) = Pair
-- | Extract the first component of a strict pair.
fst :: Pair a b -> a
-- | Extract the second component of a strict pair.
snd :: Pair a b -> b
-- | Curry a function on strict pairs.
curry :: (Pair a b -> c) -> a -> b -> c
-- | Convert a curried function to a function on strict pairs.
uncurry :: (a -> b -> c) -> Pair a b -> c
instance (Eq a, Eq b) => Eq (Pair a b)
instance (Ord a, Ord b) => Ord (Pair a b)
instance (Show a, Show b) => Show (Pair a b)
instance (Read a, Read b) => Read (Pair a b)
instance (Bounded a, Bounded b) => Bounded (Pair a b)
instance (Ix a, Ix b) => Ix (Pair a b)
-- | Strict versions of some standard Haskell types.
module Data.Strict
|