Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nest
Gentoo
Haskell
Commits
64e70660
Commit
64e70660
authored
Dec 01, 2011
by
Mark Wright
Browse files
Bump happy to 1.18.8, built with ghc 7.2.2, 7.0.4 and 6.12.3
parent
02a9f968
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
428 additions
and
0 deletions
+428
-0
dev-haskell/happy/Manifest
dev-haskell/happy/Manifest
+4
-0
dev-haskell/happy/files/happy-1.18.8-missing-tests.patch
dev-haskell/happy/files/happy-1.18.8-missing-tests.patch
+339
-0
dev-haskell/happy/happy-1.18.8.ebuild
dev-haskell/happy/happy-1.18.8.ebuild
+74
-0
dev-haskell/happy/metadata.xml
dev-haskell/happy/metadata.xml
+11
-0
No files found.
dev-haskell/happy/Manifest
View file @
64e70660
AUX happy-1.18.6-man.patch 469 RMD160 aaf1f5eaf3ecbf766e1891606228ed146c29de68 SHA1 19af30ec92c4f34729606968d97b8d9ec32f9867 SHA256 7892274f9f0a8a0b884c4a80b852a7f41e43597efc3251613bdab36442dfd791
AUX happy-1.18.6-man.patch 469 RMD160 aaf1f5eaf3ecbf766e1891606228ed146c29de68 SHA1 19af30ec92c4f34729606968d97b8d9ec32f9867 SHA256 7892274f9f0a8a0b884c4a80b852a7f41e43597efc3251613bdab36442dfd791
AUX happy-1.18.6-missing-tests.patch 4051 RMD160 a368840178f9d5243144eaf081b6ddaa6efbd104 SHA1 f4daed3e0e360225437bd84963f33c15cbe14c54 SHA256 ba9de7d686e05e070639303862869c70c08b6d1d4d6b89749fa972b86a4ada08
AUX happy-1.18.6-missing-tests.patch 4051 RMD160 a368840178f9d5243144eaf081b6ddaa6efbd104 SHA1 f4daed3e0e360225437bd84963f33c15cbe14c54 SHA256 ba9de7d686e05e070639303862869c70c08b6d1d4d6b89749fa972b86a4ada08
AUX happy-1.18.8-missing-tests.patch 7959 RMD160 06f7ae8429e3b45f5c1ea9c956fff0f2f2285b38 SHA1 78d7e0eb99224d484d6c30c1cdeb7d6e370a24d8 SHA256 05c3ea0290b2a29b99137d1fef56e54683c0b169e7d92b7420851c98a0a25c24
DIST happy-1.18.2.tar.gz 158782 RMD160 9d42d701c51936d705646f32ac2facbfa305ac70 SHA1 1fe37e97f410dd4b4344d0b01e6a5f7cfeec7cf3 SHA256 7515922f3cfd32cd844a0abfefe0b4871f403f0d869b8644bf9cbfc0b67996ae
DIST happy-1.18.2.tar.gz 158782 RMD160 9d42d701c51936d705646f32ac2facbfa305ac70 SHA1 1fe37e97f410dd4b4344d0b01e6a5f7cfeec7cf3 SHA256 7515922f3cfd32cd844a0abfefe0b4871f403f0d869b8644bf9cbfc0b67996ae
DIST happy-1.18.4.tar.gz 157585 RMD160 846d90e2962c6053acae03ace90de3656ce271b5 SHA1 86c6a61ed8b3909c476c27343f41cb12971d52bd SHA256 909bec4541a92d3765e74756f752514d2d03ec7a5d3e74c18268a57fe7ffa832
DIST happy-1.18.4.tar.gz 157585 RMD160 846d90e2962c6053acae03ace90de3656ce271b5 SHA1 86c6a61ed8b3909c476c27343f41cb12971d52bd SHA256 909bec4541a92d3765e74756f752514d2d03ec7a5d3e74c18268a57fe7ffa832
DIST happy-1.18.6.tar.gz 158096 RMD160 c0d0a69af1ec783e60623b3ee0ce07428bdd128e SHA1 728821fb7c8c4754d20ab240626c17a2c0528828 SHA256 840c8fb6b9795faa4fae3c3bf3fb28ad403bc6891002dc703007870823b7cd60
DIST happy-1.18.6.tar.gz 158096 RMD160 c0d0a69af1ec783e60623b3ee0ce07428bdd128e SHA1 728821fb7c8c4754d20ab240626c17a2c0528828 SHA256 840c8fb6b9795faa4fae3c3bf3fb28ad403bc6891002dc703007870823b7cd60
DIST happy-1.18.8.tar.gz 158307 RMD160 98135e93495f9324b667064294e324184d6a43ad SHA1 6ed94fafb37e35e76d4dfd2f4c4a55915efbcfe6 SHA256 555d9d2b21360d70a17a802bea340051412fcfef9222ba5c38b3d5af3b570dd7
DIST mtl-1.1.0.2.tar.gz 18901 RMD160 e7032fc069c8b24b97725b259d2e6fb05ace208b SHA1 883deca3cdf8052173c995b741bdedccc3c91440 SHA256 a225aaf2b1e337f40c31e5c42f95eec9a4608322b0e4c135d2b31b8421a58d36
DIST mtl-1.1.0.2.tar.gz 18901 RMD160 e7032fc069c8b24b97725b259d2e6fb05ace208b SHA1 883deca3cdf8052173c995b741bdedccc3c91440 SHA256 a225aaf2b1e337f40c31e5c42f95eec9a4608322b0e4c135d2b31b8421a58d36
EBUILD happy-1.18.2.ebuild 961 RMD160 faabb511333499e3a5d4ff66cf82aca7852a46f9 SHA1 4e6e15b8f3d1d4cdf492b3ea34a52f380c993c63 SHA256 e2e8776131ee763d7dde0bb89650f3fc864544c06387d06ef41a2abd4d0bbfe7
EBUILD happy-1.18.2.ebuild 961 RMD160 faabb511333499e3a5d4ff66cf82aca7852a46f9 SHA1 4e6e15b8f3d1d4cdf492b3ea34a52f380c993c63 SHA256 e2e8776131ee763d7dde0bb89650f3fc864544c06387d06ef41a2abd4d0bbfe7
EBUILD happy-1.18.4.ebuild 1629 RMD160 b696d11a74cf5ab4642a37fdcdc30ec70653551c SHA1 ddc210bcc2c7b3acfb8f40300bc7be9d718141dd SHA256 e9990ec2da8e27f9205a7ab40b1c6e26a728a046cad62258009e4be02a1397ce
EBUILD happy-1.18.4.ebuild 1629 RMD160 b696d11a74cf5ab4642a37fdcdc30ec70653551c SHA1 ddc210bcc2c7b3acfb8f40300bc7be9d718141dd SHA256 e9990ec2da8e27f9205a7ab40b1c6e26a728a046cad62258009e4be02a1397ce
EBUILD happy-1.18.6.ebuild 1274 RMD160 e4a3f31ea50c1363bad1cead59cc9e5634c99366 SHA1 b738a89d67f476581884d3a0685aba391c53283d SHA256 0d6f9421721685bee67259535aafbca88dac675c1c8eccf482362082940b997b
EBUILD happy-1.18.6.ebuild 1274 RMD160 e4a3f31ea50c1363bad1cead59cc9e5634c99366 SHA1 b738a89d67f476581884d3a0685aba391c53283d SHA256 0d6f9421721685bee67259535aafbca88dac675c1c8eccf482362082940b997b
EBUILD happy-1.18.8.ebuild 1618 RMD160 28be98351b074c3e745d27cd2d54b3ed98cab2a1 SHA1 4fa3686cc9aca6a75bd71b11074949be9ccd658d SHA256 22e2482f8be36ad3da2607f2c1ee32da8535545ecc89a4ec7cdb9e36be61430a
MISC metadata.xml 307 RMD160 36ac277243f540bf235afc164fb7180214ab48d7 SHA1 b94896fc3c715233323eeba8baf775215904a69e SHA256 ce829be1fc42dd20b0fab8cfda883f3999b32dd93e237db97f5e099e5543828b
dev-haskell/happy/files/happy-1.18.8-missing-tests.patch
0 → 100644
View file @
64e70660
--- happy-1.18.8-orig/happy.cabal 2011-11-23 20:57:45.000000000 +1100
+++ happy-1.18.8/happy.cabal 2011-12-01 12:30:54.352465826 +1100
@@ -100,10 +100,13 @@
templates/GLR_Base.hs
templates/GenericTemplate.hs
templates/GLR_Lib.hs
+ tests/AttrGrammar001.y
+ tests/AttrGrammar002.y
tests/error001.y
tests/error001.stdout
tests/error001.stderr
tests/monad001.y
+ tests/monaderror.y
tests/Makefile
tests/TestMulti.ly
tests/Partial.ly
--- happy-1.18.8-orig/tests/Makefile 2011-11-23 20:57:45.000000000 +1100
+++ happy-1.18.8/tests/Makefile 2011-12-01 14:33:08.456648386 +1100
@@ -1,5 +1,5 @@
HAPPY=../dist/build/happy/happy
-HC=ghc
+HC=ghc -package array -package mtl
TESTS = Test.ly TestMulti.ly TestPrecedence.ly bug001.ly \
monad001.y monad002.ly precedence001.ly precedence002.y \
--- happy-1.18.8-orig/tests/Partial.ly 2011-11-23 20:57:45.000000000 +1100
+++ happy-1.18.8/tests/Partial.ly 2011-12-01 12:52:00.720963536 +1100
@@ -4,7 +4,7 @@
and the type of the tokens the parser reads.
> {
-> import Char
+> import Data.Char
> }
> %name calc Exp
--- happy-1.18.8-orig/tests/TestMulti.ly 2011-11-23 20:57:45.000000000 +1100
+++ happy-1.18.8/tests/TestMulti.ly 2011-12-01 12:52:00.631960738 +1100
@@ -4,7 +4,7 @@
and the type of the tokens the parser reads.
> {
-> import Char
+> import Data.Char
> }
> %name calcExp Exp
--- happy-1.18.8-orig/tests/TestPrecedence.ly 2011-11-23 20:57:45.000000000 +1100
+++ happy-1.18.8/tests/TestPrecedence.ly 2011-12-01 12:52:00.592959512 +1100
@@ -4,7 +4,7 @@
and the type of the tokens the parser reads.
> {
-> import Char
+> import Data.Char
> }
> %name calc
--- happy-1.18.8-orig/tests/monad001.y 2011-11-23 20:57:45.000000000 +1100
+++ happy-1.18.8/tests/monad001.y 2011-12-01 12:52:00.509956904 +1100
@@ -3,8 +3,8 @@
{
module Main where
-import IO
-import Char
+import System.IO
+import Data.Char
}
%name calc
--- happy-1.18.8-orig/tests/monad002.ly 2011-11-23 20:57:45.000000000 +1100
+++ happy-1.18.8/tests/monad002.ly 2011-12-01 12:52:00.444954898 +1100
@@ -5,7 +5,7 @@
> {-# OPTIONS_GHC -fglasgow-exts #-}
> -- -fglasgow-exts required because P is a type synonym, and Happy uses it
> -- unsaturated.
-> import Char
+> import Data.Char
> }
> %name calc
--- happy-1.18.8-orig/tests/precedence001.ly 2011-11-23 20:57:45.000000000 +1100
+++ happy-1.18.8/tests/precedence001.ly 2011-12-01 12:51:58.390890292 +1100
@@ -2,7 +2,7 @@
> {
> module Main where
-> import IO
+> import System.IO
> import Control.Exception as Exception
> }
>
--- happy-1.18.8-orig/tests/precedence002.y 2011-11-23 20:57:45.000000000 +1100
+++ happy-1.18.8/tests/precedence002.y 2011-12-01 12:51:58.148882915 +1100
@@ -2,7 +2,7 @@
{
module Main where
-import IO
+import System.IO
import Control.Exception as Exception
}
--- /dev/null 2011-12-01 11:21:25.890640263 +1100
+++ happy-1.18.8/tests/AttrGrammar001.y 2011-12-01 12:25:51.085873912 +1100
@@ -0,0 +1,68 @@
+{
+import Control.Monad (unless)
+}
+
+%tokentype { Char }
+
+%token a { 'a' }
+%token b { 'b' }
+%token c { 'c' }
+
+%attributetype { Attrs a }
+%attribute value { a }
+%attribute len { Int }
+
+%name parse abcstring
+
+%monad { Maybe }
+
+%%
+
+abcstring
+ : alist blist clist
+ { $$ = $1 ++ $2 ++ $3
+ ; $2.len = $1.len
+ ; $3.len = $1.len
+ }
+
+alist
+ : a alist
+ { $$ = $1 : $>
+ ; $$.len = $>.len + 1
+ }
+ | { $$ = []; $$.len = 0 }
+
+blist
+ : b blist
+ { $$ = $1 : $>
+ ; $>.len = $$.len - 1
+ }
+ | { $$ = []
+ ; where failUnless ($$.len == 0) "blist wrong length"
+ }
+
+clist
+ : c clist
+ { $$ = $1 : $>
+ ; $>.len = $$.len - 1
+ }
+ | { $$ = []
+ ; where failUnless ($$.len == 0) "clist wrong length"
+ }
+
+{
+happyError = error "parse error"
+failUnless b msg = unless b (fail msg)
+
+main = case parse "" of { Just _ ->
+ case parse "abc" of { Just _ ->
+ case parse "aaaabbbbcccc" of { Just _ ->
+ case parse "abbcc" of { Nothing ->
+ case parse "aabcc" of { Nothing ->
+ case parse "aabbc" of { Nothing ->
+ putStrLn "Test works";
+ _ -> quit } ; _ -> quit }; _ -> quit };
+ _ -> quit } ; _ -> quit }; _ -> quit }
+
+quit = putStrLn "Test failed"
+}
--- /dev/null 2011-12-01 11:21:25.890640263 +1100
+++ happy-1.18.8/tests/AttrGrammar002.y 2011-12-01 12:25:51.086873987 +1100
@@ -0,0 +1,58 @@
+
+%tokentype { Char }
+
+%token minus { '-' }
+%token plus { '+' }
+%token one { '1' }
+%token zero { '0' }
+
+%attributetype { Attrs }
+%attribute value { Integer }
+%attribute pos { Int }
+
+%name parse start
+
+%monad { Maybe }
+
+%%
+
+start
+ : num { $$ = $1 }
+
+num
+ : bits { $$ = $1 ; $1.pos = 0 }
+ | plus bits { $$ = $2 ; $2.pos = 0 }
+ | minus bits { $$ = negate $2; $2.pos = 0 }
+
+bits
+ : bit { $$ = $1
+ ; $1.pos = $$.pos
+ }
+
+ | bits bit { $$ = $1 + $2
+ ; $1.pos = $$.pos + 1
+ ; $2.pos = $$.pos
+ }
+
+bit
+ : zero { $$ = 0 }
+ | one { $$ = 2^($$.pos) }
+
+
+{
+happyError msg = fail $ "parse error: "++msg
+
+main = case parse "" of { Nothing ->
+ case parse "abc" of { Nothing ->
+ case parse "0" of { Just 0 ->
+ case parse "1" of { Just 1 ->
+ case parse "101" of { Just 5 ->
+ case parse "111" of { Just 7 ->
+ case parse "10001" of { Just 17 ->
+ putStrLn "Test worked";
+ _ -> quit }; _ -> quit }; _ -> quit };
+ _ -> quit }; _ -> quit }; _ -> quit };
+ _ -> quit }
+
+quit = putStrLn "Test Failed"
+}
--- /dev/null 2011-12-01 11:21:25.890640263 +1100
+++ happy-1.18.8/tests/ParGF.y 2011-08-13 12:54:42.513837256 +1000
@@ -0,0 +1,40 @@
+{-
+
+With Happy 1.17 this file produces "Internal Happy error" when run:
+
+$ happy ParGF.y && runghc ParGF.hs
+ParGF.hs: Internal Happy error
+
+The problem is that we always pass around the "current token". When not
+using %lexer and we've run out of tokens, the current token is notHappyAtAll,
+which gets passed to happyError when there's an error.
+
+-}
+
+{
+}
+
+%name pGrammar
+
+%tokentype { String }
+%error { parseError }
+
+%token
+ 'a' { "a" }
+
+%%
+
+Grammar :: { () }
+Grammar : 'a' 'a' { () }
+
+{
+
+parseError :: [String] -> a
+-- commenting out the below line gets rid of the "Internal Happy Error"
+parseError ("":_) = error "bar"
+parseError _ = error "foo"
+
+main :: IO ()
+main = print $ pGrammar ["a"]
+
+}
--- /dev/null 2011-12-01 11:21:25.890640263 +1100
+++ happy-1.18.8/tests/monaderror.y 2011-12-01 12:17:50.527846027 +1100
@@ -0,0 +1,57 @@
+{
+module Main where
+
+import Data.Char
+import Control.Monad.Error
+import System.Exit
+}
+
+%name parseFoo
+%tokentype { Token }
+%error { handleError }
+
+%monad { ParseM } { (>>=) } { return }
+
+%token
+ 'S' { TokenSucc }
+ 'Z' { TokenZero }
+
+%%
+
+Exp : 'Z' { 0 }
+ | 'S' Exp { $2 + 1 }
+
+{
+
+type ParseM a = Either ParseError a
+data ParseError
+ = ParseError (Maybe Token)
+ | StringError String
+ deriving (Eq,Show)
+instance Error ParseError where
+ strMsg = StringError
+
+data Token
+ = TokenSucc
+ | TokenZero
+ deriving (Eq,Show)
+
+handleError :: [Token] -> ParseM a
+handleError [] = throwError $ ParseError Nothing
+handleError ts = throwError $ ParseError $ Just $ head ts
+
+lexer :: String -> [Token]
+lexer [] = []
+lexer (c:cs)
+ | isSpace c = lexer cs
+ | c == 'S' = TokenSucc:(lexer cs)
+ | c == 'Z' = TokenZero:(lexer cs)
+ | otherwise = error "lexer error"
+
+main :: IO ()
+main = do
+ let tokens = lexer "S S"
+ when (parseFoo tokens /= Left (ParseError Nothing)) $ do
+ print (parseFoo tokens)
+ exitWith (ExitFailure 1)
+}
dev-haskell/happy/happy-1.18.8.ebuild
0 → 100644
View file @
64e70660
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# ebuild generated by hackport 0.2.9
EAPI
=
"3"
CABAL_FEATURES
=
"bin"
inherit base haskell-cabal autotools
DESCRIPTION
=
"Happy is a parser generator for Haskell"
HOMEPAGE
=
"http://www.haskell.org/happy/"
SRC_URI
=
"http://hackage.haskell.org/packages/archive/
${
PN
}
/
${
PV
}
/
${
P
}
.tar.gz"
LICENSE
=
"BSD"
SLOT
=
"0"
KEYWORDS
=
"~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE
=
"doc"
RDEPEND
=
""
DEPEND
=
"
${
RDEPEND
}
>=dev-haskell/cabal-1.2.3
>=dev-haskell/mtl-1.0
>=dev-lang/ghc-6.8.2
dev-lang/perl
doc? ( ~app-text/docbook-xml-dtd-4.2
app-text/docbook-xsl-stylesheets )"
PATCHES
=(
"
${
FILESDIR
}
/
${
PN
}
-1.18.6-man.patch"
"
${
FILESDIR
}
/
${
PN
}
-1.18.8-missing-tests.patch"
)
src_prepare
()
{
base_src_prepare
use doc
&&
cd
doc
&&
eautoconf
}
src_configure
()
{
cabal_src_configure
if
use doc
;
then
cd
doc
&&
econf
||
die
"econf failed in /doc"
fi
}
src_compile
()
{
cabal_src_compile
if
use doc
;
then
cd
doc
&&
emake
-j1
||
die
"emake failed in /doc"
fi
}
src_test
()
{
if
has_version
"dev-haskell/monads-fd"
;
then
sed
-e
's@HC=ghc@HC=ghc -hide-package monads-fd@'
\
-i
"
${
S
}
/tests/Makefile"
||
die
"Could not patch tests Makefile"
fi
if
has_version
"dev-haskell/monads-tf"
;
then
sed
-e
's@HC=ghc@HC=ghc -hide-package monads-tf@'
\
-i
"
${
S
}
/tests/Makefile"
||
die
"Could not patch tests Makefile"
fi
emake
-C
"
${
S
}
/tests/"
||
die
"emake for tests failed"
}
src_install
()
{
cabal_src_install
if
use doc
;
then
cd
doc
dohtml
-r
happy/
*
doman
"
${
S
}
/doc/happy.1"
fi
}
dev-haskell/happy/metadata.xml
0 → 100644
View file @
64e70660
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>
haskell
</herd>
<maintainer>
<email>
haskell@gentoo.org
</email>
</maintainer>
<longdescription>
Happy is a parser generator for Haskell
</longdescription>
</pkgmetadata>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment