From 49849d7fe381bdf20e66e5255ee7d27a8dc300f9 Mon Sep 17 00:00:00 2001 From: bringert Date: Sat, 20 May 2006 01:41:53 +0000 Subject: Regenerated transfer bnfc stuff with latest bnfc, happy and alex, to be able to compile on GHC CVS. --- src/Transfer/Core/Abs.hs | 137 ++++++++++++++++++++++++----------------------- src/Transfer/Core/Lex.hs | 13 +---- src/Transfer/Core/Lex.x | 2 +- src/Transfer/Core/Par.hs | 22 ++------ src/Transfer/Core/Par.y | 1 + 5 files changed, 76 insertions(+), 99 deletions(-) (limited to 'src/Transfer/Core') diff --git a/src/Transfer/Core/Abs.hs b/src/Transfer/Core/Abs.hs index 8e4de4057..8306d5b46 100644 --- a/src/Transfer/Core/Abs.hs +++ b/src/Transfer/Core/Abs.hs @@ -196,71 +196,72 @@ johnMajorEq _ _ = False instance Ord (Tree c) where compare x y = compare (index x) (index y) `mappend` compareSame x y - where - index (Module _) = 0 - index (DataDecl _ _ _) = 1 - index (TypeDecl _ _) = 2 - index (ValueDecl _ _) = 3 - index (ConsDecl _ _) = 4 - index (PCons _ _) = 5 - index (PVar _) = 6 - index (PRec _) = 7 - index (PStr _) = 8 - index (PInt _) = 9 - index (FieldPattern _ _) = 10 - index (PVVar _) = 11 - index (PVWild ) = 12 - index (ELet _ _) = 13 - index (ECase _ _) = 14 - index (EAbs _ _) = 15 - index (EPi _ _ _) = 16 - index (EApp _ _) = 17 - index (EProj _ _) = 18 - index (ERecType _) = 19 - index (ERec _) = 20 - index (EVar _) = 21 - index (EType ) = 22 - index (EStr _) = 23 - index (EInteger _) = 24 - index (EDouble _) = 25 - index (EMeta _) = 26 - index (LetDef _ _) = 27 - index (Case _ _ _) = 28 - index (FieldType _ _) = 29 - index (FieldValue _ _) = 30 - index (TMeta _) = 31 - index (CIdent _) = 32 - compareSame (Module decls) (Module decls_) = compare decls decls_ - compareSame (DataDecl cident exp consdecls) (DataDecl cident_ exp_ consdecls_) = mappend (compare cident cident_) (mappend (compare exp exp_) (compare consdecls consdecls_)) - compareSame (TypeDecl cident exp) (TypeDecl cident_ exp_) = mappend (compare cident cident_) (compare exp exp_) - compareSame (ValueDecl cident exp) (ValueDecl cident_ exp_) = mappend (compare cident cident_) (compare exp exp_) - compareSame (ConsDecl cident exp) (ConsDecl cident_ exp_) = mappend (compare cident cident_) (compare exp exp_) - compareSame (PCons cident patterns) (PCons cident_ patterns_) = mappend (compare cident cident_) (compare patterns patterns_) - compareSame (PVar patternvariable) (PVar patternvariable_) = compare patternvariable patternvariable_ - compareSame (PRec fieldpatterns) (PRec fieldpatterns_) = compare fieldpatterns fieldpatterns_ - compareSame (PStr str) (PStr str_) = compare str str_ - compareSame (PInt n) (PInt n_) = compare n n_ - compareSame (FieldPattern cident pattern) (FieldPattern cident_ pattern_) = mappend (compare cident cident_) (compare pattern pattern_) - compareSame (PVVar cident) (PVVar cident_) = compare cident cident_ - compareSame PVWild PVWild = EQ - compareSame (ELet letdefs exp) (ELet letdefs_ exp_) = mappend (compare letdefs letdefs_) (compare exp exp_) - compareSame (ECase exp cases) (ECase exp_ cases_) = mappend (compare exp exp_) (compare cases cases_) - compareSame (EAbs patternvariable exp) (EAbs patternvariable_ exp_) = mappend (compare patternvariable patternvariable_) (compare exp exp_) - compareSame (EPi patternvariable exp0 exp1) (EPi patternvariable_ exp0_ exp1_) = mappend (compare patternvariable patternvariable_) (mappend (compare exp0 exp0_) (compare exp1 exp1_)) - compareSame (EApp exp0 exp1) (EApp exp0_ exp1_) = mappend (compare exp0 exp0_) (compare exp1 exp1_) - compareSame (EProj exp cident) (EProj exp_ cident_) = mappend (compare exp exp_) (compare cident cident_) - compareSame (ERecType fieldtypes) (ERecType fieldtypes_) = compare fieldtypes fieldtypes_ - compareSame (ERec fieldvalues) (ERec fieldvalues_) = compare fieldvalues fieldvalues_ - compareSame (EVar cident) (EVar cident_) = compare cident cident_ - compareSame EType EType = EQ - compareSame (EStr str) (EStr str_) = compare str str_ - compareSame (EInteger n) (EInteger n_) = compare n n_ - compareSame (EDouble d) (EDouble d_) = compare d d_ - compareSame (EMeta tmeta) (EMeta tmeta_) = compare tmeta tmeta_ - compareSame (LetDef cident exp) (LetDef cident_ exp_) = mappend (compare cident cident_) (compare exp exp_) - compareSame (Case pattern exp0 exp1) (Case pattern_ exp0_ exp1_) = mappend (compare pattern pattern_) (mappend (compare exp0 exp0_) (compare exp1 exp1_)) - compareSame (FieldType cident exp) (FieldType cident_ exp_) = mappend (compare cident cident_) (compare exp exp_) - compareSame (FieldValue cident exp) (FieldValue cident_ exp_) = mappend (compare cident cident_) (compare exp exp_) - compareSame (TMeta str) (TMeta str_) = compare str str_ - compareSame (CIdent str) (CIdent str_) = compare str str_ - compareSame x y = error "BNFC error:" compareSame +index :: Tree c -> Int +index (Module _) = 0 +index (DataDecl _ _ _) = 1 +index (TypeDecl _ _) = 2 +index (ValueDecl _ _) = 3 +index (ConsDecl _ _) = 4 +index (PCons _ _) = 5 +index (PVar _) = 6 +index (PRec _) = 7 +index (PStr _) = 8 +index (PInt _) = 9 +index (FieldPattern _ _) = 10 +index (PVVar _) = 11 +index (PVWild ) = 12 +index (ELet _ _) = 13 +index (ECase _ _) = 14 +index (EAbs _ _) = 15 +index (EPi _ _ _) = 16 +index (EApp _ _) = 17 +index (EProj _ _) = 18 +index (ERecType _) = 19 +index (ERec _) = 20 +index (EVar _) = 21 +index (EType ) = 22 +index (EStr _) = 23 +index (EInteger _) = 24 +index (EDouble _) = 25 +index (EMeta _) = 26 +index (LetDef _ _) = 27 +index (Case _ _ _) = 28 +index (FieldType _ _) = 29 +index (FieldValue _ _) = 30 +index (TMeta _) = 31 +index (CIdent _) = 32 +compareSame :: Tree c -> Tree c -> Ordering +compareSame (Module decls) (Module decls_) = compare decls decls_ +compareSame (DataDecl cident exp consdecls) (DataDecl cident_ exp_ consdecls_) = mappend (compare cident cident_) (mappend (compare exp exp_) (compare consdecls consdecls_)) +compareSame (TypeDecl cident exp) (TypeDecl cident_ exp_) = mappend (compare cident cident_) (compare exp exp_) +compareSame (ValueDecl cident exp) (ValueDecl cident_ exp_) = mappend (compare cident cident_) (compare exp exp_) +compareSame (ConsDecl cident exp) (ConsDecl cident_ exp_) = mappend (compare cident cident_) (compare exp exp_) +compareSame (PCons cident patterns) (PCons cident_ patterns_) = mappend (compare cident cident_) (compare patterns patterns_) +compareSame (PVar patternvariable) (PVar patternvariable_) = compare patternvariable patternvariable_ +compareSame (PRec fieldpatterns) (PRec fieldpatterns_) = compare fieldpatterns fieldpatterns_ +compareSame (PStr str) (PStr str_) = compare str str_ +compareSame (PInt n) (PInt n_) = compare n n_ +compareSame (FieldPattern cident pattern) (FieldPattern cident_ pattern_) = mappend (compare cident cident_) (compare pattern pattern_) +compareSame (PVVar cident) (PVVar cident_) = compare cident cident_ +compareSame PVWild PVWild = EQ +compareSame (ELet letdefs exp) (ELet letdefs_ exp_) = mappend (compare letdefs letdefs_) (compare exp exp_) +compareSame (ECase exp cases) (ECase exp_ cases_) = mappend (compare exp exp_) (compare cases cases_) +compareSame (EAbs patternvariable exp) (EAbs patternvariable_ exp_) = mappend (compare patternvariable patternvariable_) (compare exp exp_) +compareSame (EPi patternvariable exp0 exp1) (EPi patternvariable_ exp0_ exp1_) = mappend (compare patternvariable patternvariable_) (mappend (compare exp0 exp0_) (compare exp1 exp1_)) +compareSame (EApp exp0 exp1) (EApp exp0_ exp1_) = mappend (compare exp0 exp0_) (compare exp1 exp1_) +compareSame (EProj exp cident) (EProj exp_ cident_) = mappend (compare exp exp_) (compare cident cident_) +compareSame (ERecType fieldtypes) (ERecType fieldtypes_) = compare fieldtypes fieldtypes_ +compareSame (ERec fieldvalues) (ERec fieldvalues_) = compare fieldvalues fieldvalues_ +compareSame (EVar cident) (EVar cident_) = compare cident cident_ +compareSame EType EType = EQ +compareSame (EStr str) (EStr str_) = compare str str_ +compareSame (EInteger n) (EInteger n_) = compare n n_ +compareSame (EDouble d) (EDouble d_) = compare d d_ +compareSame (EMeta tmeta) (EMeta tmeta_) = compare tmeta tmeta_ +compareSame (LetDef cident exp) (LetDef cident_ exp_) = mappend (compare cident cident_) (compare exp exp_) +compareSame (Case pattern exp0 exp1) (Case pattern_ exp0_ exp1_) = mappend (compare pattern pattern_) (mappend (compare exp0 exp0_) (compare exp1 exp1_)) +compareSame (FieldType cident exp) (FieldType cident_ exp_) = mappend (compare cident cident_) (compare exp exp_) +compareSame (FieldValue cident exp) (FieldValue cident_ exp_) = mappend (compare cident cident_) (compare exp exp_) +compareSame (TMeta str) (TMeta str_) = compare str str_ +compareSame (CIdent str) (CIdent str_) = compare str str_ +compareSame x y = error "BNFC error:" compareSame diff --git a/src/Transfer/Core/Lex.hs b/src/Transfer/Core/Lex.hs index dba4b522b..be1198508 100644 --- a/src/Transfer/Core/Lex.hs +++ b/src/Transfer/Core/Lex.hs @@ -1,8 +1,8 @@ {-# OPTIONS -fglasgow-exts -cpp #-} {-# LINE 3 "Transfer/Core/Lex.x" #-} +{-# OPTIONS -fno-warn-incomplete-patterns #-} module Transfer.Core.Lex where -import Transfer.ErrM #if __GLASGOW_HASKELL__ >= 603 @@ -161,18 +161,9 @@ alex_action_9 = tok (\p s -> PT p (TD $ share s)) -- ----------------------------------------------------------------------------- -- INTERNALS and main scanner engine - {-# LINE 35 "GenericTemplate.hs" #-} - - - - - - - - - +{-# LINE 45 "GenericTemplate.hs" #-} data AlexAddr = AlexA# Addr# diff --git a/src/Transfer/Core/Lex.x b/src/Transfer/Core/Lex.x index 92fb9bdae..480f366ae 100644 --- a/src/Transfer/Core/Lex.x +++ b/src/Transfer/Core/Lex.x @@ -1,9 +1,9 @@ -- -*- haskell -*- -- This Alex file was machine-generated by the BNF converter { +{-# OPTIONS -fno-warn-incomplete-patterns #-} module Transfer.Core.Lex where -import Transfer.ErrM } diff --git a/src/Transfer/Core/Par.hs b/src/Transfer/Core/Par.hs index 3dfbb8b03..fec63662a 100644 --- a/src/Transfer/Core/Par.hs +++ b/src/Transfer/Core/Par.hs @@ -1,4 +1,5 @@ {-# OPTIONS -fglasgow-exts -cpp #-} +{-# OPTIONS -fno-warn-incomplete-patterns -fno-warn-overlapping-patterns #-} module Transfer.Core.Par where import Transfer.Core.Abs import Transfer.Core.Lex @@ -903,7 +904,6 @@ myLexer = tokens {-# LINE 1 "GenericTemplate.hs" #-} -- $Id$ - {-# LINE 28 "GenericTemplate.hs" #-} @@ -913,20 +913,11 @@ data Happy_IntList = HappyCons Int# Happy_IntList - {-# LINE 49 "GenericTemplate.hs" #-} - {-# LINE 59 "GenericTemplate.hs" #-} - - - - - - - - +{-# LINE 68 "GenericTemplate.hs" #-} infixr 9 `HappyStk` data HappyStk a = HappyStk a (HappyStk a) @@ -978,14 +969,7 @@ happyDoAction i tk st action | check = indexShortOffAddr happyTable off_i | otherwise = indexShortOffAddr happyDefActions st - - - - - - - - +{-# LINE 127 "GenericTemplate.hs" #-} indexShortOffAddr (HappyA# arr) off = diff --git a/src/Transfer/Core/Par.y b/src/Transfer/Core/Par.y index a7e0bade8..ceeaa313f 100644 --- a/src/Transfer/Core/Par.y +++ b/src/Transfer/Core/Par.y @@ -1,5 +1,6 @@ -- This Happy file was machine-generated by the BNF converter { +{-# OPTIONS -fno-warn-incomplete-patterns -fno-warn-overlapping-patterns #-} module Transfer.Core.Par where import Transfer.Core.Abs import Transfer.Core.Lex -- cgit v1.2.3