/usr/lib/hugs/packages/Cabal/Distribution/Compat/ReadP.hs is in libhugs-cabal-bundled 98.200609.21-5.3.
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 | {-# OPTIONS_GHC -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Compat.ReadP
-- Copyright : (c) The University of Glasgow 2002
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stability : provisional
-- Portability : portable
--
-- This is a library of parser combinators, originally written by Koen Claessen.
-- It parses all alternatives in parallel, so it never keeps hold of
-- the beginning of the input string, a common source of space leaks with
-- other parsers. The '(+++)' choice combinator is genuinely commutative;
-- it makes no difference which branch is \"shorter\".
--
-- See also Koen's paper /Parallel Parsing Processes/
-- (<http://www.cs.chalmers.se/~koen/publications.html>).
--
-- This version of ReadP has been locally hacked to make it H98, by
-- Martin Sjögren <mailto:msjogren@gmail.com>
--
-----------------------------------------------------------------------------
module Distribution.Compat.ReadP
(
-- * The 'ReadP' type
ReadP, -- :: * -> *; instance Functor, Monad, MonadPlus
-- * Primitive operations
get, -- :: ReadP Char
look, -- :: ReadP String
(+++), -- :: ReadP a -> ReadP a -> ReadP a
(<++), -- :: ReadP a -> ReadP a -> ReadP a
gather, -- :: ReadP a -> ReadP (String, a)
-- * Other operations
pfail, -- :: ReadP a
satisfy, -- :: (Char -> Bool) -> ReadP Char
char, -- :: Char -> ReadP Char
string, -- :: String -> ReadP String
munch, -- :: (Char -> Bool) -> ReadP String
munch1, -- :: (Char -> Bool) -> ReadP String
skipSpaces, -- :: ReadP ()
choice, -- :: [ReadP a] -> ReadP a
count, -- :: Int -> ReadP a -> ReadP [a]
between, -- :: ReadP open -> ReadP close -> ReadP a -> ReadP a
option, -- :: a -> ReadP a -> ReadP a
optional, -- :: ReadP a -> ReadP ()
many, -- :: ReadP a -> ReadP [a]
many1, -- :: ReadP a -> ReadP [a]
skipMany, -- :: ReadP a -> ReadP ()
skipMany1, -- :: ReadP a -> ReadP ()
sepBy, -- :: ReadP a -> ReadP sep -> ReadP [a]
sepBy1, -- :: ReadP a -> ReadP sep -> ReadP [a]
endBy, -- :: ReadP a -> ReadP sep -> ReadP [a]
endBy1, -- :: ReadP a -> ReadP sep -> ReadP [a]
chainr, -- :: ReadP a -> ReadP (a -> a -> a) -> a -> ReadP a
chainl, -- :: ReadP a -> ReadP (a -> a -> a) -> a -> ReadP a
chainl1, -- :: ReadP a -> ReadP (a -> a -> a) -> ReadP a
chainr1, -- :: ReadP a -> ReadP (a -> a -> a) -> ReadP a
manyTill, -- :: ReadP a -> ReadP end -> ReadP [a]
-- * Running a parser
ReadS, -- :: *; = String -> [(a,String)]
readP_to_S, -- :: ReadP a -> ReadS a
readS_to_P -- :: ReadS a -> ReadP a
)
where
import Text.ParserCombinators.ReadP hiding (ReadP)
import qualified Text.ParserCombinators.ReadP as ReadP
type ReadP r a = ReadP.ReadP a
|