[Pkg-haskell-commits] r722 - in /packages/haskell-uulib/trunk: README debian/changelog debian/control debian/mk-haskell-depends src/UU/Parsing/Interface.hs src/UU/Parsing/MachineInterface.hs
arjan at users.alioth.debian.org
arjan at users.alioth.debian.org
Mon May 28 15:12:20 UTC 2007
Author: arjan
Date: Mon May 28 15:12:20 2007
New Revision: 722
URL: http://svn.debian.org/wsvn/pkg-haskell/?sc=1&rev=722
Log:
* New upstream snapshot release.
* debian/mk-haskell-depends:
- Small cleanups.
* Generate links to other API documentation packages:
- debian/control:
+ Add libghc6-base-doc and libghc6-haskell98-doc to the
Build-Depends-Indep so haddock can link to names in other
packages.
+ Add libghc6-base-doc and libghc6-haskell98-doc to the Recommends
of haskell-uulib-doc.
Modified:
packages/haskell-uulib/trunk/README
packages/haskell-uulib/trunk/debian/changelog
packages/haskell-uulib/trunk/debian/control
packages/haskell-uulib/trunk/debian/mk-haskell-depends
packages/haskell-uulib/trunk/src/UU/Parsing/Interface.hs
packages/haskell-uulib/trunk/src/UU/Parsing/MachineInterface.hs
Modified: packages/haskell-uulib/trunk/README
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/trunk/README?rev=722&op=diff
==============================================================================
--- packages/haskell-uulib/trunk/README (original)
+++ packages/haskell-uulib/trunk/README Mon May 28 15:12:20 2007
@@ -73,10 +73,10 @@
URL: https://svn.cs.uu.nl:12443/repos/uust-repo/uulib/trunk
Repository Root: https://svn.cs.uu.nl:12443/repos/uust-repo
Repository UUID: 30b93d28-2606-0410-b7f1-95e0edb40354
-Revision: 140
+Revision: 178
Node Kind: directory
Schedule: normal
-Last Changed Author: doaitse
-Last Changed Rev: 135
-Last Changed Date: 2007-04-13 15:39:36 +0200 (Fri, 13 Apr 2007)
+Last Changed Author: arthurvl
+Last Changed Rev: 154
+Last Changed Date: 2007-05-09 13:55:16 +0200 (Wed, 09 May 2007)
Modified: packages/haskell-uulib/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/trunk/debian/changelog?rev=722&op=diff
==============================================================================
--- packages/haskell-uulib/trunk/debian/changelog (original)
+++ packages/haskell-uulib/trunk/debian/changelog Mon May 28 15:12:20 2007
@@ -1,10 +1,20 @@
-haskell-uulib (0.9.2+snapshot20070419-pre1) unstable; urgency=low
+haskell-uulib (0.9.3~snapshot20070528-1~pre1) unstable; urgency=low
+ * New upstream snapshot release.
* debian/control:
- Update XS-Vcs-* fields as the packages has moved to the pkg-haskell
subversion archive.
+ * debian/mk-haskell-depends:
+ - Small cleanups.
+ * Generate links to other API documentation packages:
+ - debian/control:
+ + Add libghc6-base-doc and libghc6-haskell98-doc to the
+ Build-Depends-Indep so haddock can link to names in other
+ packages.
+ + Add libghc6-base-doc and libghc6-haskell98-doc to the Recommends
+ of haskell-uulib-doc.
- -- Arjan Oosting <arjan at debian.org> Fri, 11 May 2007 14:43:34 +0200
+ -- Arjan Oosting <arjan at debian.org> Mon, 28 May 2007 17:07:35 +0200
haskell-uulib (0.9.2+snapshot20070419-1) unstable; urgency=low
Modified: packages/haskell-uulib/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/trunk/debian/control?rev=722&op=diff
==============================================================================
--- packages/haskell-uulib/trunk/debian/control (original)
+++ packages/haskell-uulib/trunk/debian/control Mon May 28 15:12:20 2007
@@ -4,7 +4,8 @@
Maintainer: Arjan Oosting <arjan at debian.org>
Build-Depends: dctrl-tools, debhelper (>= 5), dpatch, dpkg-dev (>= 1.13.19),
ghc6 (>= 6.4.2), ghc6-prof (>= 6.4.2), haskell-devscripts
-Build-Depends-Indep: cpphs, haddock, hugs
+Build-Depends-Indep: cpphs, haddock, hugs, libghc6-base-doc,
+ libghc6-haskell98-doc
Standards-Version: 3.7.2
XS-Vcs-Svn: svn://svn.debian.org/svn/pkg-haskell/packages/haskell-uulib
XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib
@@ -61,7 +62,7 @@
Architecture: all
Section: doc
Depends: ${misc:Depends}
-Recommends: doc-base
+Recommends: doc-base, libghc6-base-doc, libghc6-haskell98-doc
Description: API documentation for uulib Haskell library
The API documentation of the uulib parser and pretty print combinator
library.
Modified: packages/haskell-uulib/trunk/debian/mk-haskell-depends
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/trunk/debian/mk-haskell-depends?rev=722&op=diff
==============================================================================
--- packages/haskell-uulib/trunk/debian/mk-haskell-depends (original)
+++ packages/haskell-uulib/trunk/debian/mk-haskell-depends Mon May 28 15:12:20 2007
@@ -63,29 +63,29 @@
}
dependency(){
- local deb
+ local package
local version
local next_upstream_version
- deb=$1
- version=`dpkg-query --showformat='${Version}' -W $deb`
+ package=$1
+ version=`dpkg-query --showformat='${Version}' -W $package`
next_upstream_version=`echo $version | sed -e 's/-[^-]*$/+/'`
- echo "$deb (>= $version), $deb (<< $next_upstream_version)"
+ echo "$package (>= $version), $package (<< $next_upstream_version)"
}
dependencies(){
- local deb
- local debs
+ local package
+ local packages
local deps
- debs=$@
- for deb in `sort_uniq $debs` ; do
- deps="$deps, `dependency $deb`"
+ packages=$@
+ for package in `sort_uniq $packages` ; do
+ deps="$deps, `dependency $package`"
done
echo $deps | sed -e 's/^,[ ]*//'
}
providing_package_for_ghc6(){
- local deb
+ local package
local dep
local dir
local dirs
@@ -95,15 +95,15 @@
lib=`ghc-pkg6 field $dep hs-libraries | sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
for dir in $dirs ; do
if [ -e "$dir/lib$lib.a" ] ; then
- deb=`dpkg-query -S $dir/lib$lib.a | cut -d':' -f 1` || exit $?
+ package=`dpkg-query -S $dir/lib$lib.a | cut -d':' -f 1` || exit $?
continue
fi
done
- echo $deb
+ echo $package
}
providing_package_for_ghc6_prof(){
- local deb
+ local package
local dep
local dir
local dirs
@@ -113,11 +113,11 @@
lib=`ghc-pkg6 field $dep hs-libraries | sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
for dir in $dirs ; do
if [ -e "$dir/lib$lib_p.a" ] ; then
- deb=`dpkg-query -S $dir/lib$lib.a | cut -d':' -f 1` || exit $?
+ package=`dpkg-query -S $dir/lib$lib.a | cut -d':' -f 1` || exit $?
continue
fi
done
- echo $deb
+ echo $package
}
cabal_depends(){
@@ -145,22 +145,22 @@
depends_for_ghc6(){
local dep
- local debs
+ local packages
for dep in `cabal_depends $@` ; do
- debs="$debs `providing_package_for_ghc6 $dep`"
+ packages="$packages `providing_package_for_ghc6 $dep`"
done
- dependencies $debs
+ dependencies $packages
}
depends_for_ghc6_prof(){
local dep
- local debs
+ local packages
for dep in `cabal_depends $@` ; do
- debs="$debs `providing_package_for_ghc6_prof $dep`"
+ packages="$packages `providing_package_for_ghc6_prof $dep`"
done
- dependencies $debs
+ dependencies $packages
}
find_config_for_ghc6(){
Modified: packages/haskell-uulib/trunk/src/UU/Parsing/Interface.hs
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/trunk/src/UU/Parsing/Interface.hs?rev=722&op=diff
==============================================================================
--- packages/haskell-uulib/trunk/src/UU/Parsing/Interface.hs (original)
+++ packages/haskell-uulib/trunk/src/UU/Parsing/Interface.hs Mon May 28 15:12:20 2007
@@ -25,37 +25,74 @@
-- ===== PARSER CLASSES ==================================================================
-- =======================================================================================
+-- | The 'IsParser' class contains the base combinators with which
+-- to write parsers. A minimal complete instance definition consists of
+-- definitions for '(<*>)', '(<|>)', 'pSucceed', 'pLow', 'pFail',
+-- 'pCostRange', 'pCostSym', 'getfirsts', 'setfirsts', 'getzerop'
+-- and 'setzerop'.
class IsParser p s | p -> s where
-- | Sequential composition. Often used in combination with <$>.
+ -- The function returned by parsing the left-hand side is applied
+ -- to the value returned by parsing the right-hand side.
(<*>) :: p (a->b) -> p a -> p b
+ -- | Value ignoring versions of sequential composition. These ignore
+ -- either the value returned by the parser on the right-hand side or
+ -- the left-hand side, depending on the visual direction of the
+ -- combinator.
(<* ) :: p a -> p b -> p a
( *>) :: p a -> p b -> p b
-- | Applies the function f to the result of p after parsing p.
(<$>) :: (a->b) -> p a -> p b
(<$ ) :: b -> p a -> p b
+ -- | Two variants of the parser for empty strings. 'pSucceed' parses the
+ -- empty string, and fully counts as an alternative parse. It returns the
+ -- value passed to it.
pSucceed :: a -> p a
+ -- | 'pLow' parses the empty string, but alternatives to pLow are always
+ -- preferred over 'pLow' parsing the empty string.
pLow :: a -> p a
f <$> p = pSucceed f <*> p
f <$ q = pSucceed f <* q
p <* q = pSucceed const <*> p <*> q
p *> q = pSucceed (flip const) <*> p <*> q
- -- | Alternative combinator.
+ -- | Alternative combinator. Succeeds if either of the two arguments
+ -- succeed, and returns the result of the best success parse.
(<|>) :: p a -> p a -> p a
- -- | This parser always fails.
+ -- | This parser always fails, and never returns any value at all.
pFail :: p a
+ -- | Parses a range of symbols with an associated cost and the symbol to
+ -- insert if no symbol in the range is present. Returns the actual symbol
+ -- parsed.
pCostRange :: Int{-#L-} -> s -> SymbolR s -> p s
+ -- | Parses a symbol with an associated cost and the symbol to insert if
+ -- the symbol to parse isn't present. Returns either the symbol parsed or
+ -- the symbol inserted.
pCostSym :: Int{-#L-} -> s -> s -> p s
- -- | Parses a symbol.
+ -- | Parses a symbol. Returns the symbol parsed.
pSym :: s -> p s
pRange :: s -> SymbolR s -> p s
+ -- | Get the firsts set from the parser, i.e. the symbols it expects.
getfirsts :: p v -> Expecting s
+ -- | Set the firsts set in the parser.
setfirsts :: Expecting s -> p v -> p v
pSym a = pCostSym 5{-#L-} a a
pRange = pCostRange 5{-#L-}
+ -- | 'getzerop' returns @Nothing@ if the parser can not parse the empty
+ -- string, and returns @Just p@ with @p@ a parser that parses the empty
+ -- string and returns the appropriate value.
getzerop :: p v -> Maybe (p v)
+ -- | 'getonep' returns @Nothing@ if the parser can only parse the empty
+ -- string, and returns @Just p@ with @p@ a parser that does not parse any
+ -- empty string.
getonep :: p v -> Maybe (p v)
+-- | The fast 'AnaParser' instance of the 'IsParser' class. Note that this
+-- requires a functioning 'Ord' for the symbol type s, as tokens are
+-- often compared using the 'compare' function in 'Ord' rather than always
+-- using '==' rom 'Eq'. The two do need to be consistent though, that is
+-- for any two @x1@, @x2@ such that @x1 == x2@ you must have
+-- @compare x1 x2 == EQ at .
instance (Ord s, Symbol s, InputState state s p, OutputState result) => IsParser (AnaParser state result s p) s where
(<*>) p q = anaSeq libDollar libSeq ($) p q
(<* ) p q = anaSeq libDollarL libSeqL const p q
Modified: packages/haskell-uulib/trunk/src/UU/Parsing/MachineInterface.hs
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-uulib/trunk/src/UU/Parsing/MachineInterface.hs?rev=722&op=diff
==============================================================================
--- packages/haskell-uulib/trunk/src/UU/Parsing/MachineInterface.hs (original)
+++ packages/haskell-uulib/trunk/src/UU/Parsing/MachineInterface.hs Mon May 28 15:12:20 2007
@@ -1,17 +1,33 @@
module UU.Parsing.MachineInterface where
+-- | The 'InputState' class contains the interface that the AnaParser
+-- parsers expect for the input. A minimal complete instance definition
+-- consists of 'splitStateE', 'splitState' and 'getPosition'.
class InputState state s pos | state -> s, state -> pos where
+ -- | Splits the state in a strict variant of 'Either', with 'Left'' if a symbol
+ -- can be split off and 'Right'' if none can
splitStateE :: state -> Either' state s
+ -- | Splits the state in the first symbol and the remaining state
splitState :: state -> ({-#L-} s, state {-L#-})
+ -- | Gets the current position in the input
getPosition :: state -> pos
+ -- | Reports an error
reportError :: Message s pos -> state -> state
reportError _ = id
+ -- | Modify the state as the result of inserting a symbol 's' in the input.
+ -- The symbol that has already been considered as having been inserted
+ -- is passed. It should normally not be added to the state.
insertSymbol :: s -> state -> state
insertSymbol _ = id
+ -- | Modify the state as the result of deleting a symbol 's' from the input.
+ -- The symbol that has already been deleted from the input state is passed.
+ -- It should normally not be deleted from the state.
deleteSymbol :: s -> state -> state
deleteSymbol _ = id
{-# INLINE splitStateE #-}
{-# INLINE splitState #-}
+ {-# INLINE insertSymbol #-}
+ {-# INLINE deleteSymbol #-}
class OutputState r where
acceptR :: v -> rest -> r v rest
More information about the Pkg-haskell-commits
mailing list