summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-haskell/happy/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-haskell/happy/files')
-rw-r--r--dev-haskell/happy/files/happy-1.18.6-man.patch12
-rw-r--r--dev-haskell/happy/files/happy-1.18.9-missing-tests.patch260
-rw-r--r--dev-haskell/happy/files/happy-1.19.5-ghc-7.10.2.patch27
3 files changed, 299 insertions, 0 deletions
diff --git a/dev-haskell/happy/files/happy-1.18.6-man.patch b/dev-haskell/happy/files/happy-1.18.6-man.patch
new file mode 100644
index 000000000000..cd5558cc6607
--- /dev/null
+++ b/dev-haskell/happy/files/happy-1.18.6-man.patch
@@ -0,0 +1,12 @@
+Tue Aug 2 12:16:38 EEST 2011 Sergei Trofimovich <slyfox@community.haskell.org>
+ * doc: make happy.1 be buildabale with doc/configure
+diff -rN -u old-happy/doc/configure.ac new-happy/doc/configure.ac
+--- old-happy/doc/configure.ac 2011-08-02 12:24:20.913926740 +0300
++++ new-happy/doc/configure.ac 2011-08-02 12:24:20.923926615 +0300
+@@ -9,5 +9,5 @@
+
+ AC_PATH_PROG(DbLatexCmd,dblatex)
+
+-AC_CONFIG_FILES([config.mk])
++AC_CONFIG_FILES([config.mk happy.1])
+ AC_OUTPUT
diff --git a/dev-haskell/happy/files/happy-1.18.9-missing-tests.patch b/dev-haskell/happy/files/happy-1.18.9-missing-tests.patch
new file mode 100644
index 000000000000..eb993678723d
--- /dev/null
+++ b/dev-haskell/happy/files/happy-1.18.9-missing-tests.patch
@@ -0,0 +1,260 @@
+--- happy-1.18.9-orig/happy.cabal 2012-02-06 20:49:56.000000000 +1100
++++ happy-1.18.9/happy.cabal 2012-02-07 20:50:33.859004968 +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.9-orig/tests/Makefile 2012-02-06 20:49:55.000000000 +1100
++++ happy-1.18.9/tests/Makefile 2012-02-07 20:50:33.859004968 +1100
+@@ -1,5 +1,5 @@
+ HAPPY=../dist/build/happy/happy
+-HC=ghc
++HC=ghc -hide-all-packages -package base -package array -package mtl
+
+ TESTS = Test.ly TestMulti.ly TestPrecedence.ly bug001.ly \
+ monad001.y monad002.ly precedence001.ly precedence002.y \
+--- /dev/null 2012-02-07 10:04:42.144206507 +1100
++++ happy-1.18.9/tests/AttrGrammar001.y 2012-02-07 20:50:47.013316418 +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 2012-02-07 10:04:42.144206507 +1100
++++ happy-1.18.9/tests/AttrGrammar002.y 2012-02-07 20:50:47.013316418 +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 2012-02-07 10:04:42.144206507 +1100
++++ happy-1.18.9/tests/ParGF.y 2012-02-07 20:50:47.014316443 +1100
+@@ -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 2012-02-07 10:04:42.144206507 +1100
++++ happy-1.18.9/tests/monaderror.y 2012-02-07 20:50:47.015316467 +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)
++}
diff --git a/dev-haskell/happy/files/happy-1.19.5-ghc-7.10.2.patch b/dev-haskell/happy/files/happy-1.19.5-ghc-7.10.2.patch
new file mode 100644
index 000000000000..dee216b029fb
--- /dev/null
+++ b/dev-haskell/happy/files/happy-1.19.5-ghc-7.10.2.patch
@@ -0,0 +1,27 @@
+I'm not sure if it's a ghc feature or a bug.
+Should happy emable that extension for -g option?
+
+The build error is Kind mismatch:
+
+ monad002.g.hs:296:26:
+ Couldn't match kind ‘*’ with ‘#’
+ When matching types
+ t0 :: *
+ Happy_GHC_Exts.Int# :: #
+ Relevant bindings include
+ cont :: t0 -> [Char] -> Int -> ParseResult a
+ (bound at monad002.g.hs:293:13)
+ In the first argument of ‘cont’, namely ‘8#’
+ In the expression: cont 8#
+ In a case alternative: TokenLet -> cont 8#
+
+Slightly related bug: https://ghc.haskell.org/trac/ghc/ticket/8739
+
+diff --git a/tests/monad002.ly b/tests/monad002.ly
+index 35cc5b0..4c526ca 100644
+--- a/tests/monad002.ly
++++ b/tests/monad002.ly
+@@ -5,2 +5,3 @@ Test for monadic Happy Parsers, Simon Marlow 1996.
+ > {-# OPTIONS_GHC -fglasgow-exts #-}
++> {-# LANGUAGE MonoLocalBinds #-}
+ > -- -fglasgow-exts required because P is a type synonym, and Happy uses it