code
stringlengths 5
1.03M
| repo_name
stringlengths 5
90
| path
stringlengths 4
158
| license
stringclasses 15
values | size
int64 5
1.03M
| n_ast_errors
int64 0
53.9k
| ast_max_depth
int64 2
4.17k
| n_whitespaces
int64 0
365k
| n_ast_nodes
int64 3
317k
| n_ast_terminals
int64 1
171k
| n_ast_nonterminals
int64 1
146k
| loc
int64 -1
37.3k
| cycloplexity
int64 -1
1.31k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
import Test.HUnit (Assertion, (@=?), runTestTT, Test(..))
import Control.Monad (void)
import LeapYear (isLeapYear)
testCase :: String -> Assertion -> Test
testCase label assertion = TestLabel label (TestCase assertion)
main :: IO ()
main = void $ runTestTT $ TestList
[ TestList isLeapYearTests ]
isLeapYearTests :: [Test]
isLeapYearTests =
[ testCase "vanilla leap year" $
True @=? isLeapYear 1996
, testCase "any old year" $
False @=? isLeapYear 1997
, testCase "century" $
False @=? isLeapYear 1900
, testCase "exceptional century" $
True @=? isLeapYear 2000
] | tfausak/exercism-solutions | haskell/leap/leap_test.hs | mit | 599 | 0 | 8 | 120 | 191 | 101 | 90 | 18 | 1 |
merge xs [] = xs
merge [] ys = ys
merge (x:xs) (y:ys)
| x < y = x : merge xs (y:ys)
| otherwise = y : merge (x:xs) ys
msort [] = []
msort [x] = [x]
msort xs = merge (msort (take h xs)) (msort (drop h xs))
where
h = (length xs) `div` 2
main = do
print $ msort [4, 6, 9, 8, 3, 5, 1, 7, 2]
| shigemk2/haskell_abc | merge.hs | mit | 315 | 0 | 9 | 101 | 228 | 119 | 109 | 11 | 1 |
-- list in haskell.
--
-- 1. list is homogenous. [a]
--
-- 2. string is a list of characters
-- "abc" == ['a', 'b', 'c']
--
-- 3. basic operations
-- ++ concat [1, 2] ++ [3, 4] = [1, 2, 3, 4]
-- : 1:2:[3] = [1, 2, 3]
-- !! get item [1, 2, 3] !! 2 = 3
-- == > < compare by order
-- compare order is from first element to the last element of xs
studyListBasic = "123" == ['1', '2', '3']
&& [1, 2] ++ [3, 4] == [1, 2, 3, 4]
&& 1:2:3:[4] == [1, 2, 3, 4]
&& 1:[2, 3, 4] == [1, 2, 3, 4]
&& [5, 2, 8] !! 1 == 2
&& [2, 8, 3] == [2, 8, 3]
&& [8, 0, 0] > [4, 10, 10, 11]
-- 4. more functions to handle list
-- (1) get elements from list:
-- head tail last init take drop reverse replicate
-- (2) the state of list: length null elem
-- (3) reduce list: minimum maximum sum product
--
-- when use head tail last and init, be careful, do not act on empty list.
studyListHanlders = head [9, 0, 10] == 9
&& tail [9, 0, 10] == [0, 10]
&& last [2, 5, 8] == 8
&& init "12345" == "1234"
&& take 3 [0, 10, 4, 7] == [0, 10, 4]
&& take 0 [0, 10, 4, 7] == []
&& take 100 [0, 10, 4, 7] == [0, 10, 4, 7]
&& drop 2 [0, 10, 4, 7] == [4, 7]
&& drop 0 [0, 10, 4, 7] == [0, 10, 4, 7]
&& drop 100 [0, 10, 4, 7] == []
&& reverse [1, 2, 3] == [3, 2, 1]
&& replicate 3 10 == [10, 10, 10]
&& length [3, 8, 0] == 3
&& null [] == True
&& null [1] == False
&& minimum [2, 9, 10] == 2
&& maximum [2, 9, 10] == 10
&& sum [1, 2, 3] == 6
&& product [2, 3, 4] == 24
&& elem 5 [1, 2, 5] == True
&& elem 0 [1, 2, 5] == False
--
-- 5. ranges
-- you can assign the step for range
-- [2, 4..10] == [2, 4, 6, 8, 10] start with 2, and next is 4, so step is 4-2=2
-- 6. infinite list: cycle, repeat
studyListRanges = [1..4] == [1, 2, 3, 4]
&& [1, 3..8] == [1, 3, 5, 7]
&& [4, 3..1] == [4, 3, 2, 1]
&& ['a'..'d'] == ['a', 'b', 'c', 'd']
&& take 5 (cycle [1, 2, 3]) == [1, 2, 3, 1, 2]
&& take 3 (repeat 10) == [10, 10, 10]
-- 7. list comprehension
-- list comprehension, like set comprehesion.
-- [ x*2 | x <- [1..10], 2*x < 12]
-- output function x*2
-- varibale x
-- input set [1..10]
-- predicate 2*x < 12
--
-- when you not care about a varible, you can just use _
studyListComprehension = [x * 2 | x <- [1..10], mod x 3 == 1, x * 2 < 15] == [2, 8, 14]
&& [x * y | x <- [1..3], y <- [4..5]] == [4, 5, 8, 10, 12, 15]
&& sum [1 | _ <- [1..10]] == 10
main = do
print studyListBasic
print studyListHanlders
print studyListRanges
print studyListComprehension
| ddki/my_study_project | language/haskell/grammer/base/list.hs | mit | 2,644 | 0 | 47 | 807 | 1,082 | 627 | 455 | 42 | 1 |
module Chess.MoveSpec (spec) where
import Test.Hspec
import Control.Monad (liftM)
import Data.Maybe (fromJust, isJust, isNothing)
import Chess.Board
import Chess.Move
import Chess.Game
blackGame :: Game
blackGame = newGame { player = Black }
whiteGame :: Game
whiteGame = newGame { player = White }
spec :: Spec
spec = do
describe "moves" $ do
describe "pawns" $ do
it "should allow white pawns to move twice if not moved" $
moves (whiteGame { board = mvTwice })
`shouldMatchList`
[ Move Basic ('b', 2) ('b', 3)
, Move Basic ('b', 2) ('b', 4)
]
it "should allow black pawns to move twice if not moved" $
moves (blackGame { board = mvTwice })
`shouldMatchList`
[ Move Basic ('b', 7) ('b', 6)
, Move Basic ('b', 7) ('b', 5)
]
it "should allow white pawns to only capture diagonally" $
moves (whiteGame { board = captDiag })
`shouldMatchList`
[ Move Basic ('b', 5) ('a', 6)
, Move Basic ('b', 5) ('c', 6)
]
it "should allow black pawns to only capture diagonally" $
moves (blackGame { board = captDiag })
`shouldMatchList`
[ Move Basic ('a', 6) ('a', 5)
, Move Basic ('a', 6) ('b', 5)
, Move Basic ('c', 6) ('c', 5)
, Move Basic ('c', 6) ('b', 5)
]
describe "king in check" $
it "should only allow moves that stop king being in check" $
moves (blackGame { board = check })
`shouldMatchList`
[ Move Basic ('b', 6) ('a', 5)
, Move Basic ('b', 6) ('a', 6)
, Move Basic ('b', 6) ('a', 7)
, Move Basic ('b', 6) ('c', 5)
, Move Basic ('b', 6) ('c', 6)
, Move Basic ('b', 6) ('c', 7)
]
describe "castling" $ do
it "moving the rook or king should change castling to false" $ do
let gwhite = whiteGame { board = castle }
gblack = blackGame { board = castle }
mvdgs = [ move gwhite (Move Basic ('a', 1) ('a', 2))
, move gwhite (Move Basic ('e', 1) ('e', 2))
, move gwhite (Move Basic ('h', 1) ('h', 2))
, move gblack (Move Basic ('a', 8) ('a', 7))
, move gblack (Move Basic ('e', 8) ('e', 7))
, move gblack (Move Basic ('h', 8) ('h', 7))
]
plrs = replicate 3 White ++ replicate 3 Black
mvdgs `shouldSatisfy` all isJust
zip plrs (map (snd . fromJust) mvdgs) `shouldSatisfy` all (\(p, g) -> not $ castling g p)
it "should not return castling moves if the squares between the rook and king are filled" $
moves newGame `shouldSatisfy` all (\mv -> typ mv /= Castling)
it "should not return castling moves when in check" $
moves (blackGame { board = castleCheck }) `shouldSatisfy` all (\mv -> typ mv /= Castling)
it "should not return castling moves if the king can be captured en route" $
moves (blackGame { board = castlePass }) `shouldSatisfy` all (\mv -> typ mv /= Castling)
it "should return castling moves when conditions hold" $ do
moves (whiteGame { board = castle}) `shouldSatisfy` \mvs -> all (`elem` mvs) [ Move Castling ('e', 1) ('a', 1)
, Move Castling ('e', 1) ('h', 1)
]
moves (blackGame { board = castle}) `shouldSatisfy` \mvs -> all (`elem` mvs) [ Move Castling ('e', 8) ('a', 8)
, Move Castling ('e', 8) ('h', 8)
]
it "should return enPassantMoves when conditions hold" $
moves (whiteGame { board = enPassantBrd, enPassant = Just ('c', 6) })
`shouldMatchList`
[ Move Basic ('d', 5) ('d', 6)
, Move EnPassant ('d', 5) ('c', 6)
]
describe "move" $ do
it "should only allow black player to move own pieces" $
move (blackGame { board = pawnProm }) (Move Basic ('b', 7) ('b', 8)) `shouldSatisfy` isNothing
it "should only allow white player to move own pieces" $
move (whiteGame { board = pawnProm }) (Move Basic ('b', 2) ('b', 1)) `shouldSatisfy` isNothing
it "should change the game player when playing a white basic move" $
move whiteGame (Move Basic ('b', 2) ('b', 3))
`shouldSatisfy`
(\res -> case liftM (player . snd) res of
Just Black -> True
_ -> False)
it "should change the game player when playing a black basic move" $
move blackGame (Move Basic ('b', 7) ('b', 6))
`shouldSatisfy`
(\res -> case liftM (player . snd) res of
Just White -> True
_ -> False)
it "should promote black pawn to queen when pawn reaches rank 1" $
move (blackGame { board = pawnProm }) (Move Basic ('b', 2) ('b', 1))
`shouldSatisfy`
(\res -> case res >>= ((`square` ('b', 1)) . board . snd) of
(Just (Piece Black Queen)) -> True
_ -> False)
it "should promote white pawn to queen when pawn reaches rank 8" $
move (whiteGame { board = pawnProm }) (Move Basic ('b', 7) ('b', 8))
`shouldSatisfy`
(\res -> case res >>= ((`square` ('b', 8)) . board . snd) of
(Just (Piece White Queen)) -> True
_ -> False)
it "should change the game player when playing a black castling move" $
move (blackGame { board = castle }) (Move Castling ('e', 8) ('a', 8))
`shouldSatisfy`
(\res -> case liftM (player . snd) res of
Just White -> True
_ -> False)
it "should change the game player when playing a white castling move" $
move (whiteGame { board = castle }) (Move Castling ('e', 1) ('h', 1))
`shouldSatisfy`
(\res -> case liftM (player . snd) res of
Just Black -> True
_ -> False)
it "should move king to c8 and rook to d8 for black long castling" $
move (blackGame { board = castle }) (Move Castling ('e', 8) ('a', 8))
`shouldSatisfy`
(\res -> case res >>= (`rank` 8) . board . snd of
(Just r) -> r == ([Nothing, Nothing, Just $ Piece Black King, Just $ Piece Black Rook] ++ replicate 3 Nothing ++ [Just $ Piece Black Rook])
_ -> False)
it "should move king to g8 and rook to f8 for black short castling" $
move (blackGame { board = castle }) (Move Castling ('e', 8) ('h', 8))
`shouldSatisfy`
(\res -> case res >>= (`rank` 8) . board . snd of
(Just r) -> r == (((Just $ Piece Black Rook) : replicate 4 Nothing) ++ [Just $ Piece Black Rook, Just $ Piece Black King, Nothing])
_ -> False)
it "should move king to c1 and rook to d1 for white long castling" $
move (whiteGame { board = castle }) (Move Castling ('e', 1) ('a', 1))
`shouldSatisfy`
(\res -> case res >>= (`rank` 1) . board . snd of
(Just r) -> r == ([Nothing, Nothing, Just $ Piece White King, Just $ Piece White Rook] ++ replicate 3 Nothing ++ [Just $ Piece White Rook])
_ -> False)
it "should move king to g1 and rook to f1 for white short castling" $
move (whiteGame { board = castle }) (Move Castling ('e', 1) ('h', 1))
`shouldSatisfy`
(\res -> case res >>= (`rank` 1) . board . snd of
(Just r) -> r == (((Just $ Piece White Rook) : replicate 4 Nothing) ++ [Just $ Piece White Rook, Just $ Piece White King, Nothing])
_ -> False)
it "should set enPassant when pawn makes a double move" $
move whiteGame (Move Basic ('c', 2) ('c', 4))
`shouldSatisfy`
(\res -> case res >>= enPassant . snd of
Just ('c', 3) -> True
_ -> False)
it "should unset enPassant when basic non-double move is made" $
let g = whiteGame { board = enPassantBrd, enPassant = Just ('c', 3) }
in move g (Move Basic ('d', 2) ('d', 3))
`shouldSatisfy`
(\res -> case res >>= enPassant . snd of
Nothing -> True
_ -> False)
it "should capture adjacent pawn when en passant move is made" $
let g = whiteGame { board = enPassantBrd, enPassant = Just ('c', 6) }
in move g (Move EnPassant ('d', 5) ('c', 6))
`shouldSatisfy`
(\res -> case liftM ((==) enPassantBrdCapt . board . snd) res of
(Just b) -> b
_ -> False)
mvTwice :: Board
mvTwice = [ replicate 8 Nothing
, Nothing : (Just $ Piece Black Pawn) : replicate 6 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, Nothing : (Just $ Piece White Pawn) : replicate 6 Nothing
, replicate 8 Nothing
]
captDiag :: Board
captDiag = [ replicate 8 Nothing
, replicate 8 Nothing
, replicate 3 (Just $ Piece Black Pawn) ++ replicate 5 Nothing
, Nothing : (Just $ Piece White Pawn) : replicate 6 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
]
check :: Board
check = [ replicate 8 Nothing
, replicate 8 Nothing
, Nothing : (Just $ Piece Black King) : replicate 6 Nothing
, (Just $ Piece White Pawn) : replicate 7 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, Nothing : (Just $ Piece White Rook) : replicate 6 Nothing
, replicate 8 Nothing
]
pawnProm :: Board
pawnProm = [ replicate 8 Nothing
, Nothing : (Just $ Piece White Pawn) : replicate 6 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, Nothing : (Just $ Piece Black Pawn) : replicate 6 Nothing
, replicate 8 Nothing
]
castleCheck :: Board
castleCheck = [ (Just $ Piece Black Rook) : replicate 3 Nothing ++ [Just $ Piece Black King] ++ replicate 2 Nothing ++ [Just $ Piece Black Rook]
, replicate 8 Nothing
, replicate 4 Nothing ++ [Just $ Piece White Rook] ++ replicate 3 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
]
castlePass :: Board
castlePass = [ (Just $ Piece Black Rook) : replicate 3 Nothing ++ [Just $ Piece Black King] ++ replicate 2 Nothing ++ [Just $ Piece Black Rook]
, replicate 8 Nothing
, replicate 8 (Just $ Piece White Rook)
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
]
castle :: Board
castle = [ (Just $ Piece Black Rook) : replicate 3 Nothing ++ [Just $ Piece Black King] ++ replicate 2 Nothing ++ [Just $ Piece Black Rook]
, (Just $ Piece Black Pawn) : replicate 6 Nothing ++ [Just $ Piece Black Pawn]
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, (Just $ Piece White Pawn) : replicate 6 Nothing ++ [Just $ Piece White Pawn]
, (Just $ Piece White Rook) : replicate 3 Nothing ++ [Just $ Piece White King] ++ replicate 2 Nothing ++ [Just $ Piece White Rook]
]
enPassantBrd :: Board
enPassantBrd = [ replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, Nothing : Nothing : (Just $ Piece Black Pawn) : (Just $ Piece White Pawn) : replicate 4 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
]
enPassantBrdCapt :: Board
enPassantBrdCapt = [ replicate 8 Nothing
, replicate 8 Nothing
, Nothing : Nothing : (Just $ Piece White Pawn) : replicate 5 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
, replicate 8 Nothing
]
| samgd/Chess | test/Chess/MoveSpec.hs | mit | 13,801 | 0 | 23 | 5,719 | 4,270 | 2,294 | 1,976 | 242 | 14 |
module CodeModel.Module where
import CodeModel.Core
import CodeModel.Interface
data Import = Import String
data Module = Module String [Import] [Interface] [Core] [Trait]
instance Show Import where
show (Import s) = "import " ++ s
instance Show Module where
show (Module n ims ins cs ts) = "module " ++ n ++ "\n\n" ++ unlines (map show ims) ++ "\n" ++ unlines (map show ts) ++ unlines (map show ins) ++ unlines (map show cs)
| MarcusVoelker/Recolang | CodeModel/Module.hs | mit | 439 | 0 | 13 | 87 | 182 | 94 | 88 | 9 | 0 |
{-# OPTIONS
-XMultiParamTypeClasses
-XFunctionalDependencies
-XMultiWayIf
-XFlexibleInstances
-XFlexibleContexts
#-}
module Search (Treelike, children, root, graft, SearchPath, TPath, TPath2, path, meTree, cur, curTree, up, down, prev, next, start, changeMe, emptyPath, node, dFSStep, dFSStep2, zipUp) where
import System.Environment
import Control.Monad
import Data.Tree
import Control.Monad.Trans.State
import Utilities
class Treelike a b | a -> b where
children :: a -> [a]
root :: a -> b
graft :: b -> [a] -> a
node :: (Treelike a b) => b -> a
node x = graft x []
instance Treelike (Tree a) a where
children ta = (case ta of Node _ c -> c)
root ta = (case ta of Node a1 _ -> a1)
graft top ts = Node top ts
--another way to make an instance: for a concrete a with function f: a-> a
--instance Treelike a a where
-- children ta = f ta
-- root ta = ta
-- graft top ts = top
--breadcrumbs | c -> a b
class (Treelike a b) => SearchPath a b c | c -> a b where
curTree :: c -> a
cur :: c -> b
down :: c -> c
up :: c -> c
next :: c -> c
prev :: c -> c
hasNext :: c -> Bool
hasPrev :: c -> Bool
hasChild :: c -> Bool
start :: a -> c
changeMe :: a -> c -> c
atTop :: c -> Bool
emptyPath :: c
cur2 :: (Treelike a b) => b -> TPath a b -> b
cur2 y t = case (meTree t) of (Just a) -> cur t
Nothing -> y
--basically a list zipper inside. probably a little overkill.
data TNode a b = TNode {meN :: b
, leftN :: [a]
, rightN :: [a]
}
instance Show b => Show (TNode a b) where
show x = show (meN x)
data TPath a b = TPath {path :: [TNode a b]
, meTree :: Maybe a
}
type TPath2 b = TPath (Tree b) b
instance (Show a , Show b) => Show (TPath a b) where
show x = "(" ++ show (path x) ++ ", " ++ show (meTree x) ++")"
--do not call on empty tree!
--tip :: TPath a b -> b
--tip x = meN (head (path x))
left :: TPath a b -> [a]
left x = leftN (head (path x))
right :: TPath a b -> [a]
right x = rightN (head (path x))
update :: TPath a b -> TNode a b -> Maybe a -> TPath a b
update t n tr =
case (path t) of
(_:parents) -> TPath (n:parents) tr
--error case
--a natural transformation
maybeToList :: Maybe a -> [a]
maybeToList (Just x) = [x]
maybeToList Nothing = []
parentName :: (TPath a b) -> b
parentName t = case (path t) of
(parent:ancestors) -> meN parent
instance (Treelike a b) => SearchPath a b (TPath a b) where
--have to join up! Note this can be made more efficient
curTree t =
case (meTree t) of (Just a) -> a
Nothing -> curTree (up t)
cur t = root (curTree t)
down t =
case (meTree t) of
Nothing -> t
Just tr -> TPath ((TNode (root tr) [] (children tr)):(path t)) Nothing
--also add nth down
up t =
let
childList =
case (meTree t) of
Nothing -> (reverse (left t)) ++ (right t)
Just c -> (reverse (left t)) ++ [c] ++ (right t)
parentTree = graft (parentName t) childList
(_:ancestors) = (path t)
in
TPath ancestors (Just parentTree)
next t =
let
toAppend = maybeToList (meTree t)
in
case (path t) of
(_:_) ->
case (right t) of
[] -> update t (TNode (parentName t) (toAppend ++ (left t)) []) Nothing
(hd:rest) -> update t (TNode (parentName t) (toAppend ++ (left t)) rest) (Just hd)
[] -> t
prev t =
let
toAppend = maybeToList (meTree t)
in
case (path t) of
(_:_) ->
case (left t) of
[] -> update t (TNode (parentName t) [] (toAppend ++ (right t))) Nothing
(hd:rest) -> update t (TNode (parentName t) rest (toAppend ++ (right t))) (Just hd)
hasNext t = case (right t) of
[] -> False
_ -> True
hasPrev t = case (left t) of
[] -> False
_ -> True
hasChild t = case (meTree t) of
Nothing -> False
Just tr ->
case (children tr) of
[] -> False
_ -> True
start x = (TPath [] (Just x))
changeMe s x = x{meTree = Just s}
atTop t = case (path t) of
[] -> True
_ -> False
emptyPath = TPath [] Nothing
zipUp :: (SearchPath a b c) => c -> a
zipUp tp = if atTop tp then curTree tp else zipUp $ up tp
--change this to tell us where it went
dFSStep:: (SearchPath a b c) => (c, Bool) -> (c,Bool)
dFSStep (tpath, done) =
if done
then (tpath,done)
else
if (hasChild tpath)
then (tpath |> down |> next, False)
else (
let
tpath2 = tpath |> up
in
if (atTop tpath2)
then (tpath2, True)
else (tpath2 |> next, False)
)
dFSStep2:: (SearchPath a b c) => State c (b,String)
--(Treelike a b) => b -> State (TPath a b) (b,String)
dFSStep2 = state $ (\tpath ->
if (hasChild tpath)
then
let tpath2 = tpath |> down |> next in
((cur tpath2, "down"), tpath2)
else (
if hasNext tpath
then
let tpath2 = tpath |> next in
((cur tpath2, "down"), tpath2)
else
let
tpath2 = tpath |> up
in
if (atTop tpath2)
then ((cur tpath, "done"), tpath2)
else ((cur (tpath2 |> next), "up"), tpath2 |> next)
))
{-
dFSStep:: (SearchPath a b c) => c -> State c Bool
dFSStep tpath = State (dFSStep')
-}
| holdenlee/fluidity | SeekWhence/formulas/Search.hs | mit | 6,172 | 0 | 20 | 2,498 | 2,208 | 1,169 | 1,039 | -1 | -1 |
module Zwerg.Generator.Item.Weapon (sword) where
import Zwerg.Generator
import Zwerg.Generator.Default
sword :: Generator
sword = Generator swordHatch []
swordHatch :: EntityHatcher
swordHatch = MkEntityHatcher $ do
swordUUID <- generateSkeleton Item
let (<@-) :: Component a -> a -> MonadCompState ()
(<@-) = addComp swordUUID
name <@- "Iron Short Sword"
description <@- "A simple sword with short iron blade"
glyph <@- Glyph '†' (CellColor antiquewhite Nothing)
itemType <@- Weapon
damageChain <@- [ DamageData SingleTarget Slash $ Uniform 1 2 , DamageData SingleTarget Pierce $ Uniform 1 2 ]
slot <@- SingleHand RightHand
return swordUUID
| zmeadows/zwerg | lib/Zwerg/Generator/Item/Weapon.hs | mit | 716 | 0 | 14 | 163 | 200 | 99 | 101 | 17 | 1 |
{- ORMOLU_DISABLE -}
{-
Disable formatting this comment so that fourmolu doesn't complain about
qualified do in the example code.
-}
{- |
Module : Orville.PostgreSQL.Connection
Copyright : Flipstone Technology Partners 2021
License : MIT
This module exports the 'Plan.bind' function as '>>=' so that it can be used in
conjuction with the @QualifiedDo@ language extension to write plans using do
syntax like so:
@
{-# LANGUAGE QualifiedDo #-}
module MyModule where
import qualified Orville.PostgreSQL.Plan.Syntax as PlanSyntax
data FooFamily =
FooFamily
{ foo :: Foo
, children :: [FooChildren]
, pets :: [FooPets]
}
findFooFamily = PlanSyntax.do $
fooHeader <- Plan.findOne fooTable fooIdField
fooChildren <- Plan.findAll fooChildTable fooIdField
fooPets <- Plan.findAll fooPetTable fooIdField
FooFamily
<$> Plan.use fooHeader
<*> Plan.use fooChildren
<*> Plan.use fooPets
@
-}
{- ORMOLU_ENABLE -}
module Orville.PostgreSQL.Plan.Syntax
( (>>=),
)
where
import Prelude ()
import qualified Orville.PostgreSQL.Plan as Plan
{- |
An operator alias of 'Plan.bind' so that it can be used with @QualifiedDo@.
-}
(>>=) ::
Plan.Plan scope param a ->
(Plan.Planned scope param a -> Plan.Plan scope param result) ->
Plan.Plan scope param result
(>>=) = Plan.bind
| flipstone/orville | orville-postgresql-libpq/src/Orville/PostgreSQL/Plan/Syntax.hs | mit | 1,320 | 0 | 10 | 251 | 103 | 63 | 40 | 9 | 1 |
module Holyhaskell.Coconut (coconut,coconutfunc,CoconutDataStruct(..)) where
data CoconutDataStruct = CoconutConstr [Integer] deriving (Show)
coconut :: Integer
coconut = 10
coconutfunc :: CoconutDataStruct -> Int
coconutfunc (CoconutConstr l) = length l
| duikboot/holyhaskell | src/Holyhaskell/Coconut.hs | mit | 257 | 0 | 7 | 30 | 76 | 44 | 32 | 6 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TemplateHaskell #-}
module Data.FreeAgent.Types.Projects where
import qualified Data.ByteString as BS
import Control.Applicative ((<$>), (<*>), empty)
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Data.Data
data Project = Project {
_hours_per_day :: BS.ByteString -- 8.0
, _name :: BS.ByteString -- Test Project
, _created_at :: BS.ByteString -- 2011-09-14T16:05:57Z
, _status :: BS.ByteString -- Active
, _normal_billing_rate :: BS.ByteString -- 0.0
, _contact :: BS.ByteString -- /contacts/1
, _currency :: BS.ByteString -- GBP
, _billing_period :: BS.ByteString -- hour
, _budget_units :: BS.ByteString -- Hours
, _uses_project_invoice_sequence :: Bool
, _budget :: Double
, _is_ir35 :: Bool
, _updated_at :: BS.ByteString -- 2011-09-14T16:05:57Z
} deriving (Show, Data, Typeable)
type Projects = [ Project ]
instance FromJSON Project where
parseJSON (Object v) = Project <$>
v .: "hours_per_day" <*>
v .: "name" <*>
v .: "created_at" <*>
v .: "status" <*>
v .: "normal_billing_rate" <*>
v .: "contact" <*>
v .: "currency" <*>
v .: "billing_period" <*>
v .: "budget_units" <*>
v .: "uses_project_invoice_sequence" <*>
v .: "budget" <*>
v .: "is_ir35" <*>
v .: "updated_at"
parseJSON _ = empty
$(deriveToJSON tail ''Project)
$(makeLenses ''Project)
| perurbis/hfreeagent | src/Data/FreeAgent/Types/Projects.hs | mit | 1,975 | 0 | 31 | 811 | 361 | 211 | 150 | 44 | 0 |
module Chapter07.Chapter7 where
numbers :: (Num a, Ord a) => a -> Integer
numbers x
| x < 0 = -1
| x == 0 = 0
| x > 0 = 1
pal :: [Char] -> Bool
pal xs
| xs == reverse xs = True
| otherwise = False
avgGrade :: (Fractional a, Ord a) => a -> Char
avgGrade x
| y >= 0.9 = 'A'
| y >= 0.8 = 'B'
| y >= 0.7 = 'C'
| y >= 0.59 = 'D'
| otherwise = 'F'
where y = x / 100
avgGrade' :: (Fractional a, Ord a) => a -> Char
avgGrade' x
| y >= 0.7 = 'C'
| y >= 0.9 = 'A'
| y >= 0.8 = 'B'
| y >= 0.59 = 'D'
| otherwise = 'F'
where y = x / 100
dodgy :: Num a => a -> a -> a
dodgy x y = x + y * 10
nums x =
case compare x 0 of
LT -> -1
GT -> 1
_ -> 0
ifEvenAdd2 n = if even n then (n+2) else n
ifEvenAdd2' n =
case even n of
True -> n + 2
_ -> n
functionC x y = if (x > y) then x else y
functionC' x y =
case x > y of
True -> x
_ -> y
f :: (a, b, c) -> (d, e, f) ->
((a, d), (c, f))
f (m, n, o) (p, q, r) =
((m, p), (o, r))
k (x, y) = x
mTh1 x y z = x * y * z
mTh2 x y = \z -> x * y * z
mTh3 x = \y -> \z -> x * y * z
mTh4 = \x -> \y -> \z -> x * y * z
addOneIfOdd n = case odd n of
True -> f n
False -> n
where f = \n -> n + 1
addFive x y =
(if x > y
then y
else x) + 5
mflip f = \x -> \y -> f y x
| brodyberg/LearnHaskell | HaskellProgramming.hsproj/Chapter07/Chapter7.hs | mit | 1,446 | 0 | 9 | 621 | 811 | 422 | 389 | 61 | 3 |
{-# LANGUAGE GeneralizedNewtypeDeriving, DataKinds #-}
{-# LANGUAGE UndecidableInstances, FlexibleInstances, FlexibleContexts #-}
{-# LANGUAGE TypeOperators, DefaultSignatures, ScopedTypeVariables, CPP #-}
#if MIN_VERSION_base(4, 10, 0)
{-# OPTIONS_GHC -Wno-simplifiable-class-constraints #-}
#endif
module Database.Selda.SqlRow
( SqlRow (..), ResultReader
, GSqlRow
, runResultReader, next
) where
import Control.Monad.State.Strict
import Database.Selda.SqlType
import Data.Typeable
import GHC.Generics
import qualified GHC.TypeLits as TL
newtype ResultReader a = R (State [SqlValue] a)
deriving (Functor, Applicative, Monad)
runResultReader :: ResultReader a -> [SqlValue] -> a
runResultReader (R m) = evalState m
next :: ResultReader SqlValue
next = R . state $ \s -> (head s, tail s)
class Typeable a => SqlRow a where
-- | Read the next, potentially composite, result from a stream of columns.
nextResult :: ResultReader a
default nextResult :: (Generic a, GSqlRow (Rep a)) => ResultReader a
nextResult = to <$> gNextResult
-- | The number of nested columns contained in this type.
nestedCols :: Proxy a -> Int
default nestedCols :: (Generic a, GSqlRow (Rep a)) => Proxy a -> Int
nestedCols _ = gNestedCols (Proxy :: Proxy (Rep a))
-- * Generic derivation for SqlRow
class GSqlRow f where
gNextResult :: ResultReader (f x)
gNestedCols :: Proxy f -> Int
instance SqlType a => GSqlRow (K1 i a) where
gNextResult = K1 <$> fromSql <$> next
gNestedCols _ = 1
instance GSqlRow f => GSqlRow (M1 c i f) where
gNextResult = M1 <$> gNextResult
gNestedCols _ = gNestedCols (Proxy :: Proxy f)
instance (GSqlRow a, GSqlRow b) => GSqlRow (a :*: b) where
gNextResult = liftM2 (:*:) gNextResult gNextResult
gNestedCols _ = gNestedCols (Proxy :: Proxy a) + gNestedCols (Proxy :: Proxy b)
instance
(TL.TypeError
( 'TL.Text "Selda currently does not support creating tables from sum types."
'TL.:$$:
'TL.Text "Restrict your table type to a single data constructor."
)) => GSqlRow (a :+: b) where
gNextResult = error "unreachable"
gNestedCols = error "unreachable"
-- * Various instances
instance SqlRow a => SqlRow (Maybe a) where
nextResult = do
xs <- R get
if all isNull (take (nestedCols (Proxy :: Proxy a)) xs)
then return Nothing
else Just <$> nextResult
where
isNull SqlNull = True
isNull _ = False
nestedCols _ = nestedCols (Proxy :: Proxy a)
instance
( Typeable (a, b)
, GSqlRow (Rep (a, b))
) => SqlRow (a, b)
instance
( Typeable (a, b, c)
, GSqlRow (Rep (a, b, c))
) => SqlRow (a, b, c)
instance
( Typeable (a, b, c, d)
, GSqlRow (Rep (a, b, c, d))
) => SqlRow (a, b, c, d)
instance
( Typeable (a, b, c, d, e)
, GSqlRow (Rep (a, b, c, d, e))
) => SqlRow (a, b, c, d, e)
instance
( Typeable (a, b, c, d, e, f)
, GSqlRow (Rep (a, b, c, d, e, f))
) => SqlRow (a, b, c, d, e, f)
instance
( Typeable (a, b, c, d, e, f, g)
, GSqlRow (Rep (a, b, c, d, e, f, g))
) => SqlRow (a, b, c, d, e, f, g)
| valderman/selda | selda/src/Database/Selda/SqlRow.hs | mit | 3,056 | 0 | 15 | 668 | 1,126 | 624 | 502 | 78 | 1 |
-- | Pretty printing functionality.
module Galua.Pretty
( module Text.PrettyPrint
, module Galua.Pretty
) where
import Text.PrettyPrint
class Pretty t where
pp :: t -> Doc
instance Pretty Doc where
pp = id
| GaloisInc/galua | galua-rts/src/Galua/Pretty.hs | mit | 220 | 0 | 7 | 47 | 57 | 33 | 24 | 8 | 0 |
main = do
putStrLn "Hello, World!" | brodyberg/Notes | csv/csv1/src/Main.hs | mit | 37 | 0 | 7 | 8 | 12 | 5 | 7 | 2 | 1 |
{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
module Main where
import System.Environment (getArgs)
import System.Locale (defaultTimeLocale)
import Data.Time (parseTime, getCurrentTimeZone, utcToZonedTime)
import Data.ByteString (ByteString)
import Data.ByteString.Char8 ()
import qualified Data.ByteString.Char8 as BC
import qualified Data.Text.IO as TI
import qualified Data.Text.Encoding as TE
import qualified Data.Conduit as C
import qualified Data.Conduit.Attoparsec as CA
import Network.HTTP.Conduit (parseUrl, withManager, http, urlEncodedBody, Response(..))
import Web.Authenticate.OAuth (OAuth(..), Credential(..), newOAuth, newCredential, signOAuth)
import Control.Monad.IO.Class (liftIO)
import Data.Aeson (json, fromJSON, Result(..))
import qualified Data.Configurator as Conf
import Hstter.Type
twitterUserStreamUrl, twitterUpdateStatusesUrl :: String
twitterUserStreamUrl = "https://userstream.twitter.com/2/user.json"
twitterUpdateStatusesUrl = "https://api.twitter.com/1.1/statuses/update.json"
main :: IO ()
main = do
[confFile, op] <- getArgs
conf <- Conf.load [Conf.Required confFile]
oauth <- makeOAuth conf
cred <- makeCredential conf
case op of
"user-stream" -> userStream oauth cred
"update-statuses" -> updateStatuses oauth cred
_ -> BC.putStrLn "usage: hstter [user-stream | update-statuses]"
where
makeOAuth conf = do
key <- Conf.lookupDefault "" conf "oauthConsumerKey"
secret <- Conf.lookupDefault "" conf "oauthConsumerSecret"
return $ newOAuth
{ oauthConsumerKey = key
, oauthConsumerSecret = secret
}
makeCredential conf = do
token <- Conf.lookupDefault "" conf "accessToken"
secret <- Conf.lookupDefault "" conf "accessSecret"
return $ newCredential token secret
-- userstream を取得しつづける
userStream :: OAuth -> Credential -> IO ()
userStream oauth credential = do
req <- parseUrl twitterUserStreamUrl
withManager $ \manager -> do
signed <- signOAuth oauth credential req
res <- http signed manager
responseBody res C.$$+- statusParser success failure
where
success Status {..} =
case parseCreatedAt createdAt of
Just ctime -> printStatus user ctime
Nothing -> putStrLn "> time parse error: created_at"
where
parseCreatedAt = parseTime defaultTimeLocale "%a %b %d %H:%M:%S %z %Y" . BC.unpack
printStatus (User {..}) ctime = do
tzone <- getCurrentTimeZone
BC.putStrLn $ BC.concat ["> ", screenName, ": ", name, " (", BC.pack . show $ utcToZonedTime tzone ctime, ")"]
TI.putStrLn text
BC.putStrLn $ BC.concat ["(", idStr, ")"]
BC.putStrLn ""
failure m = putStrLn $ "> JSON parse error: " ++ m ++ "\n"
-- -- parser
statusParser :: (Status -> IO ()) -> (String -> IO ()) -> C.Sink ByteString (C.ResourceT IO) ()
statusParser hs hf = do
j <- CA.sinkParser json
liftIO $ case fromJSON j of
Success s -> hs s
Error m -> hf m
statusParser hs hf
-- 自分のステータスを更新する
updateStatuses :: OAuth -> Credential -> IO ()
updateStatuses oauth credential = do
status <- inputStatus
req <- makeRequest twitterUpdateStatusesUrl status
withManager $ \manager -> do
signed <- signOAuth oauth credential req
res <- http signed manager
printResponse res
where
inputStatus = BC.putStr "status=" >> TI.getLine
makeRequest url status = do
req <- parseUrl url
return $ urlEncodedBody
[ ("status", TE.encodeUtf8 status)
] req
printResponse = liftIO . print . responseStatus
| krdlab/hs-twitter-client | Main.hs | mit | 3,886 | 0 | 16 | 1,002 | 1,034 | 535 | 499 | 82 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-alias.html
module Stratosphere.Resources.KMSAlias where
import Stratosphere.ResourceImports
-- | Full data type definition for KMSAlias. See 'kmsAlias' for a more
-- convenient constructor.
data KMSAlias =
KMSAlias
{ _kMSAliasAliasName :: Val Text
, _kMSAliasTargetKeyId :: Val Text
} deriving (Show, Eq)
instance ToResourceProperties KMSAlias where
toResourceProperties KMSAlias{..} =
ResourceProperties
{ resourcePropertiesType = "AWS::KMS::Alias"
, resourcePropertiesProperties =
hashMapFromList $ catMaybes
[ (Just . ("AliasName",) . toJSON) _kMSAliasAliasName
, (Just . ("TargetKeyId",) . toJSON) _kMSAliasTargetKeyId
]
}
-- | Constructor for 'KMSAlias' containing required fields as arguments.
kmsAlias
:: Val Text -- ^ 'kmsaAliasName'
-> Val Text -- ^ 'kmsaTargetKeyId'
-> KMSAlias
kmsAlias aliasNamearg targetKeyIdarg =
KMSAlias
{ _kMSAliasAliasName = aliasNamearg
, _kMSAliasTargetKeyId = targetKeyIdarg
}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-alias.html#cfn-kms-alias-aliasname
kmsaAliasName :: Lens' KMSAlias (Val Text)
kmsaAliasName = lens _kMSAliasAliasName (\s a -> s { _kMSAliasAliasName = a })
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-alias.html#cfn-kms-alias-targetkeyid
kmsaTargetKeyId :: Lens' KMSAlias (Val Text)
kmsaTargetKeyId = lens _kMSAliasTargetKeyId (\s a -> s { _kMSAliasTargetKeyId = a })
| frontrowed/stratosphere | library-gen/Stratosphere/Resources/KMSAlias.hs | mit | 1,699 | 0 | 15 | 256 | 278 | 159 | 119 | 31 | 1 |
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Style.EmacsColours
-- License : GPL-2
-- Copyright : © Mateusz Kowalczyk, 2014
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability : portable
--
-- The 'Color's contained here correspond to the colours one would
-- expect to get in emacs where they are referred to through string
-- literals. One such list can be seen at
-- <http://raebear.net/comp/emacscolors.html>.
--
-- Functions here were generated by 'toHaskell' in the internal
-- module.
module Yi.Style.EmacsColours where
import Yi.Style (Color(RGB))
-- | Names: @["AliceBlue","alice blue"]@
--
-- R240 G248 B255, 0xf0f8ff
aliceBlue :: Color
aliceBlue = RGB 240 248 255
-- | Names: @["AntiqueWhite","antique white"]@
--
-- R250 G235 B215, 0xfaebd7
antiqueWhite :: Color
antiqueWhite = RGB 250 235 215
-- | Names: @["AntiqueWhite1"]@
--
-- R255 G239 B219, 0xffefdb
antiqueWhite1 :: Color
antiqueWhite1 = RGB 255 239 219
-- | Names: @["AntiqueWhite2"]@
--
-- R238 G223 B204, 0xeedfcc
antiqueWhite2 :: Color
antiqueWhite2 = RGB 238 223 204
-- | Names: @["AntiqueWhite3"]@
--
-- R205 G192 B176, 0xcdc0b0
antiqueWhite3 :: Color
antiqueWhite3 = RGB 205 192 176
-- | Names: @["AntiqueWhite4"]@
--
-- R139 G131 B120, 0x8b8378
antiqueWhite4 :: Color
antiqueWhite4 = RGB 139 131 120
-- | Names: @["aquamarine"]@
--
-- R127 G255 B212, 0x7fffd4
aquamarine :: Color
aquamarine = RGB 127 255 212
-- | Names: @["aquamarine1"]@
--
-- R127 G255 B212, 0x7fffd4
aquamarine1 :: Color
aquamarine1 = RGB 127 255 212
-- | Names: @["aquamarine2"]@
--
-- R118 G238 B198, 0x76eec6
aquamarine2 :: Color
aquamarine2 = RGB 118 238 198
-- | Names: @["aquamarine3"]@
--
-- R102 G205 B170, 0x66cdaa
aquamarine3 :: Color
aquamarine3 = RGB 102 205 170
-- | Names: @["aquamarine4"]@
--
-- R69 G139 B116, 0x458b74
aquamarine4 :: Color
aquamarine4 = RGB 69 139 116
-- | Names: @["azure"]@
--
-- R240 G255 B255, 0xf0ffff
azure :: Color
azure = RGB 240 255 255
-- | Names: @["azure1"]@
--
-- R240 G255 B255, 0xf0ffff
azure1 :: Color
azure1 = RGB 240 255 255
-- | Names: @["azure2"]@
--
-- R224 G238 B238, 0xe0eeee
azure2 :: Color
azure2 = RGB 224 238 238
-- | Names: @["azure3"]@
--
-- R193 G205 B205, 0xc1cdcd
azure3 :: Color
azure3 = RGB 193 205 205
-- | Names: @["azure4"]@
--
-- R131 G139 B139, 0x838b8b
azure4 :: Color
azure4 = RGB 131 139 139
-- | Names: @["beige"]@
--
-- R245 G245 B220, 0xf5f5dc
beige :: Color
beige = RGB 245 245 220
-- | Names: @["bisque"]@
--
-- R255 G228 B196, 0xffe4c4
bisque :: Color
bisque = RGB 255 228 196
-- | Names: @["bisque1"]@
--
-- R255 G228 B196, 0xffe4c4
bisque1 :: Color
bisque1 = RGB 255 228 196
-- | Names: @["bisque2"]@
--
-- R238 G213 B183, 0xeed5b7
bisque2 :: Color
bisque2 = RGB 238 213 183
-- | Names: @["bisque3"]@
--
-- R205 G183 B158, 0xcdb79e
bisque3 :: Color
bisque3 = RGB 205 183 158
-- | Names: @["bisque4"]@
--
-- R139 G125 B107, 0x8b7d6b
bisque4 :: Color
bisque4 = RGB 139 125 107
-- | Names: @["black"]@
--
-- R0 G0 B0, 0x000000
black :: Color
black = RGB 0 0 0
-- | Names: @["BlanchedAlmond","blanched almond"]@
--
-- R255 G235 B205, 0xffebcd
blanchedAlmond :: Color
blanchedAlmond = RGB 255 235 205
-- | Names: @["blue"]@
--
-- R0 G0 B255, 0x0000ff
blue :: Color
blue = RGB 0 0 255
-- | Names: @["blue1"]@
--
-- R0 G0 B255, 0x0000ff
blue1 :: Color
blue1 = RGB 0 0 255
-- | Names: @["blue2"]@
--
-- R0 G0 B238, 0x0000ee
blue2 :: Color
blue2 = RGB 0 0 238
-- | Names: @["blue3"]@
--
-- R0 G0 B205, 0x0000cd
blue3 :: Color
blue3 = RGB 0 0 205
-- | Names: @["blue4"]@
--
-- R0 G0 B139, 0x00008b
blue4 :: Color
blue4 = RGB 0 0 139
-- | Names: @["BlueViolet","blue violet"]@
--
-- R138 G43 B226, 0x8a2be2
blueViolet :: Color
blueViolet = RGB 138 43 226
-- | Names: @["brown"]@
--
-- R165 G42 B42, 0xa52a2a
brown :: Color
brown = RGB 165 42 42
-- | Names: @["brown1"]@
--
-- R255 G64 B64, 0xff4040
brown1 :: Color
brown1 = RGB 255 64 64
-- | Names: @["brown2"]@
--
-- R238 G59 B59, 0xee3b3b
brown2 :: Color
brown2 = RGB 238 59 59
-- | Names: @["brown3"]@
--
-- R205 G51 B51, 0xcd3333
brown3 :: Color
brown3 = RGB 205 51 51
-- | Names: @["brown4"]@
--
-- R139 G35 B35, 0x8b2323
brown4 :: Color
brown4 = RGB 139 35 35
-- | Names: @["burlywood"]@
--
-- R222 G184 B135, 0xdeb887
burlywood :: Color
burlywood = RGB 222 184 135
-- | Names: @["burlywood1"]@
--
-- R255 G211 B155, 0xffd39b
burlywood1 :: Color
burlywood1 = RGB 255 211 155
-- | Names: @["burlywood2"]@
--
-- R238 G197 B145, 0xeec591
burlywood2 :: Color
burlywood2 = RGB 238 197 145
-- | Names: @["burlywood3"]@
--
-- R205 G170 B125, 0xcdaa7d
burlywood3 :: Color
burlywood3 = RGB 205 170 125
-- | Names: @["burlywood4"]@
--
-- R139 G115 B85, 0x8b7355
burlywood4 :: Color
burlywood4 = RGB 139 115 85
-- | Names: @["CadetBlue","cadet blue"]@
--
-- R95 G158 B160, 0x5f9ea0
cadetBlue :: Color
cadetBlue = RGB 95 158 160
-- | Names: @["CadetBlue1"]@
--
-- R152 G245 B255, 0x98f5ff
cadetBlue1 :: Color
cadetBlue1 = RGB 152 245 255
-- | Names: @["CadetBlue2"]@
--
-- R142 G229 B238, 0x8ee5ee
cadetBlue2 :: Color
cadetBlue2 = RGB 142 229 238
-- | Names: @["CadetBlue3"]@
--
-- R122 G197 B205, 0x7ac5cd
cadetBlue3 :: Color
cadetBlue3 = RGB 122 197 205
-- | Names: @["CadetBlue4"]@
--
-- R83 G134 B139, 0x53868b
cadetBlue4 :: Color
cadetBlue4 = RGB 83 134 139
-- | Names: @["chartreuse"]@
--
-- R127 G255 B0, 0x7fff00
chartreuse :: Color
chartreuse = RGB 127 255 0
-- | Names: @["chartreuse1"]@
--
-- R127 G255 B0, 0x7fff00
chartreuse1 :: Color
chartreuse1 = RGB 127 255 0
-- | Names: @["chartreuse2"]@
--
-- R118 G238 B0, 0x76ee00
chartreuse2 :: Color
chartreuse2 = RGB 118 238 0
-- | Names: @["chartreuse3"]@
--
-- R102 G205 B0, 0x66cd00
chartreuse3 :: Color
chartreuse3 = RGB 102 205 0
-- | Names: @["chartreuse4"]@
--
-- R69 G139 B0, 0x458b00
chartreuse4 :: Color
chartreuse4 = RGB 69 139 0
-- | Names: @["chocolate"]@
--
-- R210 G105 B30, 0xd2691e
chocolate :: Color
chocolate = RGB 210 105 30
-- | Names: @["chocolate1"]@
--
-- R255 G127 B36, 0xff7f24
chocolate1 :: Color
chocolate1 = RGB 255 127 36
-- | Names: @["chocolate2"]@
--
-- R238 G118 B33, 0xee7621
chocolate2 :: Color
chocolate2 = RGB 238 118 33
-- | Names: @["chocolate3"]@
--
-- R205 G102 B29, 0xcd661d
chocolate3 :: Color
chocolate3 = RGB 205 102 29
-- | Names: @["chocolate4"]@
--
-- R139 G69 B19, 0x8b4513
chocolate4 :: Color
chocolate4 = RGB 139 69 19
-- | Names: @["coral"]@
--
-- R255 G127 B80, 0xff7f50
coral :: Color
coral = RGB 255 127 80
-- | Names: @["coral1"]@
--
-- R255 G114 B86, 0xff7256
coral1 :: Color
coral1 = RGB 255 114 86
-- | Names: @["coral2"]@
--
-- R238 G106 B80, 0xee6a50
coral2 :: Color
coral2 = RGB 238 106 80
-- | Names: @["coral3"]@
--
-- R205 G91 B69, 0xcd5b45
coral3 :: Color
coral3 = RGB 205 91 69
-- | Names: @["coral4"]@
--
-- R139 G62 B47, 0x8b3e2f
coral4 :: Color
coral4 = RGB 139 62 47
-- | Names: @["CornflowerBlue","cornflower blue"]@
--
-- R100 G149 B237, 0x6495ed
cornflowerBlue :: Color
cornflowerBlue = RGB 100 149 237
-- | Names: @["cornsilk"]@
--
-- R255 G248 B220, 0xfff8dc
cornsilk :: Color
cornsilk = RGB 255 248 220
-- | Names: @["cornsilk1"]@
--
-- R255 G248 B220, 0xfff8dc
cornsilk1 :: Color
cornsilk1 = RGB 255 248 220
-- | Names: @["cornsilk2"]@
--
-- R238 G232 B205, 0xeee8cd
cornsilk2 :: Color
cornsilk2 = RGB 238 232 205
-- | Names: @["cornsilk3"]@
--
-- R205 G200 B177, 0xcdc8b1
cornsilk3 :: Color
cornsilk3 = RGB 205 200 177
-- | Names: @["cornsilk4"]@
--
-- R139 G136 B120, 0x8b8878
cornsilk4 :: Color
cornsilk4 = RGB 139 136 120
-- | Names: @["cyan"]@
--
-- R0 G255 B255, 0x00ffff
cyan :: Color
cyan = RGB 0 255 255
-- | Names: @["cyan1"]@
--
-- R0 G255 B255, 0x00ffff
cyan1 :: Color
cyan1 = RGB 0 255 255
-- | Names: @["cyan2"]@
--
-- R0 G238 B238, 0x00eeee
cyan2 :: Color
cyan2 = RGB 0 238 238
-- | Names: @["cyan3"]@
--
-- R0 G205 B205, 0x00cdcd
cyan3 :: Color
cyan3 = RGB 0 205 205
-- | Names: @["cyan4"]@
--
-- R0 G139 B139, 0x008b8b
cyan4 :: Color
cyan4 = RGB 0 139 139
-- | Names: @["DarkBlue","dark blue"]@
--
-- R0 G0 B139, 0x00008b
darkBlue :: Color
darkBlue = RGB 0 0 139
-- | Names: @["DarkCyan","dark cyan"]@
--
-- R0 G139 B139, 0x008b8b
darkCyan :: Color
darkCyan = RGB 0 139 139
-- | Names: @["DarkGoldenrod","dark goldenrod"]@
--
-- R184 G134 B11, 0xb8860b
darkGoldenrod :: Color
darkGoldenrod = RGB 184 134 11
-- | Names: @["DarkGoldenrod1"]@
--
-- R255 G185 B15, 0xffb90f
darkGoldenrod1 :: Color
darkGoldenrod1 = RGB 255 185 15
-- | Names: @["DarkGoldenrod2"]@
--
-- R238 G173 B14, 0xeead0e
darkGoldenrod2 :: Color
darkGoldenrod2 = RGB 238 173 14
-- | Names: @["DarkGoldenrod3"]@
--
-- R205 G149 B12, 0xcd950c
darkGoldenrod3 :: Color
darkGoldenrod3 = RGB 205 149 12
-- | Names: @["DarkGoldenrod4"]@
--
-- R139 G101 B8, 0x8b6508
darkGoldenrod4 :: Color
darkGoldenrod4 = RGB 139 101 8
-- | Names: @["DarkGray","dark gray"]@
--
-- R169 G169 B169, 0xa9a9a9
darkGray :: Color
darkGray = RGB 169 169 169
-- | Names: @["DarkGreen","dark green"]@
--
-- R0 G100 B0, 0x006400
darkGreen :: Color
darkGreen = RGB 0 100 0
-- | Names: @["DarkGrey","dark grey"]@
--
-- R169 G169 B169, 0xa9a9a9
darkGrey :: Color
darkGrey = RGB 169 169 169
-- | Names: @["DarkKhaki","dark khaki"]@
--
-- R189 G183 B107, 0xbdb76b
darkKhaki :: Color
darkKhaki = RGB 189 183 107
-- | Names: @["DarkMagenta","dark magenta"]@
--
-- R139 G0 B139, 0x8b008b
darkMagenta :: Color
darkMagenta = RGB 139 0 139
-- | Names: @["DarkOliveGreen","dark olive green"]@
--
-- R85 G107 B47, 0x556b2f
darkOliveGreen :: Color
darkOliveGreen = RGB 85 107 47
-- | Names: @["DarkOliveGreen1"]@
--
-- R202 G255 B112, 0xcaff70
darkOliveGreen1 :: Color
darkOliveGreen1 = RGB 202 255 112
-- | Names: @["DarkOliveGreen2"]@
--
-- R188 G238 B104, 0xbcee68
darkOliveGreen2 :: Color
darkOliveGreen2 = RGB 188 238 104
-- | Names: @["DarkOliveGreen3"]@
--
-- R162 G205 B90, 0xa2cd5a
darkOliveGreen3 :: Color
darkOliveGreen3 = RGB 162 205 90
-- | Names: @["DarkOliveGreen4"]@
--
-- R110 G139 B61, 0x6e8b3d
darkOliveGreen4 :: Color
darkOliveGreen4 = RGB 110 139 61
-- | Names: @["DarkOrange","dark orange"]@
--
-- R255 G140 B0, 0xff8c00
darkOrange :: Color
darkOrange = RGB 255 140 0
-- | Names: @["DarkOrange1"]@
--
-- R255 G127 B0, 0xff7f00
darkOrange1 :: Color
darkOrange1 = RGB 255 127 0
-- | Names: @["DarkOrange2"]@
--
-- R238 G118 B0, 0xee7600
darkOrange2 :: Color
darkOrange2 = RGB 238 118 0
-- | Names: @["DarkOrange3"]@
--
-- R205 G102 B0, 0xcd6600
darkOrange3 :: Color
darkOrange3 = RGB 205 102 0
-- | Names: @["DarkOrange4"]@
--
-- R139 G69 B0, 0x8b4500
darkOrange4 :: Color
darkOrange4 = RGB 139 69 0
-- | Names: @["DarkOrchid","dark orchid"]@
--
-- R153 G50 B204, 0x9932cc
darkOrchid :: Color
darkOrchid = RGB 153 50 204
-- | Names: @["DarkOrchid1"]@
--
-- R191 G62 B255, 0xbf3eff
darkOrchid1 :: Color
darkOrchid1 = RGB 191 62 255
-- | Names: @["DarkOrchid2"]@
--
-- R178 G58 B238, 0xb23aee
darkOrchid2 :: Color
darkOrchid2 = RGB 178 58 238
-- | Names: @["DarkOrchid3"]@
--
-- R154 G50 B205, 0x9a32cd
darkOrchid3 :: Color
darkOrchid3 = RGB 154 50 205
-- | Names: @["DarkOrchid4"]@
--
-- R104 G34 B139, 0x68228b
darkOrchid4 :: Color
darkOrchid4 = RGB 104 34 139
-- | Names: @["DarkRed","dark red"]@
--
-- R139 G0 B0, 0x8b0000
darkRed :: Color
darkRed = RGB 139 0 0
-- | Names: @["DarkSalmon","dark salmon"]@
--
-- R233 G150 B122, 0xe9967a
darkSalmon :: Color
darkSalmon = RGB 233 150 122
-- | Names: @["DarkSeaGreen","dark sea green"]@
--
-- R143 G188 B143, 0x8fbc8f
darkSeaGreen :: Color
darkSeaGreen = RGB 143 188 143
-- | Names: @["DarkSeaGreen1"]@
--
-- R193 G255 B193, 0xc1ffc1
darkSeaGreen1 :: Color
darkSeaGreen1 = RGB 193 255 193
-- | Names: @["DarkSeaGreen2"]@
--
-- R180 G238 B180, 0xb4eeb4
darkSeaGreen2 :: Color
darkSeaGreen2 = RGB 180 238 180
-- | Names: @["DarkSeaGreen3"]@
--
-- R155 G205 B155, 0x9bcd9b
darkSeaGreen3 :: Color
darkSeaGreen3 = RGB 155 205 155
-- | Names: @["DarkSeaGreen4"]@
--
-- R105 G139 B105, 0x698b69
darkSeaGreen4 :: Color
darkSeaGreen4 = RGB 105 139 105
-- | Names: @["DarkSlateBlue","dark slate blue"]@
--
-- R72 G61 B139, 0x483d8b
darkSlateBlue :: Color
darkSlateBlue = RGB 72 61 139
-- | Names: @["DarkSlateGray","dark slate gray"]@
--
-- R47 G79 B79, 0x2f4f4f
darkSlateGray :: Color
darkSlateGray = RGB 47 79 79
-- | Names: @["DarkSlateGray1"]@
--
-- R151 G255 B255, 0x97ffff
darkSlateGray1 :: Color
darkSlateGray1 = RGB 151 255 255
-- | Names: @["DarkSlateGray2"]@
--
-- R141 G238 B238, 0x8deeee
darkSlateGray2 :: Color
darkSlateGray2 = RGB 141 238 238
-- | Names: @["DarkSlateGray3"]@
--
-- R121 G205 B205, 0x79cdcd
darkSlateGray3 :: Color
darkSlateGray3 = RGB 121 205 205
-- | Names: @["DarkSlateGray4"]@
--
-- R82 G139 B139, 0x528b8b
darkSlateGray4 :: Color
darkSlateGray4 = RGB 82 139 139
-- | Names: @["DarkSlateGrey","dark slate grey"]@
--
-- R47 G79 B79, 0x2f4f4f
darkSlateGrey :: Color
darkSlateGrey = RGB 47 79 79
-- | Names: @["DarkTurquoise","dark turquoise"]@
--
-- R0 G206 B209, 0x00ced1
darkTurquoise :: Color
darkTurquoise = RGB 0 206 209
-- | Names: @["DarkViolet","dark violet"]@
--
-- R148 G0 B211, 0x9400d3
darkViolet :: Color
darkViolet = RGB 148 0 211
-- | Names: @["DeepPink","deep pink"]@
--
-- R255 G20 B147, 0xff1493
deepPink :: Color
deepPink = RGB 255 20 147
-- | Names: @["DeepPink1"]@
--
-- R255 G20 B147, 0xff1493
deepPink1 :: Color
deepPink1 = RGB 255 20 147
-- | Names: @["DeepPink2"]@
--
-- R238 G18 B137, 0xee1289
deepPink2 :: Color
deepPink2 = RGB 238 18 137
-- | Names: @["DeepPink3"]@
--
-- R205 G16 B118, 0xcd1076
deepPink3 :: Color
deepPink3 = RGB 205 16 118
-- | Names: @["DeepPink4"]@
--
-- R139 G10 B80, 0x8b0a50
deepPink4 :: Color
deepPink4 = RGB 139 10 80
-- | Names: @["DeepSkyBlue","deep sky blue"]@
--
-- R0 G191 B255, 0x00bfff
deepSkyBlue :: Color
deepSkyBlue = RGB 0 191 255
-- | Names: @["DeepSkyBlue1"]@
--
-- R0 G191 B255, 0x00bfff
deepSkyBlue1 :: Color
deepSkyBlue1 = RGB 0 191 255
-- | Names: @["DeepSkyBlue2"]@
--
-- R0 G178 B238, 0x00b2ee
deepSkyBlue2 :: Color
deepSkyBlue2 = RGB 0 178 238
-- | Names: @["DeepSkyBlue3"]@
--
-- R0 G154 B205, 0x009acd
deepSkyBlue3 :: Color
deepSkyBlue3 = RGB 0 154 205
-- | Names: @["DeepSkyBlue4"]@
--
-- R0 G104 B139, 0x00688b
deepSkyBlue4 :: Color
deepSkyBlue4 = RGB 0 104 139
-- | Names: @["DimGray","dim gray"]@
--
-- R105 G105 B105, 0x696969
dimGray :: Color
dimGray = RGB 105 105 105
-- | Names: @["DimGrey","dim grey"]@
--
-- R105 G105 B105, 0x696969
dimGrey :: Color
dimGrey = RGB 105 105 105
-- | Names: @["DodgerBlue","dodger blue"]@
--
-- R30 G144 B255, 0x1e90ff
dodgerBlue :: Color
dodgerBlue = RGB 30 144 255
-- | Names: @["DodgerBlue1"]@
--
-- R30 G144 B255, 0x1e90ff
dodgerBlue1 :: Color
dodgerBlue1 = RGB 30 144 255
-- | Names: @["DodgerBlue2"]@
--
-- R28 G134 B238, 0x1c86ee
dodgerBlue2 :: Color
dodgerBlue2 = RGB 28 134 238
-- | Names: @["DodgerBlue3"]@
--
-- R24 G116 B205, 0x1874cd
dodgerBlue3 :: Color
dodgerBlue3 = RGB 24 116 205
-- | Names: @["DodgerBlue4"]@
--
-- R16 G78 B139, 0x104e8b
dodgerBlue4 :: Color
dodgerBlue4 = RGB 16 78 139
-- | Names: @["firebrick"]@
--
-- R178 G34 B34, 0xb22222
firebrick :: Color
firebrick = RGB 178 34 34
-- | Names: @["firebrick1"]@
--
-- R255 G48 B48, 0xff3030
firebrick1 :: Color
firebrick1 = RGB 255 48 48
-- | Names: @["firebrick2"]@
--
-- R238 G44 B44, 0xee2c2c
firebrick2 :: Color
firebrick2 = RGB 238 44 44
-- | Names: @["firebrick3"]@
--
-- R205 G38 B38, 0xcd2626
firebrick3 :: Color
firebrick3 = RGB 205 38 38
-- | Names: @["firebrick4"]@
--
-- R139 G26 B26, 0x8b1a1a
firebrick4 :: Color
firebrick4 = RGB 139 26 26
-- | Names: @["FloralWhite","floral white"]@
--
-- R255 G250 B240, 0xfffaf0
floralWhite :: Color
floralWhite = RGB 255 250 240
-- | Names: @["ForestGreen","forest green"]@
--
-- R34 G139 B34, 0x228b22
forestGreen :: Color
forestGreen = RGB 34 139 34
-- | Names: @["gainsboro"]@
--
-- R220 G220 B220, 0xdcdcdc
gainsboro :: Color
gainsboro = RGB 220 220 220
-- | Names: @["GhostWhite","ghost white"]@
--
-- R248 G248 B255, 0xf8f8ff
ghostWhite :: Color
ghostWhite = RGB 248 248 255
-- | Names: @["gold"]@
--
-- R255 G215 B0, 0xffd700
gold :: Color
gold = RGB 255 215 0
-- | Names: @["gold1"]@
--
-- R255 G215 B0, 0xffd700
gold1 :: Color
gold1 = RGB 255 215 0
-- | Names: @["gold2"]@
--
-- R238 G201 B0, 0xeec900
gold2 :: Color
gold2 = RGB 238 201 0
-- | Names: @["gold3"]@
--
-- R205 G173 B0, 0xcdad00
gold3 :: Color
gold3 = RGB 205 173 0
-- | Names: @["gold4"]@
--
-- R139 G117 B0, 0x8b7500
gold4 :: Color
gold4 = RGB 139 117 0
-- | Names: @["goldenrod"]@
--
-- R218 G165 B32, 0xdaa520
goldenrod :: Color
goldenrod = RGB 218 165 32
-- | Names: @["goldenrod1"]@
--
-- R255 G193 B37, 0xffc125
goldenrod1 :: Color
goldenrod1 = RGB 255 193 37
-- | Names: @["goldenrod2"]@
--
-- R238 G180 B34, 0xeeb422
goldenrod2 :: Color
goldenrod2 = RGB 238 180 34
-- | Names: @["goldenrod3"]@
--
-- R205 G155 B29, 0xcd9b1d
goldenrod3 :: Color
goldenrod3 = RGB 205 155 29
-- | Names: @["goldenrod4"]@
--
-- R139 G105 B20, 0x8b6914
goldenrod4 :: Color
goldenrod4 = RGB 139 105 20
-- | Names: @["gray"]@
--
-- R190 G190 B190, 0xbebebe
gray :: Color
gray = RGB 190 190 190
-- | Names: @["gray0"]@
--
-- R0 G0 B0, 0x000000
gray0 :: Color
gray0 = RGB 0 0 0
-- | Names: @["gray1"]@
--
-- R3 G3 B3, 0x030303
gray1 :: Color
gray1 = RGB 3 3 3
-- | Names: @["gray10"]@
--
-- R26 G26 B26, 0x1a1a1a
gray10 :: Color
gray10 = RGB 26 26 26
-- | Names: @["gray100"]@
--
-- R255 G255 B255, 0xffffff
gray100 :: Color
gray100 = RGB 255 255 255
-- | Names: @["gray11"]@
--
-- R28 G28 B28, 0x1c1c1c
gray11 :: Color
gray11 = RGB 28 28 28
-- | Names: @["gray12"]@
--
-- R31 G31 B31, 0x1f1f1f
gray12 :: Color
gray12 = RGB 31 31 31
-- | Names: @["gray13"]@
--
-- R33 G33 B33, 0x212121
gray13 :: Color
gray13 = RGB 33 33 33
-- | Names: @["gray14"]@
--
-- R36 G36 B36, 0x242424
gray14 :: Color
gray14 = RGB 36 36 36
-- | Names: @["gray15"]@
--
-- R38 G38 B38, 0x262626
gray15 :: Color
gray15 = RGB 38 38 38
-- | Names: @["gray16"]@
--
-- R41 G41 B41, 0x292929
gray16 :: Color
gray16 = RGB 41 41 41
-- | Names: @["gray17"]@
--
-- R43 G43 B43, 0x2b2b2b
gray17 :: Color
gray17 = RGB 43 43 43
-- | Names: @["gray18"]@
--
-- R46 G46 B46, 0x2e2e2e
gray18 :: Color
gray18 = RGB 46 46 46
-- | Names: @["gray19"]@
--
-- R48 G48 B48, 0x303030
gray19 :: Color
gray19 = RGB 48 48 48
-- | Names: @["gray2"]@
--
-- R5 G5 B5, 0x050505
gray2 :: Color
gray2 = RGB 5 5 5
-- | Names: @["gray20"]@
--
-- R51 G51 B51, 0x333333
gray20 :: Color
gray20 = RGB 51 51 51
-- | Names: @["gray21"]@
--
-- R54 G54 B54, 0x363636
gray21 :: Color
gray21 = RGB 54 54 54
-- | Names: @["gray22"]@
--
-- R56 G56 B56, 0x383838
gray22 :: Color
gray22 = RGB 56 56 56
-- | Names: @["gray23"]@
--
-- R59 G59 B59, 0x3b3b3b
gray23 :: Color
gray23 = RGB 59 59 59
-- | Names: @["gray24"]@
--
-- R61 G61 B61, 0x3d3d3d
gray24 :: Color
gray24 = RGB 61 61 61
-- | Names: @["gray25"]@
--
-- R64 G64 B64, 0x404040
gray25 :: Color
gray25 = RGB 64 64 64
-- | Names: @["gray26"]@
--
-- R66 G66 B66, 0x424242
gray26 :: Color
gray26 = RGB 66 66 66
-- | Names: @["gray27"]@
--
-- R69 G69 B69, 0x454545
gray27 :: Color
gray27 = RGB 69 69 69
-- | Names: @["gray28"]@
--
-- R71 G71 B71, 0x474747
gray28 :: Color
gray28 = RGB 71 71 71
-- | Names: @["gray29"]@
--
-- R74 G74 B74, 0x4a4a4a
gray29 :: Color
gray29 = RGB 74 74 74
-- | Names: @["gray3"]@
--
-- R8 G8 B8, 0x080808
gray3 :: Color
gray3 = RGB 8 8 8
-- | Names: @["gray30"]@
--
-- R77 G77 B77, 0x4d4d4d
gray30 :: Color
gray30 = RGB 77 77 77
-- | Names: @["gray31"]@
--
-- R79 G79 B79, 0x4f4f4f
gray31 :: Color
gray31 = RGB 79 79 79
-- | Names: @["gray32"]@
--
-- R82 G82 B82, 0x525252
gray32 :: Color
gray32 = RGB 82 82 82
-- | Names: @["gray33"]@
--
-- R84 G84 B84, 0x545454
gray33 :: Color
gray33 = RGB 84 84 84
-- | Names: @["gray34"]@
--
-- R87 G87 B87, 0x575757
gray34 :: Color
gray34 = RGB 87 87 87
-- | Names: @["gray35"]@
--
-- R89 G89 B89, 0x595959
gray35 :: Color
gray35 = RGB 89 89 89
-- | Names: @["gray36"]@
--
-- R92 G92 B92, 0x5c5c5c
gray36 :: Color
gray36 = RGB 92 92 92
-- | Names: @["gray37"]@
--
-- R94 G94 B94, 0x5e5e5e
gray37 :: Color
gray37 = RGB 94 94 94
-- | Names: @["gray38"]@
--
-- R97 G97 B97, 0x616161
gray38 :: Color
gray38 = RGB 97 97 97
-- | Names: @["gray39"]@
--
-- R99 G99 B99, 0x636363
gray39 :: Color
gray39 = RGB 99 99 99
-- | Names: @["gray4"]@
--
-- R10 G10 B10, 0x0a0a0a
gray4 :: Color
gray4 = RGB 10 10 10
-- | Names: @["gray40"]@
--
-- R102 G102 B102, 0x666666
gray40 :: Color
gray40 = RGB 102 102 102
-- | Names: @["gray41"]@
--
-- R105 G105 B105, 0x696969
gray41 :: Color
gray41 = RGB 105 105 105
-- | Names: @["gray42"]@
--
-- R107 G107 B107, 0x6b6b6b
gray42 :: Color
gray42 = RGB 107 107 107
-- | Names: @["gray43"]@
--
-- R110 G110 B110, 0x6e6e6e
gray43 :: Color
gray43 = RGB 110 110 110
-- | Names: @["gray44"]@
--
-- R112 G112 B112, 0x707070
gray44 :: Color
gray44 = RGB 112 112 112
-- | Names: @["gray45"]@
--
-- R115 G115 B115, 0x737373
gray45 :: Color
gray45 = RGB 115 115 115
-- | Names: @["gray46"]@
--
-- R117 G117 B117, 0x757575
gray46 :: Color
gray46 = RGB 117 117 117
-- | Names: @["gray47"]@
--
-- R120 G120 B120, 0x787878
gray47 :: Color
gray47 = RGB 120 120 120
-- | Names: @["gray48"]@
--
-- R122 G122 B122, 0x7a7a7a
gray48 :: Color
gray48 = RGB 122 122 122
-- | Names: @["gray49"]@
--
-- R125 G125 B125, 0x7d7d7d
gray49 :: Color
gray49 = RGB 125 125 125
-- | Names: @["gray5"]@
--
-- R13 G13 B13, 0x0d0d0d
gray5 :: Color
gray5 = RGB 13 13 13
-- | Names: @["gray50"]@
--
-- R127 G127 B127, 0x7f7f7f
gray50 :: Color
gray50 = RGB 127 127 127
-- | Names: @["gray51"]@
--
-- R130 G130 B130, 0x828282
gray51 :: Color
gray51 = RGB 130 130 130
-- | Names: @["gray52"]@
--
-- R133 G133 B133, 0x858585
gray52 :: Color
gray52 = RGB 133 133 133
-- | Names: @["gray53"]@
--
-- R135 G135 B135, 0x878787
gray53 :: Color
gray53 = RGB 135 135 135
-- | Names: @["gray54"]@
--
-- R138 G138 B138, 0x8a8a8a
gray54 :: Color
gray54 = RGB 138 138 138
-- | Names: @["gray55"]@
--
-- R140 G140 B140, 0x8c8c8c
gray55 :: Color
gray55 = RGB 140 140 140
-- | Names: @["gray56"]@
--
-- R143 G143 B143, 0x8f8f8f
gray56 :: Color
gray56 = RGB 143 143 143
-- | Names: @["gray57"]@
--
-- R145 G145 B145, 0x919191
gray57 :: Color
gray57 = RGB 145 145 145
-- | Names: @["gray58"]@
--
-- R148 G148 B148, 0x949494
gray58 :: Color
gray58 = RGB 148 148 148
-- | Names: @["gray59"]@
--
-- R150 G150 B150, 0x969696
gray59 :: Color
gray59 = RGB 150 150 150
-- | Names: @["gray6"]@
--
-- R15 G15 B15, 0x0f0f0f
gray6 :: Color
gray6 = RGB 15 15 15
-- | Names: @["gray60"]@
--
-- R153 G153 B153, 0x999999
gray60 :: Color
gray60 = RGB 153 153 153
-- | Names: @["gray61"]@
--
-- R156 G156 B156, 0x9c9c9c
gray61 :: Color
gray61 = RGB 156 156 156
-- | Names: @["gray62"]@
--
-- R158 G158 B158, 0x9e9e9e
gray62 :: Color
gray62 = RGB 158 158 158
-- | Names: @["gray63"]@
--
-- R161 G161 B161, 0xa1a1a1
gray63 :: Color
gray63 = RGB 161 161 161
-- | Names: @["gray64"]@
--
-- R163 G163 B163, 0xa3a3a3
gray64 :: Color
gray64 = RGB 163 163 163
-- | Names: @["gray65"]@
--
-- R166 G166 B166, 0xa6a6a6
gray65 :: Color
gray65 = RGB 166 166 166
-- | Names: @["gray66"]@
--
-- R168 G168 B168, 0xa8a8a8
gray66 :: Color
gray66 = RGB 168 168 168
-- | Names: @["gray67"]@
--
-- R171 G171 B171, 0xababab
gray67 :: Color
gray67 = RGB 171 171 171
-- | Names: @["gray68"]@
--
-- R173 G173 B173, 0xadadad
gray68 :: Color
gray68 = RGB 173 173 173
-- | Names: @["gray69"]@
--
-- R176 G176 B176, 0xb0b0b0
gray69 :: Color
gray69 = RGB 176 176 176
-- | Names: @["gray7"]@
--
-- R18 G18 B18, 0x121212
gray7 :: Color
gray7 = RGB 18 18 18
-- | Names: @["gray70"]@
--
-- R179 G179 B179, 0xb3b3b3
gray70 :: Color
gray70 = RGB 179 179 179
-- | Names: @["gray71"]@
--
-- R181 G181 B181, 0xb5b5b5
gray71 :: Color
gray71 = RGB 181 181 181
-- | Names: @["gray72"]@
--
-- R184 G184 B184, 0xb8b8b8
gray72 :: Color
gray72 = RGB 184 184 184
-- | Names: @["gray73"]@
--
-- R186 G186 B186, 0xbababa
gray73 :: Color
gray73 = RGB 186 186 186
-- | Names: @["gray74"]@
--
-- R189 G189 B189, 0xbdbdbd
gray74 :: Color
gray74 = RGB 189 189 189
-- | Names: @["gray75"]@
--
-- R191 G191 B191, 0xbfbfbf
gray75 :: Color
gray75 = RGB 191 191 191
-- | Names: @["gray76"]@
--
-- R194 G194 B194, 0xc2c2c2
gray76 :: Color
gray76 = RGB 194 194 194
-- | Names: @["gray77"]@
--
-- R196 G196 B196, 0xc4c4c4
gray77 :: Color
gray77 = RGB 196 196 196
-- | Names: @["gray78"]@
--
-- R199 G199 B199, 0xc7c7c7
gray78 :: Color
gray78 = RGB 199 199 199
-- | Names: @["gray79"]@
--
-- R201 G201 B201, 0xc9c9c9
gray79 :: Color
gray79 = RGB 201 201 201
-- | Names: @["gray8"]@
--
-- R20 G20 B20, 0x141414
gray8 :: Color
gray8 = RGB 20 20 20
-- | Names: @["gray80"]@
--
-- R204 G204 B204, 0xcccccc
gray80 :: Color
gray80 = RGB 204 204 204
-- | Names: @["gray81"]@
--
-- R207 G207 B207, 0xcfcfcf
gray81 :: Color
gray81 = RGB 207 207 207
-- | Names: @["gray82"]@
--
-- R209 G209 B209, 0xd1d1d1
gray82 :: Color
gray82 = RGB 209 209 209
-- | Names: @["gray83"]@
--
-- R212 G212 B212, 0xd4d4d4
gray83 :: Color
gray83 = RGB 212 212 212
-- | Names: @["gray84"]@
--
-- R214 G214 B214, 0xd6d6d6
gray84 :: Color
gray84 = RGB 214 214 214
-- | Names: @["gray85"]@
--
-- R217 G217 B217, 0xd9d9d9
gray85 :: Color
gray85 = RGB 217 217 217
-- | Names: @["gray86"]@
--
-- R219 G219 B219, 0xdbdbdb
gray86 :: Color
gray86 = RGB 219 219 219
-- | Names: @["gray87"]@
--
-- R222 G222 B222, 0xdedede
gray87 :: Color
gray87 = RGB 222 222 222
-- | Names: @["gray88"]@
--
-- R224 G224 B224, 0xe0e0e0
gray88 :: Color
gray88 = RGB 224 224 224
-- | Names: @["gray89"]@
--
-- R227 G227 B227, 0xe3e3e3
gray89 :: Color
gray89 = RGB 227 227 227
-- | Names: @["gray9"]@
--
-- R23 G23 B23, 0x171717
gray9 :: Color
gray9 = RGB 23 23 23
-- | Names: @["gray90"]@
--
-- R229 G229 B229, 0xe5e5e5
gray90 :: Color
gray90 = RGB 229 229 229
-- | Names: @["gray91"]@
--
-- R232 G232 B232, 0xe8e8e8
gray91 :: Color
gray91 = RGB 232 232 232
-- | Names: @["gray92"]@
--
-- R235 G235 B235, 0xebebeb
gray92 :: Color
gray92 = RGB 235 235 235
-- | Names: @["gray93"]@
--
-- R237 G237 B237, 0xededed
gray93 :: Color
gray93 = RGB 237 237 237
-- | Names: @["gray94"]@
--
-- R240 G240 B240, 0xf0f0f0
gray94 :: Color
gray94 = RGB 240 240 240
-- | Names: @["gray95"]@
--
-- R242 G242 B242, 0xf2f2f2
gray95 :: Color
gray95 = RGB 242 242 242
-- | Names: @["gray96"]@
--
-- R245 G245 B245, 0xf5f5f5
gray96 :: Color
gray96 = RGB 245 245 245
-- | Names: @["gray97"]@
--
-- R247 G247 B247, 0xf7f7f7
gray97 :: Color
gray97 = RGB 247 247 247
-- | Names: @["gray98"]@
--
-- R250 G250 B250, 0xfafafa
gray98 :: Color
gray98 = RGB 250 250 250
-- | Names: @["gray99"]@
--
-- R252 G252 B252, 0xfcfcfc
gray99 :: Color
gray99 = RGB 252 252 252
-- | Names: @["green"]@
--
-- R0 G255 B0, 0x00ff00
green :: Color
green = RGB 0 255 0
-- | Names: @["green1"]@
--
-- R0 G255 B0, 0x00ff00
green1 :: Color
green1 = RGB 0 255 0
-- | Names: @["green2"]@
--
-- R0 G238 B0, 0x00ee00
green2 :: Color
green2 = RGB 0 238 0
-- | Names: @["green3"]@
--
-- R0 G205 B0, 0x00cd00
green3 :: Color
green3 = RGB 0 205 0
-- | Names: @["green4"]@
--
-- R0 G139 B0, 0x008b00
green4 :: Color
green4 = RGB 0 139 0
-- | Names: @["GreenYellow","green yellow"]@
--
-- R173 G255 B47, 0xadff2f
greenYellow :: Color
greenYellow = RGB 173 255 47
-- | Names: @["grey"]@
--
-- R190 G190 B190, 0xbebebe
grey :: Color
grey = RGB 190 190 190
-- | Names: @["grey0"]@
--
-- R0 G0 B0, 0x000000
grey0 :: Color
grey0 = RGB 0 0 0
-- | Names: @["grey1"]@
--
-- R3 G3 B3, 0x030303
grey1 :: Color
grey1 = RGB 3 3 3
-- | Names: @["grey10"]@
--
-- R26 G26 B26, 0x1a1a1a
grey10 :: Color
grey10 = RGB 26 26 26
-- | Names: @["grey100"]@
--
-- R255 G255 B255, 0xffffff
grey100 :: Color
grey100 = RGB 255 255 255
-- | Names: @["grey11"]@
--
-- R28 G28 B28, 0x1c1c1c
grey11 :: Color
grey11 = RGB 28 28 28
-- | Names: @["grey12"]@
--
-- R31 G31 B31, 0x1f1f1f
grey12 :: Color
grey12 = RGB 31 31 31
-- | Names: @["grey13"]@
--
-- R33 G33 B33, 0x212121
grey13 :: Color
grey13 = RGB 33 33 33
-- | Names: @["grey14"]@
--
-- R36 G36 B36, 0x242424
grey14 :: Color
grey14 = RGB 36 36 36
-- | Names: @["grey15"]@
--
-- R38 G38 B38, 0x262626
grey15 :: Color
grey15 = RGB 38 38 38
-- | Names: @["grey16"]@
--
-- R41 G41 B41, 0x292929
grey16 :: Color
grey16 = RGB 41 41 41
-- | Names: @["grey17"]@
--
-- R43 G43 B43, 0x2b2b2b
grey17 :: Color
grey17 = RGB 43 43 43
-- | Names: @["grey18"]@
--
-- R46 G46 B46, 0x2e2e2e
grey18 :: Color
grey18 = RGB 46 46 46
-- | Names: @["grey19"]@
--
-- R48 G48 B48, 0x303030
grey19 :: Color
grey19 = RGB 48 48 48
-- | Names: @["grey2"]@
--
-- R5 G5 B5, 0x050505
grey2 :: Color
grey2 = RGB 5 5 5
-- | Names: @["grey20"]@
--
-- R51 G51 B51, 0x333333
grey20 :: Color
grey20 = RGB 51 51 51
-- | Names: @["grey21"]@
--
-- R54 G54 B54, 0x363636
grey21 :: Color
grey21 = RGB 54 54 54
-- | Names: @["grey22"]@
--
-- R56 G56 B56, 0x383838
grey22 :: Color
grey22 = RGB 56 56 56
-- | Names: @["grey23"]@
--
-- R59 G59 B59, 0x3b3b3b
grey23 :: Color
grey23 = RGB 59 59 59
-- | Names: @["grey24"]@
--
-- R61 G61 B61, 0x3d3d3d
grey24 :: Color
grey24 = RGB 61 61 61
-- | Names: @["grey25"]@
--
-- R64 G64 B64, 0x404040
grey25 :: Color
grey25 = RGB 64 64 64
-- | Names: @["grey26"]@
--
-- R66 G66 B66, 0x424242
grey26 :: Color
grey26 = RGB 66 66 66
-- | Names: @["grey27"]@
--
-- R69 G69 B69, 0x454545
grey27 :: Color
grey27 = RGB 69 69 69
-- | Names: @["grey28"]@
--
-- R71 G71 B71, 0x474747
grey28 :: Color
grey28 = RGB 71 71 71
-- | Names: @["grey29"]@
--
-- R74 G74 B74, 0x4a4a4a
grey29 :: Color
grey29 = RGB 74 74 74
-- | Names: @["grey3"]@
--
-- R8 G8 B8, 0x080808
grey3 :: Color
grey3 = RGB 8 8 8
-- | Names: @["grey30"]@
--
-- R77 G77 B77, 0x4d4d4d
grey30 :: Color
grey30 = RGB 77 77 77
-- | Names: @["grey31"]@
--
-- R79 G79 B79, 0x4f4f4f
grey31 :: Color
grey31 = RGB 79 79 79
-- | Names: @["grey32"]@
--
-- R82 G82 B82, 0x525252
grey32 :: Color
grey32 = RGB 82 82 82
-- | Names: @["grey33"]@
--
-- R84 G84 B84, 0x545454
grey33 :: Color
grey33 = RGB 84 84 84
-- | Names: @["grey34"]@
--
-- R87 G87 B87, 0x575757
grey34 :: Color
grey34 = RGB 87 87 87
-- | Names: @["grey35"]@
--
-- R89 G89 B89, 0x595959
grey35 :: Color
grey35 = RGB 89 89 89
-- | Names: @["grey36"]@
--
-- R92 G92 B92, 0x5c5c5c
grey36 :: Color
grey36 = RGB 92 92 92
-- | Names: @["grey37"]@
--
-- R94 G94 B94, 0x5e5e5e
grey37 :: Color
grey37 = RGB 94 94 94
-- | Names: @["grey38"]@
--
-- R97 G97 B97, 0x616161
grey38 :: Color
grey38 = RGB 97 97 97
-- | Names: @["grey39"]@
--
-- R99 G99 B99, 0x636363
grey39 :: Color
grey39 = RGB 99 99 99
-- | Names: @["grey4"]@
--
-- R10 G10 B10, 0x0a0a0a
grey4 :: Color
grey4 = RGB 10 10 10
-- | Names: @["grey40"]@
--
-- R102 G102 B102, 0x666666
grey40 :: Color
grey40 = RGB 102 102 102
-- | Names: @["grey41"]@
--
-- R105 G105 B105, 0x696969
grey41 :: Color
grey41 = RGB 105 105 105
-- | Names: @["grey42"]@
--
-- R107 G107 B107, 0x6b6b6b
grey42 :: Color
grey42 = RGB 107 107 107
-- | Names: @["grey43"]@
--
-- R110 G110 B110, 0x6e6e6e
grey43 :: Color
grey43 = RGB 110 110 110
-- | Names: @["grey44"]@
--
-- R112 G112 B112, 0x707070
grey44 :: Color
grey44 = RGB 112 112 112
-- | Names: @["grey45"]@
--
-- R115 G115 B115, 0x737373
grey45 :: Color
grey45 = RGB 115 115 115
-- | Names: @["grey46"]@
--
-- R117 G117 B117, 0x757575
grey46 :: Color
grey46 = RGB 117 117 117
-- | Names: @["grey47"]@
--
-- R120 G120 B120, 0x787878
grey47 :: Color
grey47 = RGB 120 120 120
-- | Names: @["grey48"]@
--
-- R122 G122 B122, 0x7a7a7a
grey48 :: Color
grey48 = RGB 122 122 122
-- | Names: @["grey49"]@
--
-- R125 G125 B125, 0x7d7d7d
grey49 :: Color
grey49 = RGB 125 125 125
-- | Names: @["grey5"]@
--
-- R13 G13 B13, 0x0d0d0d
grey5 :: Color
grey5 = RGB 13 13 13
-- | Names: @["grey50"]@
--
-- R127 G127 B127, 0x7f7f7f
grey50 :: Color
grey50 = RGB 127 127 127
-- | Names: @["grey51"]@
--
-- R130 G130 B130, 0x828282
grey51 :: Color
grey51 = RGB 130 130 130
-- | Names: @["grey52"]@
--
-- R133 G133 B133, 0x858585
grey52 :: Color
grey52 = RGB 133 133 133
-- | Names: @["grey53"]@
--
-- R135 G135 B135, 0x878787
grey53 :: Color
grey53 = RGB 135 135 135
-- | Names: @["grey54"]@
--
-- R138 G138 B138, 0x8a8a8a
grey54 :: Color
grey54 = RGB 138 138 138
-- | Names: @["grey55"]@
--
-- R140 G140 B140, 0x8c8c8c
grey55 :: Color
grey55 = RGB 140 140 140
-- | Names: @["grey56"]@
--
-- R143 G143 B143, 0x8f8f8f
grey56 :: Color
grey56 = RGB 143 143 143
-- | Names: @["grey57"]@
--
-- R145 G145 B145, 0x919191
grey57 :: Color
grey57 = RGB 145 145 145
-- | Names: @["grey58"]@
--
-- R148 G148 B148, 0x949494
grey58 :: Color
grey58 = RGB 148 148 148
-- | Names: @["grey59"]@
--
-- R150 G150 B150, 0x969696
grey59 :: Color
grey59 = RGB 150 150 150
-- | Names: @["grey6"]@
--
-- R15 G15 B15, 0x0f0f0f
grey6 :: Color
grey6 = RGB 15 15 15
-- | Names: @["grey60"]@
--
-- R153 G153 B153, 0x999999
grey60 :: Color
grey60 = RGB 153 153 153
-- | Names: @["grey61"]@
--
-- R156 G156 B156, 0x9c9c9c
grey61 :: Color
grey61 = RGB 156 156 156
-- | Names: @["grey62"]@
--
-- R158 G158 B158, 0x9e9e9e
grey62 :: Color
grey62 = RGB 158 158 158
-- | Names: @["grey63"]@
--
-- R161 G161 B161, 0xa1a1a1
grey63 :: Color
grey63 = RGB 161 161 161
-- | Names: @["grey64"]@
--
-- R163 G163 B163, 0xa3a3a3
grey64 :: Color
grey64 = RGB 163 163 163
-- | Names: @["grey65"]@
--
-- R166 G166 B166, 0xa6a6a6
grey65 :: Color
grey65 = RGB 166 166 166
-- | Names: @["grey66"]@
--
-- R168 G168 B168, 0xa8a8a8
grey66 :: Color
grey66 = RGB 168 168 168
-- | Names: @["grey67"]@
--
-- R171 G171 B171, 0xababab
grey67 :: Color
grey67 = RGB 171 171 171
-- | Names: @["grey68"]@
--
-- R173 G173 B173, 0xadadad
grey68 :: Color
grey68 = RGB 173 173 173
-- | Names: @["grey69"]@
--
-- R176 G176 B176, 0xb0b0b0
grey69 :: Color
grey69 = RGB 176 176 176
-- | Names: @["grey7"]@
--
-- R18 G18 B18, 0x121212
grey7 :: Color
grey7 = RGB 18 18 18
-- | Names: @["grey70"]@
--
-- R179 G179 B179, 0xb3b3b3
grey70 :: Color
grey70 = RGB 179 179 179
-- | Names: @["grey71"]@
--
-- R181 G181 B181, 0xb5b5b5
grey71 :: Color
grey71 = RGB 181 181 181
-- | Names: @["grey72"]@
--
-- R184 G184 B184, 0xb8b8b8
grey72 :: Color
grey72 = RGB 184 184 184
-- | Names: @["grey73"]@
--
-- R186 G186 B186, 0xbababa
grey73 :: Color
grey73 = RGB 186 186 186
-- | Names: @["grey74"]@
--
-- R189 G189 B189, 0xbdbdbd
grey74 :: Color
grey74 = RGB 189 189 189
-- | Names: @["grey75"]@
--
-- R191 G191 B191, 0xbfbfbf
grey75 :: Color
grey75 = RGB 191 191 191
-- | Names: @["grey76"]@
--
-- R194 G194 B194, 0xc2c2c2
grey76 :: Color
grey76 = RGB 194 194 194
-- | Names: @["grey77"]@
--
-- R196 G196 B196, 0xc4c4c4
grey77 :: Color
grey77 = RGB 196 196 196
-- | Names: @["grey78"]@
--
-- R199 G199 B199, 0xc7c7c7
grey78 :: Color
grey78 = RGB 199 199 199
-- | Names: @["grey79"]@
--
-- R201 G201 B201, 0xc9c9c9
grey79 :: Color
grey79 = RGB 201 201 201
-- | Names: @["grey8"]@
--
-- R20 G20 B20, 0x141414
grey8 :: Color
grey8 = RGB 20 20 20
-- | Names: @["grey80"]@
--
-- R204 G204 B204, 0xcccccc
grey80 :: Color
grey80 = RGB 204 204 204
-- | Names: @["grey81"]@
--
-- R207 G207 B207, 0xcfcfcf
grey81 :: Color
grey81 = RGB 207 207 207
-- | Names: @["grey82"]@
--
-- R209 G209 B209, 0xd1d1d1
grey82 :: Color
grey82 = RGB 209 209 209
-- | Names: @["grey83"]@
--
-- R212 G212 B212, 0xd4d4d4
grey83 :: Color
grey83 = RGB 212 212 212
-- | Names: @["grey84"]@
--
-- R214 G214 B214, 0xd6d6d6
grey84 :: Color
grey84 = RGB 214 214 214
-- | Names: @["grey85"]@
--
-- R217 G217 B217, 0xd9d9d9
grey85 :: Color
grey85 = RGB 217 217 217
-- | Names: @["grey86"]@
--
-- R219 G219 B219, 0xdbdbdb
grey86 :: Color
grey86 = RGB 219 219 219
-- | Names: @["grey87"]@
--
-- R222 G222 B222, 0xdedede
grey87 :: Color
grey87 = RGB 222 222 222
-- | Names: @["grey88"]@
--
-- R224 G224 B224, 0xe0e0e0
grey88 :: Color
grey88 = RGB 224 224 224
-- | Names: @["grey89"]@
--
-- R227 G227 B227, 0xe3e3e3
grey89 :: Color
grey89 = RGB 227 227 227
-- | Names: @["grey9"]@
--
-- R23 G23 B23, 0x171717
grey9 :: Color
grey9 = RGB 23 23 23
-- | Names: @["grey90"]@
--
-- R229 G229 B229, 0xe5e5e5
grey90 :: Color
grey90 = RGB 229 229 229
-- | Names: @["grey91"]@
--
-- R232 G232 B232, 0xe8e8e8
grey91 :: Color
grey91 = RGB 232 232 232
-- | Names: @["grey92"]@
--
-- R235 G235 B235, 0xebebeb
grey92 :: Color
grey92 = RGB 235 235 235
-- | Names: @["grey93"]@
--
-- R237 G237 B237, 0xededed
grey93 :: Color
grey93 = RGB 237 237 237
-- | Names: @["grey94"]@
--
-- R240 G240 B240, 0xf0f0f0
grey94 :: Color
grey94 = RGB 240 240 240
-- | Names: @["grey95"]@
--
-- R242 G242 B242, 0xf2f2f2
grey95 :: Color
grey95 = RGB 242 242 242
-- | Names: @["grey96"]@
--
-- R245 G245 B245, 0xf5f5f5
grey96 :: Color
grey96 = RGB 245 245 245
-- | Names: @["grey97"]@
--
-- R247 G247 B247, 0xf7f7f7
grey97 :: Color
grey97 = RGB 247 247 247
-- | Names: @["grey98"]@
--
-- R250 G250 B250, 0xfafafa
grey98 :: Color
grey98 = RGB 250 250 250
-- | Names: @["grey99"]@
--
-- R252 G252 B252, 0xfcfcfc
grey99 :: Color
grey99 = RGB 252 252 252
-- | Names: @["honeydew"]@
--
-- R240 G255 B240, 0xf0fff0
honeydew :: Color
honeydew = RGB 240 255 240
-- | Names: @["honeydew1"]@
--
-- R240 G255 B240, 0xf0fff0
honeydew1 :: Color
honeydew1 = RGB 240 255 240
-- | Names: @["honeydew2"]@
--
-- R224 G238 B224, 0xe0eee0
honeydew2 :: Color
honeydew2 = RGB 224 238 224
-- | Names: @["honeydew3"]@
--
-- R193 G205 B193, 0xc1cdc1
honeydew3 :: Color
honeydew3 = RGB 193 205 193
-- | Names: @["honeydew4"]@
--
-- R131 G139 B131, 0x838b83
honeydew4 :: Color
honeydew4 = RGB 131 139 131
-- | Names: @["HotPink","hot pink"]@
--
-- R255 G105 B180, 0xff69b4
hotPink :: Color
hotPink = RGB 255 105 180
-- | Names: @["HotPink1"]@
--
-- R255 G110 B180, 0xff6eb4
hotPink1 :: Color
hotPink1 = RGB 255 110 180
-- | Names: @["HotPink2"]@
--
-- R238 G106 B167, 0xee6aa7
hotPink2 :: Color
hotPink2 = RGB 238 106 167
-- | Names: @["HotPink3"]@
--
-- R205 G96 B144, 0xcd6090
hotPink3 :: Color
hotPink3 = RGB 205 96 144
-- | Names: @["HotPink4"]@
--
-- R139 G58 B98, 0x8b3a62
hotPink4 :: Color
hotPink4 = RGB 139 58 98
-- | Names: @["IndianRed","indian red"]@
--
-- R205 G92 B92, 0xcd5c5c
indianRed :: Color
indianRed = RGB 205 92 92
-- | Names: @["IndianRed1"]@
--
-- R255 G106 B106, 0xff6a6a
indianRed1 :: Color
indianRed1 = RGB 255 106 106
-- | Names: @["IndianRed2"]@
--
-- R238 G99 B99, 0xee6363
indianRed2 :: Color
indianRed2 = RGB 238 99 99
-- | Names: @["IndianRed3"]@
--
-- R205 G85 B85, 0xcd5555
indianRed3 :: Color
indianRed3 = RGB 205 85 85
-- | Names: @["IndianRed4"]@
--
-- R139 G58 B58, 0x8b3a3a
indianRed4 :: Color
indianRed4 = RGB 139 58 58
-- | Names: @["ivory"]@
--
-- R255 G255 B240, 0xfffff0
ivory :: Color
ivory = RGB 255 255 240
-- | Names: @["ivory1"]@
--
-- R255 G255 B240, 0xfffff0
ivory1 :: Color
ivory1 = RGB 255 255 240
-- | Names: @["ivory2"]@
--
-- R238 G238 B224, 0xeeeee0
ivory2 :: Color
ivory2 = RGB 238 238 224
-- | Names: @["ivory3"]@
--
-- R205 G205 B193, 0xcdcdc1
ivory3 :: Color
ivory3 = RGB 205 205 193
-- | Names: @["ivory4"]@
--
-- R139 G139 B131, 0x8b8b83
ivory4 :: Color
ivory4 = RGB 139 139 131
-- | Names: @["khaki"]@
--
-- R240 G230 B140, 0xf0e68c
khaki :: Color
khaki = RGB 240 230 140
-- | Names: @["khaki1"]@
--
-- R255 G246 B143, 0xfff68f
khaki1 :: Color
khaki1 = RGB 255 246 143
-- | Names: @["khaki2"]@
--
-- R238 G230 B133, 0xeee685
khaki2 :: Color
khaki2 = RGB 238 230 133
-- | Names: @["khaki3"]@
--
-- R205 G198 B115, 0xcdc673
khaki3 :: Color
khaki3 = RGB 205 198 115
-- | Names: @["khaki4"]@
--
-- R139 G134 B78, 0x8b864e
khaki4 :: Color
khaki4 = RGB 139 134 78
-- | Names: @["lavender"]@
--
-- R230 G230 B250, 0xe6e6fa
lavender :: Color
lavender = RGB 230 230 250
-- | Names: @["LavenderBlush","lavender blush"]@
--
-- R255 G240 B245, 0xfff0f5
lavenderBlush :: Color
lavenderBlush = RGB 255 240 245
-- | Names: @["LavenderBlush1"]@
--
-- R255 G240 B245, 0xfff0f5
lavenderBlush1 :: Color
lavenderBlush1 = RGB 255 240 245
-- | Names: @["LavenderBlush2"]@
--
-- R238 G224 B229, 0xeee0e5
lavenderBlush2 :: Color
lavenderBlush2 = RGB 238 224 229
-- | Names: @["LavenderBlush3"]@
--
-- R205 G193 B197, 0xcdc1c5
lavenderBlush3 :: Color
lavenderBlush3 = RGB 205 193 197
-- | Names: @["LavenderBlush4"]@
--
-- R139 G131 B134, 0x8b8386
lavenderBlush4 :: Color
lavenderBlush4 = RGB 139 131 134
-- | Names: @["LawnGreen","lawn green"]@
--
-- R124 G252 B0, 0x7cfc00
lawnGreen :: Color
lawnGreen = RGB 124 252 0
-- | Names: @["LemonChiffon","lemon chiffon"]@
--
-- R255 G250 B205, 0xfffacd
lemonChiffon :: Color
lemonChiffon = RGB 255 250 205
-- | Names: @["LemonChiffon1"]@
--
-- R255 G250 B205, 0xfffacd
lemonChiffon1 :: Color
lemonChiffon1 = RGB 255 250 205
-- | Names: @["LemonChiffon2"]@
--
-- R238 G233 B191, 0xeee9bf
lemonChiffon2 :: Color
lemonChiffon2 = RGB 238 233 191
-- | Names: @["LemonChiffon3"]@
--
-- R205 G201 B165, 0xcdc9a5
lemonChiffon3 :: Color
lemonChiffon3 = RGB 205 201 165
-- | Names: @["LemonChiffon4"]@
--
-- R139 G137 B112, 0x8b8970
lemonChiffon4 :: Color
lemonChiffon4 = RGB 139 137 112
-- | Names: @["LightBlue","light blue"]@
--
-- R173 G216 B230, 0xadd8e6
lightBlue :: Color
lightBlue = RGB 173 216 230
-- | Names: @["LightBlue1"]@
--
-- R191 G239 B255, 0xbfefff
lightBlue1 :: Color
lightBlue1 = RGB 191 239 255
-- | Names: @["LightBlue2"]@
--
-- R178 G223 B238, 0xb2dfee
lightBlue2 :: Color
lightBlue2 = RGB 178 223 238
-- | Names: @["LightBlue3"]@
--
-- R154 G192 B205, 0x9ac0cd
lightBlue3 :: Color
lightBlue3 = RGB 154 192 205
-- | Names: @["LightBlue4"]@
--
-- R104 G131 B139, 0x68838b
lightBlue4 :: Color
lightBlue4 = RGB 104 131 139
-- | Names: @["LightCoral","light coral"]@
--
-- R240 G128 B128, 0xf08080
lightCoral :: Color
lightCoral = RGB 240 128 128
-- | Names: @["LightCyan","light cyan"]@
--
-- R224 G255 B255, 0xe0ffff
lightCyan :: Color
lightCyan = RGB 224 255 255
-- | Names: @["LightCyan1"]@
--
-- R224 G255 B255, 0xe0ffff
lightCyan1 :: Color
lightCyan1 = RGB 224 255 255
-- | Names: @["LightCyan2"]@
--
-- R209 G238 B238, 0xd1eeee
lightCyan2 :: Color
lightCyan2 = RGB 209 238 238
-- | Names: @["LightCyan3"]@
--
-- R180 G205 B205, 0xb4cdcd
lightCyan3 :: Color
lightCyan3 = RGB 180 205 205
-- | Names: @["LightCyan4"]@
--
-- R122 G139 B139, 0x7a8b8b
lightCyan4 :: Color
lightCyan4 = RGB 122 139 139
-- | Names: @["LightGoldenrod","light goldenrod"]@
--
-- R238 G221 B130, 0xeedd82
lightGoldenrod :: Color
lightGoldenrod = RGB 238 221 130
-- | Names: @["LightGoldenrod1"]@
--
-- R255 G236 B139, 0xffec8b
lightGoldenrod1 :: Color
lightGoldenrod1 = RGB 255 236 139
-- | Names: @["LightGoldenrod2"]@
--
-- R238 G220 B130, 0xeedc82
lightGoldenrod2 :: Color
lightGoldenrod2 = RGB 238 220 130
-- | Names: @["LightGoldenrod3"]@
--
-- R205 G190 B112, 0xcdbe70
lightGoldenrod3 :: Color
lightGoldenrod3 = RGB 205 190 112
-- | Names: @["LightGoldenrod4"]@
--
-- R139 G129 B76, 0x8b814c
lightGoldenrod4 :: Color
lightGoldenrod4 = RGB 139 129 76
-- | Names: @["LightGoldenrodYellow","light goldenrod yellow"]@
--
-- R250 G250 B210, 0xfafad2
lightGoldenrodYellow :: Color
lightGoldenrodYellow = RGB 250 250 210
-- | Names: @["LightGray","light gray"]@
--
-- R211 G211 B211, 0xd3d3d3
lightGray :: Color
lightGray = RGB 211 211 211
-- | Names: @["LightGreen","light green"]@
--
-- R144 G238 B144, 0x90ee90
lightGreen :: Color
lightGreen = RGB 144 238 144
-- | Names: @["LightGrey","light grey"]@
--
-- R211 G211 B211, 0xd3d3d3
lightGrey :: Color
lightGrey = RGB 211 211 211
-- | Names: @["LightPink","light pink"]@
--
-- R255 G182 B193, 0xffb6c1
lightPink :: Color
lightPink = RGB 255 182 193
-- | Names: @["LightPink1"]@
--
-- R255 G174 B185, 0xffaeb9
lightPink1 :: Color
lightPink1 = RGB 255 174 185
-- | Names: @["LightPink2"]@
--
-- R238 G162 B173, 0xeea2ad
lightPink2 :: Color
lightPink2 = RGB 238 162 173
-- | Names: @["LightPink3"]@
--
-- R205 G140 B149, 0xcd8c95
lightPink3 :: Color
lightPink3 = RGB 205 140 149
-- | Names: @["LightPink4"]@
--
-- R139 G95 B101, 0x8b5f65
lightPink4 :: Color
lightPink4 = RGB 139 95 101
-- | Names: @["LightSalmon","light salmon"]@
--
-- R255 G160 B122, 0xffa07a
lightSalmon :: Color
lightSalmon = RGB 255 160 122
-- | Names: @["LightSalmon1"]@
--
-- R255 G160 B122, 0xffa07a
lightSalmon1 :: Color
lightSalmon1 = RGB 255 160 122
-- | Names: @["LightSalmon2"]@
--
-- R238 G149 B114, 0xee9572
lightSalmon2 :: Color
lightSalmon2 = RGB 238 149 114
-- | Names: @["LightSalmon3"]@
--
-- R205 G129 B98, 0xcd8162
lightSalmon3 :: Color
lightSalmon3 = RGB 205 129 98
-- | Names: @["LightSalmon4"]@
--
-- R139 G87 B66, 0x8b5742
lightSalmon4 :: Color
lightSalmon4 = RGB 139 87 66
-- | Names: @["LightSeaGreen","light sea green"]@
--
-- R32 G178 B170, 0x20b2aa
lightSeaGreen :: Color
lightSeaGreen = RGB 32 178 170
-- | Names: @["LightSkyBlue","light sky blue"]@
--
-- R135 G206 B250, 0x87cefa
lightSkyBlue :: Color
lightSkyBlue = RGB 135 206 250
-- | Names: @["LightSkyBlue1"]@
--
-- R176 G226 B255, 0xb0e2ff
lightSkyBlue1 :: Color
lightSkyBlue1 = RGB 176 226 255
-- | Names: @["LightSkyBlue2"]@
--
-- R164 G211 B238, 0xa4d3ee
lightSkyBlue2 :: Color
lightSkyBlue2 = RGB 164 211 238
-- | Names: @["LightSkyBlue3"]@
--
-- R141 G182 B205, 0x8db6cd
lightSkyBlue3 :: Color
lightSkyBlue3 = RGB 141 182 205
-- | Names: @["LightSkyBlue4"]@
--
-- R96 G123 B139, 0x607b8b
lightSkyBlue4 :: Color
lightSkyBlue4 = RGB 96 123 139
-- | Names: @["LightSlateBlue","light slate blue"]@
--
-- R132 G112 B255, 0x8470ff
lightSlateBlue :: Color
lightSlateBlue = RGB 132 112 255
-- | Names: @["LightSlateGray","light slate gray"]@
--
-- R119 G136 B153, 0x778899
lightSlateGray :: Color
lightSlateGray = RGB 119 136 153
-- | Names: @["LightSlateGrey","light slate grey"]@
--
-- R119 G136 B153, 0x778899
lightSlateGrey :: Color
lightSlateGrey = RGB 119 136 153
-- | Names: @["LightSteelBlue","light steel blue"]@
--
-- R176 G196 B222, 0xb0c4de
lightSteelBlue :: Color
lightSteelBlue = RGB 176 196 222
-- | Names: @["LightSteelBlue1"]@
--
-- R202 G225 B255, 0xcae1ff
lightSteelBlue1 :: Color
lightSteelBlue1 = RGB 202 225 255
-- | Names: @["LightSteelBlue2"]@
--
-- R188 G210 B238, 0xbcd2ee
lightSteelBlue2 :: Color
lightSteelBlue2 = RGB 188 210 238
-- | Names: @["LightSteelBlue3"]@
--
-- R162 G181 B205, 0xa2b5cd
lightSteelBlue3 :: Color
lightSteelBlue3 = RGB 162 181 205
-- | Names: @["LightSteelBlue4"]@
--
-- R110 G123 B139, 0x6e7b8b
lightSteelBlue4 :: Color
lightSteelBlue4 = RGB 110 123 139
-- | Names: @["LightYellow","light yellow"]@
--
-- R255 G255 B224, 0xffffe0
lightYellow :: Color
lightYellow = RGB 255 255 224
-- | Names: @["LightYellow1"]@
--
-- R255 G255 B224, 0xffffe0
lightYellow1 :: Color
lightYellow1 = RGB 255 255 224
-- | Names: @["LightYellow2"]@
--
-- R238 G238 B209, 0xeeeed1
lightYellow2 :: Color
lightYellow2 = RGB 238 238 209
-- | Names: @["LightYellow3"]@
--
-- R205 G205 B180, 0xcdcdb4
lightYellow3 :: Color
lightYellow3 = RGB 205 205 180
-- | Names: @["LightYellow4"]@
--
-- R139 G139 B122, 0x8b8b7a
lightYellow4 :: Color
lightYellow4 = RGB 139 139 122
-- | Names: @["LimeGreen","lime green"]@
--
-- R50 G205 B50, 0x32cd32
limeGreen :: Color
limeGreen = RGB 50 205 50
-- | Names: @["linen"]@
--
-- R250 G240 B230, 0xfaf0e6
linen :: Color
linen = RGB 250 240 230
-- | Names: @["magenta"]@
--
-- R255 G0 B255, 0xff00ff
magenta :: Color
magenta = RGB 255 0 255
-- | Names: @["magenta1"]@
--
-- R255 G0 B255, 0xff00ff
magenta1 :: Color
magenta1 = RGB 255 0 255
-- | Names: @["magenta2"]@
--
-- R238 G0 B238, 0xee00ee
magenta2 :: Color
magenta2 = RGB 238 0 238
-- | Names: @["magenta3"]@
--
-- R205 G0 B205, 0xcd00cd
magenta3 :: Color
magenta3 = RGB 205 0 205
-- | Names: @["magenta4"]@
--
-- R139 G0 B139, 0x8b008b
magenta4 :: Color
magenta4 = RGB 139 0 139
-- | Names: @["maroon"]@
--
-- R176 G48 B96, 0xb03060
maroon :: Color
maroon = RGB 176 48 96
-- | Names: @["maroon1"]@
--
-- R255 G52 B179, 0xff34b3
maroon1 :: Color
maroon1 = RGB 255 52 179
-- | Names: @["maroon2"]@
--
-- R238 G48 B167, 0xee30a7
maroon2 :: Color
maroon2 = RGB 238 48 167
-- | Names: @["maroon3"]@
--
-- R205 G41 B144, 0xcd2990
maroon3 :: Color
maroon3 = RGB 205 41 144
-- | Names: @["maroon4"]@
--
-- R139 G28 B98, 0x8b1c62
maroon4 :: Color
maroon4 = RGB 139 28 98
-- | Names: @["MediumAquamarine","medium aquamarine"]@
--
-- R102 G205 B170, 0x66cdaa
mediumAquamarine :: Color
mediumAquamarine = RGB 102 205 170
-- | Names: @["MediumBlue","medium blue"]@
--
-- R0 G0 B205, 0x0000cd
mediumBlue :: Color
mediumBlue = RGB 0 0 205
-- | Names: @["MediumOrchid","medium orchid"]@
--
-- R186 G85 B211, 0xba55d3
mediumOrchid :: Color
mediumOrchid = RGB 186 85 211
-- | Names: @["MediumOrchid1"]@
--
-- R224 G102 B255, 0xe066ff
mediumOrchid1 :: Color
mediumOrchid1 = RGB 224 102 255
-- | Names: @["MediumOrchid2"]@
--
-- R209 G95 B238, 0xd15fee
mediumOrchid2 :: Color
mediumOrchid2 = RGB 209 95 238
-- | Names: @["MediumOrchid3"]@
--
-- R180 G82 B205, 0xb452cd
mediumOrchid3 :: Color
mediumOrchid3 = RGB 180 82 205
-- | Names: @["MediumOrchid4"]@
--
-- R122 G55 B139, 0x7a378b
mediumOrchid4 :: Color
mediumOrchid4 = RGB 122 55 139
-- | Names: @["MediumPurple","medium purple"]@
--
-- R147 G112 B219, 0x9370db
mediumPurple :: Color
mediumPurple = RGB 147 112 219
-- | Names: @["MediumPurple1"]@
--
-- R171 G130 B255, 0xab82ff
mediumPurple1 :: Color
mediumPurple1 = RGB 171 130 255
-- | Names: @["MediumPurple2"]@
--
-- R159 G121 B238, 0x9f79ee
mediumPurple2 :: Color
mediumPurple2 = RGB 159 121 238
-- | Names: @["MediumPurple3"]@
--
-- R137 G104 B205, 0x8968cd
mediumPurple3 :: Color
mediumPurple3 = RGB 137 104 205
-- | Names: @["MediumPurple4"]@
--
-- R93 G71 B139, 0x5d478b
mediumPurple4 :: Color
mediumPurple4 = RGB 93 71 139
-- | Names: @["MediumSeaGreen","medium sea green"]@
--
-- R60 G179 B113, 0x3cb371
mediumSeaGreen :: Color
mediumSeaGreen = RGB 60 179 113
-- | Names: @["MediumSlateBlue","medium slate blue"]@
--
-- R123 G104 B238, 0x7b68ee
mediumSlateBlue :: Color
mediumSlateBlue = RGB 123 104 238
-- | Names: @["MediumSpringGreen","medium spring green"]@
--
-- R0 G250 B154, 0x00fa9a
mediumSpringGreen :: Color
mediumSpringGreen = RGB 0 250 154
-- | Names: @["MediumTurquoise","medium turquoise"]@
--
-- R72 G209 B204, 0x48d1cc
mediumTurquoise :: Color
mediumTurquoise = RGB 72 209 204
-- | Names: @["MediumVioletRed","medium violet red"]@
--
-- R199 G21 B133, 0xc71585
mediumVioletRed :: Color
mediumVioletRed = RGB 199 21 133
-- | Names: @["MidnightBlue","midnight blue"]@
--
-- R25 G25 B112, 0x191970
midnightBlue :: Color
midnightBlue = RGB 25 25 112
-- | Names: @["MintCream","mint cream"]@
--
-- R245 G255 B250, 0xf5fffa
mintCream :: Color
mintCream = RGB 245 255 250
-- | Names: @["MistyRose","misty rose"]@
--
-- R255 G228 B225, 0xffe4e1
mistyRose :: Color
mistyRose = RGB 255 228 225
-- | Names: @["MistyRose1"]@
--
-- R255 G228 B225, 0xffe4e1
mistyRose1 :: Color
mistyRose1 = RGB 255 228 225
-- | Names: @["MistyRose2"]@
--
-- R238 G213 B210, 0xeed5d2
mistyRose2 :: Color
mistyRose2 = RGB 238 213 210
-- | Names: @["MistyRose3"]@
--
-- R205 G183 B181, 0xcdb7b5
mistyRose3 :: Color
mistyRose3 = RGB 205 183 181
-- | Names: @["MistyRose4"]@
--
-- R139 G125 B123, 0x8b7d7b
mistyRose4 :: Color
mistyRose4 = RGB 139 125 123
-- | Names: @["moccasin"]@
--
-- R255 G228 B181, 0xffe4b5
moccasin :: Color
moccasin = RGB 255 228 181
-- | Names: @["NavajoWhite","navajo white"]@
--
-- R255 G222 B173, 0xffdead
navajoWhite :: Color
navajoWhite = RGB 255 222 173
-- | Names: @["NavajoWhite1"]@
--
-- R255 G222 B173, 0xffdead
navajoWhite1 :: Color
navajoWhite1 = RGB 255 222 173
-- | Names: @["NavajoWhite2"]@
--
-- R238 G207 B161, 0xeecfa1
navajoWhite2 :: Color
navajoWhite2 = RGB 238 207 161
-- | Names: @["NavajoWhite3"]@
--
-- R205 G179 B139, 0xcdb38b
navajoWhite3 :: Color
navajoWhite3 = RGB 205 179 139
-- | Names: @["NavajoWhite4"]@
--
-- R139 G121 B94, 0x8b795e
navajoWhite4 :: Color
navajoWhite4 = RGB 139 121 94
-- | Names: @["navy"]@
--
-- R0 G0 B128, 0x000080
navy :: Color
navy = RGB 0 0 128
-- | Names: @["NavyBlue","navy blue"]@
--
-- R0 G0 B128, 0x000080
navyBlue :: Color
navyBlue = RGB 0 0 128
-- | Names: @["OldLace","old lace"]@
--
-- R253 G245 B230, 0xfdf5e6
oldLace :: Color
oldLace = RGB 253 245 230
-- | Names: @["OliveDrab","olive drab"]@
--
-- R107 G142 B35, 0x6b8e23
oliveDrab :: Color
oliveDrab = RGB 107 142 35
-- | Names: @["OliveDrab1"]@
--
-- R192 G255 B62, 0xc0ff3e
oliveDrab1 :: Color
oliveDrab1 = RGB 192 255 62
-- | Names: @["OliveDrab2"]@
--
-- R179 G238 B58, 0xb3ee3a
oliveDrab2 :: Color
oliveDrab2 = RGB 179 238 58
-- | Names: @["OliveDrab3"]@
--
-- R154 G205 B50, 0x9acd32
oliveDrab3 :: Color
oliveDrab3 = RGB 154 205 50
-- | Names: @["OliveDrab4"]@
--
-- R105 G139 B34, 0x698b22
oliveDrab4 :: Color
oliveDrab4 = RGB 105 139 34
-- | Names: @["orange"]@
--
-- R255 G165 B0, 0xffa500
orange :: Color
orange = RGB 255 165 0
-- | Names: @["orange1"]@
--
-- R255 G165 B0, 0xffa500
orange1 :: Color
orange1 = RGB 255 165 0
-- | Names: @["orange2"]@
--
-- R238 G154 B0, 0xee9a00
orange2 :: Color
orange2 = RGB 238 154 0
-- | Names: @["orange3"]@
--
-- R205 G133 B0, 0xcd8500
orange3 :: Color
orange3 = RGB 205 133 0
-- | Names: @["orange4"]@
--
-- R139 G90 B0, 0x8b5a00
orange4 :: Color
orange4 = RGB 139 90 0
-- | Names: @["OrangeRed","orange red"]@
--
-- R255 G69 B0, 0xff4500
orangeRed :: Color
orangeRed = RGB 255 69 0
-- | Names: @["OrangeRed1"]@
--
-- R255 G69 B0, 0xff4500
orangeRed1 :: Color
orangeRed1 = RGB 255 69 0
-- | Names: @["OrangeRed2"]@
--
-- R238 G64 B0, 0xee4000
orangeRed2 :: Color
orangeRed2 = RGB 238 64 0
-- | Names: @["OrangeRed3"]@
--
-- R205 G55 B0, 0xcd3700
orangeRed3 :: Color
orangeRed3 = RGB 205 55 0
-- | Names: @["OrangeRed4"]@
--
-- R139 G37 B0, 0x8b2500
orangeRed4 :: Color
orangeRed4 = RGB 139 37 0
-- | Names: @["orchid"]@
--
-- R218 G112 B214, 0xda70d6
orchid :: Color
orchid = RGB 218 112 214
-- | Names: @["orchid1"]@
--
-- R255 G131 B250, 0xff83fa
orchid1 :: Color
orchid1 = RGB 255 131 250
-- | Names: @["orchid2"]@
--
-- R238 G122 B233, 0xee7ae9
orchid2 :: Color
orchid2 = RGB 238 122 233
-- | Names: @["orchid3"]@
--
-- R205 G105 B201, 0xcd69c9
orchid3 :: Color
orchid3 = RGB 205 105 201
-- | Names: @["orchid4"]@
--
-- R139 G71 B137, 0x8b4789
orchid4 :: Color
orchid4 = RGB 139 71 137
-- | Names: @["PaleGoldenrod","pale goldenrod"]@
--
-- R238 G232 B170, 0xeee8aa
paleGoldenrod :: Color
paleGoldenrod = RGB 238 232 170
-- | Names: @["PaleGreen","pale green"]@
--
-- R152 G251 B152, 0x98fb98
paleGreen :: Color
paleGreen = RGB 152 251 152
-- | Names: @["PaleGreen1"]@
--
-- R154 G255 B154, 0x9aff9a
paleGreen1 :: Color
paleGreen1 = RGB 154 255 154
-- | Names: @["PaleGreen2"]@
--
-- R144 G238 B144, 0x90ee90
paleGreen2 :: Color
paleGreen2 = RGB 144 238 144
-- | Names: @["PaleGreen3"]@
--
-- R124 G205 B124, 0x7ccd7c
paleGreen3 :: Color
paleGreen3 = RGB 124 205 124
-- | Names: @["PaleGreen4"]@
--
-- R84 G139 B84, 0x548b54
paleGreen4 :: Color
paleGreen4 = RGB 84 139 84
-- | Names: @["PaleTurquoise","pale turquoise"]@
--
-- R175 G238 B238, 0xafeeee
paleTurquoise :: Color
paleTurquoise = RGB 175 238 238
-- | Names: @["PaleTurquoise1"]@
--
-- R187 G255 B255, 0xbbffff
paleTurquoise1 :: Color
paleTurquoise1 = RGB 187 255 255
-- | Names: @["PaleTurquoise2"]@
--
-- R174 G238 B238, 0xaeeeee
paleTurquoise2 :: Color
paleTurquoise2 = RGB 174 238 238
-- | Names: @["PaleTurquoise3"]@
--
-- R150 G205 B205, 0x96cdcd
paleTurquoise3 :: Color
paleTurquoise3 = RGB 150 205 205
-- | Names: @["PaleTurquoise4"]@
--
-- R102 G139 B139, 0x668b8b
paleTurquoise4 :: Color
paleTurquoise4 = RGB 102 139 139
-- | Names: @["PaleVioletRed","pale violet red"]@
--
-- R219 G112 B147, 0xdb7093
paleVioletRed :: Color
paleVioletRed = RGB 219 112 147
-- | Names: @["PaleVioletRed1"]@
--
-- R255 G130 B171, 0xff82ab
paleVioletRed1 :: Color
paleVioletRed1 = RGB 255 130 171
-- | Names: @["PaleVioletRed2"]@
--
-- R238 G121 B159, 0xee799f
paleVioletRed2 :: Color
paleVioletRed2 = RGB 238 121 159
-- | Names: @["PaleVioletRed3"]@
--
-- R205 G104 B137, 0xcd6889
paleVioletRed3 :: Color
paleVioletRed3 = RGB 205 104 137
-- | Names: @["PaleVioletRed4"]@
--
-- R139 G71 B93, 0x8b475d
paleVioletRed4 :: Color
paleVioletRed4 = RGB 139 71 93
-- | Names: @["PapayaWhip","papaya whip"]@
--
-- R255 G239 B213, 0xffefd5
papayaWhip :: Color
papayaWhip = RGB 255 239 213
-- | Names: @["PeachPuff","peach puff"]@
--
-- R255 G218 B185, 0xffdab9
peachPuff :: Color
peachPuff = RGB 255 218 185
-- | Names: @["PeachPuff1"]@
--
-- R255 G218 B185, 0xffdab9
peachPuff1 :: Color
peachPuff1 = RGB 255 218 185
-- | Names: @["PeachPuff2"]@
--
-- R238 G203 B173, 0xeecbad
peachPuff2 :: Color
peachPuff2 = RGB 238 203 173
-- | Names: @["PeachPuff3"]@
--
-- R205 G175 B149, 0xcdaf95
peachPuff3 :: Color
peachPuff3 = RGB 205 175 149
-- | Names: @["PeachPuff4"]@
--
-- R139 G119 B101, 0x8b7765
peachPuff4 :: Color
peachPuff4 = RGB 139 119 101
-- | Names: @["peru"]@
--
-- R205 G133 B63, 0xcd853f
peru :: Color
peru = RGB 205 133 63
-- | Names: @["pink"]@
--
-- R255 G192 B203, 0xffc0cb
pink :: Color
pink = RGB 255 192 203
-- | Names: @["pink1"]@
--
-- R255 G181 B197, 0xffb5c5
pink1 :: Color
pink1 = RGB 255 181 197
-- | Names: @["pink2"]@
--
-- R238 G169 B184, 0xeea9b8
pink2 :: Color
pink2 = RGB 238 169 184
-- | Names: @["pink3"]@
--
-- R205 G145 B158, 0xcd919e
pink3 :: Color
pink3 = RGB 205 145 158
-- | Names: @["pink4"]@
--
-- R139 G99 B108, 0x8b636c
pink4 :: Color
pink4 = RGB 139 99 108
-- | Names: @["plum"]@
--
-- R221 G160 B221, 0xdda0dd
plum :: Color
plum = RGB 221 160 221
-- | Names: @["plum1"]@
--
-- R255 G187 B255, 0xffbbff
plum1 :: Color
plum1 = RGB 255 187 255
-- | Names: @["plum2"]@
--
-- R238 G174 B238, 0xeeaeee
plum2 :: Color
plum2 = RGB 238 174 238
-- | Names: @["plum3"]@
--
-- R205 G150 B205, 0xcd96cd
plum3 :: Color
plum3 = RGB 205 150 205
-- | Names: @["plum4"]@
--
-- R139 G102 B139, 0x8b668b
plum4 :: Color
plum4 = RGB 139 102 139
-- | Names: @["PowderBlue","powder blue"]@
--
-- R176 G224 B230, 0xb0e0e6
powderBlue :: Color
powderBlue = RGB 176 224 230
-- | Names: @["purple"]@
--
-- R160 G32 B240, 0xa020f0
purple :: Color
purple = RGB 160 32 240
-- | Names: @["purple1"]@
--
-- R155 G48 B255, 0x9b30ff
purple1 :: Color
purple1 = RGB 155 48 255
-- | Names: @["purple2"]@
--
-- R145 G44 B238, 0x912cee
purple2 :: Color
purple2 = RGB 145 44 238
-- | Names: @["purple3"]@
--
-- R125 G38 B205, 0x7d26cd
purple3 :: Color
purple3 = RGB 125 38 205
-- | Names: @["purple4"]@
--
-- R85 G26 B139, 0x551a8b
purple4 :: Color
purple4 = RGB 85 26 139
-- | Names: @["red"]@
--
-- R255 G0 B0, 0xff0000
red :: Color
red = RGB 255 0 0
-- | Names: @["red1"]@
--
-- R255 G0 B0, 0xff0000
red1 :: Color
red1 = RGB 255 0 0
-- | Names: @["red2"]@
--
-- R238 G0 B0, 0xee0000
red2 :: Color
red2 = RGB 238 0 0
-- | Names: @["red3"]@
--
-- R205 G0 B0, 0xcd0000
red3 :: Color
red3 = RGB 205 0 0
-- | Names: @["red4"]@
--
-- R139 G0 B0, 0x8b0000
red4 :: Color
red4 = RGB 139 0 0
-- | Names: @["RosyBrown","rosy brown"]@
--
-- R188 G143 B143, 0xbc8f8f
rosyBrown :: Color
rosyBrown = RGB 188 143 143
-- | Names: @["RosyBrown1"]@
--
-- R255 G193 B193, 0xffc1c1
rosyBrown1 :: Color
rosyBrown1 = RGB 255 193 193
-- | Names: @["RosyBrown2"]@
--
-- R238 G180 B180, 0xeeb4b4
rosyBrown2 :: Color
rosyBrown2 = RGB 238 180 180
-- | Names: @["RosyBrown3"]@
--
-- R205 G155 B155, 0xcd9b9b
rosyBrown3 :: Color
rosyBrown3 = RGB 205 155 155
-- | Names: @["RosyBrown4"]@
--
-- R139 G105 B105, 0x8b6969
rosyBrown4 :: Color
rosyBrown4 = RGB 139 105 105
-- | Names: @["RoyalBlue","royal blue"]@
--
-- R65 G105 B225, 0x4169e1
royalBlue :: Color
royalBlue = RGB 65 105 225
-- | Names: @["RoyalBlue1"]@
--
-- R72 G118 B255, 0x4876ff
royalBlue1 :: Color
royalBlue1 = RGB 72 118 255
-- | Names: @["RoyalBlue2"]@
--
-- R67 G110 B238, 0x436eee
royalBlue2 :: Color
royalBlue2 = RGB 67 110 238
-- | Names: @["RoyalBlue3"]@
--
-- R58 G95 B205, 0x3a5fcd
royalBlue3 :: Color
royalBlue3 = RGB 58 95 205
-- | Names: @["RoyalBlue4"]@
--
-- R39 G64 B139, 0x27408b
royalBlue4 :: Color
royalBlue4 = RGB 39 64 139
-- | Names: @["SaddleBrown","saddle brown"]@
--
-- R139 G69 B19, 0x8b4513
saddleBrown :: Color
saddleBrown = RGB 139 69 19
-- | Names: @["salmon"]@
--
-- R250 G128 B114, 0xfa8072
salmon :: Color
salmon = RGB 250 128 114
-- | Names: @["salmon1"]@
--
-- R255 G140 B105, 0xff8c69
salmon1 :: Color
salmon1 = RGB 255 140 105
-- | Names: @["salmon2"]@
--
-- R238 G130 B98, 0xee8262
salmon2 :: Color
salmon2 = RGB 238 130 98
-- | Names: @["salmon3"]@
--
-- R205 G112 B84, 0xcd7054
salmon3 :: Color
salmon3 = RGB 205 112 84
-- | Names: @["salmon4"]@
--
-- R139 G76 B57, 0x8b4c39
salmon4 :: Color
salmon4 = RGB 139 76 57
-- | Names: @["SandyBrown","sandy brown"]@
--
-- R244 G164 B96, 0xf4a460
sandyBrown :: Color
sandyBrown = RGB 244 164 96
-- | Names: @["SeaGreen","sea green"]@
--
-- R46 G139 B87, 0x2e8b57
seaGreen :: Color
seaGreen = RGB 46 139 87
-- | Names: @["SeaGreen1"]@
--
-- R84 G255 B159, 0x54ff9f
seaGreen1 :: Color
seaGreen1 = RGB 84 255 159
-- | Names: @["SeaGreen2"]@
--
-- R78 G238 B148, 0x4eee94
seaGreen2 :: Color
seaGreen2 = RGB 78 238 148
-- | Names: @["SeaGreen3"]@
--
-- R67 G205 B128, 0x43cd80
seaGreen3 :: Color
seaGreen3 = RGB 67 205 128
-- | Names: @["SeaGreen4"]@
--
-- R46 G139 B87, 0x2e8b57
seaGreen4 :: Color
seaGreen4 = RGB 46 139 87
-- | Names: @["seashell"]@
--
-- R255 G245 B238, 0xfff5ee
seashell :: Color
seashell = RGB 255 245 238
-- | Names: @["seashell1"]@
--
-- R255 G245 B238, 0xfff5ee
seashell1 :: Color
seashell1 = RGB 255 245 238
-- | Names: @["seashell2"]@
--
-- R238 G229 B222, 0xeee5de
seashell2 :: Color
seashell2 = RGB 238 229 222
-- | Names: @["seashell3"]@
--
-- R205 G197 B191, 0xcdc5bf
seashell3 :: Color
seashell3 = RGB 205 197 191
-- | Names: @["seashell4"]@
--
-- R139 G134 B130, 0x8b8682
seashell4 :: Color
seashell4 = RGB 139 134 130
-- | Names: @["sienna"]@
--
-- R160 G82 B45, 0xa0522d
sienna :: Color
sienna = RGB 160 82 45
-- | Names: @["sienna1"]@
--
-- R255 G130 B71, 0xff8247
sienna1 :: Color
sienna1 = RGB 255 130 71
-- | Names: @["sienna2"]@
--
-- R238 G121 B66, 0xee7942
sienna2 :: Color
sienna2 = RGB 238 121 66
-- | Names: @["sienna3"]@
--
-- R205 G104 B57, 0xcd6839
sienna3 :: Color
sienna3 = RGB 205 104 57
-- | Names: @["sienna4"]@
--
-- R139 G71 B38, 0x8b4726
sienna4 :: Color
sienna4 = RGB 139 71 38
-- | Names: @["SkyBlue","sky blue"]@
--
-- R135 G206 B235, 0x87ceeb
skyBlue :: Color
skyBlue = RGB 135 206 235
-- | Names: @["SkyBlue1"]@
--
-- R135 G206 B255, 0x87ceff
skyBlue1 :: Color
skyBlue1 = RGB 135 206 255
-- | Names: @["SkyBlue2"]@
--
-- R126 G192 B238, 0x7ec0ee
skyBlue2 :: Color
skyBlue2 = RGB 126 192 238
-- | Names: @["SkyBlue3"]@
--
-- R108 G166 B205, 0x6ca6cd
skyBlue3 :: Color
skyBlue3 = RGB 108 166 205
-- | Names: @["SkyBlue4"]@
--
-- R74 G112 B139, 0x4a708b
skyBlue4 :: Color
skyBlue4 = RGB 74 112 139
-- | Names: @["SlateBlue","slate blue"]@
--
-- R106 G90 B205, 0x6a5acd
slateBlue :: Color
slateBlue = RGB 106 90 205
-- | Names: @["SlateBlue1"]@
--
-- R131 G111 B255, 0x836fff
slateBlue1 :: Color
slateBlue1 = RGB 131 111 255
-- | Names: @["SlateBlue2"]@
--
-- R122 G103 B238, 0x7a67ee
slateBlue2 :: Color
slateBlue2 = RGB 122 103 238
-- | Names: @["SlateBlue3"]@
--
-- R105 G89 B205, 0x6959cd
slateBlue3 :: Color
slateBlue3 = RGB 105 89 205
-- | Names: @["SlateBlue4"]@
--
-- R71 G60 B139, 0x473c8b
slateBlue4 :: Color
slateBlue4 = RGB 71 60 139
-- | Names: @["SlateGray","slate gray"]@
--
-- R112 G128 B144, 0x708090
slateGray :: Color
slateGray = RGB 112 128 144
-- | Names: @["SlateGray1"]@
--
-- R198 G226 B255, 0xc6e2ff
slateGray1 :: Color
slateGray1 = RGB 198 226 255
-- | Names: @["SlateGray2"]@
--
-- R185 G211 B238, 0xb9d3ee
slateGray2 :: Color
slateGray2 = RGB 185 211 238
-- | Names: @["SlateGray3"]@
--
-- R159 G182 B205, 0x9fb6cd
slateGray3 :: Color
slateGray3 = RGB 159 182 205
-- | Names: @["SlateGray4"]@
--
-- R108 G123 B139, 0x6c7b8b
slateGray4 :: Color
slateGray4 = RGB 108 123 139
-- | Names: @["SlateGrey","slate grey"]@
--
-- R112 G128 B144, 0x708090
slateGrey :: Color
slateGrey = RGB 112 128 144
-- | Names: @["snow"]@
--
-- R255 G250 B250, 0xfffafa
snow :: Color
snow = RGB 255 250 250
-- | Names: @["snow1"]@
--
-- R255 G250 B250, 0xfffafa
snow1 :: Color
snow1 = RGB 255 250 250
-- | Names: @["snow2"]@
--
-- R238 G233 B233, 0xeee9e9
snow2 :: Color
snow2 = RGB 238 233 233
-- | Names: @["snow3"]@
--
-- R205 G201 B201, 0xcdc9c9
snow3 :: Color
snow3 = RGB 205 201 201
-- | Names: @["snow4"]@
--
-- R139 G137 B137, 0x8b8989
snow4 :: Color
snow4 = RGB 139 137 137
-- | Names: @["SpringGreen","spring green"]@
--
-- R0 G255 B127, 0x00ff7f
springGreen :: Color
springGreen = RGB 0 255 127
-- | Names: @["SpringGreen1"]@
--
-- R0 G255 B127, 0x00ff7f
springGreen1 :: Color
springGreen1 = RGB 0 255 127
-- | Names: @["SpringGreen2"]@
--
-- R0 G238 B118, 0x00ee76
springGreen2 :: Color
springGreen2 = RGB 0 238 118
-- | Names: @["SpringGreen3"]@
--
-- R0 G205 B102, 0x00cd66
springGreen3 :: Color
springGreen3 = RGB 0 205 102
-- | Names: @["SpringGreen4"]@
--
-- R0 G139 B69, 0x008b45
springGreen4 :: Color
springGreen4 = RGB 0 139 69
-- | Names: @["SteelBlue","steel blue"]@
--
-- R70 G130 B180, 0x4682b4
steelBlue :: Color
steelBlue = RGB 70 130 180
-- | Names: @["SteelBlue1"]@
--
-- R99 G184 B255, 0x63b8ff
steelBlue1 :: Color
steelBlue1 = RGB 99 184 255
-- | Names: @["SteelBlue2"]@
--
-- R92 G172 B238, 0x5cacee
steelBlue2 :: Color
steelBlue2 = RGB 92 172 238
-- | Names: @["SteelBlue3"]@
--
-- R79 G148 B205, 0x4f94cd
steelBlue3 :: Color
steelBlue3 = RGB 79 148 205
-- | Names: @["SteelBlue4"]@
--
-- R54 G100 B139, 0x36648b
steelBlue4 :: Color
steelBlue4 = RGB 54 100 139
-- | Names: @["tan"]@
--
-- R210 G180 B140, 0xd2b48c
tan :: Color
tan = RGB 210 180 140
-- | Names: @["tan1"]@
--
-- R255 G165 B79, 0xffa54f
tan1 :: Color
tan1 = RGB 255 165 79
-- | Names: @["tan2"]@
--
-- R238 G154 B73, 0xee9a49
tan2 :: Color
tan2 = RGB 238 154 73
-- | Names: @["tan3"]@
--
-- R205 G133 B63, 0xcd853f
tan3 :: Color
tan3 = RGB 205 133 63
-- | Names: @["tan4"]@
--
-- R139 G90 B43, 0x8b5a2b
tan4 :: Color
tan4 = RGB 139 90 43
-- | Names: @["thistle"]@
--
-- R216 G191 B216, 0xd8bfd8
thistle :: Color
thistle = RGB 216 191 216
-- | Names: @["thistle1"]@
--
-- R255 G225 B255, 0xffe1ff
thistle1 :: Color
thistle1 = RGB 255 225 255
-- | Names: @["thistle2"]@
--
-- R238 G210 B238, 0xeed2ee
thistle2 :: Color
thistle2 = RGB 238 210 238
-- | Names: @["thistle3"]@
--
-- R205 G181 B205, 0xcdb5cd
thistle3 :: Color
thistle3 = RGB 205 181 205
-- | Names: @["thistle4"]@
--
-- R139 G123 B139, 0x8b7b8b
thistle4 :: Color
thistle4 = RGB 139 123 139
-- | Names: @["tomato"]@
--
-- R255 G99 B71, 0xff6347
tomato :: Color
tomato = RGB 255 99 71
-- | Names: @["tomato1"]@
--
-- R255 G99 B71, 0xff6347
tomato1 :: Color
tomato1 = RGB 255 99 71
-- | Names: @["tomato2"]@
--
-- R238 G92 B66, 0xee5c42
tomato2 :: Color
tomato2 = RGB 238 92 66
-- | Names: @["tomato3"]@
--
-- R205 G79 B57, 0xcd4f39
tomato3 :: Color
tomato3 = RGB 205 79 57
-- | Names: @["tomato4"]@
--
-- R139 G54 B38, 0x8b3626
tomato4 :: Color
tomato4 = RGB 139 54 38
-- | Names: @["turquoise"]@
--
-- R64 G224 B208, 0x40e0d0
turquoise :: Color
turquoise = RGB 64 224 208
-- | Names: @["turquoise1"]@
--
-- R0 G245 B255, 0x00f5ff
turquoise1 :: Color
turquoise1 = RGB 0 245 255
-- | Names: @["turquoise2"]@
--
-- R0 G229 B238, 0x00e5ee
turquoise2 :: Color
turquoise2 = RGB 0 229 238
-- | Names: @["turquoise3"]@
--
-- R0 G197 B205, 0x00c5cd
turquoise3 :: Color
turquoise3 = RGB 0 197 205
-- | Names: @["turquoise4"]@
--
-- R0 G134 B139, 0x00868b
turquoise4 :: Color
turquoise4 = RGB 0 134 139
-- | Names: @["violet"]@
--
-- R238 G130 B238, 0xee82ee
violet :: Color
violet = RGB 238 130 238
-- | Names: @["VioletRed","violet red"]@
--
-- R208 G32 B144, 0xd02090
violetRed :: Color
violetRed = RGB 208 32 144
-- | Names: @["VioletRed1"]@
--
-- R255 G62 B150, 0xff3e96
violetRed1 :: Color
violetRed1 = RGB 255 62 150
-- | Names: @["VioletRed2"]@
--
-- R238 G58 B140, 0xee3a8c
violetRed2 :: Color
violetRed2 = RGB 238 58 140
-- | Names: @["VioletRed3"]@
--
-- R205 G50 B120, 0xcd3278
violetRed3 :: Color
violetRed3 = RGB 205 50 120
-- | Names: @["VioletRed4"]@
--
-- R139 G34 B82, 0x8b2252
violetRed4 :: Color
violetRed4 = RGB 139 34 82
-- | Names: @["wheat"]@
--
-- R245 G222 B179, 0xf5deb3
wheat :: Color
wheat = RGB 245 222 179
-- | Names: @["wheat1"]@
--
-- R255 G231 B186, 0xffe7ba
wheat1 :: Color
wheat1 = RGB 255 231 186
-- | Names: @["wheat2"]@
--
-- R238 G216 B174, 0xeed8ae
wheat2 :: Color
wheat2 = RGB 238 216 174
-- | Names: @["wheat3"]@
--
-- R205 G186 B150, 0xcdba96
wheat3 :: Color
wheat3 = RGB 205 186 150
-- | Names: @["wheat4"]@
--
-- R139 G126 B102, 0x8b7e66
wheat4 :: Color
wheat4 = RGB 139 126 102
-- | Names: @["white"]@
--
-- R255 G255 B255, 0xffffff
white :: Color
white = RGB 255 255 255
-- | Names: @["WhiteSmoke","white smoke"]@
--
-- R245 G245 B245, 0xf5f5f5
whiteSmoke :: Color
whiteSmoke = RGB 245 245 245
-- | Names: @["yellow"]@
--
-- R255 G255 B0, 0xffff00
yellow :: Color
yellow = RGB 255 255 0
-- | Names: @["yellow1"]@
--
-- R255 G255 B0, 0xffff00
yellow1 :: Color
yellow1 = RGB 255 255 0
-- | Names: @["yellow2"]@
--
-- R238 G238 B0, 0xeeee00
yellow2 :: Color
yellow2 = RGB 238 238 0
-- | Names: @["yellow3"]@
--
-- R205 G205 B0, 0xcdcd00
yellow3 :: Color
yellow3 = RGB 205 205 0
-- | Names: @["yellow4"]@
--
-- R139 G139 B0, 0x8b8b00
yellow4 :: Color
yellow4 = RGB 139 139 0
-- | Names: @["YellowGreen","yellow green"]@
--
-- R154 G205 B50, 0x9acd32
yellowGreen :: Color
yellowGreen = RGB 154 205 50
| Fuuzetsu/yi-emacs-colours | src/Yi/Style/EmacsColours.hs | gpl-2.0 | 69,603 | 0 | 6 | 13,358 | 13,177 | 7,914 | 5,263 | 1,317 | 1 |
{- |
Module : $Header$
Description : builtin types and functions
Copyright : (c) Christian Maeder and Uni Bremen 2003
License : GPLv2 or higher, see LICENSE.txt
Maintainer : [email protected]
Stability : experimental
Portability : portable
HasCASL's builtin types and functions
-}
module HasCASL.Builtin
( cpoMap
, bList
, bTypes
, bOps
, preEnv
, addBuiltins
, aTypeArg
, bTypeArg
, cTypeArg
, aType
, bType
, cType
, botId
, whenElse
, ifThenElse
, defId
, eqId
, exEq
, falseId
, trueId
, notId
, negId
, andId
, orId
, logId
, predTypeId
, implId
, infixIf
, eqvId
, resId
, resType
, botType
, whenType
, defType
, eqType
, notType
, logType
, mkQualOp
, mkEqTerm
, mkLogTerm
, toBinJunctor
, mkTerm
, unitTerm
, unitTypeScheme
) where
import Common.Id
import Common.Keywords
import Common.GlobalAnnotations
import Common.AS_Annotation
import Common.AnnoParser
import Common.AnalyseAnnos
import Common.Result
import qualified Data.Map as Map
import qualified Data.Set as Set
import qualified Common.Lib.Rel as Rel
import HasCASL.As
import HasCASL.AsUtils
import HasCASL.Le
import Text.ParserCombinators.Parsec
-- * buitln identifiers
trueId :: Id
trueId = mkId [mkSimpleId trueS]
falseId :: Id
falseId = mkId [mkSimpleId falseS]
ifThenElse :: Id
ifThenElse = mkId (map mkSimpleId [ifS, place, thenS, place, elseS, place])
whenElse :: Id
whenElse = mkId (map mkSimpleId [place, whenS, place, elseS, place])
infixIf :: Id
infixIf = mkInfix ifS
andId :: Id
andId = mkInfix lAnd
orId :: Id
orId = mkInfix lOr
implId :: Id
implId = mkInfix implS
eqvId :: Id
eqvId = mkInfix equivS
resId :: Id
resId = mkInfix "res"
{-
make these prefix identifier to allow "not def x" to be recognized
as "not (def x)" by giving def__ higher precedence then not__.
Simple identifiers usually have higher precedence then ____,
otherwise "def x" would be rejected. But with simple identifiers
"not def x" would be parsed as "(not def) x" because ____ is left
associative.
-}
defId :: Id
defId = mkId [mkSimpleId defS, placeTok]
notId :: Id
notId = mkId [mkSimpleId notS, placeTok]
negId :: Id
negId = mkId [mkSimpleId negS, placeTok]
builtinRelIds :: Set.Set Id
builtinRelIds = Set.fromList [typeId, eqId, exEq, defId]
builtinLogIds :: Set.Set Id
builtinLogIds = Set.fromList [andId, eqvId, implId, orId, infixIf, notId]
-- | add builtin identifiers
addBuiltins :: GlobalAnnos -> GlobalAnnos
addBuiltins ga =
let ass = assoc_annos ga
newAss = Map.union ass $ Map.fromList
[(applId, ALeft), (andId, ALeft), (orId, ALeft),
(implId, ARight), (infixIf, ALeft),
(whenElse, ARight)]
precs = prec_annos ga
pMap = Rel.toMap precs
opIds = Set.unions (Map.keysSet pMap : Map.elems pMap)
opIs = Set.toList
(((Set.filter (\ i -> begPlace i || endPlace i) opIds
Set.\\ builtinRelIds) Set.\\ builtinLogIds)
Set.\\ Set.fromList [applId, whenElse])
logs = [(eqvId, implId), (implId, andId), (implId, orId),
(eqvId, infixIf), (infixIf, andId), (infixIf, orId),
(andId, notId), (orId, notId),
(andId, negId), (orId, negId)]
rels1 = map ( \ i -> (notId, i)) $ Set.toList builtinRelIds
rels1b = map ( \ i -> (negId, i)) $ Set.toList builtinRelIds
rels2 = map ( \ i -> (i, whenElse)) $ Set.toList builtinRelIds
ops1 = map ( \ i -> (whenElse, i)) (applId : opIs)
ops2 = map ( \ i -> (i, applId)) opIs
newPrecs = foldl (\ p (a, b) -> if Rel.path b a p then p else
Rel.insertDiffPair a b p) precs $
concat [logs, rels1, rels1b, rels2, ops1, ops2]
in case addGlobalAnnos ga { assoc_annos = newAss
, prec_annos = Rel.transClosure newPrecs } $
map parseDAnno displayStrings of
Result _ (Just newGa) -> newGa
_ -> error "addBuiltins"
displayStrings :: [String]
displayStrings =
[ "%display __\\/__ %LATEX __\\vee__"
, "%display __/\\__ %LATEX __\\wedge__"
, "%display __=>__ %LATEX __\\Rightarrow__"
, "%display __<=>__ %LATEX __\\Leftrightarrow__"
, "%display not__ %LATEX \\neg__"
]
parseDAnno :: String -> Annotation
parseDAnno str = case parse annotationL "" str of
Left _ -> error "parseDAnno"
Right a -> a
aVar :: Id
aVar = stringToId "a"
bVar :: Id
bVar = stringToId "b"
cVar :: Id
cVar = stringToId "c"
aType :: Type
aType = typeArgToType aTypeArg
bType :: Type
bType = typeArgToType bTypeArg
cType :: Type
cType = typeArgToType cTypeArg
lazyAType :: Type
lazyAType = mkLazyType aType
varToTypeArgK :: Id -> Int -> Variance -> Kind -> TypeArg
varToTypeArgK i n v k = TypeArg i v (VarKind k) (toRaw k) n Other nullRange
varToTypeArg :: Id -> Int -> Variance -> TypeArg
varToTypeArg i n v = varToTypeArgK i n v universe
mkATypeArg :: Variance -> TypeArg
mkATypeArg = varToTypeArg aVar (-1)
aTypeArg :: TypeArg
aTypeArg = mkATypeArg NonVar
aTypeArgK :: Kind -> TypeArg
aTypeArgK = varToTypeArgK aVar (-1) NonVar
bTypeArg :: TypeArg
bTypeArg = varToTypeArg bVar (-2) NonVar
cTypeArg :: TypeArg
cTypeArg = varToTypeArg cVar (-3) NonVar
bindVarA :: TypeArg -> Type -> TypeScheme
bindVarA a t = TypeScheme [a] t nullRange
bindA :: Type -> TypeScheme
bindA = bindVarA aTypeArg
resType :: TypeScheme
resType = TypeScheme [aTypeArg, bTypeArg]
(mkFunArrType (mkProductType [lazyAType, mkLazyType bType]) FunArr aType)
nullRange
lazyLog :: Type
lazyLog = mkLazyType unitType
aPredType :: Type
aPredType = TypeAbs (mkATypeArg ContraVar)
(mkFunArrType aType PFunArr unitType) nullRange
eqType :: TypeScheme
eqType = bindA $ mkFunArrType (mkProductType [lazyAType, lazyAType])
PFunArr unitType
logType :: TypeScheme
logType = simpleTypeScheme $ mkFunArrType
(mkProductType [lazyLog, lazyLog]) PFunArr unitType
notType :: TypeScheme
notType = simpleTypeScheme $ mkFunArrType lazyLog PFunArr unitType
whenType :: TypeScheme
whenType = bindA $ mkFunArrType
(mkProductType [lazyAType, lazyLog, lazyAType]) PFunArr aType
unitTypeScheme :: TypeScheme
unitTypeScheme = simpleTypeScheme lazyLog
botId :: Id
botId = mkId [mkSimpleId "bottom"]
predTypeId :: Id
predTypeId = mkId [mkSimpleId "Pred"]
logId :: Id
logId = mkId [mkSimpleId "Logical"]
botType :: TypeScheme
botType = let a = aTypeArgK cppoCl in bindVarA a $ mkLazyType $ typeArgToType a
defType :: TypeScheme
defType = bindA $ mkFunArrType lazyAType PFunArr unitType
-- | builtin functions
bList :: [(Id, TypeScheme)]
bList = (botId, botType) : (defId, defType) : (notId, notType) :
(negId, notType) : (whenElse, whenType) :
(trueId, unitTypeScheme) : (falseId, unitTypeScheme) :
(eqId, eqType) : (exEq, eqType) : (resId, resType) :
map ( \ o -> (o, logType)) [andId, orId, eqvId, implId, infixIf]
mkTypesEntry :: Id -> Kind -> [Kind] -> [Id] -> TypeDefn -> (Id, TypeInfo)
mkTypesEntry i k cs s d =
(i, TypeInfo (toRaw k) (Set.fromList cs) (Set.fromList s) d)
funEntry :: Arrow -> [Arrow] -> [Kind] -> (Id, TypeInfo)
funEntry a s cs =
mkTypesEntry (arrowId a) funKind (funKind : cs) (map arrowId s) NoTypeDefn
mkEntry :: Id -> Kind -> [Kind] -> TypeDefn -> (Id, TypeInfo)
mkEntry i k cs = mkTypesEntry i k cs []
pEntry :: Id -> Kind -> TypeDefn -> (Id, TypeInfo)
pEntry i k = mkEntry i k [k]
-- | builtin data type map
bTypes :: TypeMap
bTypes = Map.fromList $ funEntry PFunArr [] []
: funEntry FunArr [PFunArr] []
: funEntry PContFunArr [PFunArr] [funKind3 cpoCl cpoCl cppoCl]
: funEntry ContFunArr [PContFunArr, FunArr]
[funKind3 cpoCl cpoCl cpoCl, funKind3 cpoCl cppoCl cppoCl]
: pEntry unitTypeId cppoCl NoTypeDefn
: pEntry predTypeId (FunKind ContraVar universe universe nullRange)
(AliasTypeDefn aPredType)
: pEntry lazyTypeId coKind NoTypeDefn
: pEntry logId universe (AliasTypeDefn $ mkLazyType unitType)
: map (\ n -> let k = prodKind n nullRange in
mkEntry (productId n nullRange) k
(k : map (prodKind1 n nullRange) [cpoCl, cppoCl]) NoTypeDefn)
[2 .. 5]
cpoId :: Id
cpoId = stringToId "Cpo"
cpoCl :: Kind
cpoCl = ClassKind cpoId
cppoId :: Id
cppoId = stringToId "Cppo"
cppoCl :: Kind
cppoCl = ClassKind cppoId
-- | builtin class map
cpoMap :: ClassMap
cpoMap = Map.fromList
[ (cpoId, ClassInfo rStar $ Set.singleton universe)
, (cppoId, ClassInfo rStar $ Set.singleton cpoCl)]
-- | builtin function map
bOps :: Assumps
bOps = Map.fromList $ map ( \ (i, sc) ->
(i, Set.singleton $ OpInfo sc Set.empty $ NoOpDefn Fun)) bList
-- | environment with predefined names
preEnv :: Env
preEnv = initialEnv { classMap = cpoMap, typeMap = bTypes, assumps = bOps }
mkQualOp :: Id -> TypeScheme -> [Type] -> Range -> Term
mkQualOp i sc tys ps = QualOp Fun (PolyId i [] ps) sc tys Infer ps
mkTerm :: Id -> TypeScheme -> [Type] -> Range -> Term -> Term
mkTerm i sc tys ps t = ApplTerm (mkQualOp i sc tys ps) t ps
mkBinTerm :: Id -> TypeScheme -> [Type] -> Range -> Term -> Term -> Term
mkBinTerm i sc tys ps t1 t2 = mkTerm i sc tys ps $ TupleTerm [t1, t2] ps
mkLogTerm :: Id -> Range -> Term -> Term -> Term
mkLogTerm i = mkBinTerm i logType []
mkEqTerm :: Id -> Type -> Range -> Term -> Term -> Term
mkEqTerm i ty = mkBinTerm i eqType [ty]
unitTerm :: Id -> Range -> Term
unitTerm i = mkQualOp i unitTypeScheme []
toBinJunctor :: Id -> [Term] -> Range -> Term
toBinJunctor i ts ps = case ts of
[] -> error "toBinJunctor"
[t] -> t
t : rs -> mkLogTerm i ps t (toBinJunctor i rs ps)
| nevrenato/Hets_Fork | HasCASL/Builtin.hs | gpl-2.0 | 9,803 | 0 | 20 | 2,298 | 3,199 | 1,755 | 1,444 | 260 | 3 |
{-# language DeriveDataTypeable, TemplateHaskell, FlexibleInstances, MultiParamTypeClasses #-}
module Program.Cexp.Interface where
import qualified Program.Cexp.Type as T
import qualified Program.Cexp.Annotated as A
import Challenger.Partial
import Autolib.ToDoc
import Autolib.Reader
import Autolib.Reporter
import Inter.Types
import Inter.Quiz
import Data.Typeable
data Cexp = Cexp deriving Typeable
instance OrderScore Cexp where
scoringOrder _ = None -- ?
$(derives [makeToDoc,makeReader] [''Cexp])
-- Note: Order of components (first Integer, then T.Exp)
-- is important for parsing. T.Exp first would not work
-- since the final "," will be parsed as part of the T.Exp.
-- Fixme: "--" operator may be confused with comment?
instance Partial Cexp ( Integer, T.Exp ) A.Annotated where
describe _ ( v, x ) = vcat
[ text "Gesucht ist eine Auswertungsreihenfolge, durch welche der Ausdruck"
, nest 4 $ toDoc x
, text "den Wert" <+> toDoc v <+> text "bekommt."
, text "TODO: more text"
]
initial _ ( v, x ) = A.start x
partial _ ( v, x ) a = A.same_skeleton (x, a)
total _ ( v, x ) a = do
A.execute a
A.check a
when ( A.rvalue a /= Just v )
$ reject $ text "Wert stimmt nicht mit Ziel überein."
make_fixed :: Make
make_fixed = direct Cexp T.example | florianpilz/autotool | src/Program/Cexp/Interface.hs | gpl-2.0 | 1,363 | 0 | 14 | 315 | 334 | 181 | 153 | 30 | 1 |
{-
Given: A DNA string s of length at most 100 bp and an array A containing at most 20 numbers between 0 and 1.
Return: An array B having the same length as A in which B[k]
represents the common logarithm of the probability that
a random string constructed with the GC-content
found in A[k] will match s exactly.
-}
probability input s = map (logBase 10) zz
where
zz = zipWith (*) aa gg
aa = map (** atpow) at
gg = map (** cgpow) gc
cgpow = fromIntegral . length $ filter (`elem` ['C','G']) s
atpow = fromIntegral . length $ filter (`elem` ['A','T']) s
gc = map (* 0.5) input
at = [(1 - a) * 0.5 | a <- input]
main = do
input_raw <- readFile "rosalind_prob.txt"
let input_l = lines input_raw
s = input_l!!0
a = input_l!!1
let input = map (\x -> read x :: Double) (words a)
res = probability input s
putStrLn $ unwords . map (show) $ res | forgit/Rosalind | prob.hs | gpl-2.0 | 986 | 0 | 13 | 317 | 278 | 149 | 129 | 16 | 1 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 [email protected]
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- grid is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with grid. If not, see <http://www.gnu.org/licenses/>.
--
module LevelTools.Helpers where
import MyPrelude
import LevelTools.EditWorld
import Game.Grid.Helpers
findInvalidObject :: EditWorld -> Maybe (RoomIx, Node, String)
findInvalidObject edit =
let ixs = map (\sr -> sroomRoomIx sr) $ scontentRooms $ editSemiContent edit
dotplains = concatMap (\sr -> map (\dot -> (sroomRoomIx sr, dot)) (sroomDotPlain sr)) $ scontentRooms $ editSemiContent edit
in helper ixs dotplains
where
helper :: [RoomIx] -> [(RoomIx, DotPlain)] -> Maybe (RoomIx, Node, String)
helper ixs ((room, dot):rds) =
if dotplainRoom dot `elem` ixs
then helper ixs rds
else Just (room, dotplainNode dot, "no such RoomIx: " ++ show (dotplainRoom dot))
helper ixs [] =
Nothing
editModifyCamera edit f =
editModifyGrid edit $ \grid -> gridModifyCamera grid f
editModifyGrid edit f =
edit { editGrid = f (editGrid edit) }
editModifyLevel edit f =
edit { editLevel = f $ editLevel edit }
editModifyCameraNode edit f =
edit { editCameraNode = f $ editCameraNode edit }
editModifyNode edit f =
edit { editNode = f $ editNode edit }
editModifySemiContent edit f =
edit { editSemiContent = f $ editSemiContent edit }
editModifyDotPlain edit f =
edit { editDotPlain = f $ editDotPlain edit }
editModifyDotBonus edit f =
edit { editDotBonus = f $ editDotBonus edit }
editModifyDotTele edit f =
edit { editDotTele = f $ editDotTele edit }
editModifyDotFinish edit f =
edit { editDotFinish = f $ editDotFinish edit }
editModifyWall edit f =
edit { editWall = f $ editWall edit }
scontentPushDotPlain cnt room dot =
cnt { scontentRooms = helper (scontentRooms cnt) room dot }
where
helper (r:rs) ix dot =
if sroomRoomIx r == ix then let r' = r { sroomDotPlain = sroomDotPlain r ++ [dot] }
in r' : rs
else r : helper rs ix dot
helper [] ix dot =
[makeSemiRoom ix [] [dot] [] [] []]
scontentPushDotBonus cnt room dot =
cnt { scontentRooms = helper (scontentRooms cnt) room dot }
where
helper (r:rs) ix dot =
if sroomRoomIx r == ix then let r' = r { sroomDotBonus = sroomDotBonus r ++ [dot] }
in r' : rs
else r : helper rs ix dot
helper [] ix dot =
[makeSemiRoom ix [] [] [dot] [] []]
scontentPushDotTele cnt room dot =
cnt { scontentRooms = helper (scontentRooms cnt) room dot }
where
helper (r:rs) ix dot =
if sroomRoomIx r == ix then let r' = r { sroomDotTele = sroomDotTele r ++ [dot] }
in r' : rs
else r : helper rs ix dot
helper [] ix dot =
[makeSemiRoom ix [] [] [] [dot] []]
scontentPushDotFinish cnt room dot =
cnt { scontentRooms = helper (scontentRooms cnt) room dot }
where
helper (r:rs) ix dot =
if sroomRoomIx r == ix then let r' = r { sroomDotFinish = sroomDotFinish r ++ [dot] }
in r' : rs
else r : helper rs ix dot
helper [] ix dot =
[makeSemiRoom ix [] [] [] [] [dot]]
scontentPushWall cnt room wall =
cnt { scontentRooms = helper (scontentRooms cnt) room wall }
where
helper (r:rs) ix wall =
if sroomRoomIx r == ix then let r' = r { sroomWall = sroomWall r ++ [wall] }
in r' : rs
else r : helper rs ix wall
helper [] ix wall =
[makeSemiRoom ix [wall] [] [] [] []]
--------------------------------------------------------------------------------
-- editObjects
editChangeObject edit node =
let (edit', mWall, mDotPlain, mDotBonus, mDotTele, mDotFinish) =
modSemiContent edit $ \cnt -> modRoom cnt (scontentRoom cnt) $ \room ->
helper0 room node
in edit'
{
editWall = maybe' (editWall edit) mWall,
editDotPlain = maybe' (editDotPlain edit) mDotPlain,
editDotBonus = maybe' (editDotBonus edit) mDotBonus,
editDotTele = maybe' (editDotTele edit) mDotTele,
editDotFinish = maybe' (editDotFinish edit) mDotFinish
}
where
maybe' a = \maybeA -> case maybeA of
Nothing -> a
Just a' -> a'
modSemiContent edit f =
let (cnt', m0, m1, m2, m3, m4) = f (editSemiContent edit)
in (edit { editSemiContent = cnt' }, m0, m1, m2, m3, m4)
modRoom cnt ix f =
let (rooms', m0, m1, m2, m3, m4) = helper (scontentRooms cnt) ix f
in (cnt { scontentRooms = rooms' }, m0, m1, m2, m3, m4)
where
helper (r:rs) ix f =
if sroomRoomIx r == ix then let (r', m0, m1, m2, m3, m4) = f r
in (r':rs, m0, m1, m2, m3, m4)
else helper rs ix f
helper [] ix f =
([], Nothing, Nothing, Nothing, Nothing, Nothing)
helper0 room node =
case helper (sroomDotPlain room) of
Just (d, ds) -> (room { sroomDotPlain = ds }, Nothing, Just d, Nothing, Nothing, Nothing)
Nothing -> helper1 room node
where
helper (d:ds) =
if dotplainNode d == node then Just (d, ds)
else case helper ds of
Just (d', ds') -> Just (d', d:ds')
Nothing -> Nothing
helper [] =
Nothing
helper1 room node =
case helper (sroomDotBonus room) of
Just (d, ds) -> (room { sroomDotBonus = ds }, Nothing, Nothing, Just d, Nothing, Nothing)
Nothing -> helper2 room node
where
helper (d:ds) =
if dotbonusNode d == node then Just (d, ds)
else case helper ds of
Just (d', ds') -> Just (d', d:ds')
Nothing -> Nothing
helper [] =
Nothing
helper2 room node =
case helper (sroomDotTele room) of
Just (d, ds) -> (room { sroomDotTele= ds }, Nothing, Nothing, Nothing, Just d, Nothing)
Nothing -> helper3 room node
where
helper (d:ds) =
if dotteleNode d == node || dotteleNode' d == node then Just (d, ds)
else case helper ds of
Just (d', ds') -> Just (d', d:ds')
Nothing -> Nothing
helper [] =
Nothing
helper3 room node =
case helper (sroomDotFinish room) of
Just (d, ds) -> (room { sroomDotFinish = ds }, Nothing, Nothing, Nothing, Nothing, Just d)
Nothing -> helper4 room node
where
helper (d:ds) =
if dotfinishNode d == node then Just (d, ds)
else case helper ds of
Just (d', ds') -> Just (d', d:ds')
Nothing -> Nothing
helper [] =
Nothing
helper4 room node =
case helper (sroomWall room) of
Just (d, ds) -> (room { sroomWall = ds }, Just d, Nothing, Nothing, Nothing, Nothing)
Nothing -> (room, Nothing, Nothing, Nothing, Nothing, Nothing)
where
helper (d:ds) =
if isCol d node then Just (d, ds)
else case helper ds of
Just (d', ds') -> Just (d', d:ds')
Nothing -> Nothing
helper [] =
Nothing
isCol wall node =
case nodeDiff (wallNode wall) node of
p -> let x = wallX wall
y = wallY wall
n = nodeCross x y
ix = nodeInner p x
iy = nodeInner p y
in nodeInner p n == 0 && 0 <= ix && ix <= nodeInner x x
&& 0 <= iy && iy <= nodeInner y y
editEraseObject edit node =
edit
| karamellpelle/grid | designer/source/LevelTools/Helpers.hs | gpl-3.0 | 9,124 | 0 | 23 | 3,541 | 2,840 | 1,503 | 1,337 | 169 | 24 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DeriveDataTypeable #-}
-- | This program compares two Infernal covariance models with each other.
-- Based on the Infernal CM scoring mechanism, a Link sequence and Link score
-- are calculated. The Link sequence is defined as the sequence scoring highest
-- in both models simultanuously.
--
-- The complete algorithm is described in:
--
-- "Christian Höner zu Siederdissen, and Ivo L. Hofacker. 2010. Discriminatory
-- power of RNA family models. Bioinformatics 26, no. 18: 453–59."
--
-- <http://bioinformatics.oxfordjournals.org/content/26/18/i453.long>
--
--
--
-- NOTE always use coverage analysis to find out, if we really used all code
-- paths (in long models, if a path is not taken, there is a bug)
-- NOTE when comparing hits with cmsearch, use the following commandline:
--
-- cmsearch --no-null3 --cyk --fil-no-hmm --fil-no-qdb
--
-- --no-null3 : important, the test sequence is so short that null3 can easily
-- generate scores that are way off! remember, we are interested in a sequence
-- that is typically embedded in something large
--
-- --fil-no-hmm, --fil-no-qdb: do not use heuristics for speedup, they
-- sometimes hide results (in at least one case)
--
-- (--toponly): if the comparison was done onesided
--
-- (-g): if you want to compare globally
module BioInf.CMCompare where
import Control.Arrow (first,second,(***))
import Control.Lens
import Control.Monad
import Data.Array.IArray
import Data.List (maximumBy,nub,sort)
import qualified Data.Map as M
import System.Console.CmdArgs
import System.Environment (getArgs)
import Text.Printf
import Biobase.Primary
import Biobase.SElab.CM
import Biobase.SElab.CM.Import
import Biobase.SElab.Types
-- * optimization functions
-- | Type of the optimization functions.
type Opt a =
( CM -> StateID -> a -- E
, CM -> StateID -> BitScore -> a -> a -- lbegin
, CM -> StateID -> BitScore -> a -> a -- S
, CM -> StateID -> BitScore -> a -> a -- D
, CM -> StateID -> BitScore -> (Char,Char,BitScore) -> a -> a -- MP
, CM -> StateID -> BitScore -> (Char,BitScore) -> a -> a -- ML
, CM -> StateID -> BitScore -> (Char,BitScore) -> a -> a -- IL
, CM -> StateID -> BitScore -> (Char,BitScore) -> a -> a -- MR
, CM -> StateID -> BitScore -> (Char,BitScore) -> a -> a -- IR
, CM -> StateID -> a -> a -> a -- B
, [(a,a)] -> [(a,a)] -- optimization
, a -> String -- finalize, make pretty for output
)
-- | Calculates the cyk optimal score over both models.
cykMaxiMin :: Opt BitScore
cykMaxiMin = (end,lbegin,start,delete,matchP,matchL,insertL,matchR,insertR,branch,opt,finalize) where
end _ _ = 0
lbegin _ _ t s = t + s
start _ _ t s = t + s
delete _ _ t s = t + s
matchP _ _ t (_,_,e) s = t + e + s
matchL _ _ t (_,e) s = t + e + s
insertL _ _ t (_,e) s = t + e + s
matchR _ _ t (_,e) s = t + e + s
insertR _ _ t (_,e) s = t + e + s
branch _ _ s t = s + t
opt [] = []
opt xs = [maximumBy (\(a,b) (c,d) -> (min a b) `compare` (min c d)) xs] -- (xs `using` parList rdeepseq)]
finalize s = show s
-- | Return the nucleotide sequence leading to the score. uses an optional
-- endmarker to denote end states. the string is the same for both models. this
-- is the only Opt function, currently, for which this is true.
rnaString :: Bool -> Opt [Char]
rnaString endmarker = (end,lbegin,start,delete,matchP,matchL,insertL,matchR,insertR,branch,opt,finalize) where
end _ _ = ['N' | endmarker]
lbegin _ _ _ s = s
start _ _ _ s = s
delete _ _ _ s = s
matchP _ _ _ (k1,k2,_) s = [k1] ++ s ++ [k2]
matchL _ _ _ (k,_) s = k : s
insertL _ _ _ (k,_) s = k : s
matchR _ _ _ (k,_) s = s ++ [k]
insertR _ _ _ (k,_) s = s ++ [k]
branch _ _ s t = s ++ t
opt = id
finalize s = if endmarker
then concatMap f s
else concatMap show s
f x
| x=='N' = "_"
| otherwise = show x
-- | Dotbracket notation, again with an endmarker, to see the secondary
-- structure corresponding to the rnastring.
dotBracket :: Bool -> Opt String
dotBracket endmarker = (end,lbegin,start,delete,matchP,matchL,insertL,matchR,insertR,branch,opt,finalize) where
end _ _ = ['_' | endmarker]
lbegin _ _ _ s = s
start _ _ _ s = s
delete _ _ _ s = s
matchP _ _ _ _ s = "(" ++ s ++ ")"
matchL _ _ _ _ s = '.' : s
insertL _ _ _ _ s = ',' : s
matchR _ _ _ _ s = s ++ "."
insertR _ _ _ _ s = s ++ ","
branch _ _ s t = s ++ t
opt = id
finalize s = s
-- | Show the nodes which were visited to get the score. the last node can
-- occur multiple times. if it does, local end transitions were used.
visitedNodes :: Opt [NodeID]
visitedNodes = (end,lbegin,start,delete,matchP,matchL,insertL,matchR,insertR,branch,opt,finalize) where
end cm k = [((cm^.states) M.! k) ^. nodeID]
lbegin cm k _ s = s
start cm k _ s = ((cm^.states) M.! k) ^. nodeID : s
delete cm k _ s = ((cm^.states) M.! k) ^. nodeID : s
matchP cm k _ _ s = ((cm^.states) M.! k) ^. nodeID : s
matchL cm k _ _ s = ((cm^.states) M.! k) ^. nodeID : s
insertL cm k _ _ s = ((cm^.states) M.! k) ^. nodeID : s
matchR cm k _ _ s = ((cm^.states) M.! k) ^. nodeID : s
insertR cm k _ _ s = ((cm^.states) M.! k) ^. nodeID : s
branch cm k s t = ((cm^.states) M.! k) ^. nodeID : (s ++ t)
opt = id -- NOTE do not sort, do not nub !
finalize xs = (show $ map unNodeID xs) -- NOTE do not sort, do not nub !
-- | Detailed output of the different states, that were visited.
extendedOutput :: Opt String
extendedOutput = (end,lbegin,start,delete,matchP,matchL,insertL,matchR,insertR,branch,opt,finalize) where
end cm sid = printf "E %5d %5d" (unStateID sid) (unNodeID $ ((cm^.states) M.! sid)^.nodeID)
lbegin cm sid t s = printf "lbegin %5d %5d %7.3f \n%s" (unStateID sid) (unNodeID $ ((cm^.states) M.! sid)^.nodeID) (unBitScore t) s
start cm sid t s = printf "S %5d %5d %7.3f \n%s" (unStateID sid) (unNodeID $ ((cm^.states) M.! sid)^.nodeID) (unBitScore t) s
delete cm sid t s = printf "D %5d %5d %7.3f \n%s" (unStateID sid) (unNodeID $ ((cm^.states) M.! sid)^.nodeID) (unBitScore t) s
matchP cm sid t (k1,k2,e) s = printf "MP %5d %5d %7.3f %7.3f %1s %1s\n%s" (unStateID sid) (unNodeID $ ((cm^.states) M.! sid)^.nodeID) (unBitScore t) (unBitScore e) (show k1) (show k2) s
matchL cm sid t (k,e) s = printf "ML %5d %5d %7.3f %7.3f %1s\n%s" (unStateID sid) (unNodeID $ ((cm^.states) M.! sid)^.nodeID) (unBitScore t) (unBitScore e) (show k) s
insertL cm sid t (k,e) s = printf "IL %5d %5d %7.3f %7.3f %1s\n%s" (unStateID sid) (unNodeID $ ((cm^.states) M.! sid)^.nodeID) (unBitScore t) (unBitScore e) (show k) s
matchR cm sid t (k,e) s = printf "MR %5d %5d %7.3f %7.3f %1s\n%s" (unStateID sid) (unNodeID $ ((cm^.states) M.! sid)^.nodeID) (unBitScore t) (unBitScore e) (show k) s
insertR cm sid t (k,e) s = printf "IR %5d %5d %7.3f %7.3f %1s\n%s" (unStateID sid) (unNodeID $ ((cm^.states) M.! sid)^.nodeID) (unBitScore t) (unBitScore e) (show k) s
branch cm sid s t = printf "B %5d %5d\n%s\n%s" (unStateID sid) (unNodeID $ ((cm^.states) M.! sid) ^. nodeID) s t
opt = id
finalize s = "\nLabel State Node Trans Emis\n\n" ++ s
-- | Algebra product operation.
(<*>) :: Eq a => Opt a -> Opt b -> Opt (a,b)
algA <*> algB = (end,lbegin,start,delete,matchP,matchL,insertL,matchR,insertR,branch,opt,finalize) where
(endA,lbeginA,startA,deleteA,matchPA,matchLA,insertLA,matchRA,insertRA,branchA,optA,finalizeA) = algA
(endB,lbeginB,startB,deleteB,matchPB,matchLB,insertLB,matchRB,insertRB,branchB,optB,finalizeB) = algB
end cm k = (endA cm k, endB cm k)
lbegin cm k t (sA,sB) = (lbeginA cm k t sA, lbeginB cm k t sB)
start cm k t (sA,sB) = (startA cm k t sA, startB cm k t sB)
delete cm k t (sA,sB) = (deleteA cm k t sA, deleteB cm k t sB)
matchP cm k t e (sA,sB) = (matchPA cm k t e sA, matchPB cm k t e sB)
matchL cm k t e (sA,sB) = (matchLA cm k t e sA, matchLB cm k t e sB)
insertL cm k t e (sA,sB) = (insertLA cm k t e sA, insertLB cm k t e sB)
matchR cm k t e (sA,sB) = (matchRA cm k t e sA, matchRB cm k t e sB)
insertR cm k t e (sA,sB) = (insertRA cm k t e sA, insertRB cm k t e sB)
branch cm k (sA,sB) (tA,tB) = (branchA cm k sA tA, branchB cm k sB tB)
opt xs = [((xl1,xl2),(xr1,xr2)) | (xl1,xr1) <- nub $ optA [(yl1,yr1) | ((yl1,yl2),(yr1,yr2)) <- xs]
, (xl2,xr2) <- optB [(yl2,yr2) | ((yl1,yl2),(yr1,yr2)) <- xs, (yl1,yr1) == (xl1,xr1)]
]
finalize (sA,sB) = finalizeA sA ++ "\n" ++ finalizeB sB
-- * The grammar for CM comparison.
-- | Recursion in two CMs simultanously.
recurse :: Bool -> Opt a -> CM -> CM -> Array (StateID,StateID) [(a,a)]
recurse fastIns (end,lbegin,start,delete,matchP,matchL,insertL,matchR,insertR,branch,opt,finalize) m1 m2 = locarr where
loc k1 k2
| otherwise = opt $ do
r <- arr ! (k1, k2)
return $ (lbegin m1 k1 lb1 *** lbegin m2 k2 lb2) r
where
lb1 = M.findWithDefault (BitScore (-10000)) k1 (m1^.localBegin)
lb2 = M.findWithDefault (BitScore (-10000)) k2 (m2^.localBegin)
rec k1 k2 = let xyz = rec' k1 k2
in xyz -- traceShow ("rec",k1,((m1^.states) M.! k1) ^. stateType,k2,((m2^.states) M.! k2) ^. stateType) xyz
rec' k1 k2
--
| t1 == E && t2 == E = [(end m1 k1, end m2 k2)]
--
| t1 == S && t2 == S = opt $ do
(c1,tr1) <- s1 ^. transitions ++ [(ls1,le1)]
(c2,tr2) <- s2 ^. transitions ++ [(ls2,le2)]
r <- arr ! (c1, c2)
return $ (start m1 k1 tr1 *** start m2 k2 tr2) r
| t1 == D && t2 == D = opt $ do
(c1,tr1) <- s1 ^. transitions ++ [(ls1,le1)]
(c2,tr2) <- s2 ^. transitions ++ [(ls2,le2)]
r <- arr ! (c1, c2)
return $ (delete m1 k1 tr1 *** delete m2 k2 tr2) r
-- match pair emitting states
| t1 == MP && t2 == MP
= opt $ do
(c1,tr1) <- s1 ^. transitions ++ [(ls1,le1)]
(c2,tr2) <- s2 ^. transitions ++ [(ls2,le2)]
(e1,e2) <- zip (s1 ^. emits ^. pair) (s2 ^. emits ^. pair)
r <- arr ! (c1, c2)
return $ (matchP m1 k1 tr1 e1 *** matchP m2 k2 tr2 e2) r
-- match left emitting states
| t1 `elem` lstates && t2 `elem` lstates
= opt $ do
(c1,tr1) <- s1 ^. transitions ++ [(ls1,le1)]
(c2,tr2) <- s2 ^. transitions ++ [(ls2,le2)]
guard $ (not fastIns && (c1 /= k1 || c2 /= k2)) || (fastIns && c1/=k1 && c2/=k2)
(e1,e2) <- zip (s1 ^. emits ^. single) (s2 ^. emits ^. single)
r <- arr ! (c1, c2)
let f = if t1 == ML then matchL else insertL
let g = if t2 == ML then matchL else insertL
return $ (f m1 k1 tr1 e1 *** g m2 k2 tr2 e2) r
-- match right emitting states
| t1 `elem` rstates && t2 `elem` rstates
= opt $ do
(c1,tr1) <- s1 ^. transitions ++ [(ls1,le1)]
(c2,tr2) <- s2 ^. transitions ++ [(ls2,le2)]
guard $ (not fastIns && (c1 /= k1 || c2 /= k2)) || (fastIns && c1/=k1 && c2/=k2)
(e1,e2) <- zip (s1 ^. emits ^. single) (s2 ^. emits ^. single)
r <- arr ! (c1, c2)
let f = if t1 == MR then matchR else insertR
let g = if t2 == MR then matchR else insertR
return $ (f m1 k1 tr1 e1 *** g m2 k2 tr2 e2) r
-- if one state is E, we can only delete states, except for another S state, which will go into local end
-- it is not possible to use an emitting state on the right as those would require emitting on the left, too!
| t1 == E && t2 `elem` [D,S] = opt $ do
(c2,tr2) <- s2 ^. transitions ++ [(ls2,le2)]
r <- arr ! (k1,c2)
return $ if t2 == D then second (delete m2 k2 tr2) r else second (start m2 k2 tr2) r
-- the other way around with D,E
| t1 `elem` [D,S] && t2 == E = opt $ do
(c1,tr1) <- s1 ^. transitions ++ [(ls1,le2)]
r <- arr ! (c1,k2)
return $ if t1 == D then first (delete m1 k1 tr1) r else first (start m1 k1 tr1) r
-- two branching states
| t1 == B && t2 == B = opt $
let
[(l1,_),(r1,_)] = s1 ^. transitions
[(l2,_),(r2,_)] = s2 ^. transitions
in
-- both branches are matched
do
(s1,s2) <- arr ! (l1,l2) -- left branch (m1,m2)
(t1,t2) <- arr ! (r1,r2) -- right branch (m1,m2)
return (branch m1 k1 s1 t1, branch m2 k2 s2 t2) -- (m1,m2)
++
do
(t1,s2) <- arr ! (r1,l2) -- match right branch of m1 with left branch of m2
-- local ends for other branches
x <- arr ! (ls1,ls2)
let (s1,t2) = (delete m1 l1 le1 *** delete m2 l2 le2) x
return (branch m1 k1 s1 t1, branch m2 k2 s2 t2)
++
do
(s1,t2) <- arr ! (l1,r2)
x <- arr ! (ls1,ls2)
let (t1,s2) = (delete m1 l1 le1 *** delete m2 l2 le2) x
return (branch m1 k1 s1 t1, branch m2 k2 s2 t2)
-- branch - non-branch
| t1 == B && t2 /= B = opt $
let
[(l,_), (r,_)] = s1 ^. transitions
in
do
(s1,s2) <- arr ! (l,k2) -- left branch and m2
x <- arr ! (ls1,ls2)
-- dont do anything for ls2, since we do not have to
-- delete a branch in model 2.
let (t1,t2) = first (delete m1 r le1) x
return (branch m1 k1 s1 t1, branch m2 k2 s2 t2)
++
do
(t1,t2) <- arr ! (r,k2) -- right branch and m2
x <- arr ! (ls1,ls2)
let (s1,s2) = first (delete m1 l le1) x -- delete left branch in m1
return (branch m1 k1 s1 t1, branch m2 k2 s2 t2)
-- branch - non-branch
| t1 /= B && t2 == B = opt $
let
[(l,_), (r,_)] = s2 ^. transitions
in
do
(s1,s2) <- arr ! (k1,l)
x <- arr ! (ls1,ls2)
let (t1,t2) = second (delete m2 r le2) x
return (branch m1 k1 s1 t1, branch m2 k2 s2 t2)
++
do
(t1,t2) <- arr ! (k1,r)
x <- arr ! (ls1,ls2)
let (s1,s2) = second (delete m2 l le2) x
return (branch m1 k1 s1 t1, branch m2 k2 s2 t2)
-- S state versus any
| t1 == S = opt $ do
(c1,tr1) <- s1 ^. transitions ++ [(ls1,le1)]
r <- arr ! (c1, k2)
return $ first (start m1 k1 tr1) r
-- S state versus any
| t2 == S = opt $ do
(c2,tr2) <- s2 ^. transitions ++ [(ls2,le2)]
r <- arr ! (k1, c2)
return $ second (start m2 k2 tr2) r
--
| otherwise = []
where
s1 = (m1 ^. states) M.! k1
s2 = (m2 ^. states) M.! k2
t1 = s1 ^. stateType
t2 = s2 ^. stateType
le1 = M.findWithDefault (BitScore (-10000)) k1 (m1^.localEnd)
le2 = M.findWithDefault (BitScore (-10000)) k2 (m2^.localEnd)
ls1 = sn1
ls2 = sn2
lstates = [ML,IL]
rstates = [MR,IR]
locarr = (array ((0,0),(sn1,sn2)) [((k1,k2),loc k1 k2) | k1 <- [0 .. sn1], k2 <- [0 .. sn2]])
arr = (array ((0,0),(sn1,sn2)) [((k1,k2),rec k1 k2) | k1 <- [0 .. sn1], k2 <- [0 .. sn2]]) `asTypeOf` locarr
sn1 = fst . M.findMax $ m1 ^. states
sn2 = fst . M.findMax $ m2 ^. states
| choener/CMCompare | BioInf/CMCompare.hs | gpl-3.0 | 15,590 | 0 | 21 | 4,589 | 6,539 | 3,541 | 2,998 | 253 | 7 |
module Paths_anansi
( version
) where
import Data.Version
version :: Version
version = Version [] []
| jmillikin/anansi | tests/Paths_anansi.hs | gpl-3.0 | 115 | 4 | 6 | 30 | 37 | 21 | 16 | 5 | 1 |
module Main where
import SlicerTestSuiteUtils ( runTMLTest )
import Test.Tasty ( TestTree, defaultMain, testGroup )
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests =
testGroup "Run TML files" (map runTMLTest
[ "abs"
, "array"
, "array2"
, "array3"
, "copy-list"
, "curried-componentwise-sum"
, "curried-pointwise-sum"
, "curried-pointwise-sum-two"
, "example"
, "exception_assign"
, "exceptions"
, "exceptions2"
, "exceptions3"
, "filter"
, "foo"
, "gauss"
, "icfp17-example"
, "icfp17-example2"
, "map-increment-closed"
, "map-increment"
, "map"
, "meanSquareDiff"
, "meanSquare"
, "mergesort"
, "merge"
, "newton"
, "let-exception"
, "operators"
, "proportion"
, "raise_inside"
, "refs"
, "refs-bslice"
, "reverse-eval"
, "reverse-slice"
, "reverse"
, "reverse-trace"
, "simple-closure"
, "sort-bug-2"
, "sort-bug"
, "sort-eval"
, "sort-eval-trace-slice"
, "sort-eval-trace"
, "sort"
, "sum-eval"
, "sum-eval-trace-slice"
, "sum-eval-trace"
, "T2"
, "T43"
, "T47"
, "T52"
, "T56"
, "T59"
, "T62"
, "uncurried-componentwise-sum"
, "while"
, "while2"
, "while3"
, "while4"
] )
| jstolarek/slicer | tests/SlicerTestSuite.hs | gpl-3.0 | 1,474 | 0 | 8 | 534 | 243 | 155 | 88 | 66 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.PlayMoviesPartner.Types.Product
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <[email protected]>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
module Network.Google.PlayMoviesPartner.Types.Product where
import Network.Google.PlayMoviesPartner.Types.Sum
import Network.Google.Prelude
-- | An Avail describes the Availability Window of a specific Edit in a given
-- country, which means the period Google is allowed to sell or rent the
-- Edit. Avails are exposed in EMA format Version 1.6b (available at
-- http:\/\/www.movielabs.com\/md\/avails\/) Studios can see the Avails for
-- the Titles they own. Post-production houses cannot see any Avails.
--
-- /See:/ 'avail' smart constructor.
data Avail =
Avail'
{ _aAltId :: !(Maybe Text)
, _aPphNames :: !(Maybe [Text])
, _aCaptionExemption :: !(Maybe Text)
, _aRatingSystem :: !(Maybe Text)
, _aSuppressionLiftDate :: !(Maybe Text)
, _aEpisodeNumber :: !(Maybe Text)
, _aPriceType :: !(Maybe Text)
, _aStoreLanguage :: !(Maybe Text)
, _aEpisodeAltId :: !(Maybe Text)
, _aStart :: !(Maybe Text)
, _aTerritory :: !(Maybe Text)
, _aEpisodeTitleInternalAlias :: !(Maybe Text)
, _aLicenseType :: !(Maybe AvailLicenseType)
, _aAvailId :: !(Maybe Text)
, _aSeasonNumber :: !(Maybe Text)
, _aWorkType :: !(Maybe AvailWorkType)
, _aRatingValue :: !(Maybe Text)
, _aSeasonTitleInternalAlias :: !(Maybe Text)
, _aContentId :: !(Maybe Text)
, _aVideoId :: !(Maybe Text)
, _aSeriesAltId :: !(Maybe Text)
, _aEnd :: !(Maybe Text)
, _aSeriesTitleInternalAlias :: !(Maybe Text)
, _aDisplayName :: !(Maybe Text)
, _aReleaseDate :: !(Maybe Text)
, _aFormatProFile :: !(Maybe AvailFormatProFile)
, _aRatingReason :: !(Maybe Text)
, _aEncodeId :: !(Maybe Text)
, _aPriceValue :: !(Maybe Text)
, _aCaptionIncluded :: !(Maybe Bool)
, _aProductId :: !(Maybe Text)
, _aSeasonAltId :: !(Maybe Text)
, _aTitleInternalAlias :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
-- | Creates a value of 'Avail' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aAltId'
--
-- * 'aPphNames'
--
-- * 'aCaptionExemption'
--
-- * 'aRatingSystem'
--
-- * 'aSuppressionLiftDate'
--
-- * 'aEpisodeNumber'
--
-- * 'aPriceType'
--
-- * 'aStoreLanguage'
--
-- * 'aEpisodeAltId'
--
-- * 'aStart'
--
-- * 'aTerritory'
--
-- * 'aEpisodeTitleInternalAlias'
--
-- * 'aLicenseType'
--
-- * 'aAvailId'
--
-- * 'aSeasonNumber'
--
-- * 'aWorkType'
--
-- * 'aRatingValue'
--
-- * 'aSeasonTitleInternalAlias'
--
-- * 'aContentId'
--
-- * 'aVideoId'
--
-- * 'aSeriesAltId'
--
-- * 'aEnd'
--
-- * 'aSeriesTitleInternalAlias'
--
-- * 'aDisplayName'
--
-- * 'aReleaseDate'
--
-- * 'aFormatProFile'
--
-- * 'aRatingReason'
--
-- * 'aEncodeId'
--
-- * 'aPriceValue'
--
-- * 'aCaptionIncluded'
--
-- * 'aProductId'
--
-- * 'aSeasonAltId'
--
-- * 'aTitleInternalAlias'
avail
:: Avail
avail =
Avail'
{ _aAltId = Nothing
, _aPphNames = Nothing
, _aCaptionExemption = Nothing
, _aRatingSystem = Nothing
, _aSuppressionLiftDate = Nothing
, _aEpisodeNumber = Nothing
, _aPriceType = Nothing
, _aStoreLanguage = Nothing
, _aEpisodeAltId = Nothing
, _aStart = Nothing
, _aTerritory = Nothing
, _aEpisodeTitleInternalAlias = Nothing
, _aLicenseType = Nothing
, _aAvailId = Nothing
, _aSeasonNumber = Nothing
, _aWorkType = Nothing
, _aRatingValue = Nothing
, _aSeasonTitleInternalAlias = Nothing
, _aContentId = Nothing
, _aVideoId = Nothing
, _aSeriesAltId = Nothing
, _aEnd = Nothing
, _aSeriesTitleInternalAlias = Nothing
, _aDisplayName = Nothing
, _aReleaseDate = Nothing
, _aFormatProFile = Nothing
, _aRatingReason = Nothing
, _aEncodeId = Nothing
, _aPriceValue = Nothing
, _aCaptionIncluded = Nothing
, _aProductId = Nothing
, _aSeasonAltId = Nothing
, _aTitleInternalAlias = Nothing
}
-- | Other identifier referring to the Edit, as defined by partner. Example:
-- \"GOOGLER_2006\"
aAltId :: Lens' Avail (Maybe Text)
aAltId = lens _aAltId (\ s a -> s{_aAltId = a})
-- | Name of the post-production houses that manage the Avail. Not part of
-- EMA Specs.
aPphNames :: Lens' Avail [Text]
aPphNames
= lens _aPphNames (\ s a -> s{_aPphNames = a}) .
_Default
. _Coerce
-- | Communicating an exempt category as defined by FCC regulations. It is
-- not required for non-US Avails. Example: \"1\"
aCaptionExemption :: Lens' Avail (Maybe Text)
aCaptionExemption
= lens _aCaptionExemption
(\ s a -> s{_aCaptionExemption = a})
-- | Rating system applied to the version of title within territory of Avail.
-- Rating systems should be formatted as per [EMA ratings
-- spec](http:\/\/www.movielabs.com\/md\/ratings\/) Example: \"MPAA\"
aRatingSystem :: Lens' Avail (Maybe Text)
aRatingSystem
= lens _aRatingSystem
(\ s a -> s{_aRatingSystem = a})
-- | First date an Edit could be publically announced as becoming available
-- at a specific future date in territory of Avail. *Not* the Avail start
-- date or pre-order start date. Format is YYYY-MM-DD. Only available for
-- pre-orders. Example: \"2012-12-10\"
aSuppressionLiftDate :: Lens' Avail (Maybe Text)
aSuppressionLiftDate
= lens _aSuppressionLiftDate
(\ s a -> s{_aSuppressionLiftDate = a})
-- | The number assigned to the episode within a season. Only available on TV
-- Avails. Example: \"3\".
aEpisodeNumber :: Lens' Avail (Maybe Text)
aEpisodeNumber
= lens _aEpisodeNumber
(\ s a -> s{_aEpisodeNumber = a})
-- | Type of pricing that should be applied to this Avail based on how the
-- partner classify them. Example: \"Tier\", \"WSP\", \"SRP\", or
-- \"Category\".
aPriceType :: Lens' Avail (Maybe Text)
aPriceType
= lens _aPriceType (\ s a -> s{_aPriceType = a})
-- | Spoken language of the intended audience. Language shall be encoded in
-- accordance with RFC 5646. Example: \"fr\".
aStoreLanguage :: Lens' Avail (Maybe Text)
aStoreLanguage
= lens _aStoreLanguage
(\ s a -> s{_aStoreLanguage = a})
-- | Other identifier referring to the episode, as defined by partner. Only
-- available on TV avails. Example: \"rs_googlers_s1_3\".
aEpisodeAltId :: Lens' Avail (Maybe Text)
aEpisodeAltId
= lens _aEpisodeAltId
(\ s a -> s{_aEpisodeAltId = a})
-- | Start of term in YYYY-MM-DD format in the timezone of the country of the
-- Avail. Example: \"2013-05-14\".
aStart :: Lens' Avail (Maybe Text)
aStart = lens _aStart (\ s a -> s{_aStart = a})
-- | ISO 3166-1 alpha-2 country code for the country or territory of this
-- Avail. For Avails, we use Territory in lieu of Country to comply with
-- EMA specifications. But please note that Territory and Country identify
-- the same thing. Example: \"US\".
aTerritory :: Lens' Avail (Maybe Text)
aTerritory
= lens _aTerritory (\ s a -> s{_aTerritory = a})
-- | OPTIONAL.TV Only. Title used by involved parties to refer to this
-- episode. Only available on TV Avails. Example: \"Coding at Google\".
aEpisodeTitleInternalAlias :: Lens' Avail (Maybe Text)
aEpisodeTitleInternalAlias
= lens _aEpisodeTitleInternalAlias
(\ s a -> s{_aEpisodeTitleInternalAlias = a})
-- | Type of transaction.
aLicenseType :: Lens' Avail (Maybe AvailLicenseType)
aLicenseType
= lens _aLicenseType (\ s a -> s{_aLicenseType = a})
-- | ID internally generated by Google to uniquely identify an Avail. Not
-- part of EMA Specs.
aAvailId :: Lens' Avail (Maybe Text)
aAvailId = lens _aAvailId (\ s a -> s{_aAvailId = a})
-- | The number assigned to the season within a series. Only available on TV
-- Avails. Example: \"1\".
aSeasonNumber :: Lens' Avail (Maybe Text)
aSeasonNumber
= lens _aSeasonNumber
(\ s a -> s{_aSeasonNumber = a})
-- | Work type as enumerated in EMA.
aWorkType :: Lens' Avail (Maybe AvailWorkType)
aWorkType
= lens _aWorkType (\ s a -> s{_aWorkType = a})
-- | Value representing the rating. Ratings should be formatted as per
-- http:\/\/www.movielabs.com\/md\/ratings\/ Example: \"PG\"
aRatingValue :: Lens' Avail (Maybe Text)
aRatingValue
= lens _aRatingValue (\ s a -> s{_aRatingValue = a})
-- | Title used by involved parties to refer to this season. Only available
-- on TV Avails. Example: \"Googlers, The\".
aSeasonTitleInternalAlias :: Lens' Avail (Maybe Text)
aSeasonTitleInternalAlias
= lens _aSeasonTitleInternalAlias
(\ s a -> s{_aSeasonTitleInternalAlias = a})
-- | Title Identifier. This should be the Title Level EIDR. Example:
-- \"10.5240\/1489-49A2-3956-4B2D-FE16-5\".
aContentId :: Lens' Avail (Maybe Text)
aContentId
= lens _aContentId (\ s a -> s{_aContentId = a})
-- | Google-generated ID identifying the video linked to this Avail, once
-- delivered. Not part of EMA Specs. Example: \'gtry456_xc\'
aVideoId :: Lens' Avail (Maybe Text)
aVideoId = lens _aVideoId (\ s a -> s{_aVideoId = a})
-- | Other identifier referring to the series, as defined by partner. Only
-- available on TV avails. Example: \"rs_googlers\".
aSeriesAltId :: Lens' Avail (Maybe Text)
aSeriesAltId
= lens _aSeriesAltId (\ s a -> s{_aSeriesAltId = a})
-- | End of term in YYYY-MM-DD format in the timezone of the country of the
-- Avail. \"Open\" if no end date is available. Example: \"2019-02-17\"
aEnd :: Lens' Avail (Maybe Text)
aEnd = lens _aEnd (\ s a -> s{_aEnd = a})
-- | Title used by involved parties to refer to this series. Only available
-- on TV Avails. Example: \"Googlers, The\".
aSeriesTitleInternalAlias :: Lens' Avail (Maybe Text)
aSeriesTitleInternalAlias
= lens _aSeriesTitleInternalAlias
(\ s a -> s{_aSeriesTitleInternalAlias = a})
-- | The name of the studio that owns the Edit referred in the Avail. This is
-- the equivalent of \`studio_name\` in other resources, but it follows the
-- EMA nomenclature. Example: \"Google Films\".
aDisplayName :: Lens' Avail (Maybe Text)
aDisplayName
= lens _aDisplayName (\ s a -> s{_aDisplayName = a})
-- | Release date of the Title in earliest released territory. Typically it
-- is just the year, but it is free-form as per EMA spec. Examples:
-- \"1979\", \"Oct 2014\"
aReleaseDate :: Lens' Avail (Maybe Text)
aReleaseDate
= lens _aReleaseDate (\ s a -> s{_aReleaseDate = a})
-- | Indicates the format profile covered by the transaction.
aFormatProFile :: Lens' Avail (Maybe AvailFormatProFile)
aFormatProFile
= lens _aFormatProFile
(\ s a -> s{_aFormatProFile = a})
-- | Value representing the rating reason. Rating reasons should be formatted
-- as per [EMA ratings spec](http:\/\/www.movielabs.com\/md\/ratings\/) and
-- comma-separated for inclusion of multiple reasons. Example: \"L, S, V\"
aRatingReason :: Lens' Avail (Maybe Text)
aRatingReason
= lens _aRatingReason
(\ s a -> s{_aRatingReason = a})
-- | Manifestation Identifier. This should be the Manifestation Level EIDR.
-- Example: \"10.2340\/1489-49A2-3956-4B2D-FE16-7\"
aEncodeId :: Lens' Avail (Maybe Text)
aEncodeId
= lens _aEncodeId (\ s a -> s{_aEncodeId = a})
-- | Value to be applied to the pricing type. Example: \"4\" or \"2.99\"
aPriceValue :: Lens' Avail (Maybe Text)
aPriceValue
= lens _aPriceValue (\ s a -> s{_aPriceValue = a})
-- | Communicating if caption file will be delivered.
aCaptionIncluded :: Lens' Avail (Maybe Bool)
aCaptionIncluded
= lens _aCaptionIncluded
(\ s a -> s{_aCaptionIncluded = a})
-- | Edit Identifier. This should be the Edit Level EIDR. Example:
-- \"10.2340\/1489-49A2-3956-4B2D-FE16-6\"
aProductId :: Lens' Avail (Maybe Text)
aProductId
= lens _aProductId (\ s a -> s{_aProductId = a})
-- | Other identifier referring to the season, as defined by partner. Only
-- available on TV avails. Example: \"rs_googlers_s1\".
aSeasonAltId :: Lens' Avail (Maybe Text)
aSeasonAltId
= lens _aSeasonAltId (\ s a -> s{_aSeasonAltId = a})
-- | Title used by involved parties to refer to this content. Example:
-- \"Googlers, The\". Only available on Movie Avails.
aTitleInternalAlias :: Lens' Avail (Maybe Text)
aTitleInternalAlias
= lens _aTitleInternalAlias
(\ s a -> s{_aTitleInternalAlias = a})
instance FromJSON Avail where
parseJSON
= withObject "Avail"
(\ o ->
Avail' <$>
(o .:? "altId") <*> (o .:? "pphNames" .!= mempty) <*>
(o .:? "captionExemption")
<*> (o .:? "ratingSystem")
<*> (o .:? "suppressionLiftDate")
<*> (o .:? "episodeNumber")
<*> (o .:? "priceType")
<*> (o .:? "storeLanguage")
<*> (o .:? "episodeAltId")
<*> (o .:? "start")
<*> (o .:? "territory")
<*> (o .:? "episodeTitleInternalAlias")
<*> (o .:? "licenseType")
<*> (o .:? "availId")
<*> (o .:? "seasonNumber")
<*> (o .:? "workType")
<*> (o .:? "ratingValue")
<*> (o .:? "seasonTitleInternalAlias")
<*> (o .:? "contentId")
<*> (o .:? "videoId")
<*> (o .:? "seriesAltId")
<*> (o .:? "end")
<*> (o .:? "seriesTitleInternalAlias")
<*> (o .:? "displayName")
<*> (o .:? "releaseDate")
<*> (o .:? "formatProfile")
<*> (o .:? "ratingReason")
<*> (o .:? "encodeId")
<*> (o .:? "priceValue")
<*> (o .:? "captionIncluded")
<*> (o .:? "productId")
<*> (o .:? "seasonAltId")
<*> (o .:? "titleInternalAlias"))
instance ToJSON Avail where
toJSON Avail'{..}
= object
(catMaybes
[("altId" .=) <$> _aAltId,
("pphNames" .=) <$> _aPphNames,
("captionExemption" .=) <$> _aCaptionExemption,
("ratingSystem" .=) <$> _aRatingSystem,
("suppressionLiftDate" .=) <$> _aSuppressionLiftDate,
("episodeNumber" .=) <$> _aEpisodeNumber,
("priceType" .=) <$> _aPriceType,
("storeLanguage" .=) <$> _aStoreLanguage,
("episodeAltId" .=) <$> _aEpisodeAltId,
("start" .=) <$> _aStart,
("territory" .=) <$> _aTerritory,
("episodeTitleInternalAlias" .=) <$>
_aEpisodeTitleInternalAlias,
("licenseType" .=) <$> _aLicenseType,
("availId" .=) <$> _aAvailId,
("seasonNumber" .=) <$> _aSeasonNumber,
("workType" .=) <$> _aWorkType,
("ratingValue" .=) <$> _aRatingValue,
("seasonTitleInternalAlias" .=) <$>
_aSeasonTitleInternalAlias,
("contentId" .=) <$> _aContentId,
("videoId" .=) <$> _aVideoId,
("seriesAltId" .=) <$> _aSeriesAltId,
("end" .=) <$> _aEnd,
("seriesTitleInternalAlias" .=) <$>
_aSeriesTitleInternalAlias,
("displayName" .=) <$> _aDisplayName,
("releaseDate" .=) <$> _aReleaseDate,
("formatProfile" .=) <$> _aFormatProFile,
("ratingReason" .=) <$> _aRatingReason,
("encodeId" .=) <$> _aEncodeId,
("priceValue" .=) <$> _aPriceValue,
("captionIncluded" .=) <$> _aCaptionIncluded,
("productId" .=) <$> _aProductId,
("seasonAltId" .=) <$> _aSeasonAltId,
("titleInternalAlias" .=) <$> _aTitleInternalAlias])
-- | Response to the \'ListAvails\' method.
--
-- /See:/ 'listAvailsResponse' smart constructor.
data ListAvailsResponse =
ListAvailsResponse'
{ _larNextPageToken :: !(Maybe Text)
, _larAvails :: !(Maybe [Avail])
, _larTotalSize :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
-- | Creates a value of 'ListAvailsResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'larNextPageToken'
--
-- * 'larAvails'
--
-- * 'larTotalSize'
listAvailsResponse
:: ListAvailsResponse
listAvailsResponse =
ListAvailsResponse'
{_larNextPageToken = Nothing, _larAvails = Nothing, _larTotalSize = Nothing}
-- | See _List methods rules_ for info about this field.
larNextPageToken :: Lens' ListAvailsResponse (Maybe Text)
larNextPageToken
= lens _larNextPageToken
(\ s a -> s{_larNextPageToken = a})
-- | List of Avails that match the request criteria.
larAvails :: Lens' ListAvailsResponse [Avail]
larAvails
= lens _larAvails (\ s a -> s{_larAvails = a}) .
_Default
. _Coerce
-- | See _List methods rules_ for more information about this field.
larTotalSize :: Lens' ListAvailsResponse (Maybe Int32)
larTotalSize
= lens _larTotalSize (\ s a -> s{_larTotalSize = a})
. mapping _Coerce
instance FromJSON ListAvailsResponse where
parseJSON
= withObject "ListAvailsResponse"
(\ o ->
ListAvailsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "avails" .!= mempty)
<*> (o .:? "totalSize"))
instance ToJSON ListAvailsResponse where
toJSON ListAvailsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _larNextPageToken,
("avails" .=) <$> _larAvails,
("totalSize" .=) <$> _larTotalSize])
-- | Response to the \'ListOrders\' method.
--
-- /See:/ 'listOrdersResponse' smart constructor.
data ListOrdersResponse =
ListOrdersResponse'
{ _lorNextPageToken :: !(Maybe Text)
, _lorTotalSize :: !(Maybe (Textual Int32))
, _lorOrders :: !(Maybe [Order])
}
deriving (Eq, Show, Data, Typeable, Generic)
-- | Creates a value of 'ListOrdersResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lorNextPageToken'
--
-- * 'lorTotalSize'
--
-- * 'lorOrders'
listOrdersResponse
:: ListOrdersResponse
listOrdersResponse =
ListOrdersResponse'
{_lorNextPageToken = Nothing, _lorTotalSize = Nothing, _lorOrders = Nothing}
-- | See _List methods rules_ for info about this field.
lorNextPageToken :: Lens' ListOrdersResponse (Maybe Text)
lorNextPageToken
= lens _lorNextPageToken
(\ s a -> s{_lorNextPageToken = a})
-- | See _List methods rules_ for more information about this field.
lorTotalSize :: Lens' ListOrdersResponse (Maybe Int32)
lorTotalSize
= lens _lorTotalSize (\ s a -> s{_lorTotalSize = a})
. mapping _Coerce
-- | List of Orders that match the request criteria.
lorOrders :: Lens' ListOrdersResponse [Order]
lorOrders
= lens _lorOrders (\ s a -> s{_lorOrders = a}) .
_Default
. _Coerce
instance FromJSON ListOrdersResponse where
parseJSON
= withObject "ListOrdersResponse"
(\ o ->
ListOrdersResponse' <$>
(o .:? "nextPageToken") <*> (o .:? "totalSize") <*>
(o .:? "orders" .!= mempty))
instance ToJSON ListOrdersResponse where
toJSON ListOrdersResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lorNextPageToken,
("totalSize" .=) <$> _lorTotalSize,
("orders" .=) <$> _lorOrders])
-- | Response to the \'ListStoreInfos\' method.
--
-- /See:/ 'listStoreInfosResponse' smart constructor.
data ListStoreInfosResponse =
ListStoreInfosResponse'
{ _lsirNextPageToken :: !(Maybe Text)
, _lsirTotalSize :: !(Maybe (Textual Int32))
, _lsirStoreInfos :: !(Maybe [StoreInfo])
}
deriving (Eq, Show, Data, Typeable, Generic)
-- | Creates a value of 'ListStoreInfosResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lsirNextPageToken'
--
-- * 'lsirTotalSize'
--
-- * 'lsirStoreInfos'
listStoreInfosResponse
:: ListStoreInfosResponse
listStoreInfosResponse =
ListStoreInfosResponse'
{ _lsirNextPageToken = Nothing
, _lsirTotalSize = Nothing
, _lsirStoreInfos = Nothing
}
-- | See \'List methods rules\' for info about this field.
lsirNextPageToken :: Lens' ListStoreInfosResponse (Maybe Text)
lsirNextPageToken
= lens _lsirNextPageToken
(\ s a -> s{_lsirNextPageToken = a})
-- | See _List methods rules_ for more information about this field.
lsirTotalSize :: Lens' ListStoreInfosResponse (Maybe Int32)
lsirTotalSize
= lens _lsirTotalSize
(\ s a -> s{_lsirTotalSize = a})
. mapping _Coerce
-- | List of StoreInfos that match the request criteria.
lsirStoreInfos :: Lens' ListStoreInfosResponse [StoreInfo]
lsirStoreInfos
= lens _lsirStoreInfos
(\ s a -> s{_lsirStoreInfos = a})
. _Default
. _Coerce
instance FromJSON ListStoreInfosResponse where
parseJSON
= withObject "ListStoreInfosResponse"
(\ o ->
ListStoreInfosResponse' <$>
(o .:? "nextPageToken") <*> (o .:? "totalSize") <*>
(o .:? "storeInfos" .!= mempty))
instance ToJSON ListStoreInfosResponse where
toJSON ListStoreInfosResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lsirNextPageToken,
("totalSize" .=) <$> _lsirTotalSize,
("storeInfos" .=) <$> _lsirStoreInfos])
-- | An Order tracks the fulfillment of an Edit when delivered using the
-- legacy, non-component-based delivery. Each Order is uniquely identified
-- by an \`order_id\`, which is generated by Google. Externally, Orders can
-- also be identified by partners using its \`custom_id\` (when provided).
--
-- /See:/ 'order' smart constructor.
data Order =
Order'
{ _oStatus :: !(Maybe OrderStatus)
, _oShowName :: !(Maybe Text)
, _oPphName :: !(Maybe Text)
, _oEarliestAvailStartTime :: !(Maybe DateTime')
, _oStudioName :: !(Maybe Text)
, _oReceivedTime :: !(Maybe DateTime')
, _oPriority :: !(Maybe (Textual Double))
, _oChannelId :: !(Maybe Text)
, _oCustomId :: !(Maybe Text)
, _oApprovedTime :: !(Maybe DateTime')
, _oCountries :: !(Maybe [Text])
, _oChannelName :: !(Maybe Text)
, _oVideoId :: !(Maybe Text)
, _oLegacyPriority :: !(Maybe Text)
, _oName :: !(Maybe Text)
, _oRejectionNote :: !(Maybe Text)
, _oOrderedTime :: !(Maybe DateTime')
, _oSeasonName :: !(Maybe Text)
, _oStatusDetail :: !(Maybe OrderStatusDetail)
, _oType :: !(Maybe OrderType)
, _oNormalizedPriority :: !(Maybe OrderNormalizedPriority)
, _oOrderId :: !(Maybe Text)
, _oEpisodeName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
-- | Creates a value of 'Order' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'oStatus'
--
-- * 'oShowName'
--
-- * 'oPphName'
--
-- * 'oEarliestAvailStartTime'
--
-- * 'oStudioName'
--
-- * 'oReceivedTime'
--
-- * 'oPriority'
--
-- * 'oChannelId'
--
-- * 'oCustomId'
--
-- * 'oApprovedTime'
--
-- * 'oCountries'
--
-- * 'oChannelName'
--
-- * 'oVideoId'
--
-- * 'oLegacyPriority'
--
-- * 'oName'
--
-- * 'oRejectionNote'
--
-- * 'oOrderedTime'
--
-- * 'oSeasonName'
--
-- * 'oStatusDetail'
--
-- * 'oType'
--
-- * 'oNormalizedPriority'
--
-- * 'oOrderId'
--
-- * 'oEpisodeName'
order
:: Order
order =
Order'
{ _oStatus = Nothing
, _oShowName = Nothing
, _oPphName = Nothing
, _oEarliestAvailStartTime = Nothing
, _oStudioName = Nothing
, _oReceivedTime = Nothing
, _oPriority = Nothing
, _oChannelId = Nothing
, _oCustomId = Nothing
, _oApprovedTime = Nothing
, _oCountries = Nothing
, _oChannelName = Nothing
, _oVideoId = Nothing
, _oLegacyPriority = Nothing
, _oName = Nothing
, _oRejectionNote = Nothing
, _oOrderedTime = Nothing
, _oSeasonName = Nothing
, _oStatusDetail = Nothing
, _oType = Nothing
, _oNormalizedPriority = Nothing
, _oOrderId = Nothing
, _oEpisodeName = Nothing
}
-- | High-level status of the order.
oStatus :: Lens' Order (Maybe OrderStatus)
oStatus = lens _oStatus (\ s a -> s{_oStatus = a})
-- | Default Show name, usually in the language of the country of origin.
-- Only available for TV Edits Example: \"Googlers, The\".
oShowName :: Lens' Order (Maybe Text)
oShowName
= lens _oShowName (\ s a -> s{_oShowName = a})
-- | Name of the post-production house that manages the Edit ordered.
oPphName :: Lens' Order (Maybe Text)
oPphName = lens _oPphName (\ s a -> s{_oPphName = a})
-- | Timestamp of the earliest start date of the Avails linked to this Order.
oEarliestAvailStartTime :: Lens' Order (Maybe UTCTime)
oEarliestAvailStartTime
= lens _oEarliestAvailStartTime
(\ s a -> s{_oEarliestAvailStartTime = a})
. mapping _DateTime
-- | Name of the studio that owns the Edit ordered.
oStudioName :: Lens' Order (Maybe Text)
oStudioName
= lens _oStudioName (\ s a -> s{_oStudioName = a})
-- | Timestamp when the Order was fulfilled.
oReceivedTime :: Lens' Order (Maybe UTCTime)
oReceivedTime
= lens _oReceivedTime
(\ s a -> s{_oReceivedTime = a})
. mapping _DateTime
-- | Order priority, as defined by Google. The higher the value, the higher
-- the priority. Example: 90
oPriority :: Lens' Order (Maybe Double)
oPriority
= lens _oPriority (\ s a -> s{_oPriority = a}) .
mapping _Coerce
-- | YouTube Channel ID that should be used to fulfill the Order. Example:
-- \"UCRG64darCZhb\".
oChannelId :: Lens' Order (Maybe Text)
oChannelId
= lens _oChannelId (\ s a -> s{_oChannelId = a})
-- | ID that can be used to externally identify an Order. This ID is provided
-- by partners when submitting the Avails. Example: \'GOOGLER_2006\'
oCustomId :: Lens' Order (Maybe Text)
oCustomId
= lens _oCustomId (\ s a -> s{_oCustomId = a})
-- | Timestamp when the Order was approved.
oApprovedTime :: Lens' Order (Maybe UTCTime)
oApprovedTime
= lens _oApprovedTime
(\ s a -> s{_oApprovedTime = a})
. mapping _DateTime
-- | Countries where the Order is available, using the \"ISO 3166-1 alpha-2\"
-- format (example: \"US\").
oCountries :: Lens' Order [Text]
oCountries
= lens _oCountries (\ s a -> s{_oCountries = a}) .
_Default
. _Coerce
-- | YouTube Channel Name that should be used to fulfill the Order. Example:
-- \"Google_channel\".
oChannelName :: Lens' Order (Maybe Text)
oChannelName
= lens _oChannelName (\ s a -> s{_oChannelName = a})
-- | Google-generated ID identifying the video linked to this Order, once
-- delivered. Example: \'gtry456_xc\'.
oVideoId :: Lens' Order (Maybe Text)
oVideoId = lens _oVideoId (\ s a -> s{_oVideoId = a})
-- | Legacy Order priority, as defined by Google. Example: \'P0\'
oLegacyPriority :: Lens' Order (Maybe Text)
oLegacyPriority
= lens _oLegacyPriority
(\ s a -> s{_oLegacyPriority = a})
-- | Default Edit name, usually in the language of the country of origin.
-- Example: \"Googlers, The\".
oName :: Lens' Order (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
-- | Field explaining why an Order has been rejected. Example: \"Trailer
-- audio is 2ch mono, please re-deliver in stereo\".
oRejectionNote :: Lens' Order (Maybe Text)
oRejectionNote
= lens _oRejectionNote
(\ s a -> s{_oRejectionNote = a})
-- | Timestamp when the Order was created.
oOrderedTime :: Lens' Order (Maybe UTCTime)
oOrderedTime
= lens _oOrderedTime (\ s a -> s{_oOrderedTime = a})
. mapping _DateTime
-- | Default Season name, usually in the language of the country of origin.
-- Only available for TV Edits Example: \"Googlers, The - A Brave New
-- World\".
oSeasonName :: Lens' Order (Maybe Text)
oSeasonName
= lens _oSeasonName (\ s a -> s{_oSeasonName = a})
-- | Detailed status of the order
oStatusDetail :: Lens' Order (Maybe OrderStatusDetail)
oStatusDetail
= lens _oStatusDetail
(\ s a -> s{_oStatusDetail = a})
-- | Type of the Edit linked to the Order.
oType :: Lens' Order (Maybe OrderType)
oType = lens _oType (\ s a -> s{_oType = a})
-- | A simpler representation of the priority.
oNormalizedPriority :: Lens' Order (Maybe OrderNormalizedPriority)
oNormalizedPriority
= lens _oNormalizedPriority
(\ s a -> s{_oNormalizedPriority = a})
-- | ID internally generated by Google to uniquely identify an Order.
-- Example: \'abcde12_x\'
oOrderId :: Lens' Order (Maybe Text)
oOrderId = lens _oOrderId (\ s a -> s{_oOrderId = a})
-- | Default Episode name, usually in the language of the country of origin.
-- Only available for TV Edits Example: \"Googlers, The - Pilot\".
oEpisodeName :: Lens' Order (Maybe Text)
oEpisodeName
= lens _oEpisodeName (\ s a -> s{_oEpisodeName = a})
instance FromJSON Order where
parseJSON
= withObject "Order"
(\ o ->
Order' <$>
(o .:? "status") <*> (o .:? "showName") <*>
(o .:? "pphName")
<*> (o .:? "earliestAvailStartTime")
<*> (o .:? "studioName")
<*> (o .:? "receivedTime")
<*> (o .:? "priority")
<*> (o .:? "channelId")
<*> (o .:? "customId")
<*> (o .:? "approvedTime")
<*> (o .:? "countries" .!= mempty)
<*> (o .:? "channelName")
<*> (o .:? "videoId")
<*> (o .:? "legacyPriority")
<*> (o .:? "name")
<*> (o .:? "rejectionNote")
<*> (o .:? "orderedTime")
<*> (o .:? "seasonName")
<*> (o .:? "statusDetail")
<*> (o .:? "type")
<*> (o .:? "normalizedPriority")
<*> (o .:? "orderId")
<*> (o .:? "episodeName"))
instance ToJSON Order where
toJSON Order'{..}
= object
(catMaybes
[("status" .=) <$> _oStatus,
("showName" .=) <$> _oShowName,
("pphName" .=) <$> _oPphName,
("earliestAvailStartTime" .=) <$>
_oEarliestAvailStartTime,
("studioName" .=) <$> _oStudioName,
("receivedTime" .=) <$> _oReceivedTime,
("priority" .=) <$> _oPriority,
("channelId" .=) <$> _oChannelId,
("customId" .=) <$> _oCustomId,
("approvedTime" .=) <$> _oApprovedTime,
("countries" .=) <$> _oCountries,
("channelName" .=) <$> _oChannelName,
("videoId" .=) <$> _oVideoId,
("legacyPriority" .=) <$> _oLegacyPriority,
("name" .=) <$> _oName,
("rejectionNote" .=) <$> _oRejectionNote,
("orderedTime" .=) <$> _oOrderedTime,
("seasonName" .=) <$> _oSeasonName,
("statusDetail" .=) <$> _oStatusDetail,
("type" .=) <$> _oType,
("normalizedPriority" .=) <$> _oNormalizedPriority,
("orderId" .=) <$> _oOrderId,
("episodeName" .=) <$> _oEpisodeName])
-- | Information about a playable sequence (video) associated with an Edit
-- and available at the Google Play Store. Internally, each StoreInfo is
-- uniquely identified by a \`video_id\` and \`country\`. Externally,
-- Title-level EIDR or Edit-level EIDR, if provided, can also be used to
-- identify a specific title or edit in a country.
--
-- /See:/ 'storeInfo' smart constructor.
data StoreInfo =
StoreInfo'
{ _siTitleLevelEidr :: !(Maybe Text)
, _siPphNames :: !(Maybe [Text])
, _siShowName :: !(Maybe Text)
, _siSubtitles :: !(Maybe [Text])
, _siStudioName :: !(Maybe Text)
, _siAudioTracks :: !(Maybe [Text])
, _siEpisodeNumber :: !(Maybe Text)
, _siCountry :: !(Maybe Text)
, _siTrailerId :: !(Maybe Text)
, _siHasInfoCards :: !(Maybe Bool)
, _siLiveTime :: !(Maybe DateTime')
, _siSeasonNumber :: !(Maybe Text)
, _siHasHdOffer :: !(Maybe Bool)
, _siVideoId :: !(Maybe Text)
, _siName :: !(Maybe Text)
, _siHasVodOffer :: !(Maybe Bool)
, _siSeasonName :: !(Maybe Text)
, _siHasSdOffer :: !(Maybe Bool)
, _siMid :: !(Maybe Text)
, _siEditLevelEidr :: !(Maybe Text)
, _siType :: !(Maybe StoreInfoType)
, _siHasEstOffer :: !(Maybe Bool)
, _siHasAudio51 :: !(Maybe Bool)
, _siSeasonId :: !(Maybe Text)
, _siShowId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
-- | Creates a value of 'StoreInfo' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'siTitleLevelEidr'
--
-- * 'siPphNames'
--
-- * 'siShowName'
--
-- * 'siSubtitles'
--
-- * 'siStudioName'
--
-- * 'siAudioTracks'
--
-- * 'siEpisodeNumber'
--
-- * 'siCountry'
--
-- * 'siTrailerId'
--
-- * 'siHasInfoCards'
--
-- * 'siLiveTime'
--
-- * 'siSeasonNumber'
--
-- * 'siHasHdOffer'
--
-- * 'siVideoId'
--
-- * 'siName'
--
-- * 'siHasVodOffer'
--
-- * 'siSeasonName'
--
-- * 'siHasSdOffer'
--
-- * 'siMid'
--
-- * 'siEditLevelEidr'
--
-- * 'siType'
--
-- * 'siHasEstOffer'
--
-- * 'siHasAudio51'
--
-- * 'siSeasonId'
--
-- * 'siShowId'
storeInfo
:: StoreInfo
storeInfo =
StoreInfo'
{ _siTitleLevelEidr = Nothing
, _siPphNames = Nothing
, _siShowName = Nothing
, _siSubtitles = Nothing
, _siStudioName = Nothing
, _siAudioTracks = Nothing
, _siEpisodeNumber = Nothing
, _siCountry = Nothing
, _siTrailerId = Nothing
, _siHasInfoCards = Nothing
, _siLiveTime = Nothing
, _siSeasonNumber = Nothing
, _siHasHdOffer = Nothing
, _siVideoId = Nothing
, _siName = Nothing
, _siHasVodOffer = Nothing
, _siSeasonName = Nothing
, _siHasSdOffer = Nothing
, _siMid = Nothing
, _siEditLevelEidr = Nothing
, _siType = Nothing
, _siHasEstOffer = Nothing
, _siHasAudio51 = Nothing
, _siSeasonId = Nothing
, _siShowId = Nothing
}
-- | Title-level EIDR ID. Example: \"10.5240\/1489-49A2-3956-4B2D-FE16-5\".
siTitleLevelEidr :: Lens' StoreInfo (Maybe Text)
siTitleLevelEidr
= lens _siTitleLevelEidr
(\ s a -> s{_siTitleLevelEidr = a})
-- | Name of the post-production houses that manage the Edit.
siPphNames :: Lens' StoreInfo [Text]
siPphNames
= lens _siPphNames (\ s a -> s{_siPphNames = a}) .
_Default
. _Coerce
-- | Default Show name, usually in the language of the country of origin.
-- Only available for TV Edits Example: \"Googlers, The\".
siShowName :: Lens' StoreInfo (Maybe Text)
siShowName
= lens _siShowName (\ s a -> s{_siShowName = a})
-- | Subtitles available for this Edit.
siSubtitles :: Lens' StoreInfo [Text]
siSubtitles
= lens _siSubtitles (\ s a -> s{_siSubtitles = a}) .
_Default
. _Coerce
-- | Name of the studio that owns the Edit ordered.
siStudioName :: Lens' StoreInfo (Maybe Text)
siStudioName
= lens _siStudioName (\ s a -> s{_siStudioName = a})
-- | Audio tracks available for this Edit.
siAudioTracks :: Lens' StoreInfo [Text]
siAudioTracks
= lens _siAudioTracks
(\ s a -> s{_siAudioTracks = a})
. _Default
. _Coerce
-- | The number assigned to the episode within a season. Only available on TV
-- Edits. Example: \"1\".
siEpisodeNumber :: Lens' StoreInfo (Maybe Text)
siEpisodeNumber
= lens _siEpisodeNumber
(\ s a -> s{_siEpisodeNumber = a})
-- | Country where Edit is available in ISO 3166-1 alpha-2 country code.
-- Example: \"US\".
siCountry :: Lens' StoreInfo (Maybe Text)
siCountry
= lens _siCountry (\ s a -> s{_siCountry = a})
-- | Google-generated ID identifying the trailer linked to the Edit. Example:
-- \'bhd_4e_cx\'
siTrailerId :: Lens' StoreInfo (Maybe Text)
siTrailerId
= lens _siTrailerId (\ s a -> s{_siTrailerId = a})
-- | Whether the Edit has info cards.
siHasInfoCards :: Lens' StoreInfo (Maybe Bool)
siHasInfoCards
= lens _siHasInfoCards
(\ s a -> s{_siHasInfoCards = a})
-- | Timestamp when the Edit went live on the Store.
siLiveTime :: Lens' StoreInfo (Maybe UTCTime)
siLiveTime
= lens _siLiveTime (\ s a -> s{_siLiveTime = a}) .
mapping _DateTime
-- | The number assigned to the season within a show. Only available on TV
-- Edits. Example: \"1\".
siSeasonNumber :: Lens' StoreInfo (Maybe Text)
siSeasonNumber
= lens _siSeasonNumber
(\ s a -> s{_siSeasonNumber = a})
-- | Whether the Edit has a HD offer.
siHasHdOffer :: Lens' StoreInfo (Maybe Bool)
siHasHdOffer
= lens _siHasHdOffer (\ s a -> s{_siHasHdOffer = a})
-- | Google-generated ID identifying the video linked to the Edit. Example:
-- \'gtry456_xc\'
siVideoId :: Lens' StoreInfo (Maybe Text)
siVideoId
= lens _siVideoId (\ s a -> s{_siVideoId = a})
-- | Default Edit name, usually in the language of the country of origin.
-- Example: \"Googlers, The\".
siName :: Lens' StoreInfo (Maybe Text)
siName = lens _siName (\ s a -> s{_siName = a})
-- | Whether the Edit has a VOD offer.
siHasVodOffer :: Lens' StoreInfo (Maybe Bool)
siHasVodOffer
= lens _siHasVodOffer
(\ s a -> s{_siHasVodOffer = a})
-- | Default Season name, usually in the language of the country of origin.
-- Only available for TV Edits Example: \"Googlers, The - A Brave New
-- World\".
siSeasonName :: Lens' StoreInfo (Maybe Text)
siSeasonName
= lens _siSeasonName (\ s a -> s{_siSeasonName = a})
-- | Whether the Edit has a SD offer.
siHasSdOffer :: Lens' StoreInfo (Maybe Bool)
siHasSdOffer
= lens _siHasSdOffer (\ s a -> s{_siHasSdOffer = a})
-- | Knowledge Graph ID associated to this Edit, if available. This ID links
-- the Edit to its knowledge entity, externally accessible at
-- http:\/\/freebase.com. In the absense of Title EIDR or Edit EIDR, this
-- ID helps link together multiple Edits across countries. Example:
-- \'\/m\/0ffx29\'
siMid :: Lens' StoreInfo (Maybe Text)
siMid = lens _siMid (\ s a -> s{_siMid = a})
-- | Edit-level EIDR ID. Example: \"10.5240\/1489-49A2-3956-4B2D-FE16-6\".
siEditLevelEidr :: Lens' StoreInfo (Maybe Text)
siEditLevelEidr
= lens _siEditLevelEidr
(\ s a -> s{_siEditLevelEidr = a})
-- | Edit type, like Movie, Episode or Season.
siType :: Lens' StoreInfo (Maybe StoreInfoType)
siType = lens _siType (\ s a -> s{_siType = a})
-- | Whether the Edit has a EST offer.
siHasEstOffer :: Lens' StoreInfo (Maybe Bool)
siHasEstOffer
= lens _siHasEstOffer
(\ s a -> s{_siHasEstOffer = a})
-- | Whether the Edit has a 5.1 channel audio track.
siHasAudio51 :: Lens' StoreInfo (Maybe Bool)
siHasAudio51
= lens _siHasAudio51 (\ s a -> s{_siHasAudio51 = a})
-- | Google-generated ID identifying the season linked to the Edit. Only
-- available for TV Edits. Example: \'ster23ex\'
siSeasonId :: Lens' StoreInfo (Maybe Text)
siSeasonId
= lens _siSeasonId (\ s a -> s{_siSeasonId = a})
-- | Google-generated ID identifying the show linked to the Edit. Only
-- available for TV Edits. Example: \'et2hsue_x\'
siShowId :: Lens' StoreInfo (Maybe Text)
siShowId = lens _siShowId (\ s a -> s{_siShowId = a})
instance FromJSON StoreInfo where
parseJSON
= withObject "StoreInfo"
(\ o ->
StoreInfo' <$>
(o .:? "titleLevelEidr") <*>
(o .:? "pphNames" .!= mempty)
<*> (o .:? "showName")
<*> (o .:? "subtitles" .!= mempty)
<*> (o .:? "studioName")
<*> (o .:? "audioTracks" .!= mempty)
<*> (o .:? "episodeNumber")
<*> (o .:? "country")
<*> (o .:? "trailerId")
<*> (o .:? "hasInfoCards")
<*> (o .:? "liveTime")
<*> (o .:? "seasonNumber")
<*> (o .:? "hasHdOffer")
<*> (o .:? "videoId")
<*> (o .:? "name")
<*> (o .:? "hasVodOffer")
<*> (o .:? "seasonName")
<*> (o .:? "hasSdOffer")
<*> (o .:? "mid")
<*> (o .:? "editLevelEidr")
<*> (o .:? "type")
<*> (o .:? "hasEstOffer")
<*> (o .:? "hasAudio51")
<*> (o .:? "seasonId")
<*> (o .:? "showId"))
instance ToJSON StoreInfo where
toJSON StoreInfo'{..}
= object
(catMaybes
[("titleLevelEidr" .=) <$> _siTitleLevelEidr,
("pphNames" .=) <$> _siPphNames,
("showName" .=) <$> _siShowName,
("subtitles" .=) <$> _siSubtitles,
("studioName" .=) <$> _siStudioName,
("audioTracks" .=) <$> _siAudioTracks,
("episodeNumber" .=) <$> _siEpisodeNumber,
("country" .=) <$> _siCountry,
("trailerId" .=) <$> _siTrailerId,
("hasInfoCards" .=) <$> _siHasInfoCards,
("liveTime" .=) <$> _siLiveTime,
("seasonNumber" .=) <$> _siSeasonNumber,
("hasHdOffer" .=) <$> _siHasHdOffer,
("videoId" .=) <$> _siVideoId,
("name" .=) <$> _siName,
("hasVodOffer" .=) <$> _siHasVodOffer,
("seasonName" .=) <$> _siSeasonName,
("hasSdOffer" .=) <$> _siHasSdOffer,
("mid" .=) <$> _siMid,
("editLevelEidr" .=) <$> _siEditLevelEidr,
("type" .=) <$> _siType,
("hasEstOffer" .=) <$> _siHasEstOffer,
("hasAudio51" .=) <$> _siHasAudio51,
("seasonId" .=) <$> _siSeasonId,
("showId" .=) <$> _siShowId])
| brendanhay/gogol | gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner/Types/Product.hs | mpl-2.0 | 42,964 | 0 | 43 | 11,121 | 8,859 | 5,147 | 3,712 | 956 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Resource.Logging.Folders.Logs.List
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <[email protected]>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the logs in projects, organizations, folders, or billing accounts.
-- Only logs that have entries are listed.
--
-- /See:/ <https://cloud.google.com/logging/docs/ Cloud Logging API Reference> for @logging.folders.logs.list@.
module Network.Google.Resource.Logging.Folders.Logs.List
(
-- * REST Resource
FoldersLogsListResource
-- * Creating a Request
, foldersLogsList
, FoldersLogsList
-- * Request Lenses
, fllParent
, fllXgafv
, fllUploadProtocol
, fllAccessToken
, fllUploadType
, fllPageToken
, fllPageSize
, fllResourceNames
, fllCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
-- | A resource alias for @logging.folders.logs.list@ method which the
-- 'FoldersLogsList' request conforms to.
type FoldersLogsListResource =
"v2" :>
Capture "parent" Text :>
"logs" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParams "resourceNames" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListLogsResponse
-- | Lists the logs in projects, organizations, folders, or billing accounts.
-- Only logs that have entries are listed.
--
-- /See:/ 'foldersLogsList' smart constructor.
data FoldersLogsList =
FoldersLogsList'
{ _fllParent :: !Text
, _fllXgafv :: !(Maybe Xgafv)
, _fllUploadProtocol :: !(Maybe Text)
, _fllAccessToken :: !(Maybe Text)
, _fllUploadType :: !(Maybe Text)
, _fllPageToken :: !(Maybe Text)
, _fllPageSize :: !(Maybe (Textual Int32))
, _fllResourceNames :: !(Maybe [Text])
, _fllCallback :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
-- | Creates a value of 'FoldersLogsList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'fllParent'
--
-- * 'fllXgafv'
--
-- * 'fllUploadProtocol'
--
-- * 'fllAccessToken'
--
-- * 'fllUploadType'
--
-- * 'fllPageToken'
--
-- * 'fllPageSize'
--
-- * 'fllResourceNames'
--
-- * 'fllCallback'
foldersLogsList
:: Text -- ^ 'fllParent'
-> FoldersLogsList
foldersLogsList pFllParent_ =
FoldersLogsList'
{ _fllParent = pFllParent_
, _fllXgafv = Nothing
, _fllUploadProtocol = Nothing
, _fllAccessToken = Nothing
, _fllUploadType = Nothing
, _fllPageToken = Nothing
, _fllPageSize = Nothing
, _fllResourceNames = Nothing
, _fllCallback = Nothing
}
-- | Required. The resource name that owns the logs: projects\/[PROJECT_ID]
-- organizations\/[ORGANIZATION_ID] billingAccounts\/[BILLING_ACCOUNT_ID]
-- folders\/[FOLDER_ID]
fllParent :: Lens' FoldersLogsList Text
fllParent
= lens _fllParent (\ s a -> s{_fllParent = a})
-- | V1 error format.
fllXgafv :: Lens' FoldersLogsList (Maybe Xgafv)
fllXgafv = lens _fllXgafv (\ s a -> s{_fllXgafv = a})
-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
fllUploadProtocol :: Lens' FoldersLogsList (Maybe Text)
fllUploadProtocol
= lens _fllUploadProtocol
(\ s a -> s{_fllUploadProtocol = a})
-- | OAuth access token.
fllAccessToken :: Lens' FoldersLogsList (Maybe Text)
fllAccessToken
= lens _fllAccessToken
(\ s a -> s{_fllAccessToken = a})
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
fllUploadType :: Lens' FoldersLogsList (Maybe Text)
fllUploadType
= lens _fllUploadType
(\ s a -> s{_fllUploadType = a})
-- | Optional. If present, then retrieve the next batch of results from the
-- preceding call to this method. pageToken must be the value of
-- nextPageToken from the previous response. The values of other method
-- parameters should be identical to those in the previous call.
fllPageToken :: Lens' FoldersLogsList (Maybe Text)
fllPageToken
= lens _fllPageToken (\ s a -> s{_fllPageToken = a})
-- | Optional. The maximum number of results to return from this request.
-- Non-positive values are ignored. The presence of nextPageToken in the
-- response indicates that more results might be available.
fllPageSize :: Lens' FoldersLogsList (Maybe Int32)
fllPageSize
= lens _fllPageSize (\ s a -> s{_fllPageSize = a}) .
mapping _Coerce
-- | Optional. The resource name that owns the logs:
-- projects\/[PROJECT_ID]\/locations\/[LOCATION_ID]\/buckets\/[BUCKET_ID]\/views\/[VIEW_ID]
-- organizations\/[ORGANIZATION_ID]\/locations\/[LOCATION_ID]\/buckets\/[BUCKET_ID]\/views\/[VIEW_ID]
-- billingAccounts\/[BILLING_ACCOUNT_ID]\/locations\/[LOCATION_ID]\/buckets\/[BUCKET_ID]\/views\/[VIEW_ID]
-- folders\/[FOLDER_ID]\/locations\/[LOCATION_ID]\/buckets\/[BUCKET_ID]\/views\/[VIEW_ID]To
-- support legacy queries, it could also be: projects\/[PROJECT_ID]
-- organizations\/[ORGANIZATION_ID] billingAccounts\/[BILLING_ACCOUNT_ID]
-- folders\/[FOLDER_ID]
fllResourceNames :: Lens' FoldersLogsList [Text]
fllResourceNames
= lens _fllResourceNames
(\ s a -> s{_fllResourceNames = a})
. _Default
. _Coerce
-- | JSONP
fllCallback :: Lens' FoldersLogsList (Maybe Text)
fllCallback
= lens _fllCallback (\ s a -> s{_fllCallback = a})
instance GoogleRequest FoldersLogsList where
type Rs FoldersLogsList = ListLogsResponse
type Scopes FoldersLogsList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only",
"https://www.googleapis.com/auth/logging.admin",
"https://www.googleapis.com/auth/logging.read"]
requestClient FoldersLogsList'{..}
= go _fllParent _fllXgafv _fllUploadProtocol
_fllAccessToken
_fllUploadType
_fllPageToken
_fllPageSize
(_fllResourceNames ^. _Default)
_fllCallback
(Just AltJSON)
loggingService
where go
= buildClient
(Proxy :: Proxy FoldersLogsListResource)
mempty
| brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Folders/Logs/List.hs | mpl-2.0 | 7,107 | 0 | 19 | 1,578 | 998 | 583 | 415 | 140 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Resource.Datastore.Projects.RunQuery
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <[email protected]>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Queries for entities.
--
-- /See:/ <https://cloud.google.com/datastore/ Google Cloud Datastore API Reference> for @datastore.projects.runQuery@.
module Network.Google.Resource.Datastore.Projects.RunQuery
(
-- * REST Resource
ProjectsRunQueryResource
-- * Creating a Request
, projectsRunQuery
, ProjectsRunQuery
-- * Request Lenses
, prqXgafv
, prqUploadProtocol
, prqPp
, prqAccessToken
, prqUploadType
, prqPayload
, prqBearerToken
, prqProjectId
, prqCallback
) where
import Network.Google.Datastore.Types
import Network.Google.Prelude
-- | A resource alias for @datastore.projects.runQuery@ method which the
-- 'ProjectsRunQuery' request conforms to.
type ProjectsRunQueryResource =
"v1" :>
"projects" :>
CaptureMode "projectId" "runQuery" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "pp" Bool :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "bearer_token" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] RunQueryRequest :>
Post '[JSON] RunQueryResponse
-- | Queries for entities.
--
-- /See:/ 'projectsRunQuery' smart constructor.
data ProjectsRunQuery = ProjectsRunQuery'
{ _prqXgafv :: !(Maybe Xgafv)
, _prqUploadProtocol :: !(Maybe Text)
, _prqPp :: !Bool
, _prqAccessToken :: !(Maybe Text)
, _prqUploadType :: !(Maybe Text)
, _prqPayload :: !RunQueryRequest
, _prqBearerToken :: !(Maybe Text)
, _prqProjectId :: !Text
, _prqCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'ProjectsRunQuery' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'prqXgafv'
--
-- * 'prqUploadProtocol'
--
-- * 'prqPp'
--
-- * 'prqAccessToken'
--
-- * 'prqUploadType'
--
-- * 'prqPayload'
--
-- * 'prqBearerToken'
--
-- * 'prqProjectId'
--
-- * 'prqCallback'
projectsRunQuery
:: RunQueryRequest -- ^ 'prqPayload'
-> Text -- ^ 'prqProjectId'
-> ProjectsRunQuery
projectsRunQuery pPrqPayload_ pPrqProjectId_ =
ProjectsRunQuery'
{ _prqXgafv = Nothing
, _prqUploadProtocol = Nothing
, _prqPp = True
, _prqAccessToken = Nothing
, _prqUploadType = Nothing
, _prqPayload = pPrqPayload_
, _prqBearerToken = Nothing
, _prqProjectId = pPrqProjectId_
, _prqCallback = Nothing
}
-- | V1 error format.
prqXgafv :: Lens' ProjectsRunQuery (Maybe Xgafv)
prqXgafv = lens _prqXgafv (\ s a -> s{_prqXgafv = a})
-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
prqUploadProtocol :: Lens' ProjectsRunQuery (Maybe Text)
prqUploadProtocol
= lens _prqUploadProtocol
(\ s a -> s{_prqUploadProtocol = a})
-- | Pretty-print response.
prqPp :: Lens' ProjectsRunQuery Bool
prqPp = lens _prqPp (\ s a -> s{_prqPp = a})
-- | OAuth access token.
prqAccessToken :: Lens' ProjectsRunQuery (Maybe Text)
prqAccessToken
= lens _prqAccessToken
(\ s a -> s{_prqAccessToken = a})
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
prqUploadType :: Lens' ProjectsRunQuery (Maybe Text)
prqUploadType
= lens _prqUploadType
(\ s a -> s{_prqUploadType = a})
-- | Multipart request metadata.
prqPayload :: Lens' ProjectsRunQuery RunQueryRequest
prqPayload
= lens _prqPayload (\ s a -> s{_prqPayload = a})
-- | OAuth bearer token.
prqBearerToken :: Lens' ProjectsRunQuery (Maybe Text)
prqBearerToken
= lens _prqBearerToken
(\ s a -> s{_prqBearerToken = a})
-- | The ID of the project against which to make the request.
prqProjectId :: Lens' ProjectsRunQuery Text
prqProjectId
= lens _prqProjectId (\ s a -> s{_prqProjectId = a})
-- | JSONP
prqCallback :: Lens' ProjectsRunQuery (Maybe Text)
prqCallback
= lens _prqCallback (\ s a -> s{_prqCallback = a})
instance GoogleRequest ProjectsRunQuery where
type Rs ProjectsRunQuery = RunQueryResponse
type Scopes ProjectsRunQuery =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/datastore"]
requestClient ProjectsRunQuery'{..}
= go _prqProjectId _prqXgafv _prqUploadProtocol
(Just _prqPp)
_prqAccessToken
_prqUploadType
_prqBearerToken
_prqCallback
(Just AltJSON)
_prqPayload
datastoreService
where go
= buildClient
(Proxy :: Proxy ProjectsRunQueryResource)
mempty
| rueshyna/gogol | gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/RunQuery.hs | mpl-2.0 | 5,686 | 0 | 19 | 1,454 | 937 | 543 | 394 | 134 | 1 |
module Compiler (
compile
) where
import System.IO
compile :: Maybe FilePath -> IO ()
compile maybeFilename = do
sourceCode <- case maybeFilename of
Nothing -> getContents
Just filename -> readFile filename
putStr sourceCode -- DEBUG
--let theModule = compile sourceCode
--outputModuleToFile theModule filename
| raviqqe/jack | command/Compiler.hs | unlicense | 333 | 0 | 11 | 66 | 77 | 39 | 38 | 9 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Prompt.Directory
-- Copyright : (C) 2007 Andrea Rossato, David Roundy
-- License : BSD3
--
-- Maintainer :
-- Stability : unstable
-- Portability : unportable
--
-- A directory prompt for XMonad
--
-----------------------------------------------------------------------------
module CopyPasteMonad.Prompt.Directory (
-- * Usage
-- $usage
directoryPrompt,
Dir,
) where
import XMonad
import XMonad.Prompt
import XMonad.Util.Run ( runProcessWithInput )
import Control.Arrow ((>>>))
import Data.List (isPrefixOf)
import Data.Maybe (fromMaybe)
import System.FilePath (splitDirectories)
-- $usage
-- For an example usage see "XMonad.Layout.WorkspaceDir"
data Dir = Dir String
instance XPrompt Dir where
showXPrompt (Dir x) = x
directoryPrompt :: XPConfig -> String -> (String -> X ()) -> X ()
directoryPrompt c prom = mkXPrompt (Dir prom) c getDirCompl
getDirCompl :: String -> IO [String]
getDirCompl s = (filter (notboring s) . lines) `fmap`
runProcessWithInput "/run/current-system/sw/bin/bash" [] ("compgen -A directory \"" ++ s ++ "\"\n")
-- Does not show hidden files, unless input starts with dot.
notboring :: String -> String -> Bool
notboring input sugg = isPrevDir input || isHidden input || (not $ isHidden sugg)
where isHidden = pathSuffix >>> isPrefixOf "."
isPrevDir = pathSuffix >>> ( == "..")
pathSuffix :: FilePath -> FilePath
pathSuffix = splitDirectories >>> lastMaybe >>> (fromMaybe "")
lastMaybe :: [a] -> Maybe a
lastMaybe [] = Nothing
lastMaybe xs = Just $ last xs
| Balletie/.xmonad | lib/CopyPasteMonad/Prompt/Directory.hs | unlicense | 1,792 | 0 | 11 | 428 | 390 | 218 | 172 | 27 | 1 |
module Main where
import System.Console.ANSI
import Control.Concurrent
import World (World, buildWorld, iterateWorld, Position(..), Cell(..), getWorld, toList)
import Control.Monad.IO.Class
import UI.NCurses
main :: IO ()
main = runCurses $ do
setEcho False
w <- defaultWindow
let startWorld = buildWorld 25 60 [ Position 6 2, Position 7 2, Position 6 3, Position 7 3,
Position 4 14, Position 4 15, Position 5 13, Position 5 17, Position 6 12, Position 6 18, Position 7 12, Position 7 16, Position 7 18, Position 7 19, Position 8 12, Position 8 18, Position 9 13, Position 9 17, Position 10 14, Position 10 15,
Position 2 26, Position 3 24, Position 3 26, Position 4 22, Position 4 23, Position 5 22, Position 5 23, Position 6 22, Position 6 23, Position 7 24, Position 7 26, Position 8 26,
Position 4 36, Position 4 37, Position 5 36, Position 5 37]
waitFor startWorld w (\ev -> ev == EventCharacter 'q')
waitFor :: World -> Window -> (Event -> Bool) -> Curses ()
waitFor world window event = loop world where
loop world' = do
let newWorld = iterateWorld world'
updateWindow window $ do
--clear
let worldMap = toList newWorld
mapM_ drawCellAtPosition worldMap
render
liftIO $ threadDelay 80000
loop newWorld
drawCellAtPosition :: (Position, Cell) -> Update ()
drawCellAtPosition (position, cell) = do
moveCursor (row position) (col position)
case cell of
Live -> drawGlyph $ Glyph '\x25A1' []
Dead -> drawGlyph $ Glyph '\x25A0' []
| mac10688/GameOfLife-Haskell | src/Main.hs | apache-2.0 | 1,608 | 0 | 15 | 417 | 633 | 318 | 315 | 31 | 2 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
module Canteven.Log.MonadLog (
LoggerTImpl,
getCantevenOutput,
{- Reexports -}
LoggingConfig(LoggingConfig, level, logfile, loggers),
LoggerDetails(loggerName, loggerPackage, loggerModule, loggerLevel),
newLoggingConfig,
) where
import Canteven.Log.Types (LoggingConfig(LoggingConfig, logfile,
level, loggers),
LoggerDetails(LoggerDetails, loggerName, loggerPackage,
loggerModule, loggerLevel),
newLoggingConfig)
import Control.Concurrent (ThreadId, myThreadId)
import Control.Monad (when)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Monad.Logger (LogSource, LogLevel(LevelOther))
import Data.Char (toUpper)
import Data.List (dropWhileEnd, isPrefixOf, isSuffixOf)
import Data.Maybe (fromMaybe, listToMaybe, mapMaybe)
import Data.Monoid ((<>))
import Data.Time.Format (defaultTimeLocale, formatTime)
import Data.Time.LocalTime (ZonedTime, getZonedTime)
import Language.Haskell.TH (Loc(loc_filename, loc_package, loc_module,
loc_start))
import System.Directory (createDirectoryIfMissing)
import System.FilePath (dropFileName)
import System.IO (Handle, IOMode(AppendMode), openFile, stdout, hFlush)
import System.Log.FastLogger (LogStr, fromLogStr, toLogStr)
import qualified Data.ByteString.Char8 as S8
import qualified Data.Text as T
type LoggerTImpl = Loc -> LogSource -> LogLevel -> LogStr -> IO ()
getCantevenOutput
:: (MonadIO io)
=> LoggingConfig
-> io LoggerTImpl
getCantevenOutput config =
uncurry cantevenOutput <$> liftIO setupLogger
where
setupLogger = do
handle <- setupHandle config
return (config, handle)
cantevenOutput
:: LoggingConfig
-> Handle
-> Loc
-> LogSource
-> LogLevel
-> LogStr
-> IO ()
cantevenOutput config handle loc src level msg =
when (configPermits config loc src level) $ do
time <- getZonedTime
threadId <- myThreadId
S8.hPutStr handle . fromLogStr $ cantevenLogFormat loc src level msg time threadId
hFlush handle
-- | Figure out whether a particular log message is permitted, given a
-- particular config.
--
-- FIXME: if two LoggerDetails match the same message, it should probably take
-- the answer given by the most specific one that matches. However, at present
-- it just takes the first one.
configPermits :: LoggingConfig -> Loc -> LogSource -> LogLevel -> Bool
configPermits LoggingConfig {level=defaultLP, loggers} = runFilters
where
predicates = map toPredicate loggers
toPredicate LoggerDetails {loggerName, loggerPackage,
loggerModule, loggerLevel=loggerLevel}
loc src level =
if matches (T.pack <$> loggerName) src &&
matches loggerPackage (loc_package loc) &&
matchesGlob loggerModule (loc_module loc)
then Just (level >= loggerLevel)
else Nothing
-- It's considered a "match" if either the specification is absent (matches
-- everything), or the specification is given and matches the target.
matches Nothing _ = True
matches (Just s1) s2 = s1 == s2
-- Not real glob matching.
matchesGlob Nothing _ = True
matchesGlob (Just p) candidate
| "*" `isSuffixOf` p = dropWhileEnd (=='*') p `isPrefixOf` candidate
| otherwise = p == candidate
runFilters loc src level =
-- default to the defaultLP
fromMaybe (level >= defaultLP) $
-- take the first value
listToMaybe $
-- of the predicates that returned Just something
mapMaybe (\p -> p loc src level) predicates
-- | This is similar to the version defined in monad-logger (which we can't
-- share because of privacy restrictions), but with the added nuance of
-- uppercasing.
cantevenLogLevelStr :: LogLevel -> LogStr
cantevenLogLevelStr level = case level of
LevelOther t -> toLogStr $ T.toUpper t
_ -> toLogStr $ S8.pack $ map toUpper $ drop 5 $ show level
-- | This log format is inspired by syslog and the X.org log
-- formats. Rationales are:
--
-- * Put the date first, because the date string tends to be a fixed number
-- of characters (or +/- 1 around changes to DST), so the eye can easily
-- skim over them.
--
-- * The "source" of a message comes before the message itself. "Source" is
-- composed of not just the "logger name" (called a source in
-- monad-logger), but also the package/module name and the thread
-- ID. Package and module name might seem controversial, but they
-- correspond to e.g. Log4J logger names based on classes.
--
-- * Filename/position of the message is perhaps the least important, but
-- can still be helpful. Put it at the end.
cantevenLogFormat
:: Loc
-> LogSource
-> LogLevel
-> LogStr
-> ZonedTime
-> ThreadId
-> LogStr
cantevenLogFormat loc src level msg t tid =
"[" <> toLogStr (fmtTime t) <> "] " <>
cantevenLogLevelStr level <>
" " <>
(if T.null src
then mempty
else toLogStr src) <>
"@" <> toLogStr (loc_package loc ++ ":" ++ loc_module loc) <>
"[" <>
toLogStr (show tid) <> "]: " <>
msg <> " (" <> toLogStr (S8.pack fileLocStr) <> ")\n"
where
fmtTime = formatTime defaultTimeLocale "%Y-%m-%dT%H:%M:%S.%q %Z"
fileLocStr =
loc_filename loc ++ ':' : line loc ++ ':' : char loc
where
line = show . fst . loc_start
char = show . snd . loc_start
openFileForLogging :: FilePath -> IO Handle
openFileForLogging filename = do
createDirectoryIfMissing True (dropFileName filename)
openFile filename AppendMode
setupHandle :: LoggingConfig -> IO Handle
setupHandle LoggingConfig {logfile} =
maybe (return stdout) openFileForLogging logfile
| SumAll/haskell-canteven-log | src/Canteven/Log/MonadLog.hs | apache-2.0 | 5,759 | 0 | 21 | 1,252 | 1,261 | 702 | 559 | 116 | 4 |
module Database.Neo4j.Util.ShowBytes (
showBytes
) where
import Data.Binary
import qualified Data.Binary.Put as P
import qualified Data.ByteString.Lazy as BSL
import Data.Char (toUpper)
import Numeric (showHex)
showBytes :: Binary a => a -> String
showBytes bin = unwords $ map hexWord8 (BSL.unpack bytes)
where
bytes = P.runPut (put bin)
hexWord8 w = pad (map toUpper (showHex w ""))
pad chars = replicate (2 - length chars) '0' ++ chars
| boggle/neo4j-haskell-driver | src/Database/Neo4j/Util/ShowBytes.hs | apache-2.0 | 516 | 0 | 11 | 144 | 167 | 92 | 75 | 12 | 1 |
module Numeric.Euler.Integers
( multiple
, multipleOf
) where
multiple :: Int -> Int -> Bool
multiple number factor = (number `mod` factor) == 0
multipleOf :: Int -> [Int] -> Bool
multipleOf number factors = any (multiple number) factors
| decomputed/euler | src/Numeric/Euler/Integers.hs | apache-2.0 | 253 | 0 | 7 | 54 | 88 | 49 | 39 | 7 | 1 |
-- http://www.codewars.com/kata/54d418bd099d650fa000032d
module Codewars.Kata.VampireNumbers where
import Data.List
isVampire :: Integer -> Integer -> Bool
isVampire a b = (a>0 || b>0) && sort (digits $ a*b) == sort (digits a ++ digits b) where
digits = map (`mod`10) . takeWhile (>0) . iterate (`div`10) . abs | Bodigrim/katas | src/haskell/7-Vampire-Numbers.hs | bsd-2-clause | 314 | 0 | 11 | 49 | 133 | 73 | 60 | 5 | 1 |
{-
This file is part of the package xmonad-test. It is subject to the
license terms in the LICENSE file found in the top-level directory of
this distribution and at http://github.com/pjones/xmonad-test/LICENSE.
No part of the xmonad-test package, including this file, may be
copied, modified, propagated, or distributed except according to the
terms contained in the LICENSE file.
-}
--------------------------------------------------------------------------------
import XMonad
--------------------------------------------------------------------------------
main :: IO ()
main = xmonad $ def
{ borderWidth = 2
, terminal = "urxvt"
, normalBorderColor = "#cccccc"
, focusedBorderColor = "#cd8b00"
}
| pjones/xmonad-test | src/Main.hs | bsd-2-clause | 742 | 0 | 7 | 130 | 52 | 32 | 20 | 7 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
module Data.Foscam.File.DeviceId(
DeviceId(..)
, AsDeviceId(..)
, deviceId
, getDeviceIdCharacters
) where
import Control.Applicative(Applicative((<*>)), (<$>))
import Control.Category(id, (.))
import Control.Lens(Optic', Choice, Fold, prism', (^?), ( # ))
import Control.Monad(Monad)
import Data.Char(Char)
import Data.Eq(Eq)
import Data.Foscam.File.DeviceIdCharacter
import Data.Functor(fmap)
import Data.Maybe(Maybe(Nothing))
import Data.Ord(Ord)
import Data.String(String)
import Text.Parser.Char(CharParsing)
import Text.Parser.Combinators((<?>))
import Prelude(Show)
-- $setup
-- >>> import Text.Parsec
data DeviceId =
DeviceId
DeviceIdCharacter
DeviceIdCharacter
DeviceIdCharacter
DeviceIdCharacter
DeviceIdCharacter
DeviceIdCharacter
DeviceIdCharacter
DeviceIdCharacter
DeviceIdCharacter
DeviceIdCharacter
DeviceIdCharacter
DeviceIdCharacter
deriving (Eq, Ord, Show)
class AsDeviceId p f s where
_DeviceId ::
Optic' p f s DeviceId
instance AsDeviceId p f DeviceId where
_DeviceId =
id
instance (p ~ (->), Applicative f) => AsDeviceIdCharacter p f DeviceId where
_DeviceIdCharacter f (DeviceId d01 d02 d03 d04 d05 d06 d07 d08 d09 d10 d11 d12) =
DeviceId <$> f d01 <*> f d02 <*> f d03 <*> f d04 <*> f d05 <*> f d06 <*> f d07 <*> f d08 <*> f d09 <*> f d10 <*> f d11 <*> f d12
instance (Choice p, Applicative f) => AsDeviceId p f String where
_DeviceId =
prism'
(\(DeviceId d01 d02 d03 d04 d05 d06 d07 d08 d09 d10 d11 d12) -> fmap (_DeviceIdCharacter #) [d01, d02, d03, d04, d05, d06, d07, d08, d09, d10, d11, d12])
(\s -> case s of
[c01, c02, c03, c04, c05, c06, c07, c08, c09, c10, c11, c12] ->
let f = (^? _DeviceIdCharacter)
in DeviceId <$>
f c01 <*>
f c02 <*>
f c03 <*>
f c04 <*>
f c05 <*>
f c06 <*>
f c07 <*>
f c08 <*>
f c09 <*>
f c10 <*>
f c11 <*>
f c12
_ ->
Nothing)
getDeviceIdCharacters ::
Fold DeviceId Char
getDeviceIdCharacters =
_DeviceIdCharacter . getDeviceIdCharacter
-- |
--
-- >>> parse deviceId "test" "AB0934233DEF"
-- Right (DeviceId (DeviceIdCharacter 'A') (DeviceIdCharacter 'B') (DeviceIdCharacter '0') (DeviceIdCharacter '9') (DeviceIdCharacter '3') (DeviceIdCharacter '4') (DeviceIdCharacter '2') (DeviceIdCharacter '3') (DeviceIdCharacter '3') (DeviceIdCharacter 'D') (DeviceIdCharacter 'E') (DeviceIdCharacter 'F'))
--
-- >>> parse deviceId "test" "AB0934233DEFabc"
-- Right (DeviceId (DeviceIdCharacter 'A') (DeviceIdCharacter 'B') (DeviceIdCharacter '0') (DeviceIdCharacter '9') (DeviceIdCharacter '3') (DeviceIdCharacter '4') (DeviceIdCharacter '2') (DeviceIdCharacter '3') (DeviceIdCharacter '3') (DeviceIdCharacter 'D') (DeviceIdCharacter 'E') (DeviceIdCharacter 'F'))
--
-- >>> parse deviceId "test" "AB0934233DX"
-- Left "test" (line 1, column 12):
-- not a device ID character: X
--
-- >>> parse deviceId "test" "AB0934233DEf"
-- Left "test" (line 1, column 13):
-- not a device ID character: f
--
-- >>> parse deviceId "test" ""
-- Left "test" (line 1, column 1):
-- unexpected end of input
-- expecting device ID
deviceId ::
(Monad f, CharParsing f) =>
f DeviceId
deviceId =
DeviceId <$>
deviceIdCharacter <*>
deviceIdCharacter <*>
deviceIdCharacter <*>
deviceIdCharacter <*>
deviceIdCharacter <*>
deviceIdCharacter <*>
deviceIdCharacter <*>
deviceIdCharacter <*>
deviceIdCharacter <*>
deviceIdCharacter <*>
deviceIdCharacter <*>
deviceIdCharacter <?> "device ID"
| tonymorris/foscam-filename | src/Data/Foscam/File/DeviceId.hs | bsd-3-clause | 3,948 | 0 | 26 | 977 | 854 | 480 | 374 | 90 | 1 |
module CodeGen.Platform.X86 where
import CmmExpr
#define MACHREGS_NO_REGS 0
#define MACHREGS_i386 1
#include "../../../../includes/CodeGen.Platform.hs"
| nomeata/ghc | compiler/codeGen/CodeGen/Platform/X86.hs | bsd-3-clause | 156 | 0 | 3 | 17 | 13 | 10 | 3 | 2 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE GHCForeignImportPrim #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE UnliftedFFITypes #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
module GHC.Exts.Heap.Closures (
-- * Closures
Closure
, GenClosure(..)
, PrimType(..)
, allClosures
#if __GLASGOW_HASKELL__ >= 809
-- The closureSize# primop is unsupported on earlier GHC releases but we
-- build ghc-heap as a boot library so it must be buildable. Drop this once
-- we are guaranteed to bootstsrap with GHC >= 8.9.
, closureSize
#endif
-- * Boxes
, Box(..)
, areBoxesEqual
, asBox
) where
import Prelude -- See note [Why do we import Prelude here?]
import GHC.Exts.Heap.Constants
#if defined(PROFILING)
import GHC.Exts.Heap.InfoTableProf
#else
import GHC.Exts.Heap.InfoTable
-- `ghc -M` currently doesn't properly account for ways when generating
-- dependencies (#15197). This import ensures correct build-ordering between
-- this module and GHC.Exts.Heap.InfoTableProf. It should be removed when #15197
-- is fixed.
import GHC.Exts.Heap.InfoTableProf ()
#endif
import Data.Bits
import Data.Int
import Data.Word
import GHC.Exts
import GHC.Generics
import Numeric
------------------------------------------------------------------------
-- Boxes
foreign import prim "aToWordzh" aToWord# :: Any -> Word#
foreign import prim "reallyUnsafePtrEqualityUpToTag"
reallyUnsafePtrEqualityUpToTag# :: Any -> Any -> Int#
-- | An arbitrary Haskell value in a safe Box. The point is that even
-- unevaluated thunks can safely be moved around inside the Box, and when
-- required, e.g. in 'getBoxedClosureData', the function knows how far it has
-- to evaluate the argument.
data Box = Box Any
instance Show Box where
-- From libraries/base/GHC/Ptr.lhs
showsPrec _ (Box a) rs =
-- unsafePerformIO (print "↓" >> pClosure a) `seq`
pad_out (showHex addr "") ++ (if tag>0 then "/" ++ show tag else "") ++ rs
where
ptr = W# (aToWord# a)
tag = ptr .&. fromIntegral tAG_MASK -- ((1 `shiftL` TAG_BITS) -1)
addr = ptr - tag
pad_out ls = '0':'x':ls
-- |This takes an arbitrary value and puts it into a box.
-- Note that calls like
--
-- > asBox (head list)
--
-- will put the thunk \"head list\" into the box, /not/ the element at the head
-- of the list. For that, use careful case expressions:
--
-- > case list of x:_ -> asBox x
asBox :: a -> Box
asBox x = Box (unsafeCoerce# x)
-- | Boxes can be compared, but this is not pure, as different heap objects can,
-- after garbage collection, become the same object.
areBoxesEqual :: Box -> Box -> IO Bool
areBoxesEqual (Box a) (Box b) = case reallyUnsafePtrEqualityUpToTag# a b of
0# -> pure False
_ -> pure True
------------------------------------------------------------------------
-- Closures
type Closure = GenClosure Box
-- | This is the representation of a Haskell value on the heap. It reflects
-- <https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/storage/Closures.h>
--
-- The data type is parametrized by the type to store references in. Usually
-- this is a 'Box' with the type synonym 'Closure'.
--
-- All Heap objects have the same basic layout. A header containing a pointer
-- to the info table and a payload with various fields. The @info@ field below
-- always refers to the info table pointed to by the header. The remaining
-- fields are the payload.
--
-- See
-- <https://gitlab.haskell.org/ghc/ghc/wikis/commentary/rts/storage/heap-objects>
-- for more information.
data GenClosure b
= -- | A data constructor
ConstrClosure
{ info :: !StgInfoTable
, ptrArgs :: ![b] -- ^ Pointer arguments
, dataArgs :: ![Word] -- ^ Non-pointer arguments
, pkg :: !String -- ^ Package name
, modl :: !String -- ^ Module name
, name :: !String -- ^ Constructor name
}
-- | A function
| FunClosure
{ info :: !StgInfoTable
, ptrArgs :: ![b] -- ^ Pointer arguments
, dataArgs :: ![Word] -- ^ Non-pointer arguments
}
-- | A thunk, an expression not obviously in head normal form
| ThunkClosure
{ info :: !StgInfoTable
, ptrArgs :: ![b] -- ^ Pointer arguments
, dataArgs :: ![Word] -- ^ Non-pointer arguments
}
-- | A thunk which performs a simple selection operation
| SelectorClosure
{ info :: !StgInfoTable
, selectee :: !b -- ^ Pointer to the object being
-- selected from
}
-- | An unsaturated function application
| PAPClosure
{ info :: !StgInfoTable
, arity :: !HalfWord -- ^ Arity of the partial application
, n_args :: !HalfWord -- ^ Size of the payload in words
, fun :: !b -- ^ Pointer to a 'FunClosure'
, payload :: ![b] -- ^ Sequence of already applied
-- arguments
}
-- In GHCi, if Linker.h would allow a reverse lookup, we could for exported
-- functions fun actually find the name here.
-- At least the other direction works via "lookupSymbol
-- base_GHCziBase_zpzp_closure" and yields the same address (up to tags)
-- | A function application
| APClosure
{ info :: !StgInfoTable
, arity :: !HalfWord -- ^ Always 0
, n_args :: !HalfWord -- ^ Size of payload in words
, fun :: !b -- ^ Pointer to a 'FunClosure'
, payload :: ![b] -- ^ Sequence of already applied
-- arguments
}
-- | A suspended thunk evaluation
| APStackClosure
{ info :: !StgInfoTable
, fun :: !b -- ^ Function closure
, payload :: ![b] -- ^ Stack right before suspension
}
-- | A pointer to another closure, introduced when a thunk is updated
-- to point at its value
| IndClosure
{ info :: !StgInfoTable
, indirectee :: !b -- ^ Target closure
}
-- | A byte-code object (BCO) which can be interpreted by GHC's byte-code
-- interpreter (e.g. as used by GHCi)
| BCOClosure
{ info :: !StgInfoTable
, instrs :: !b -- ^ A pointer to an ArrWords
-- of instructions
, literals :: !b -- ^ A pointer to an ArrWords
-- of literals
, bcoptrs :: !b -- ^ A pointer to an ArrWords
-- of byte code objects
, arity :: !HalfWord -- ^ The arity of this BCO
, size :: !HalfWord -- ^ The size of this BCO in words
, bitmap :: ![Word] -- ^ An StgLargeBitmap describing the
-- pointerhood of its args/free vars
}
-- | A thunk under evaluation by another thread
| BlackholeClosure
{ info :: !StgInfoTable
, indirectee :: !b -- ^ The target closure
}
-- | A @ByteArray#@
| ArrWordsClosure
{ info :: !StgInfoTable
, bytes :: !Word -- ^ Size of array in bytes
, arrWords :: ![Word] -- ^ Array payload
}
-- | A @MutableByteArray#@
| MutArrClosure
{ info :: !StgInfoTable
, mccPtrs :: !Word -- ^ Number of pointers
, mccSize :: !Word -- ^ ?? Closures.h vs ClosureMacros.h
, mccPayload :: ![b] -- ^ Array payload
-- Card table ignored
}
-- | A @SmallMutableArray#@
--
-- @since 8.10.1
| SmallMutArrClosure
{ info :: !StgInfoTable
, mccPtrs :: !Word -- ^ Number of pointers
, mccPayload :: ![b] -- ^ Array payload
}
-- | An @MVar#@, with a queue of thread state objects blocking on them
| MVarClosure
{ info :: !StgInfoTable
, queueHead :: !b -- ^ Pointer to head of queue
, queueTail :: !b -- ^ Pointer to tail of queue
, value :: !b -- ^ Pointer to closure
}
-- | A @MutVar#@
| MutVarClosure
{ info :: !StgInfoTable
, var :: !b -- ^ Pointer to contents
}
-- | An STM blocking queue.
| BlockingQueueClosure
{ info :: !StgInfoTable
, link :: !b -- ^ ?? Here so it looks like an IND
, blackHole :: !b -- ^ The blackhole closure
, owner :: !b -- ^ The owning thread state object
, queue :: !b -- ^ ??
}
| WeakClosure
{ info :: !StgInfoTable
, cfinalizers :: !b
, key :: !b
, value :: !b
, finalizer :: !b
, link :: !b -- ^ next weak pointer for the capability, can be NULL.
}
------------------------------------------------------------
-- Unboxed unlifted closures
-- | Primitive Int
| IntClosure
{ ptipe :: PrimType
, intVal :: !Int }
-- | Primitive Word
| WordClosure
{ ptipe :: PrimType
, wordVal :: !Word }
-- | Primitive Int64
| Int64Closure
{ ptipe :: PrimType
, int64Val :: !Int64 }
-- | Primitive Word64
| Word64Closure
{ ptipe :: PrimType
, word64Val :: !Word64 }
-- | Primitive Addr
| AddrClosure
{ ptipe :: PrimType
, addrVal :: !Int }
-- | Primitive Float
| FloatClosure
{ ptipe :: PrimType
, floatVal :: !Float }
-- | Primitive Double
| DoubleClosure
{ ptipe :: PrimType
, doubleVal :: !Double }
-----------------------------------------------------------
-- Anything else
-- | Another kind of closure
| OtherClosure
{ info :: !StgInfoTable
, hvalues :: ![b]
, rawWords :: ![Word]
}
| UnsupportedClosure
{ info :: !StgInfoTable
}
deriving (Show, Generic, Functor, Foldable, Traversable)
data PrimType
= PInt
| PWord
| PInt64
| PWord64
| PAddr
| PFloat
| PDouble
deriving (Eq, Show, Generic)
-- | For generic code, this function returns all referenced closures.
allClosures :: GenClosure b -> [b]
allClosures (ConstrClosure {..}) = ptrArgs
allClosures (ThunkClosure {..}) = ptrArgs
allClosures (SelectorClosure {..}) = [selectee]
allClosures (IndClosure {..}) = [indirectee]
allClosures (BlackholeClosure {..}) = [indirectee]
allClosures (APClosure {..}) = fun:payload
allClosures (PAPClosure {..}) = fun:payload
allClosures (APStackClosure {..}) = fun:payload
allClosures (BCOClosure {..}) = [instrs,literals,bcoptrs]
allClosures (ArrWordsClosure {}) = []
allClosures (MutArrClosure {..}) = mccPayload
allClosures (SmallMutArrClosure {..}) = mccPayload
allClosures (MutVarClosure {..}) = [var]
allClosures (MVarClosure {..}) = [queueHead,queueTail,value]
allClosures (FunClosure {..}) = ptrArgs
allClosures (BlockingQueueClosure {..}) = [link, blackHole, owner, queue]
allClosures (WeakClosure {..}) = [cfinalizers, key, value, finalizer, link]
allClosures (OtherClosure {..}) = hvalues
allClosures _ = []
#if __GLASGOW_HASKELL__ >= 809
-- | Get the size of a closure in words.
--
-- @since 8.10.1
closureSize :: Box -> Int
closureSize (Box x) = I# (closureSize# x)
#endif
| sdiehl/ghc | libraries/ghc-heap/GHC/Exts/Heap/Closures.hs | bsd-3-clause | 11,946 | 0 | 11 | 3,914 | 1,754 | 1,059 | 695 | -1 | -1 |
n \+\ tp = n * (100 + tp) `div` 100
| YoshikuniJujo/shinjukuhs | events/event_004/DaichiSaitoTT/func3.hs | bsd-3-clause | 36 | 0 | 8 | 11 | 29 | 15 | 14 | 1 | 1 |
-- ------------------------------------------------------------
{- |
Module : Yuuko.Text.XML.HXT.DOM.Interface
Copyright : Copyright (C) 2008 Uwe Schmidt
License : MIT
Maintainer : Uwe Schmidt ([email protected])
Stability : stable
Portability: portable
The interface to the primitive DOM data types and constants
and utility functions
-}
-- ------------------------------------------------------------
module Yuuko.Text.XML.HXT.DOM.Interface
( module Yuuko.Text.XML.HXT.DOM.XmlKeywords
, module Yuuko.Text.XML.HXT.DOM.TypeDefs
, module Yuuko.Text.XML.HXT.DOM.Util
, module Yuuko.Text.XML.HXT.DOM.XmlOptions
, module Yuuko.Text.XML.HXT.DOM.MimeTypes
)
where
import Yuuko.Text.XML.HXT.DOM.XmlKeywords -- constants
import Yuuko.Text.XML.HXT.DOM.TypeDefs -- XML Tree types
import Yuuko.Text.XML.HXT.DOM.Util
import Yuuko.Text.XML.HXT.DOM.XmlOptions -- predefined options
import Yuuko.Text.XML.HXT.DOM.MimeTypes -- mime types related stuff
-- ------------------------------------------------------------
| nfjinjing/yuuko | src/Yuuko/Text/XML/HXT/DOM/Interface.hs | bsd-3-clause | 1,069 | 0 | 5 | 159 | 115 | 92 | 23 | 11 | 0 |
{-# OPTIONS_GHC -w #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.Haskell.Exts.Annotated.Parser
-- Copyright : (c) Niklas Broberg 2004-2009,
-- Original (c) Simon Marlow, Sven Panne 1997-2000
-- License : BSD-style (see the file LICENSE.txt)
--
-- Maintainer : Niklas Broberg, [email protected]
-- Stability : stable
-- Portability : portable
--
--
-----------------------------------------------------------------------------
module Language.Haskell.Exts.InternalParser (
-- * General parsing
ParseMode(..), defaultParseMode, ParseResult(..), fromParseResult,
-- * Parsing of specific AST elements
-- ** Modules
parseModule, parseModuleWithMode, parseModuleWithComments,
-- ** Expressions
parseExp, parseExpWithMode, parseExpWithComments,
-- ** Statements
parseStmt, parseStmtWithMode, parseStmtWithComments,
-- ** Patterns
parsePat, parsePatWithMode, parsePatWithComments,
-- ** Declarations
parseDecl, parseDeclWithMode, parseDeclWithComments,
-- ** Types
parseType, parseTypeWithMode, parseTypeWithComments,
-- ** Multiple modules in one file
parseModules, parseModulesWithMode, parseModulesWithComments,
-- ** Option pragmas
getTopPragmas
) where
import Language.Haskell.Exts.Annotated.Syntax hiding ( Type(..), Exp(..), Asst(..), XAttr(..), FieldUpdate(..) )
import Language.Haskell.Exts.Annotated.Syntax ( Type, Exp, Asst )
import Language.Haskell.Exts.ParseMonad
import Language.Haskell.Exts.InternalLexer
import Language.Haskell.Exts.ParseUtils
import Language.Haskell.Exts.Annotated.Fixity
import Language.Haskell.Exts.SrcLoc
import Language.Haskell.Exts.Comments ( Comment )
import Language.Haskell.Exts.Extension
import Control.Monad ( liftM, (<=<) )
import Control.Applicative(Applicative(..))
import Control.Monad (ap)
-- parser produced by Happy Version 1.19.5
data HappyAbsSyn
= HappyTerminal (Loc Token)
| HappyErrorToken Int
| HappyAbsSyn11 ([Module L])
| HappyAbsSyn12 ([[ModulePragma L] -> [S] -> L -> Module L])
| HappyAbsSyn13 (Module L)
| HappyAbsSyn14 (PExp L)
| HappyAbsSyn15 (([ModulePragma L],[S],L))
| HappyAbsSyn16 (([ModulePragma L],[S],Maybe L))
| HappyAbsSyn17 (ModulePragma L)
| HappyAbsSyn18 (([Name L],[S]))
| HappyAbsSyn19 ([ModulePragma L] -> [S] -> L -> Module L)
| HappyAbsSyn20 (Maybe (ModuleHead L))
| HappyAbsSyn21 (Maybe (WarningText L))
| HappyAbsSyn22 (([ImportDecl L],[Decl L],[S],L))
| HappyAbsSyn23 (([ImportDecl L],[Decl L],[S]))
| HappyAbsSyn24 ([S])
| HappyAbsSyn26 (Maybe (ExportSpecList L))
| HappyAbsSyn27 (ExportSpecList L)
| HappyAbsSyn29 (([ExportSpec L],[S]))
| HappyAbsSyn30 (ExportSpec L)
| HappyAbsSyn31 (([ImportDecl L],[S]))
| HappyAbsSyn32 (ImportDecl L)
| HappyAbsSyn33 ((Bool,[S]))
| HappyAbsSyn35 ((Maybe String,[S]))
| HappyAbsSyn36 ((Maybe (ModuleName L),[S],Maybe L))
| HappyAbsSyn37 (Maybe (ImportSpecList L))
| HappyAbsSyn38 (ImportSpecList L)
| HappyAbsSyn39 ((Bool, Maybe L,[S]))
| HappyAbsSyn40 (([ImportSpec L],[S]))
| HappyAbsSyn41 (ImportSpec L)
| HappyAbsSyn42 (([CName L],[S]))
| HappyAbsSyn43 (CName L)
| HappyAbsSyn44 (Decl L)
| HappyAbsSyn45 ((Maybe Int, [S]))
| HappyAbsSyn46 (Assoc L)
| HappyAbsSyn47 (([Op L],[S],L))
| HappyAbsSyn48 (([Decl L],[S]))
| HappyAbsSyn51 (DataOrNew L)
| HappyAbsSyn52 (([Type L],[S]))
| HappyAbsSyn56 (Binds L)
| HappyAbsSyn60 (Type L)
| HappyAbsSyn62 (([Name L],[S],L))
| HappyAbsSyn63 (CallConv L)
| HappyAbsSyn64 (Maybe (Safety L))
| HappyAbsSyn65 ((Maybe String, Name L, Type L, [S]))
| HappyAbsSyn66 ([Rule L])
| HappyAbsSyn67 (Rule L)
| HappyAbsSyn68 (Maybe (Activation L))
| HappyAbsSyn69 ((Maybe [RuleVar L],[S]))
| HappyAbsSyn70 ([RuleVar L])
| HappyAbsSyn71 (RuleVar L)
| HappyAbsSyn72 (([([Name L],String)],[S]))
| HappyAbsSyn73 ((([Name L], String),[S]))
| HappyAbsSyn75 (Name L)
| HappyAbsSyn76 (Annotation L)
| HappyAbsSyn78 (PType L)
| HappyAbsSyn85 (QName L)
| HappyAbsSyn90 (PContext L)
| HappyAbsSyn91 (([PType L],[S]))
| HappyAbsSyn93 (([TyVarBind L],Maybe L))
| HappyAbsSyn94 (TyVarBind L)
| HappyAbsSyn95 (([Name L],Maybe L))
| HappyAbsSyn96 (([Name L],L))
| HappyAbsSyn97 (([FunDep L],[S],Maybe L))
| HappyAbsSyn98 (([FunDep L],[S],L))
| HappyAbsSyn99 (FunDep L)
| HappyAbsSyn100 (([GadtDecl L],[S],Maybe L))
| HappyAbsSyn101 (([GadtDecl L],[S]))
| HappyAbsSyn103 (GadtDecl L)
| HappyAbsSyn104 (([QualConDecl L],[S],Maybe L))
| HappyAbsSyn105 (([QualConDecl L],[S],L))
| HappyAbsSyn106 (QualConDecl L)
| HappyAbsSyn107 ((Maybe [TyVarBind L], [S], Maybe L))
| HappyAbsSyn108 (ConDecl L)
| HappyAbsSyn109 ((Name L, [BangType L], L))
| HappyAbsSyn110 ((Name L, [BangType L],L))
| HappyAbsSyn111 (BangType L)
| HappyAbsSyn113 (([FieldDecl L],[S]))
| HappyAbsSyn114 (FieldDecl L)
| HappyAbsSyn116 (Maybe (Deriving L))
| HappyAbsSyn117 (([InstHead L],[S]))
| HappyAbsSyn119 (Kind L)
| HappyAbsSyn122 ((Maybe (Kind L), [S]))
| HappyAbsSyn123 ((Maybe [ClassDecl L],[S],Maybe L))
| HappyAbsSyn124 (([ClassDecl L],[S]))
| HappyAbsSyn126 (ClassDecl L)
| HappyAbsSyn128 ((Maybe [InstDecl L],[S],Maybe L))
| HappyAbsSyn129 (([InstDecl L],[S]))
| HappyAbsSyn131 (InstDecl L)
| HappyAbsSyn134 ((Maybe (Binds L),[S]))
| HappyAbsSyn135 ((Maybe (Type L),[S]))
| HappyAbsSyn136 (Rhs L)
| HappyAbsSyn137 (([GuardedRhs L],L))
| HappyAbsSyn138 (GuardedRhs L)
| HappyAbsSyn139 (Exp L)
| HappyAbsSyn150 ([Pat L])
| HappyAbsSyn151 (Pat L)
| HappyAbsSyn157 (([Maybe (PExp L)],[S]))
| HappyAbsSyn159 (([PExp L],[S]))
| HappyAbsSyn162 ([PExp L])
| HappyAbsSyn164 (XName L)
| HappyAbsSyn165 (Loc String)
| HappyAbsSyn167 ([ParseXAttr L])
| HappyAbsSyn168 (ParseXAttr L)
| HappyAbsSyn169 (Maybe (PExp L))
| HappyAbsSyn170 (L -> PExp L)
| HappyAbsSyn172 (([[QualStmt L]],[S]))
| HappyAbsSyn173 (([QualStmt L],[S]))
| HappyAbsSyn174 (QualStmt L)
| HappyAbsSyn176 (([Stmt L],[S]))
| HappyAbsSyn177 (Stmt L)
| HappyAbsSyn178 (([Alt L],L,[S]))
| HappyAbsSyn179 (([Alt L],[S]))
| HappyAbsSyn181 (Alt L)
| HappyAbsSyn182 (GuardedAlts L)
| HappyAbsSyn183 (([GuardedAlt L],L))
| HappyAbsSyn184 (GuardedAlt L)
| HappyAbsSyn186 (([Stmt L],L,[S]))
| HappyAbsSyn190 (([PFieldUpdate L],[S]))
| HappyAbsSyn191 (PFieldUpdate L)
| HappyAbsSyn192 (([IPBind L],[S]))
| HappyAbsSyn194 (IPBind L)
| HappyAbsSyn199 (IPName L)
| HappyAbsSyn207 (Op L)
| HappyAbsSyn208 (QOp L)
| HappyAbsSyn224 (Literal L)
| HappyAbsSyn225 (S)
| HappyAbsSyn227 (ModuleName L)
{- to allow type-synonyms as our monads (likely
- with explicitly-specified bind and return)
- in Haskell98, it seems that with
- /type M a = .../, then /(HappyReduction M)/
- is not allowed. But Happy is a
- code-generator that can just substitute it.
type HappyReduction m =
Int
-> (Loc Token)
-> HappyState (Loc Token) (HappyStk HappyAbsSyn -> m HappyAbsSyn)
-> [HappyState (Loc Token) (HappyStk HappyAbsSyn -> m HappyAbsSyn)]
-> HappyStk HappyAbsSyn
-> m HappyAbsSyn
-}
action_0,
action_1,
action_2,
action_3,
action_4,
action_5,
action_6,
action_7,
action_8,
action_9,
action_10,
action_11,
action_12,
action_13,
action_14,
action_15,
action_16,
action_17,
action_18,
action_19,
action_20,
action_21,
action_22,
action_23,
action_24,
action_25,
action_26,
action_27,
action_28,
action_29,
action_30,
action_31,
action_32,
action_33,
action_34,
action_35,
action_36,
action_37,
action_38,
action_39,
action_40,
action_41,
action_42,
action_43,
action_44,
action_45,
action_46,
action_47,
action_48,
action_49,
action_50,
action_51,
action_52,
action_53,
action_54,
action_55,
action_56,
action_57,
action_58,
action_59,
action_60,
action_61,
action_62,
action_63,
action_64,
action_65,
action_66,
action_67,
action_68,
action_69,
action_70,
action_71,
action_72,
action_73,
action_74,
action_75,
action_76,
action_77,
action_78,
action_79,
action_80,
action_81,
action_82,
action_83,
action_84,
action_85,
action_86,
action_87,
action_88,
action_89,
action_90,
action_91,
action_92,
action_93,
action_94,
action_95,
action_96,
action_97,
action_98,
action_99,
action_100,
action_101,
action_102,
action_103,
action_104,
action_105,
action_106,
action_107,
action_108,
action_109,
action_110,
action_111,
action_112,
action_113,
action_114,
action_115,
action_116,
action_117,
action_118,
action_119,
action_120,
action_121,
action_122,
action_123,
action_124,
action_125,
action_126,
action_127,
action_128,
action_129,
action_130,
action_131,
action_132,
action_133,
action_134,
action_135,
action_136,
action_137,
action_138,
action_139,
action_140,
action_141,
action_142,
action_143,
action_144,
action_145,
action_146,
action_147,
action_148,
action_149,
action_150,
action_151,
action_152,
action_153,
action_154,
action_155,
action_156,
action_157,
action_158,
action_159,
action_160,
action_161,
action_162,
action_163,
action_164,
action_165,
action_166,
action_167,
action_168,
action_169,
action_170,
action_171,
action_172,
action_173,
action_174,
action_175,
action_176,
action_177,
action_178,
action_179,
action_180,
action_181,
action_182,
action_183,
action_184,
action_185,
action_186,
action_187,
action_188,
action_189,
action_190,
action_191,
action_192,
action_193,
action_194,
action_195,
action_196,
action_197,
action_198,
action_199,
action_200,
action_201,
action_202,
action_203,
action_204,
action_205,
action_206,
action_207,
action_208,
action_209,
action_210,
action_211,
action_212,
action_213,
action_214,
action_215,
action_216,
action_217,
action_218,
action_219,
action_220,
action_221,
action_222,
action_223,
action_224,
action_225,
action_226,
action_227,
action_228,
action_229,
action_230,
action_231,
action_232,
action_233,
action_234,
action_235,
action_236,
action_237,
action_238,
action_239,
action_240,
action_241,
action_242,
action_243,
action_244,
action_245,
action_246,
action_247,
action_248,
action_249,
action_250,
action_251,
action_252,
action_253,
action_254,
action_255,
action_256,
action_257,
action_258,
action_259,
action_260,
action_261,
action_262,
action_263,
action_264,
action_265,
action_266,
action_267,
action_268,
action_269,
action_270,
action_271,
action_272,
action_273,
action_274,
action_275,
action_276,
action_277,
action_278,
action_279,
action_280,
action_281,
action_282,
action_283,
action_284,
action_285,
action_286,
action_287,
action_288,
action_289,
action_290,
action_291,
action_292,
action_293,
action_294,
action_295,
action_296,
action_297,
action_298,
action_299,
action_300,
action_301,
action_302,
action_303,
action_304,
action_305,
action_306,
action_307,
action_308,
action_309,
action_310,
action_311,
action_312,
action_313,
action_314,
action_315,
action_316,
action_317,
action_318,
action_319,
action_320,
action_321,
action_322,
action_323,
action_324,
action_325,
action_326,
action_327,
action_328,
action_329,
action_330,
action_331,
action_332,
action_333,
action_334,
action_335,
action_336,
action_337,
action_338,
action_339,
action_340,
action_341,
action_342,
action_343,
action_344,
action_345,
action_346,
action_347,
action_348,
action_349,
action_350,
action_351,
action_352,
action_353,
action_354,
action_355,
action_356,
action_357,
action_358,
action_359,
action_360,
action_361,
action_362,
action_363,
action_364,
action_365,
action_366,
action_367,
action_368,
action_369,
action_370,
action_371,
action_372,
action_373,
action_374,
action_375,
action_376,
action_377,
action_378,
action_379,
action_380,
action_381,
action_382,
action_383,
action_384,
action_385,
action_386,
action_387,
action_388,
action_389,
action_390,
action_391,
action_392,
action_393,
action_394,
action_395,
action_396,
action_397,
action_398,
action_399,
action_400,
action_401,
action_402,
action_403,
action_404,
action_405,
action_406,
action_407,
action_408,
action_409,
action_410,
action_411,
action_412,
action_413,
action_414,
action_415,
action_416,
action_417,
action_418,
action_419,
action_420,
action_421,
action_422,
action_423,
action_424,
action_425,
action_426,
action_427,
action_428,
action_429,
action_430,
action_431,
action_432,
action_433,
action_434,
action_435,
action_436,
action_437,
action_438,
action_439,
action_440,
action_441,
action_442,
action_443,
action_444,
action_445,
action_446,
action_447,
action_448,
action_449,
action_450,
action_451,
action_452,
action_453,
action_454,
action_455,
action_456,
action_457,
action_458,
action_459,
action_460,
action_461,
action_462,
action_463,
action_464,
action_465,
action_466,
action_467,
action_468,
action_469,
action_470,
action_471,
action_472,
action_473,
action_474,
action_475,
action_476,
action_477,
action_478,
action_479,
action_480,
action_481,
action_482,
action_483,
action_484,
action_485,
action_486,
action_487,
action_488,
action_489,
action_490,
action_491,
action_492,
action_493,
action_494,
action_495,
action_496,
action_497,
action_498,
action_499,
action_500,
action_501,
action_502,
action_503,
action_504,
action_505,
action_506,
action_507,
action_508,
action_509,
action_510,
action_511,
action_512,
action_513,
action_514,
action_515,
action_516,
action_517,
action_518,
action_519,
action_520,
action_521,
action_522,
action_523,
action_524,
action_525,
action_526,
action_527,
action_528,
action_529,
action_530,
action_531,
action_532,
action_533,
action_534,
action_535,
action_536,
action_537,
action_538,
action_539,
action_540,
action_541,
action_542,
action_543,
action_544,
action_545,
action_546,
action_547,
action_548,
action_549,
action_550,
action_551,
action_552,
action_553,
action_554,
action_555,
action_556,
action_557,
action_558,
action_559,
action_560,
action_561,
action_562,
action_563,
action_564,
action_565,
action_566,
action_567,
action_568,
action_569,
action_570,
action_571,
action_572,
action_573,
action_574,
action_575,
action_576,
action_577,
action_578,
action_579,
action_580,
action_581,
action_582,
action_583,
action_584,
action_585,
action_586,
action_587,
action_588,
action_589,
action_590,
action_591,
action_592,
action_593,
action_594,
action_595,
action_596,
action_597,
action_598,
action_599,
action_600,
action_601,
action_602,
action_603,
action_604,
action_605,
action_606,
action_607,
action_608,
action_609,
action_610,
action_611,
action_612,
action_613,
action_614,
action_615,
action_616,
action_617,
action_618,
action_619,
action_620,
action_621,
action_622,
action_623,
action_624,
action_625,
action_626,
action_627,
action_628,
action_629,
action_630,
action_631,
action_632,
action_633,
action_634,
action_635,
action_636,
action_637,
action_638,
action_639,
action_640,
action_641,
action_642,
action_643,
action_644,
action_645,
action_646,
action_647,
action_648,
action_649,
action_650,
action_651,
action_652,
action_653,
action_654,
action_655,
action_656,
action_657,
action_658,
action_659,
action_660,
action_661,
action_662,
action_663,
action_664,
action_665,
action_666,
action_667,
action_668,
action_669,
action_670,
action_671,
action_672,
action_673,
action_674,
action_675,
action_676,
action_677,
action_678,
action_679,
action_680,
action_681,
action_682,
action_683,
action_684,
action_685,
action_686,
action_687,
action_688,
action_689,
action_690,
action_691,
action_692,
action_693,
action_694,
action_695,
action_696,
action_697,
action_698,
action_699,
action_700,
action_701,
action_702,
action_703,
action_704,
action_705,
action_706,
action_707,
action_708,
action_709,
action_710,
action_711,
action_712,
action_713,
action_714,
action_715,
action_716,
action_717,
action_718,
action_719,
action_720,
action_721,
action_722,
action_723,
action_724,
action_725,
action_726,
action_727,
action_728,
action_729,
action_730,
action_731,
action_732,
action_733,
action_734,
action_735,
action_736,
action_737,
action_738,
action_739,
action_740,
action_741,
action_742,
action_743,
action_744,
action_745,
action_746,
action_747,
action_748,
action_749,
action_750,
action_751,
action_752,
action_753,
action_754,
action_755,
action_756,
action_757,
action_758,
action_759,
action_760,
action_761,
action_762,
action_763,
action_764,
action_765,
action_766,
action_767,
action_768,
action_769,
action_770,
action_771,
action_772,
action_773,
action_774,
action_775,
action_776,
action_777,
action_778,
action_779,
action_780,
action_781,
action_782,
action_783,
action_784,
action_785,
action_786,
action_787,
action_788,
action_789,
action_790,
action_791,
action_792,
action_793,
action_794,
action_795,
action_796,
action_797,
action_798,
action_799,
action_800,
action_801,
action_802,
action_803,
action_804,
action_805,
action_806,
action_807,
action_808,
action_809,
action_810,
action_811,
action_812,
action_813,
action_814,
action_815,
action_816,
action_817,
action_818,
action_819,
action_820,
action_821,
action_822,
action_823,
action_824,
action_825,
action_826,
action_827,
action_828,
action_829,
action_830,
action_831,
action_832,
action_833,
action_834,
action_835,
action_836,
action_837,
action_838,
action_839,
action_840,
action_841,
action_842,
action_843,
action_844,
action_845,
action_846,
action_847,
action_848,
action_849,
action_850,
action_851,
action_852,
action_853,
action_854,
action_855,
action_856,
action_857,
action_858,
action_859,
action_860,
action_861,
action_862,
action_863,
action_864,
action_865,
action_866,
action_867,
action_868,
action_869,
action_870,
action_871,
action_872,
action_873,
action_874,
action_875,
action_876,
action_877,
action_878,
action_879,
action_880,
action_881,
action_882,
action_883,
action_884,
action_885,
action_886,
action_887,
action_888,
action_889,
action_890,
action_891,
action_892,
action_893,
action_894,
action_895,
action_896,
action_897,
action_898,
action_899,
action_900,
action_901,
action_902,
action_903,
action_904,
action_905,
action_906,
action_907,
action_908,
action_909,
action_910,
action_911,
action_912,
action_913,
action_914,
action_915,
action_916,
action_917,
action_918,
action_919,
action_920,
action_921,
action_922,
action_923,
action_924,
action_925,
action_926,
action_927,
action_928,
action_929,
action_930,
action_931,
action_932,
action_933,
action_934,
action_935,
action_936,
action_937,
action_938,
action_939,
action_940,
action_941,
action_942,
action_943,
action_944,
action_945,
action_946,
action_947,
action_948,
action_949,
action_950,
action_951,
action_952,
action_953,
action_954,
action_955,
action_956,
action_957,
action_958,
action_959,
action_960,
action_961,
action_962,
action_963,
action_964,
action_965,
action_966,
action_967,
action_968,
action_969,
action_970,
action_971,
action_972,
action_973,
action_974,
action_975,
action_976,
action_977,
action_978,
action_979,
action_980,
action_981,
action_982,
action_983,
action_984,
action_985,
action_986,
action_987,
action_988,
action_989,
action_990,
action_991,
action_992,
action_993,
action_994,
action_995,
action_996,
action_997,
action_998,
action_999,
action_1000,
action_1001,
action_1002,
action_1003,
action_1004,
action_1005,
action_1006,
action_1007,
action_1008,
action_1009,
action_1010,
action_1011,
action_1012,
action_1013,
action_1014,
action_1015,
action_1016,
action_1017,
action_1018,
action_1019,
action_1020,
action_1021,
action_1022,
action_1023,
action_1024,
action_1025,
action_1026,
action_1027,
action_1028,
action_1029,
action_1030,
action_1031,
action_1032,
action_1033,
action_1034,
action_1035,
action_1036,
action_1037,
action_1038,
action_1039,
action_1040,
action_1041,
action_1042,
action_1043,
action_1044,
action_1045,
action_1046,
action_1047,
action_1048,
action_1049,
action_1050,
action_1051,
action_1052,
action_1053,
action_1054,
action_1055,
action_1056,
action_1057,
action_1058,
action_1059,
action_1060,
action_1061,
action_1062,
action_1063,
action_1064,
action_1065,
action_1066,
action_1067,
action_1068,
action_1069,
action_1070,
action_1071,
action_1072,
action_1073,
action_1074,
action_1075,
action_1076,
action_1077,
action_1078,
action_1079,
action_1080,
action_1081,
action_1082,
action_1083,
action_1084,
action_1085,
action_1086,
action_1087,
action_1088,
action_1089,
action_1090,
action_1091,
action_1092,
action_1093,
action_1094,
action_1095,
action_1096,
action_1097,
action_1098,
action_1099,
action_1100,
action_1101,
action_1102,
action_1103,
action_1104,
action_1105,
action_1106,
action_1107,
action_1108,
action_1109,
action_1110,
action_1111,
action_1112,
action_1113,
action_1114,
action_1115,
action_1116,
action_1117,
action_1118,
action_1119,
action_1120,
action_1121,
action_1122,
action_1123 :: () => Int -> ({-HappyReduction (P) = -}
Int
-> (Loc Token)
-> HappyState (Loc Token) (HappyStk HappyAbsSyn -> (P) HappyAbsSyn)
-> [HappyState (Loc Token) (HappyStk HappyAbsSyn -> (P) HappyAbsSyn)]
-> HappyStk HappyAbsSyn
-> (P) HappyAbsSyn)
happyReduce_8,
happyReduce_9,
happyReduce_10,
happyReduce_11,
happyReduce_12,
happyReduce_13,
happyReduce_14,
happyReduce_15,
happyReduce_16,
happyReduce_17,
happyReduce_18,
happyReduce_19,
happyReduce_20,
happyReduce_21,
happyReduce_22,
happyReduce_23,
happyReduce_24,
happyReduce_25,
happyReduce_26,
happyReduce_27,
happyReduce_28,
happyReduce_29,
happyReduce_30,
happyReduce_31,
happyReduce_32,
happyReduce_33,
happyReduce_34,
happyReduce_35,
happyReduce_36,
happyReduce_37,
happyReduce_38,
happyReduce_39,
happyReduce_40,
happyReduce_41,
happyReduce_42,
happyReduce_43,
happyReduce_44,
happyReduce_45,
happyReduce_46,
happyReduce_47,
happyReduce_48,
happyReduce_49,
happyReduce_50,
happyReduce_51,
happyReduce_52,
happyReduce_53,
happyReduce_54,
happyReduce_55,
happyReduce_56,
happyReduce_57,
happyReduce_58,
happyReduce_59,
happyReduce_60,
happyReduce_61,
happyReduce_62,
happyReduce_63,
happyReduce_64,
happyReduce_65,
happyReduce_66,
happyReduce_67,
happyReduce_68,
happyReduce_69,
happyReduce_70,
happyReduce_71,
happyReduce_72,
happyReduce_73,
happyReduce_74,
happyReduce_75,
happyReduce_76,
happyReduce_77,
happyReduce_78,
happyReduce_79,
happyReduce_80,
happyReduce_81,
happyReduce_82,
happyReduce_83,
happyReduce_84,
happyReduce_85,
happyReduce_86,
happyReduce_87,
happyReduce_88,
happyReduce_89,
happyReduce_90,
happyReduce_91,
happyReduce_92,
happyReduce_93,
happyReduce_94,
happyReduce_95,
happyReduce_96,
happyReduce_97,
happyReduce_98,
happyReduce_99,
happyReduce_100,
happyReduce_101,
happyReduce_102,
happyReduce_103,
happyReduce_104,
happyReduce_105,
happyReduce_106,
happyReduce_107,
happyReduce_108,
happyReduce_109,
happyReduce_110,
happyReduce_111,
happyReduce_112,
happyReduce_113,
happyReduce_114,
happyReduce_115,
happyReduce_116,
happyReduce_117,
happyReduce_118,
happyReduce_119,
happyReduce_120,
happyReduce_121,
happyReduce_122,
happyReduce_123,
happyReduce_124,
happyReduce_125,
happyReduce_126,
happyReduce_127,
happyReduce_128,
happyReduce_129,
happyReduce_130,
happyReduce_131,
happyReduce_132,
happyReduce_133,
happyReduce_134,
happyReduce_135,
happyReduce_136,
happyReduce_137,
happyReduce_138,
happyReduce_139,
happyReduce_140,
happyReduce_141,
happyReduce_142,
happyReduce_143,
happyReduce_144,
happyReduce_145,
happyReduce_146,
happyReduce_147,
happyReduce_148,
happyReduce_149,
happyReduce_150,
happyReduce_151,
happyReduce_152,
happyReduce_153,
happyReduce_154,
happyReduce_155,
happyReduce_156,
happyReduce_157,
happyReduce_158,
happyReduce_159,
happyReduce_160,
happyReduce_161,
happyReduce_162,
happyReduce_163,
happyReduce_164,
happyReduce_165,
happyReduce_166,
happyReduce_167,
happyReduce_168,
happyReduce_169,
happyReduce_170,
happyReduce_171,
happyReduce_172,
happyReduce_173,
happyReduce_174,
happyReduce_175,
happyReduce_176,
happyReduce_177,
happyReduce_178,
happyReduce_179,
happyReduce_180,
happyReduce_181,
happyReduce_182,
happyReduce_183,
happyReduce_184,
happyReduce_185,
happyReduce_186,
happyReduce_187,
happyReduce_188,
happyReduce_189,
happyReduce_190,
happyReduce_191,
happyReduce_192,
happyReduce_193,
happyReduce_194,
happyReduce_195,
happyReduce_196,
happyReduce_197,
happyReduce_198,
happyReduce_199,
happyReduce_200,
happyReduce_201,
happyReduce_202,
happyReduce_203,
happyReduce_204,
happyReduce_205,
happyReduce_206,
happyReduce_207,
happyReduce_208,
happyReduce_209,
happyReduce_210,
happyReduce_211,
happyReduce_212,
happyReduce_213,
happyReduce_214,
happyReduce_215,
happyReduce_216,
happyReduce_217,
happyReduce_218,
happyReduce_219,
happyReduce_220,
happyReduce_221,
happyReduce_222,
happyReduce_223,
happyReduce_224,
happyReduce_225,
happyReduce_226,
happyReduce_227,
happyReduce_228,
happyReduce_229,
happyReduce_230,
happyReduce_231,
happyReduce_232,
happyReduce_233,
happyReduce_234,
happyReduce_235,
happyReduce_236,
happyReduce_237,
happyReduce_238,
happyReduce_239,
happyReduce_240,
happyReduce_241,
happyReduce_242,
happyReduce_243,
happyReduce_244,
happyReduce_245,
happyReduce_246,
happyReduce_247,
happyReduce_248,
happyReduce_249,
happyReduce_250,
happyReduce_251,
happyReduce_252,
happyReduce_253,
happyReduce_254,
happyReduce_255,
happyReduce_256,
happyReduce_257,
happyReduce_258,
happyReduce_259,
happyReduce_260,
happyReduce_261,
happyReduce_262,
happyReduce_263,
happyReduce_264,
happyReduce_265,
happyReduce_266,
happyReduce_267,
happyReduce_268,
happyReduce_269,
happyReduce_270,
happyReduce_271,
happyReduce_272,
happyReduce_273,
happyReduce_274,
happyReduce_275,
happyReduce_276,
happyReduce_277,
happyReduce_278,
happyReduce_279,
happyReduce_280,
happyReduce_281,
happyReduce_282,
happyReduce_283,
happyReduce_284,
happyReduce_285,
happyReduce_286,
happyReduce_287,
happyReduce_288,
happyReduce_289,
happyReduce_290,
happyReduce_291,
happyReduce_292,
happyReduce_293,
happyReduce_294,
happyReduce_295,
happyReduce_296,
happyReduce_297,
happyReduce_298,
happyReduce_299,
happyReduce_300,
happyReduce_301,
happyReduce_302,
happyReduce_303,
happyReduce_304,
happyReduce_305,
happyReduce_306,
happyReduce_307,
happyReduce_308,
happyReduce_309,
happyReduce_310,
happyReduce_311,
happyReduce_312,
happyReduce_313,
happyReduce_314,
happyReduce_315,
happyReduce_316,
happyReduce_317,
happyReduce_318,
happyReduce_319,
happyReduce_320,
happyReduce_321,
happyReduce_322,
happyReduce_323,
happyReduce_324,
happyReduce_325,
happyReduce_326,
happyReduce_327,
happyReduce_328,
happyReduce_329,
happyReduce_330,
happyReduce_331,
happyReduce_332,
happyReduce_333,
happyReduce_334,
happyReduce_335,
happyReduce_336,
happyReduce_337,
happyReduce_338,
happyReduce_339,
happyReduce_340,
happyReduce_341,
happyReduce_342,
happyReduce_343,
happyReduce_344,
happyReduce_345,
happyReduce_346,
happyReduce_347,
happyReduce_348,
happyReduce_349,
happyReduce_350,
happyReduce_351,
happyReduce_352,
happyReduce_353,
happyReduce_354,
happyReduce_355,
happyReduce_356,
happyReduce_357,
happyReduce_358,
happyReduce_359,
happyReduce_360,
happyReduce_361,
happyReduce_362,
happyReduce_363,
happyReduce_364,
happyReduce_365,
happyReduce_366,
happyReduce_367,
happyReduce_368,
happyReduce_369,
happyReduce_370,
happyReduce_371,
happyReduce_372,
happyReduce_373,
happyReduce_374,
happyReduce_375,
happyReduce_376,
happyReduce_377,
happyReduce_378,
happyReduce_379,
happyReduce_380,
happyReduce_381,
happyReduce_382,
happyReduce_383,
happyReduce_384,
happyReduce_385,
happyReduce_386,
happyReduce_387,
happyReduce_388,
happyReduce_389,
happyReduce_390,
happyReduce_391,
happyReduce_392,
happyReduce_393,
happyReduce_394,
happyReduce_395,
happyReduce_396,
happyReduce_397,
happyReduce_398,
happyReduce_399,
happyReduce_400,
happyReduce_401,
happyReduce_402,
happyReduce_403,
happyReduce_404,
happyReduce_405,
happyReduce_406,
happyReduce_407,
happyReduce_408,
happyReduce_409,
happyReduce_410,
happyReduce_411,
happyReduce_412,
happyReduce_413,
happyReduce_414,
happyReduce_415,
happyReduce_416,
happyReduce_417,
happyReduce_418,
happyReduce_419,
happyReduce_420,
happyReduce_421,
happyReduce_422,
happyReduce_423,
happyReduce_424,
happyReduce_425,
happyReduce_426,
happyReduce_427,
happyReduce_428,
happyReduce_429,
happyReduce_430,
happyReduce_431,
happyReduce_432,
happyReduce_433,
happyReduce_434,
happyReduce_435,
happyReduce_436,
happyReduce_437,
happyReduce_438,
happyReduce_439,
happyReduce_440,
happyReduce_441,
happyReduce_442,
happyReduce_443,
happyReduce_444,
happyReduce_445,
happyReduce_446,
happyReduce_447,
happyReduce_448,
happyReduce_449,
happyReduce_450,
happyReduce_451,
happyReduce_452,
happyReduce_453,
happyReduce_454,
happyReduce_455,
happyReduce_456,
happyReduce_457,
happyReduce_458,
happyReduce_459,
happyReduce_460,
happyReduce_461,
happyReduce_462,
happyReduce_463,
happyReduce_464,
happyReduce_465,
happyReduce_466,
happyReduce_467,
happyReduce_468,
happyReduce_469,
happyReduce_470,
happyReduce_471,
happyReduce_472,
happyReduce_473,
happyReduce_474,
happyReduce_475,
happyReduce_476,
happyReduce_477,
happyReduce_478,
happyReduce_479,
happyReduce_480,
happyReduce_481,
happyReduce_482,
happyReduce_483,
happyReduce_484,
happyReduce_485,
happyReduce_486,
happyReduce_487,
happyReduce_488,
happyReduce_489,
happyReduce_490,
happyReduce_491,
happyReduce_492,
happyReduce_493,
happyReduce_494,
happyReduce_495,
happyReduce_496,
happyReduce_497,
happyReduce_498,
happyReduce_499,
happyReduce_500,
happyReduce_501,
happyReduce_502,
happyReduce_503,
happyReduce_504,
happyReduce_505,
happyReduce_506,
happyReduce_507,
happyReduce_508,
happyReduce_509,
happyReduce_510,
happyReduce_511,
happyReduce_512,
happyReduce_513,
happyReduce_514,
happyReduce_515,
happyReduce_516,
happyReduce_517,
happyReduce_518,
happyReduce_519,
happyReduce_520,
happyReduce_521,
happyReduce_522,
happyReduce_523,
happyReduce_524,
happyReduce_525,
happyReduce_526,
happyReduce_527,
happyReduce_528,
happyReduce_529,
happyReduce_530,
happyReduce_531,
happyReduce_532,
happyReduce_533,
happyReduce_534,
happyReduce_535,
happyReduce_536,
happyReduce_537,
happyReduce_538,
happyReduce_539,
happyReduce_540,
happyReduce_541,
happyReduce_542,
happyReduce_543,
happyReduce_544,
happyReduce_545,
happyReduce_546,
happyReduce_547,
happyReduce_548,
happyReduce_549,
happyReduce_550,
happyReduce_551,
happyReduce_552,
happyReduce_553,
happyReduce_554,
happyReduce_555,
happyReduce_556,
happyReduce_557,
happyReduce_558,
happyReduce_559,
happyReduce_560,
happyReduce_561,
happyReduce_562,
happyReduce_563,
happyReduce_564,
happyReduce_565,
happyReduce_566,
happyReduce_567,
happyReduce_568,
happyReduce_569,
happyReduce_570,
happyReduce_571,
happyReduce_572,
happyReduce_573,
happyReduce_574,
happyReduce_575,
happyReduce_576,
happyReduce_577,
happyReduce_578,
happyReduce_579,
happyReduce_580,
happyReduce_581,
happyReduce_582,
happyReduce_583,
happyReduce_584,
happyReduce_585,
happyReduce_586,
happyReduce_587,
happyReduce_588,
happyReduce_589,
happyReduce_590,
happyReduce_591,
happyReduce_592,
happyReduce_593,
happyReduce_594,
happyReduce_595,
happyReduce_596,
happyReduce_597,
happyReduce_598,
happyReduce_599,
happyReduce_600,
happyReduce_601,
happyReduce_602,
happyReduce_603,
happyReduce_604,
happyReduce_605,
happyReduce_606,
happyReduce_607,
happyReduce_608,
happyReduce_609,
happyReduce_610,
happyReduce_611,
happyReduce_612,
happyReduce_613,
happyReduce_614,
happyReduce_615,
happyReduce_616,
happyReduce_617,
happyReduce_618,
happyReduce_619,
happyReduce_620,
happyReduce_621,
happyReduce_622,
happyReduce_623,
happyReduce_624,
happyReduce_625,
happyReduce_626,
happyReduce_627,
happyReduce_628,
happyReduce_629 :: () => ({-HappyReduction (P) = -}
Int
-> (Loc Token)
-> HappyState (Loc Token) (HappyStk HappyAbsSyn -> (P) HappyAbsSyn)
-> [HappyState (Loc Token) (HappyStk HappyAbsSyn -> (P) HappyAbsSyn)]
-> HappyStk HappyAbsSyn
-> (P) HappyAbsSyn)
action_0 (13) = happyGoto action_157
action_0 (15) = happyGoto action_158
action_0 (225) = happyGoto action_10
action_0 _ = happyReduce_615
action_1 (234) = happyShift action_39
action_1 (235) = happyShift action_40
action_1 (236) = happyShift action_41
action_1 (237) = happyShift action_42
action_1 (238) = happyShift action_43
action_1 (239) = happyShift action_44
action_1 (245) = happyShift action_45
action_1 (246) = happyShift action_46
action_1 (247) = happyShift action_47
action_1 (248) = happyShift action_48
action_1 (249) = happyShift action_49
action_1 (250) = happyShift action_50
action_1 (251) = happyShift action_51
action_1 (252) = happyShift action_52
action_1 (253) = happyShift action_53
action_1 (254) = happyShift action_54
action_1 (255) = happyShift action_55
action_1 (257) = happyShift action_56
action_1 (265) = happyShift action_57
action_1 (268) = happyShift action_58
action_1 (275) = happyShift action_59
action_1 (280) = happyShift action_60
action_1 (282) = happyShift action_61
action_1 (289) = happyShift action_63
action_1 (292) = happyShift action_64
action_1 (293) = happyShift action_65
action_1 (294) = happyShift action_66
action_1 (295) = happyShift action_67
action_1 (296) = happyShift action_68
action_1 (297) = happyShift action_69
action_1 (299) = happyShift action_70
action_1 (300) = happyShift action_71
action_1 (301) = happyShift action_72
action_1 (303) = happyShift action_73
action_1 (305) = happyShift action_74
action_1 (306) = happyShift action_75
action_1 (313) = happyShift action_76
action_1 (314) = happyShift action_77
action_1 (315) = happyShift action_78
action_1 (316) = happyShift action_79
action_1 (318) = happyShift action_80
action_1 (319) = happyShift action_81
action_1 (320) = happyShift action_82
action_1 (321) = happyShift action_83
action_1 (322) = happyShift action_84
action_1 (323) = happyShift action_85
action_1 (325) = happyShift action_86
action_1 (327) = happyShift action_87
action_1 (332) = happyShift action_88
action_1 (334) = happyShift action_89
action_1 (335) = happyShift action_90
action_1 (337) = happyShift action_91
action_1 (338) = happyShift action_92
action_1 (345) = happyShift action_142
action_1 (346) = happyShift action_94
action_1 (350) = happyShift action_95
action_1 (356) = happyShift action_97
action_1 (363) = happyShift action_98
action_1 (364) = happyShift action_99
action_1 (365) = happyShift action_100
action_1 (139) = happyGoto action_155
action_1 (140) = happyGoto action_156
action_1 (141) = happyGoto action_15
action_1 (142) = happyGoto action_16
action_1 (143) = happyGoto action_17
action_1 (144) = happyGoto action_18
action_1 (147) = happyGoto action_19
action_1 (148) = happyGoto action_20
action_1 (149) = happyGoto action_21
action_1 (152) = happyGoto action_22
action_1 (153) = happyGoto action_23
action_1 (154) = happyGoto action_24
action_1 (161) = happyGoto action_25
action_1 (195) = happyGoto action_28
action_1 (198) = happyGoto action_29
action_1 (199) = happyGoto action_30
action_1 (201) = happyGoto action_31
action_1 (211) = happyGoto action_32
action_1 (212) = happyGoto action_33
action_1 (213) = happyGoto action_34
action_1 (214) = happyGoto action_35
action_1 (215) = happyGoto action_36
action_1 (216) = happyGoto action_37
action_1 (224) = happyGoto action_38
action_1 _ = happyFail
action_2 (234) = happyShift action_39
action_2 (235) = happyShift action_40
action_2 (236) = happyShift action_41
action_2 (237) = happyShift action_42
action_2 (238) = happyShift action_43
action_2 (239) = happyShift action_44
action_2 (245) = happyShift action_45
action_2 (246) = happyShift action_46
action_2 (247) = happyShift action_47
action_2 (248) = happyShift action_48
action_2 (249) = happyShift action_49
action_2 (250) = happyShift action_50
action_2 (251) = happyShift action_51
action_2 (252) = happyShift action_52
action_2 (253) = happyShift action_53
action_2 (254) = happyShift action_54
action_2 (255) = happyShift action_55
action_2 (257) = happyShift action_56
action_2 (265) = happyShift action_57
action_2 (268) = happyShift action_58
action_2 (275) = happyShift action_59
action_2 (280) = happyShift action_60
action_2 (282) = happyShift action_61
action_2 (283) = happyShift action_62
action_2 (289) = happyShift action_63
action_2 (292) = happyShift action_64
action_2 (293) = happyShift action_65
action_2 (294) = happyShift action_66
action_2 (295) = happyShift action_67
action_2 (296) = happyShift action_68
action_2 (297) = happyShift action_69
action_2 (299) = happyShift action_70
action_2 (300) = happyShift action_71
action_2 (301) = happyShift action_72
action_2 (303) = happyShift action_73
action_2 (305) = happyShift action_74
action_2 (306) = happyShift action_75
action_2 (313) = happyShift action_76
action_2 (314) = happyShift action_77
action_2 (315) = happyShift action_78
action_2 (316) = happyShift action_79
action_2 (318) = happyShift action_80
action_2 (319) = happyShift action_81
action_2 (320) = happyShift action_82
action_2 (321) = happyShift action_83
action_2 (322) = happyShift action_84
action_2 (323) = happyShift action_85
action_2 (325) = happyShift action_86
action_2 (327) = happyShift action_87
action_2 (332) = happyShift action_88
action_2 (334) = happyShift action_89
action_2 (335) = happyShift action_90
action_2 (337) = happyShift action_91
action_2 (338) = happyShift action_92
action_2 (345) = happyShift action_142
action_2 (346) = happyShift action_94
action_2 (350) = happyShift action_95
action_2 (356) = happyShift action_97
action_2 (363) = happyShift action_98
action_2 (364) = happyShift action_99
action_2 (365) = happyShift action_100
action_2 (140) = happyGoto action_153
action_2 (141) = happyGoto action_15
action_2 (142) = happyGoto action_16
action_2 (143) = happyGoto action_17
action_2 (144) = happyGoto action_18
action_2 (147) = happyGoto action_19
action_2 (148) = happyGoto action_20
action_2 (149) = happyGoto action_21
action_2 (152) = happyGoto action_22
action_2 (153) = happyGoto action_23
action_2 (154) = happyGoto action_24
action_2 (161) = happyGoto action_25
action_2 (185) = happyGoto action_154
action_2 (195) = happyGoto action_28
action_2 (198) = happyGoto action_29
action_2 (199) = happyGoto action_30
action_2 (201) = happyGoto action_31
action_2 (211) = happyGoto action_32
action_2 (212) = happyGoto action_33
action_2 (213) = happyGoto action_34
action_2 (214) = happyGoto action_35
action_2 (215) = happyGoto action_36
action_2 (216) = happyGoto action_37
action_2 (224) = happyGoto action_38
action_2 _ = happyFail
action_3 (234) = happyShift action_39
action_3 (235) = happyShift action_40
action_3 (236) = happyShift action_41
action_3 (237) = happyShift action_42
action_3 (238) = happyShift action_43
action_3 (239) = happyShift action_44
action_3 (245) = happyShift action_45
action_3 (246) = happyShift action_46
action_3 (247) = happyShift action_47
action_3 (248) = happyShift action_48
action_3 (249) = happyShift action_49
action_3 (250) = happyShift action_50
action_3 (251) = happyShift action_51
action_3 (252) = happyShift action_52
action_3 (253) = happyShift action_53
action_3 (254) = happyShift action_54
action_3 (255) = happyShift action_55
action_3 (257) = happyShift action_56
action_3 (265) = happyShift action_57
action_3 (268) = happyShift action_58
action_3 (275) = happyShift action_59
action_3 (280) = happyShift action_60
action_3 (282) = happyShift action_61
action_3 (283) = happyShift action_132
action_3 (289) = happyShift action_63
action_3 (292) = happyShift action_64
action_3 (293) = happyShift action_65
action_3 (294) = happyShift action_66
action_3 (295) = happyShift action_67
action_3 (296) = happyShift action_68
action_3 (297) = happyShift action_69
action_3 (299) = happyShift action_70
action_3 (300) = happyShift action_71
action_3 (301) = happyShift action_72
action_3 (303) = happyShift action_73
action_3 (305) = happyShift action_74
action_3 (306) = happyShift action_75
action_3 (312) = happyShift action_133
action_3 (313) = happyShift action_76
action_3 (314) = happyShift action_77
action_3 (315) = happyShift action_78
action_3 (316) = happyShift action_79
action_3 (318) = happyShift action_80
action_3 (319) = happyShift action_81
action_3 (320) = happyShift action_82
action_3 (321) = happyShift action_83
action_3 (322) = happyShift action_84
action_3 (323) = happyShift action_85
action_3 (325) = happyShift action_86
action_3 (327) = happyShift action_87
action_3 (328) = happyShift action_134
action_3 (329) = happyShift action_135
action_3 (330) = happyShift action_136
action_3 (331) = happyShift action_137
action_3 (332) = happyShift action_88
action_3 (334) = happyShift action_89
action_3 (335) = happyShift action_90
action_3 (337) = happyShift action_91
action_3 (338) = happyShift action_92
action_3 (341) = happyShift action_138
action_3 (342) = happyShift action_139
action_3 (343) = happyShift action_140
action_3 (344) = happyShift action_141
action_3 (345) = happyShift action_142
action_3 (346) = happyShift action_94
action_3 (348) = happyShift action_143
action_3 (350) = happyShift action_95
action_3 (353) = happyShift action_144
action_3 (356) = happyShift action_97
action_3 (357) = happyShift action_145
action_3 (358) = happyShift action_146
action_3 (359) = happyShift action_147
action_3 (360) = happyShift action_148
action_3 (362) = happyShift action_149
action_3 (363) = happyShift action_98
action_3 (364) = happyShift action_99
action_3 (365) = happyShift action_100
action_3 (366) = happyShift action_150
action_3 (367) = happyShift action_151
action_3 (371) = happyShift action_152
action_3 (44) = happyGoto action_122
action_3 (46) = happyGoto action_123
action_3 (50) = happyGoto action_124
action_3 (51) = happyGoto action_125
action_3 (55) = happyGoto action_126
action_3 (57) = happyGoto action_127
action_3 (58) = happyGoto action_128
action_3 (133) = happyGoto action_129
action_3 (141) = happyGoto action_130
action_3 (142) = happyGoto action_16
action_3 (143) = happyGoto action_131
action_3 (144) = happyGoto action_18
action_3 (147) = happyGoto action_19
action_3 (148) = happyGoto action_20
action_3 (149) = happyGoto action_21
action_3 (152) = happyGoto action_22
action_3 (153) = happyGoto action_23
action_3 (154) = happyGoto action_24
action_3 (161) = happyGoto action_25
action_3 (195) = happyGoto action_28
action_3 (198) = happyGoto action_29
action_3 (199) = happyGoto action_30
action_3 (201) = happyGoto action_31
action_3 (211) = happyGoto action_32
action_3 (212) = happyGoto action_33
action_3 (213) = happyGoto action_34
action_3 (214) = happyGoto action_35
action_3 (215) = happyGoto action_36
action_3 (216) = happyGoto action_37
action_3 (224) = happyGoto action_38
action_3 _ = happyFail
action_4 (234) = happyShift action_39
action_4 (236) = happyShift action_41
action_4 (237) = happyShift action_42
action_4 (238) = happyShift action_43
action_4 (239) = happyShift action_44
action_4 (255) = happyShift action_115
action_4 (257) = happyShift action_116
action_4 (265) = happyShift action_117
action_4 (313) = happyShift action_76
action_4 (314) = happyShift action_118
action_4 (315) = happyShift action_119
action_4 (316) = happyShift action_120
action_4 (318) = happyShift action_80
action_4 (319) = happyShift action_81
action_4 (320) = happyShift action_82
action_4 (321) = happyShift action_83
action_4 (322) = happyShift action_84
action_4 (323) = happyShift action_85
action_4 (325) = happyShift action_86
action_4 (335) = happyShift action_121
action_4 (337) = happyShift action_91
action_4 (356) = happyShift action_97
action_4 (78) = happyGoto action_101
action_4 (80) = happyGoto action_102
action_4 (82) = happyGoto action_103
action_4 (84) = happyGoto action_104
action_4 (85) = happyGoto action_105
action_4 (86) = happyGoto action_106
action_4 (88) = happyGoto action_107
action_4 (89) = happyGoto action_108
action_4 (90) = happyGoto action_109
action_4 (199) = happyGoto action_110
action_4 (212) = happyGoto action_111
action_4 (214) = happyGoto action_35
action_4 (215) = happyGoto action_112
action_4 (216) = happyGoto action_37
action_4 (230) = happyGoto action_113
action_4 (231) = happyGoto action_114
action_4 _ = happyFail
action_5 (234) = happyShift action_39
action_5 (235) = happyShift action_40
action_5 (236) = happyShift action_41
action_5 (237) = happyShift action_42
action_5 (238) = happyShift action_43
action_5 (239) = happyShift action_44
action_5 (245) = happyShift action_45
action_5 (246) = happyShift action_46
action_5 (247) = happyShift action_47
action_5 (248) = happyShift action_48
action_5 (249) = happyShift action_49
action_5 (250) = happyShift action_50
action_5 (251) = happyShift action_51
action_5 (252) = happyShift action_52
action_5 (253) = happyShift action_53
action_5 (254) = happyShift action_54
action_5 (255) = happyShift action_55
action_5 (257) = happyShift action_56
action_5 (265) = happyShift action_57
action_5 (268) = happyShift action_58
action_5 (275) = happyShift action_59
action_5 (280) = happyShift action_60
action_5 (282) = happyShift action_61
action_5 (283) = happyShift action_62
action_5 (289) = happyShift action_63
action_5 (292) = happyShift action_64
action_5 (293) = happyShift action_65
action_5 (294) = happyShift action_66
action_5 (295) = happyShift action_67
action_5 (296) = happyShift action_68
action_5 (297) = happyShift action_69
action_5 (299) = happyShift action_70
action_5 (300) = happyShift action_71
action_5 (301) = happyShift action_72
action_5 (303) = happyShift action_73
action_5 (305) = happyShift action_74
action_5 (306) = happyShift action_75
action_5 (313) = happyShift action_76
action_5 (314) = happyShift action_77
action_5 (315) = happyShift action_78
action_5 (316) = happyShift action_79
action_5 (318) = happyShift action_80
action_5 (319) = happyShift action_81
action_5 (320) = happyShift action_82
action_5 (321) = happyShift action_83
action_5 (322) = happyShift action_84
action_5 (323) = happyShift action_85
action_5 (325) = happyShift action_86
action_5 (327) = happyShift action_87
action_5 (332) = happyShift action_88
action_5 (334) = happyShift action_89
action_5 (335) = happyShift action_90
action_5 (337) = happyShift action_91
action_5 (338) = happyShift action_92
action_5 (345) = happyShift action_93
action_5 (346) = happyShift action_94
action_5 (350) = happyShift action_95
action_5 (351) = happyShift action_96
action_5 (356) = happyShift action_97
action_5 (363) = happyShift action_98
action_5 (364) = happyShift action_99
action_5 (365) = happyShift action_100
action_5 (139) = happyGoto action_13
action_5 (140) = happyGoto action_14
action_5 (141) = happyGoto action_15
action_5 (142) = happyGoto action_16
action_5 (143) = happyGoto action_17
action_5 (144) = happyGoto action_18
action_5 (147) = happyGoto action_19
action_5 (148) = happyGoto action_20
action_5 (149) = happyGoto action_21
action_5 (152) = happyGoto action_22
action_5 (153) = happyGoto action_23
action_5 (154) = happyGoto action_24
action_5 (161) = happyGoto action_25
action_5 (185) = happyGoto action_26
action_5 (189) = happyGoto action_27
action_5 (195) = happyGoto action_28
action_5 (198) = happyGoto action_29
action_5 (199) = happyGoto action_30
action_5 (201) = happyGoto action_31
action_5 (211) = happyGoto action_32
action_5 (212) = happyGoto action_33
action_5 (213) = happyGoto action_34
action_5 (214) = happyGoto action_35
action_5 (215) = happyGoto action_36
action_5 (216) = happyGoto action_37
action_5 (224) = happyGoto action_38
action_5 _ = happyFail
action_6 (11) = happyGoto action_12
action_6 (15) = happyGoto action_9
action_6 (225) = happyGoto action_10
action_6 _ = happyReduce_615
action_7 (15) = happyGoto action_11
action_7 (225) = happyGoto action_10
action_7 _ = happyReduce_615
action_8 (15) = happyGoto action_9
action_8 (225) = happyGoto action_10
action_8 _ = happyFail
action_9 (347) = happyShift action_164
action_9 (12) = happyGoto action_393
action_9 (19) = happyGoto action_394
action_9 (20) = happyGoto action_161
action_9 _ = happyReduce_26
action_10 (369) = happyShift action_390
action_10 (370) = happyShift action_391
action_10 (371) = happyShift action_392
action_10 (16) = happyGoto action_388
action_10 (17) = happyGoto action_389
action_10 _ = happyReduce_18
action_11 (1) = happyAccept
action_11 _ = happyFail
action_12 (373) = happyAccept
action_12 _ = happyFail
action_13 _ = happyReduce_518
action_14 (277) = happyReduce_507
action_14 _ = happyReduce_319
action_15 _ = happyReduce_321
action_16 _ = happyReduce_327
action_17 (241) = happyShift action_214
action_17 (242) = happyShift action_215
action_17 (243) = happyShift action_216
action_17 (244) = happyShift action_217
action_17 (269) = happyShift action_219
action_17 (270) = happyShift action_220
action_17 (272) = happyShift action_221
action_17 (273) = happyShift action_383
action_17 (282) = happyShift action_223
action_17 (283) = happyShift action_224
action_17 (284) = happyShift action_225
action_17 (285) = happyShift action_384
action_17 (286) = happyShift action_385
action_17 (287) = happyShift action_386
action_17 (288) = happyShift action_387
action_17 (203) = happyGoto action_205
action_17 (206) = happyGoto action_206
action_17 (208) = happyGoto action_382
action_17 (210) = happyGoto action_208
action_17 (217) = happyGoto action_209
action_17 (218) = happyGoto action_210
action_17 (219) = happyGoto action_211
action_17 (221) = happyGoto action_212
action_17 (223) = happyGoto action_213
action_17 _ = happyReduce_328
action_18 _ = happyReduce_330
action_19 _ = happyReduce_332
action_20 _ = happyReduce_337
action_21 (234) = happyShift action_39
action_21 (235) = happyShift action_40
action_21 (236) = happyShift action_41
action_21 (237) = happyShift action_42
action_21 (238) = happyShift action_43
action_21 (239) = happyShift action_44
action_21 (245) = happyShift action_45
action_21 (246) = happyShift action_46
action_21 (247) = happyShift action_47
action_21 (248) = happyShift action_48
action_21 (249) = happyShift action_49
action_21 (250) = happyShift action_50
action_21 (251) = happyShift action_51
action_21 (252) = happyShift action_52
action_21 (253) = happyShift action_53
action_21 (254) = happyShift action_54
action_21 (255) = happyShift action_55
action_21 (257) = happyShift action_56
action_21 (265) = happyShift action_57
action_21 (268) = happyShift action_58
action_21 (280) = happyShift action_60
action_21 (289) = happyShift action_63
action_21 (292) = happyShift action_64
action_21 (293) = happyShift action_65
action_21 (294) = happyShift action_66
action_21 (295) = happyShift action_67
action_21 (296) = happyShift action_68
action_21 (297) = happyShift action_69
action_21 (299) = happyShift action_70
action_21 (300) = happyShift action_71
action_21 (301) = happyShift action_72
action_21 (303) = happyShift action_73
action_21 (305) = happyShift action_74
action_21 (306) = happyShift action_75
action_21 (313) = happyShift action_76
action_21 (314) = happyShift action_77
action_21 (315) = happyShift action_78
action_21 (316) = happyShift action_79
action_21 (318) = happyShift action_80
action_21 (319) = happyShift action_81
action_21 (320) = happyShift action_82
action_21 (321) = happyShift action_83
action_21 (322) = happyShift action_84
action_21 (323) = happyShift action_85
action_21 (325) = happyShift action_86
action_21 (334) = happyShift action_89
action_21 (335) = happyShift action_90
action_21 (337) = happyShift action_91
action_21 (356) = happyShift action_97
action_21 (152) = happyGoto action_381
action_21 (153) = happyGoto action_23
action_21 (154) = happyGoto action_24
action_21 (161) = happyGoto action_25
action_21 (195) = happyGoto action_28
action_21 (198) = happyGoto action_29
action_21 (199) = happyGoto action_30
action_21 (201) = happyGoto action_31
action_21 (211) = happyGoto action_32
action_21 (212) = happyGoto action_33
action_21 (213) = happyGoto action_34
action_21 (214) = happyGoto action_35
action_21 (215) = happyGoto action_36
action_21 (216) = happyGoto action_37
action_21 (224) = happyGoto action_38
action_21 _ = happyReduce_346
action_22 _ = happyReduce_351
action_23 (262) = happyShift action_380
action_23 _ = happyReduce_359
action_24 _ = happyReduce_363
action_25 _ = happyReduce_381
action_26 (277) = happyShift action_379
action_26 _ = happyFail
action_27 (373) = happyAccept
action_27 _ = happyFail
action_28 _ = happyReduce_366
action_29 (259) = happyShift action_376
action_29 (279) = happyShift action_377
action_29 (291) = happyShift action_378
action_29 _ = happyReduce_365
action_30 _ = happyReduce_364
action_31 _ = happyReduce_534
action_32 _ = happyReduce_539
action_33 _ = happyReduce_577
action_34 _ = happyReduce_564
action_35 _ = happyReduce_541
action_36 _ = happyReduce_544
action_37 _ = happyReduce_585
action_38 _ = happyReduce_367
action_39 _ = happyReduce_566
action_40 _ = happyReduce_565
action_41 _ = happyReduce_583
action_42 _ = happyReduce_584
action_43 _ = happyReduce_587
action_44 _ = happyReduce_586
action_45 _ = happyReduce_605
action_46 _ = happyReduce_607
action_47 _ = happyReduce_606
action_48 _ = happyReduce_608
action_49 _ = happyReduce_609
action_50 _ = happyReduce_610
action_51 _ = happyReduce_611
action_52 _ = happyReduce_612
action_53 _ = happyReduce_613
action_54 _ = happyReduce_614
action_55 (234) = happyShift action_39
action_55 (235) = happyShift action_40
action_55 (236) = happyShift action_41
action_55 (237) = happyShift action_42
action_55 (238) = happyShift action_43
action_55 (239) = happyShift action_44
action_55 (241) = happyShift action_370
action_55 (242) = happyShift action_215
action_55 (243) = happyShift action_216
action_55 (244) = happyShift action_217
action_55 (245) = happyShift action_45
action_55 (246) = happyShift action_46
action_55 (247) = happyShift action_47
action_55 (248) = happyShift action_48
action_55 (249) = happyShift action_49
action_55 (250) = happyShift action_50
action_55 (251) = happyShift action_51
action_55 (252) = happyShift action_52
action_55 (253) = happyShift action_53
action_55 (254) = happyShift action_54
action_55 (255) = happyShift action_55
action_55 (256) = happyShift action_371
action_55 (257) = happyShift action_56
action_55 (265) = happyShift action_57
action_55 (267) = happyShift action_237
action_55 (268) = happyShift action_58
action_55 (269) = happyShift action_356
action_55 (270) = happyShift action_372
action_55 (272) = happyShift action_221
action_55 (275) = happyShift action_59
action_55 (280) = happyShift action_60
action_55 (282) = happyShift action_373
action_55 (283) = happyShift action_374
action_55 (284) = happyShift action_375
action_55 (289) = happyShift action_63
action_55 (292) = happyShift action_64
action_55 (293) = happyShift action_65
action_55 (294) = happyShift action_66
action_55 (295) = happyShift action_67
action_55 (296) = happyShift action_68
action_55 (297) = happyShift action_69
action_55 (299) = happyShift action_70
action_55 (300) = happyShift action_71
action_55 (301) = happyShift action_72
action_55 (303) = happyShift action_73
action_55 (305) = happyShift action_74
action_55 (306) = happyShift action_75
action_55 (313) = happyShift action_76
action_55 (314) = happyShift action_77
action_55 (315) = happyShift action_78
action_55 (316) = happyShift action_79
action_55 (318) = happyShift action_80
action_55 (319) = happyShift action_81
action_55 (320) = happyShift action_82
action_55 (321) = happyShift action_83
action_55 (322) = happyShift action_84
action_55 (323) = happyShift action_85
action_55 (325) = happyShift action_86
action_55 (327) = happyShift action_87
action_55 (332) = happyShift action_88
action_55 (334) = happyShift action_89
action_55 (335) = happyShift action_90
action_55 (337) = happyShift action_91
action_55 (338) = happyShift action_92
action_55 (345) = happyShift action_142
action_55 (346) = happyShift action_94
action_55 (350) = happyShift action_95
action_55 (356) = happyShift action_97
action_55 (363) = happyShift action_98
action_55 (364) = happyShift action_99
action_55 (365) = happyShift action_100
action_55 (140) = happyGoto action_363
action_55 (141) = happyGoto action_15
action_55 (142) = happyGoto action_16
action_55 (143) = happyGoto action_17
action_55 (144) = happyGoto action_18
action_55 (147) = happyGoto action_19
action_55 (148) = happyGoto action_20
action_55 (149) = happyGoto action_21
action_55 (152) = happyGoto action_22
action_55 (153) = happyGoto action_23
action_55 (154) = happyGoto action_24
action_55 (155) = happyGoto action_364
action_55 (156) = happyGoto action_365
action_55 (160) = happyGoto action_366
action_55 (161) = happyGoto action_25
action_55 (195) = happyGoto action_28
action_55 (198) = happyGoto action_29
action_55 (199) = happyGoto action_30
action_55 (201) = happyGoto action_31
action_55 (204) = happyGoto action_348
action_55 (206) = happyGoto action_349
action_55 (209) = happyGoto action_350
action_55 (210) = happyGoto action_367
action_55 (211) = happyGoto action_32
action_55 (212) = happyGoto action_33
action_55 (213) = happyGoto action_34
action_55 (214) = happyGoto action_35
action_55 (215) = happyGoto action_36
action_55 (216) = happyGoto action_37
action_55 (217) = happyGoto action_209
action_55 (218) = happyGoto action_210
action_55 (219) = happyGoto action_368
action_55 (220) = happyGoto action_351
action_55 (221) = happyGoto action_212
action_55 (222) = happyGoto action_352
action_55 (223) = happyGoto action_369
action_55 (224) = happyGoto action_38
action_55 _ = happyFail
action_56 (234) = happyShift action_39
action_56 (235) = happyShift action_40
action_56 (236) = happyShift action_41
action_56 (237) = happyShift action_42
action_56 (238) = happyShift action_43
action_56 (239) = happyShift action_44
action_56 (241) = happyShift action_354
action_56 (242) = happyShift action_215
action_56 (243) = happyShift action_216
action_56 (244) = happyShift action_217
action_56 (245) = happyShift action_45
action_56 (246) = happyShift action_46
action_56 (247) = happyShift action_47
action_56 (248) = happyShift action_48
action_56 (249) = happyShift action_49
action_56 (250) = happyShift action_50
action_56 (251) = happyShift action_51
action_56 (252) = happyShift action_52
action_56 (253) = happyShift action_53
action_56 (254) = happyShift action_54
action_56 (255) = happyShift action_55
action_56 (257) = happyShift action_56
action_56 (258) = happyShift action_362
action_56 (265) = happyShift action_57
action_56 (267) = happyShift action_237
action_56 (268) = happyShift action_58
action_56 (269) = happyShift action_356
action_56 (270) = happyShift action_357
action_56 (272) = happyShift action_221
action_56 (275) = happyShift action_59
action_56 (280) = happyShift action_60
action_56 (282) = happyShift action_61
action_56 (283) = happyShift action_358
action_56 (284) = happyShift action_359
action_56 (289) = happyShift action_63
action_56 (292) = happyShift action_64
action_56 (293) = happyShift action_65
action_56 (294) = happyShift action_66
action_56 (295) = happyShift action_67
action_56 (296) = happyShift action_68
action_56 (297) = happyShift action_69
action_56 (299) = happyShift action_70
action_56 (300) = happyShift action_71
action_56 (301) = happyShift action_72
action_56 (303) = happyShift action_73
action_56 (305) = happyShift action_74
action_56 (306) = happyShift action_75
action_56 (313) = happyShift action_76
action_56 (314) = happyShift action_77
action_56 (315) = happyShift action_78
action_56 (316) = happyShift action_79
action_56 (318) = happyShift action_80
action_56 (319) = happyShift action_81
action_56 (320) = happyShift action_82
action_56 (321) = happyShift action_83
action_56 (322) = happyShift action_84
action_56 (323) = happyShift action_85
action_56 (325) = happyShift action_86
action_56 (327) = happyShift action_87
action_56 (332) = happyShift action_88
action_56 (334) = happyShift action_89
action_56 (335) = happyShift action_90
action_56 (337) = happyShift action_91
action_56 (338) = happyShift action_92
action_56 (345) = happyShift action_142
action_56 (346) = happyShift action_94
action_56 (350) = happyShift action_95
action_56 (356) = happyShift action_97
action_56 (363) = happyShift action_98
action_56 (364) = happyShift action_99
action_56 (365) = happyShift action_100
action_56 (140) = happyGoto action_344
action_56 (141) = happyGoto action_15
action_56 (142) = happyGoto action_16
action_56 (143) = happyGoto action_17
action_56 (144) = happyGoto action_18
action_56 (147) = happyGoto action_19
action_56 (148) = happyGoto action_20
action_56 (149) = happyGoto action_21
action_56 (152) = happyGoto action_22
action_56 (153) = happyGoto action_23
action_56 (154) = happyGoto action_24
action_56 (155) = happyGoto action_360
action_56 (156) = happyGoto action_361
action_56 (161) = happyGoto action_25
action_56 (195) = happyGoto action_28
action_56 (198) = happyGoto action_29
action_56 (199) = happyGoto action_30
action_56 (201) = happyGoto action_31
action_56 (204) = happyGoto action_348
action_56 (206) = happyGoto action_349
action_56 (209) = happyGoto action_350
action_56 (210) = happyGoto action_208
action_56 (211) = happyGoto action_32
action_56 (212) = happyGoto action_33
action_56 (213) = happyGoto action_34
action_56 (214) = happyGoto action_35
action_56 (215) = happyGoto action_36
action_56 (216) = happyGoto action_37
action_56 (217) = happyGoto action_209
action_56 (218) = happyGoto action_210
action_56 (220) = happyGoto action_351
action_56 (222) = happyGoto action_352
action_56 (223) = happyGoto action_353
action_56 (224) = happyGoto action_38
action_56 _ = happyFail
action_57 (234) = happyShift action_39
action_57 (235) = happyShift action_40
action_57 (236) = happyShift action_41
action_57 (237) = happyShift action_42
action_57 (238) = happyShift action_43
action_57 (239) = happyShift action_44
action_57 (241) = happyShift action_354
action_57 (242) = happyShift action_215
action_57 (243) = happyShift action_216
action_57 (244) = happyShift action_217
action_57 (245) = happyShift action_45
action_57 (246) = happyShift action_46
action_57 (247) = happyShift action_47
action_57 (248) = happyShift action_48
action_57 (249) = happyShift action_49
action_57 (250) = happyShift action_50
action_57 (251) = happyShift action_51
action_57 (252) = happyShift action_52
action_57 (253) = happyShift action_53
action_57 (254) = happyShift action_54
action_57 (255) = happyShift action_55
action_57 (257) = happyShift action_56
action_57 (265) = happyShift action_57
action_57 (266) = happyShift action_355
action_57 (268) = happyShift action_58
action_57 (269) = happyShift action_356
action_57 (270) = happyShift action_357
action_57 (272) = happyShift action_221
action_57 (275) = happyShift action_59
action_57 (280) = happyShift action_60
action_57 (282) = happyShift action_61
action_57 (283) = happyShift action_358
action_57 (284) = happyShift action_359
action_57 (289) = happyShift action_63
action_57 (292) = happyShift action_64
action_57 (293) = happyShift action_65
action_57 (294) = happyShift action_66
action_57 (295) = happyShift action_67
action_57 (296) = happyShift action_68
action_57 (297) = happyShift action_69
action_57 (299) = happyShift action_70
action_57 (300) = happyShift action_71
action_57 (301) = happyShift action_72
action_57 (303) = happyShift action_73
action_57 (305) = happyShift action_74
action_57 (306) = happyShift action_75
action_57 (313) = happyShift action_76
action_57 (314) = happyShift action_77
action_57 (315) = happyShift action_78
action_57 (316) = happyShift action_79
action_57 (318) = happyShift action_80
action_57 (319) = happyShift action_81
action_57 (320) = happyShift action_82
action_57 (321) = happyShift action_83
action_57 (322) = happyShift action_84
action_57 (323) = happyShift action_85
action_57 (325) = happyShift action_86
action_57 (327) = happyShift action_87
action_57 (332) = happyShift action_88
action_57 (334) = happyShift action_89
action_57 (335) = happyShift action_90
action_57 (337) = happyShift action_91
action_57 (338) = happyShift action_92
action_57 (345) = happyShift action_142
action_57 (346) = happyShift action_94
action_57 (350) = happyShift action_95
action_57 (356) = happyShift action_97
action_57 (363) = happyShift action_98
action_57 (364) = happyShift action_99
action_57 (365) = happyShift action_100
action_57 (140) = happyGoto action_344
action_57 (141) = happyGoto action_15
action_57 (142) = happyGoto action_16
action_57 (143) = happyGoto action_17
action_57 (144) = happyGoto action_18
action_57 (147) = happyGoto action_19
action_57 (148) = happyGoto action_20
action_57 (149) = happyGoto action_21
action_57 (152) = happyGoto action_22
action_57 (153) = happyGoto action_23
action_57 (154) = happyGoto action_24
action_57 (156) = happyGoto action_345
action_57 (161) = happyGoto action_25
action_57 (170) = happyGoto action_346
action_57 (171) = happyGoto action_347
action_57 (195) = happyGoto action_28
action_57 (198) = happyGoto action_29
action_57 (199) = happyGoto action_30
action_57 (201) = happyGoto action_31
action_57 (204) = happyGoto action_348
action_57 (206) = happyGoto action_349
action_57 (209) = happyGoto action_350
action_57 (210) = happyGoto action_208
action_57 (211) = happyGoto action_32
action_57 (212) = happyGoto action_33
action_57 (213) = happyGoto action_34
action_57 (214) = happyGoto action_35
action_57 (215) = happyGoto action_36
action_57 (216) = happyGoto action_37
action_57 (217) = happyGoto action_209
action_57 (218) = happyGoto action_210
action_57 (220) = happyGoto action_351
action_57 (222) = happyGoto action_352
action_57 (223) = happyGoto action_353
action_57 (224) = happyGoto action_38
action_57 _ = happyFail
action_58 _ = happyReduce_377
action_59 (234) = happyShift action_39
action_59 (235) = happyShift action_40
action_59 (236) = happyShift action_41
action_59 (237) = happyShift action_42
action_59 (238) = happyShift action_43
action_59 (239) = happyShift action_44
action_59 (245) = happyShift action_45
action_59 (246) = happyShift action_46
action_59 (247) = happyShift action_47
action_59 (248) = happyShift action_48
action_59 (249) = happyShift action_49
action_59 (250) = happyShift action_50
action_59 (251) = happyShift action_51
action_59 (252) = happyShift action_52
action_59 (253) = happyShift action_53
action_59 (254) = happyShift action_54
action_59 (255) = happyShift action_55
action_59 (257) = happyShift action_56
action_59 (265) = happyShift action_57
action_59 (268) = happyShift action_58
action_59 (280) = happyShift action_60
action_59 (283) = happyShift action_266
action_59 (289) = happyShift action_63
action_59 (292) = happyShift action_64
action_59 (293) = happyShift action_65
action_59 (294) = happyShift action_66
action_59 (295) = happyShift action_67
action_59 (296) = happyShift action_68
action_59 (297) = happyShift action_69
action_59 (299) = happyShift action_70
action_59 (300) = happyShift action_71
action_59 (301) = happyShift action_72
action_59 (303) = happyShift action_73
action_59 (305) = happyShift action_74
action_59 (306) = happyShift action_75
action_59 (313) = happyShift action_76
action_59 (314) = happyShift action_77
action_59 (315) = happyShift action_78
action_59 (316) = happyShift action_79
action_59 (318) = happyShift action_80
action_59 (319) = happyShift action_81
action_59 (320) = happyShift action_82
action_59 (321) = happyShift action_83
action_59 (322) = happyShift action_84
action_59 (323) = happyShift action_85
action_59 (325) = happyShift action_86
action_59 (334) = happyShift action_89
action_59 (335) = happyShift action_90
action_59 (337) = happyShift action_91
action_59 (356) = happyShift action_97
action_59 (150) = happyGoto action_342
action_59 (151) = happyGoto action_343
action_59 (152) = happyGoto action_265
action_59 (153) = happyGoto action_23
action_59 (154) = happyGoto action_24
action_59 (161) = happyGoto action_25
action_59 (195) = happyGoto action_28
action_59 (198) = happyGoto action_29
action_59 (199) = happyGoto action_30
action_59 (201) = happyGoto action_31
action_59 (211) = happyGoto action_32
action_59 (212) = happyGoto action_33
action_59 (213) = happyGoto action_34
action_59 (214) = happyGoto action_35
action_59 (215) = happyGoto action_36
action_59 (216) = happyGoto action_37
action_59 (224) = happyGoto action_38
action_59 _ = happyFail
action_60 (234) = happyShift action_39
action_60 (235) = happyShift action_40
action_60 (236) = happyShift action_41
action_60 (237) = happyShift action_42
action_60 (238) = happyShift action_43
action_60 (239) = happyShift action_44
action_60 (245) = happyShift action_45
action_60 (246) = happyShift action_46
action_60 (247) = happyShift action_47
action_60 (248) = happyShift action_48
action_60 (249) = happyShift action_49
action_60 (250) = happyShift action_50
action_60 (251) = happyShift action_51
action_60 (252) = happyShift action_52
action_60 (253) = happyShift action_53
action_60 (254) = happyShift action_54
action_60 (255) = happyShift action_55
action_60 (257) = happyShift action_56
action_60 (265) = happyShift action_57
action_60 (268) = happyShift action_58
action_60 (280) = happyShift action_60
action_60 (289) = happyShift action_63
action_60 (292) = happyShift action_64
action_60 (293) = happyShift action_65
action_60 (294) = happyShift action_66
action_60 (295) = happyShift action_67
action_60 (296) = happyShift action_68
action_60 (297) = happyShift action_69
action_60 (299) = happyShift action_70
action_60 (300) = happyShift action_71
action_60 (301) = happyShift action_72
action_60 (303) = happyShift action_73
action_60 (305) = happyShift action_74
action_60 (306) = happyShift action_75
action_60 (313) = happyShift action_76
action_60 (314) = happyShift action_77
action_60 (315) = happyShift action_78
action_60 (316) = happyShift action_79
action_60 (318) = happyShift action_80
action_60 (319) = happyShift action_81
action_60 (320) = happyShift action_82
action_60 (321) = happyShift action_83
action_60 (322) = happyShift action_84
action_60 (323) = happyShift action_85
action_60 (325) = happyShift action_86
action_60 (334) = happyShift action_89
action_60 (335) = happyShift action_90
action_60 (337) = happyShift action_91
action_60 (356) = happyShift action_97
action_60 (152) = happyGoto action_341
action_60 (153) = happyGoto action_23
action_60 (154) = happyGoto action_24
action_60 (161) = happyGoto action_25
action_60 (195) = happyGoto action_28
action_60 (198) = happyGoto action_29
action_60 (199) = happyGoto action_30
action_60 (201) = happyGoto action_31
action_60 (211) = happyGoto action_32
action_60 (212) = happyGoto action_33
action_60 (213) = happyGoto action_34
action_60 (214) = happyGoto action_35
action_60 (215) = happyGoto action_36
action_60 (216) = happyGoto action_37
action_60 (224) = happyGoto action_38
action_60 _ = happyFail
action_61 (234) = happyShift action_39
action_61 (235) = happyShift action_40
action_61 (236) = happyShift action_41
action_61 (237) = happyShift action_42
action_61 (238) = happyShift action_43
action_61 (239) = happyShift action_44
action_61 (245) = happyShift action_45
action_61 (246) = happyShift action_46
action_61 (247) = happyShift action_47
action_61 (248) = happyShift action_48
action_61 (249) = happyShift action_49
action_61 (250) = happyShift action_50
action_61 (251) = happyShift action_51
action_61 (252) = happyShift action_52
action_61 (253) = happyShift action_53
action_61 (254) = happyShift action_54
action_61 (255) = happyShift action_55
action_61 (257) = happyShift action_56
action_61 (265) = happyShift action_57
action_61 (268) = happyShift action_58
action_61 (280) = happyShift action_60
action_61 (289) = happyShift action_63
action_61 (292) = happyShift action_64
action_61 (293) = happyShift action_65
action_61 (294) = happyShift action_66
action_61 (295) = happyShift action_67
action_61 (296) = happyShift action_68
action_61 (297) = happyShift action_69
action_61 (299) = happyShift action_70
action_61 (300) = happyShift action_71
action_61 (301) = happyShift action_72
action_61 (303) = happyShift action_73
action_61 (305) = happyShift action_74
action_61 (306) = happyShift action_75
action_61 (313) = happyShift action_76
action_61 (314) = happyShift action_77
action_61 (315) = happyShift action_78
action_61 (316) = happyShift action_79
action_61 (318) = happyShift action_80
action_61 (319) = happyShift action_81
action_61 (320) = happyShift action_82
action_61 (321) = happyShift action_83
action_61 (322) = happyShift action_84
action_61 (323) = happyShift action_85
action_61 (325) = happyShift action_86
action_61 (334) = happyShift action_89
action_61 (335) = happyShift action_90
action_61 (337) = happyShift action_91
action_61 (356) = happyShift action_97
action_61 (149) = happyGoto action_340
action_61 (152) = happyGoto action_22
action_61 (153) = happyGoto action_23
action_61 (154) = happyGoto action_24
action_61 (161) = happyGoto action_25
action_61 (195) = happyGoto action_28
action_61 (198) = happyGoto action_29
action_61 (199) = happyGoto action_30
action_61 (201) = happyGoto action_31
action_61 (211) = happyGoto action_32
action_61 (212) = happyGoto action_33
action_61 (213) = happyGoto action_34
action_61 (214) = happyGoto action_35
action_61 (215) = happyGoto action_36
action_61 (216) = happyGoto action_37
action_61 (224) = happyGoto action_38
action_61 _ = happyFail
action_62 (234) = happyShift action_39
action_62 (235) = happyShift action_40
action_62 (236) = happyShift action_41
action_62 (237) = happyShift action_42
action_62 (238) = happyShift action_43
action_62 (239) = happyShift action_44
action_62 (245) = happyShift action_45
action_62 (246) = happyShift action_46
action_62 (247) = happyShift action_47
action_62 (248) = happyShift action_48
action_62 (249) = happyShift action_49
action_62 (250) = happyShift action_50
action_62 (251) = happyShift action_51
action_62 (252) = happyShift action_52
action_62 (253) = happyShift action_53
action_62 (254) = happyShift action_54
action_62 (255) = happyShift action_55
action_62 (257) = happyShift action_56
action_62 (265) = happyShift action_57
action_62 (268) = happyShift action_58
action_62 (280) = happyShift action_60
action_62 (289) = happyShift action_63
action_62 (292) = happyShift action_64
action_62 (293) = happyShift action_65
action_62 (294) = happyShift action_66
action_62 (295) = happyShift action_67
action_62 (296) = happyShift action_68
action_62 (297) = happyShift action_69
action_62 (299) = happyShift action_70
action_62 (300) = happyShift action_71
action_62 (301) = happyShift action_72
action_62 (303) = happyShift action_73
action_62 (305) = happyShift action_74
action_62 (306) = happyShift action_75
action_62 (313) = happyShift action_76
action_62 (314) = happyShift action_77
action_62 (315) = happyShift action_78
action_62 (316) = happyShift action_79
action_62 (318) = happyShift action_80
action_62 (319) = happyShift action_81
action_62 (320) = happyShift action_82
action_62 (321) = happyShift action_83
action_62 (322) = happyShift action_84
action_62 (323) = happyShift action_85
action_62 (325) = happyShift action_86
action_62 (334) = happyShift action_89
action_62 (335) = happyShift action_90
action_62 (337) = happyShift action_91
action_62 (356) = happyShift action_97
action_62 (152) = happyGoto action_339
action_62 (153) = happyGoto action_23
action_62 (154) = happyGoto action_24
action_62 (161) = happyGoto action_25
action_62 (195) = happyGoto action_28
action_62 (198) = happyGoto action_29
action_62 (199) = happyGoto action_30
action_62 (201) = happyGoto action_31
action_62 (211) = happyGoto action_32
action_62 (212) = happyGoto action_33
action_62 (213) = happyGoto action_34
action_62 (214) = happyGoto action_35
action_62 (215) = happyGoto action_36
action_62 (216) = happyGoto action_37
action_62 (224) = happyGoto action_38
action_62 _ = happyFail
action_63 (234) = happyShift action_39
action_63 (235) = happyShift action_40
action_63 (236) = happyShift action_41
action_63 (237) = happyShift action_42
action_63 (238) = happyShift action_43
action_63 (239) = happyShift action_44
action_63 (245) = happyShift action_45
action_63 (246) = happyShift action_46
action_63 (247) = happyShift action_47
action_63 (248) = happyShift action_48
action_63 (249) = happyShift action_49
action_63 (250) = happyShift action_50
action_63 (251) = happyShift action_51
action_63 (252) = happyShift action_52
action_63 (253) = happyShift action_53
action_63 (254) = happyShift action_54
action_63 (255) = happyShift action_55
action_63 (257) = happyShift action_56
action_63 (265) = happyShift action_57
action_63 (268) = happyShift action_58
action_63 (275) = happyShift action_59
action_63 (280) = happyShift action_60
action_63 (282) = happyShift action_61
action_63 (289) = happyShift action_63
action_63 (292) = happyShift action_64
action_63 (293) = happyShift action_65
action_63 (294) = happyShift action_66
action_63 (295) = happyShift action_67
action_63 (296) = happyShift action_68
action_63 (297) = happyShift action_69
action_63 (299) = happyShift action_70
action_63 (300) = happyShift action_71
action_63 (301) = happyShift action_72
action_63 (303) = happyShift action_73
action_63 (305) = happyShift action_74
action_63 (306) = happyShift action_75
action_63 (313) = happyShift action_76
action_63 (314) = happyShift action_77
action_63 (315) = happyShift action_78
action_63 (316) = happyShift action_79
action_63 (318) = happyShift action_80
action_63 (319) = happyShift action_81
action_63 (320) = happyShift action_82
action_63 (321) = happyShift action_83
action_63 (322) = happyShift action_84
action_63 (323) = happyShift action_85
action_63 (325) = happyShift action_86
action_63 (327) = happyShift action_87
action_63 (332) = happyShift action_88
action_63 (334) = happyShift action_89
action_63 (335) = happyShift action_90
action_63 (337) = happyShift action_91
action_63 (338) = happyShift action_92
action_63 (345) = happyShift action_142
action_63 (346) = happyShift action_94
action_63 (350) = happyShift action_95
action_63 (356) = happyShift action_97
action_63 (363) = happyShift action_98
action_63 (364) = happyShift action_99
action_63 (365) = happyShift action_100
action_63 (140) = happyGoto action_337
action_63 (141) = happyGoto action_15
action_63 (142) = happyGoto action_16
action_63 (143) = happyGoto action_17
action_63 (144) = happyGoto action_18
action_63 (147) = happyGoto action_19
action_63 (148) = happyGoto action_20
action_63 (149) = happyGoto action_21
action_63 (152) = happyGoto action_22
action_63 (153) = happyGoto action_23
action_63 (154) = happyGoto action_24
action_63 (159) = happyGoto action_338
action_63 (161) = happyGoto action_25
action_63 (195) = happyGoto action_28
action_63 (198) = happyGoto action_29
action_63 (199) = happyGoto action_30
action_63 (201) = happyGoto action_31
action_63 (211) = happyGoto action_32
action_63 (212) = happyGoto action_33
action_63 (213) = happyGoto action_34
action_63 (214) = happyGoto action_35
action_63 (215) = happyGoto action_36
action_63 (216) = happyGoto action_37
action_63 (224) = happyGoto action_38
action_63 _ = happyFail
action_64 _ = happyReduce_382
action_65 (234) = happyShift action_39
action_65 (235) = happyShift action_40
action_65 (236) = happyShift action_41
action_65 (237) = happyShift action_42
action_65 (238) = happyShift action_43
action_65 (239) = happyShift action_44
action_65 (245) = happyShift action_45
action_65 (246) = happyShift action_46
action_65 (247) = happyShift action_47
action_65 (248) = happyShift action_48
action_65 (249) = happyShift action_49
action_65 (250) = happyShift action_50
action_65 (251) = happyShift action_51
action_65 (252) = happyShift action_52
action_65 (253) = happyShift action_53
action_65 (254) = happyShift action_54
action_65 (255) = happyShift action_55
action_65 (257) = happyShift action_56
action_65 (265) = happyShift action_57
action_65 (268) = happyShift action_58
action_65 (275) = happyShift action_59
action_65 (280) = happyShift action_60
action_65 (282) = happyShift action_61
action_65 (289) = happyShift action_63
action_65 (292) = happyShift action_64
action_65 (293) = happyShift action_65
action_65 (294) = happyShift action_66
action_65 (295) = happyShift action_67
action_65 (296) = happyShift action_68
action_65 (297) = happyShift action_69
action_65 (299) = happyShift action_70
action_65 (300) = happyShift action_71
action_65 (301) = happyShift action_72
action_65 (303) = happyShift action_73
action_65 (305) = happyShift action_74
action_65 (306) = happyShift action_75
action_65 (313) = happyShift action_76
action_65 (314) = happyShift action_77
action_65 (315) = happyShift action_78
action_65 (316) = happyShift action_79
action_65 (318) = happyShift action_80
action_65 (319) = happyShift action_81
action_65 (320) = happyShift action_82
action_65 (321) = happyShift action_83
action_65 (322) = happyShift action_84
action_65 (323) = happyShift action_85
action_65 (325) = happyShift action_86
action_65 (327) = happyShift action_87
action_65 (332) = happyShift action_88
action_65 (334) = happyShift action_89
action_65 (335) = happyShift action_90
action_65 (337) = happyShift action_91
action_65 (338) = happyShift action_92
action_65 (345) = happyShift action_142
action_65 (346) = happyShift action_94
action_65 (350) = happyShift action_95
action_65 (356) = happyShift action_97
action_65 (363) = happyShift action_98
action_65 (364) = happyShift action_99
action_65 (365) = happyShift action_100
action_65 (139) = happyGoto action_336
action_65 (140) = happyGoto action_156
action_65 (141) = happyGoto action_15
action_65 (142) = happyGoto action_16
action_65 (143) = happyGoto action_17
action_65 (144) = happyGoto action_18
action_65 (147) = happyGoto action_19
action_65 (148) = happyGoto action_20
action_65 (149) = happyGoto action_21
action_65 (152) = happyGoto action_22
action_65 (153) = happyGoto action_23
action_65 (154) = happyGoto action_24
action_65 (161) = happyGoto action_25
action_65 (195) = happyGoto action_28
action_65 (198) = happyGoto action_29
action_65 (199) = happyGoto action_30
action_65 (201) = happyGoto action_31
action_65 (211) = happyGoto action_32
action_65 (212) = happyGoto action_33
action_65 (213) = happyGoto action_34
action_65 (214) = happyGoto action_35
action_65 (215) = happyGoto action_36
action_65 (216) = happyGoto action_37
action_65 (224) = happyGoto action_38
action_65 _ = happyFail
action_66 (234) = happyShift action_39
action_66 (235) = happyShift action_40
action_66 (236) = happyShift action_41
action_66 (237) = happyShift action_42
action_66 (238) = happyShift action_43
action_66 (239) = happyShift action_44
action_66 (245) = happyShift action_45
action_66 (246) = happyShift action_46
action_66 (247) = happyShift action_47
action_66 (248) = happyShift action_48
action_66 (249) = happyShift action_49
action_66 (250) = happyShift action_50
action_66 (251) = happyShift action_51
action_66 (252) = happyShift action_52
action_66 (253) = happyShift action_53
action_66 (254) = happyShift action_54
action_66 (255) = happyShift action_55
action_66 (257) = happyShift action_56
action_66 (265) = happyShift action_57
action_66 (268) = happyShift action_58
action_66 (275) = happyShift action_59
action_66 (280) = happyShift action_60
action_66 (282) = happyShift action_61
action_66 (289) = happyShift action_63
action_66 (292) = happyShift action_64
action_66 (293) = happyShift action_65
action_66 (294) = happyShift action_66
action_66 (295) = happyShift action_67
action_66 (296) = happyShift action_68
action_66 (297) = happyShift action_69
action_66 (299) = happyShift action_70
action_66 (300) = happyShift action_71
action_66 (301) = happyShift action_72
action_66 (303) = happyShift action_73
action_66 (305) = happyShift action_74
action_66 (306) = happyShift action_75
action_66 (313) = happyShift action_76
action_66 (314) = happyShift action_77
action_66 (315) = happyShift action_78
action_66 (316) = happyShift action_79
action_66 (318) = happyShift action_80
action_66 (319) = happyShift action_81
action_66 (320) = happyShift action_82
action_66 (321) = happyShift action_83
action_66 (322) = happyShift action_84
action_66 (323) = happyShift action_85
action_66 (325) = happyShift action_86
action_66 (327) = happyShift action_87
action_66 (332) = happyShift action_88
action_66 (334) = happyShift action_89
action_66 (335) = happyShift action_90
action_66 (337) = happyShift action_91
action_66 (338) = happyShift action_92
action_66 (345) = happyShift action_142
action_66 (346) = happyShift action_94
action_66 (350) = happyShift action_95
action_66 (356) = happyShift action_97
action_66 (363) = happyShift action_98
action_66 (364) = happyShift action_99
action_66 (365) = happyShift action_100
action_66 (139) = happyGoto action_335
action_66 (140) = happyGoto action_156
action_66 (141) = happyGoto action_15
action_66 (142) = happyGoto action_16
action_66 (143) = happyGoto action_17
action_66 (144) = happyGoto action_18
action_66 (147) = happyGoto action_19
action_66 (148) = happyGoto action_20
action_66 (149) = happyGoto action_21
action_66 (152) = happyGoto action_22
action_66 (153) = happyGoto action_23
action_66 (154) = happyGoto action_24
action_66 (161) = happyGoto action_25
action_66 (195) = happyGoto action_28
action_66 (198) = happyGoto action_29
action_66 (199) = happyGoto action_30
action_66 (201) = happyGoto action_31
action_66 (211) = happyGoto action_32
action_66 (212) = happyGoto action_33
action_66 (213) = happyGoto action_34
action_66 (214) = happyGoto action_35
action_66 (215) = happyGoto action_36
action_66 (216) = happyGoto action_37
action_66 (224) = happyGoto action_38
action_66 _ = happyFail
action_67 (234) = happyShift action_39
action_67 (235) = happyShift action_40
action_67 (236) = happyShift action_41
action_67 (237) = happyShift action_42
action_67 (238) = happyShift action_43
action_67 (239) = happyShift action_44
action_67 (245) = happyShift action_45
action_67 (246) = happyShift action_46
action_67 (247) = happyShift action_47
action_67 (248) = happyShift action_48
action_67 (249) = happyShift action_49
action_67 (250) = happyShift action_50
action_67 (251) = happyShift action_51
action_67 (252) = happyShift action_52
action_67 (253) = happyShift action_53
action_67 (254) = happyShift action_54
action_67 (255) = happyShift action_55
action_67 (257) = happyShift action_56
action_67 (265) = happyShift action_57
action_67 (268) = happyShift action_58
action_67 (275) = happyShift action_59
action_67 (280) = happyShift action_60
action_67 (282) = happyShift action_61
action_67 (289) = happyShift action_63
action_67 (292) = happyShift action_64
action_67 (293) = happyShift action_65
action_67 (294) = happyShift action_66
action_67 (295) = happyShift action_67
action_67 (296) = happyShift action_68
action_67 (297) = happyShift action_69
action_67 (299) = happyShift action_70
action_67 (300) = happyShift action_71
action_67 (301) = happyShift action_72
action_67 (303) = happyShift action_73
action_67 (305) = happyShift action_74
action_67 (306) = happyShift action_75
action_67 (313) = happyShift action_76
action_67 (314) = happyShift action_77
action_67 (315) = happyShift action_78
action_67 (316) = happyShift action_79
action_67 (318) = happyShift action_80
action_67 (319) = happyShift action_81
action_67 (320) = happyShift action_82
action_67 (321) = happyShift action_83
action_67 (322) = happyShift action_84
action_67 (323) = happyShift action_85
action_67 (325) = happyShift action_86
action_67 (327) = happyShift action_87
action_67 (332) = happyShift action_88
action_67 (334) = happyShift action_89
action_67 (335) = happyShift action_90
action_67 (337) = happyShift action_91
action_67 (338) = happyShift action_92
action_67 (345) = happyShift action_142
action_67 (346) = happyShift action_94
action_67 (350) = happyShift action_95
action_67 (356) = happyShift action_97
action_67 (363) = happyShift action_98
action_67 (364) = happyShift action_99
action_67 (365) = happyShift action_100
action_67 (141) = happyGoto action_333
action_67 (142) = happyGoto action_16
action_67 (143) = happyGoto action_334
action_67 (144) = happyGoto action_18
action_67 (147) = happyGoto action_19
action_67 (148) = happyGoto action_20
action_67 (149) = happyGoto action_21
action_67 (152) = happyGoto action_22
action_67 (153) = happyGoto action_23
action_67 (154) = happyGoto action_24
action_67 (161) = happyGoto action_25
action_67 (195) = happyGoto action_28
action_67 (198) = happyGoto action_29
action_67 (199) = happyGoto action_30
action_67 (201) = happyGoto action_31
action_67 (211) = happyGoto action_32
action_67 (212) = happyGoto action_33
action_67 (213) = happyGoto action_34
action_67 (214) = happyGoto action_35
action_67 (215) = happyGoto action_36
action_67 (216) = happyGoto action_37
action_67 (224) = happyGoto action_38
action_67 _ = happyFail
action_68 (234) = happyShift action_39
action_68 (236) = happyShift action_41
action_68 (237) = happyShift action_42
action_68 (238) = happyShift action_43
action_68 (239) = happyShift action_44
action_68 (255) = happyShift action_115
action_68 (257) = happyShift action_116
action_68 (265) = happyShift action_117
action_68 (313) = happyShift action_76
action_68 (314) = happyShift action_118
action_68 (315) = happyShift action_119
action_68 (316) = happyShift action_120
action_68 (318) = happyShift action_80
action_68 (319) = happyShift action_81
action_68 (320) = happyShift action_82
action_68 (321) = happyShift action_83
action_68 (322) = happyShift action_84
action_68 (323) = happyShift action_85
action_68 (325) = happyShift action_86
action_68 (335) = happyShift action_121
action_68 (337) = happyShift action_91
action_68 (356) = happyShift action_97
action_68 (78) = happyGoto action_101
action_68 (80) = happyGoto action_102
action_68 (82) = happyGoto action_103
action_68 (84) = happyGoto action_104
action_68 (85) = happyGoto action_105
action_68 (86) = happyGoto action_106
action_68 (88) = happyGoto action_332
action_68 (89) = happyGoto action_108
action_68 (90) = happyGoto action_109
action_68 (199) = happyGoto action_110
action_68 (212) = happyGoto action_111
action_68 (214) = happyGoto action_35
action_68 (215) = happyGoto action_112
action_68 (216) = happyGoto action_37
action_68 (230) = happyGoto action_113
action_68 (231) = happyGoto action_114
action_68 _ = happyFail
action_69 (225) = happyGoto action_331
action_69 _ = happyReduce_615
action_70 (234) = happyShift action_39
action_70 (235) = happyShift action_40
action_70 (238) = happyShift action_43
action_70 (239) = happyShift action_44
action_70 (255) = happyShift action_330
action_70 (313) = happyShift action_76
action_70 (314) = happyShift action_77
action_70 (315) = happyShift action_78
action_70 (316) = happyShift action_79
action_70 (318) = happyShift action_80
action_70 (319) = happyShift action_81
action_70 (320) = happyShift action_82
action_70 (321) = happyShift action_83
action_70 (322) = happyShift action_84
action_70 (323) = happyShift action_85
action_70 (325) = happyShift action_86
action_70 (334) = happyShift action_89
action_70 (335) = happyShift action_90
action_70 (337) = happyShift action_91
action_70 (356) = happyShift action_97
action_70 (198) = happyGoto action_328
action_70 (201) = happyGoto action_329
action_70 (211) = happyGoto action_32
action_70 (212) = happyGoto action_33
action_70 (213) = happyGoto action_34
action_70 (215) = happyGoto action_36
action_70 (216) = happyGoto action_37
action_70 _ = happyFail
action_71 (234) = happyShift action_39
action_71 (238) = happyShift action_43
action_71 (239) = happyShift action_44
action_71 (255) = happyShift action_325
action_71 (257) = happyShift action_326
action_71 (265) = happyShift action_327
action_71 (313) = happyShift action_76
action_71 (314) = happyShift action_118
action_71 (315) = happyShift action_119
action_71 (316) = happyShift action_120
action_71 (318) = happyShift action_80
action_71 (319) = happyShift action_81
action_71 (320) = happyShift action_82
action_71 (321) = happyShift action_83
action_71 (322) = happyShift action_84
action_71 (323) = happyShift action_85
action_71 (325) = happyShift action_86
action_71 (337) = happyShift action_91
action_71 (356) = happyShift action_97
action_71 (85) = happyGoto action_323
action_71 (86) = happyGoto action_106
action_71 (212) = happyGoto action_111
action_71 (215) = happyGoto action_112
action_71 (216) = happyGoto action_37
action_71 (230) = happyGoto action_324
action_71 (231) = happyGoto action_114
action_71 _ = happyFail
action_72 _ = happyReduce_392
action_73 (234) = happyShift action_277
action_73 (238) = happyShift action_278
action_73 (240) = happyShift action_279
action_73 (312) = happyShift action_280
action_73 (313) = happyShift action_281
action_73 (314) = happyShift action_282
action_73 (315) = happyShift action_283
action_73 (316) = happyShift action_284
action_73 (318) = happyShift action_285
action_73 (319) = happyShift action_286
action_73 (320) = happyShift action_287
action_73 (321) = happyShift action_288
action_73 (322) = happyShift action_289
action_73 (323) = happyShift action_290
action_73 (325) = happyShift action_291
action_73 (326) = happyShift action_292
action_73 (327) = happyShift action_293
action_73 (328) = happyShift action_294
action_73 (329) = happyShift action_295
action_73 (330) = happyShift action_296
action_73 (331) = happyShift action_297
action_73 (332) = happyShift action_298
action_73 (333) = happyShift action_299
action_73 (334) = happyShift action_300
action_73 (335) = happyShift action_301
action_73 (336) = happyShift action_302
action_73 (337) = happyShift action_303
action_73 (338) = happyShift action_304
action_73 (339) = happyShift action_305
action_73 (340) = happyShift action_306
action_73 (341) = happyShift action_307
action_73 (342) = happyShift action_308
action_73 (343) = happyShift action_309
action_73 (344) = happyShift action_310
action_73 (345) = happyShift action_311
action_73 (346) = happyShift action_312
action_73 (347) = happyShift action_313
action_73 (348) = happyShift action_314
action_73 (349) = happyShift action_315
action_73 (350) = happyShift action_316
action_73 (351) = happyShift action_317
action_73 (352) = happyShift action_318
action_73 (353) = happyShift action_319
action_73 (354) = happyShift action_320
action_73 (355) = happyShift action_321
action_73 (356) = happyShift action_322
action_73 (164) = happyGoto action_274
action_73 (165) = happyGoto action_275
action_73 (166) = happyGoto action_276
action_73 _ = happyFail
action_74 (234) = happyShift action_39
action_74 (235) = happyShift action_40
action_74 (236) = happyShift action_41
action_74 (237) = happyShift action_42
action_74 (238) = happyShift action_43
action_74 (239) = happyShift action_44
action_74 (245) = happyShift action_45
action_74 (246) = happyShift action_46
action_74 (247) = happyShift action_47
action_74 (248) = happyShift action_48
action_74 (249) = happyShift action_49
action_74 (250) = happyShift action_50
action_74 (251) = happyShift action_51
action_74 (252) = happyShift action_52
action_74 (253) = happyShift action_53
action_74 (254) = happyShift action_54
action_74 (255) = happyShift action_55
action_74 (257) = happyShift action_56
action_74 (265) = happyShift action_57
action_74 (268) = happyShift action_58
action_74 (275) = happyShift action_59
action_74 (280) = happyShift action_60
action_74 (282) = happyShift action_61
action_74 (289) = happyShift action_63
action_74 (292) = happyShift action_64
action_74 (293) = happyShift action_65
action_74 (294) = happyShift action_66
action_74 (295) = happyShift action_67
action_74 (296) = happyShift action_68
action_74 (297) = happyShift action_69
action_74 (299) = happyShift action_70
action_74 (300) = happyShift action_71
action_74 (301) = happyShift action_72
action_74 (303) = happyShift action_73
action_74 (305) = happyShift action_74
action_74 (306) = happyShift action_75
action_74 (313) = happyShift action_76
action_74 (314) = happyShift action_77
action_74 (315) = happyShift action_78
action_74 (316) = happyShift action_79
action_74 (318) = happyShift action_80
action_74 (319) = happyShift action_81
action_74 (320) = happyShift action_82
action_74 (321) = happyShift action_83
action_74 (322) = happyShift action_84
action_74 (323) = happyShift action_85
action_74 (325) = happyShift action_86
action_74 (327) = happyShift action_87
action_74 (332) = happyShift action_88
action_74 (334) = happyShift action_89
action_74 (335) = happyShift action_90
action_74 (337) = happyShift action_91
action_74 (338) = happyShift action_92
action_74 (345) = happyShift action_142
action_74 (346) = happyShift action_94
action_74 (350) = happyShift action_95
action_74 (356) = happyShift action_97
action_74 (363) = happyShift action_98
action_74 (364) = happyShift action_99
action_74 (365) = happyShift action_100
action_74 (140) = happyGoto action_273
action_74 (141) = happyGoto action_15
action_74 (142) = happyGoto action_16
action_74 (143) = happyGoto action_17
action_74 (144) = happyGoto action_18
action_74 (147) = happyGoto action_19
action_74 (148) = happyGoto action_20
action_74 (149) = happyGoto action_21
action_74 (152) = happyGoto action_22
action_74 (153) = happyGoto action_23
action_74 (154) = happyGoto action_24
action_74 (161) = happyGoto action_25
action_74 (195) = happyGoto action_28
action_74 (198) = happyGoto action_29
action_74 (199) = happyGoto action_30
action_74 (201) = happyGoto action_31
action_74 (211) = happyGoto action_32
action_74 (212) = happyGoto action_33
action_74 (213) = happyGoto action_34
action_74 (214) = happyGoto action_35
action_74 (215) = happyGoto action_36
action_74 (216) = happyGoto action_37
action_74 (224) = happyGoto action_38
action_74 _ = happyFail
action_75 (162) = happyGoto action_272
action_75 _ = happyReduce_413
action_76 _ = happyReduce_570
action_77 _ = happyReduce_578
action_78 _ = happyReduce_579
action_79 _ = happyReduce_580
action_80 _ = happyReduce_571
action_81 _ = happyReduce_572
action_82 _ = happyReduce_573
action_83 _ = happyReduce_574
action_84 _ = happyReduce_575
action_85 _ = happyReduce_576
action_86 _ = happyReduce_567
action_87 (234) = happyShift action_39
action_87 (235) = happyShift action_40
action_87 (236) = happyShift action_41
action_87 (237) = happyShift action_42
action_87 (238) = happyShift action_43
action_87 (239) = happyShift action_44
action_87 (245) = happyShift action_45
action_87 (246) = happyShift action_46
action_87 (247) = happyShift action_47
action_87 (248) = happyShift action_48
action_87 (249) = happyShift action_49
action_87 (250) = happyShift action_50
action_87 (251) = happyShift action_51
action_87 (252) = happyShift action_52
action_87 (253) = happyShift action_53
action_87 (254) = happyShift action_54
action_87 (255) = happyShift action_55
action_87 (257) = happyShift action_56
action_87 (265) = happyShift action_57
action_87 (268) = happyShift action_58
action_87 (275) = happyShift action_59
action_87 (280) = happyShift action_60
action_87 (282) = happyShift action_61
action_87 (289) = happyShift action_63
action_87 (292) = happyShift action_64
action_87 (293) = happyShift action_65
action_87 (294) = happyShift action_66
action_87 (295) = happyShift action_67
action_87 (296) = happyShift action_68
action_87 (297) = happyShift action_69
action_87 (299) = happyShift action_70
action_87 (300) = happyShift action_71
action_87 (301) = happyShift action_72
action_87 (303) = happyShift action_73
action_87 (305) = happyShift action_74
action_87 (306) = happyShift action_75
action_87 (313) = happyShift action_76
action_87 (314) = happyShift action_77
action_87 (315) = happyShift action_78
action_87 (316) = happyShift action_79
action_87 (318) = happyShift action_80
action_87 (319) = happyShift action_81
action_87 (320) = happyShift action_82
action_87 (321) = happyShift action_83
action_87 (322) = happyShift action_84
action_87 (323) = happyShift action_85
action_87 (325) = happyShift action_86
action_87 (327) = happyShift action_87
action_87 (332) = happyShift action_88
action_87 (334) = happyShift action_89
action_87 (335) = happyShift action_90
action_87 (337) = happyShift action_91
action_87 (338) = happyShift action_92
action_87 (345) = happyShift action_142
action_87 (346) = happyShift action_94
action_87 (350) = happyShift action_95
action_87 (356) = happyShift action_97
action_87 (363) = happyShift action_98
action_87 (364) = happyShift action_99
action_87 (365) = happyShift action_100
action_87 (140) = happyGoto action_271
action_87 (141) = happyGoto action_15
action_87 (142) = happyGoto action_16
action_87 (143) = happyGoto action_17
action_87 (144) = happyGoto action_18
action_87 (147) = happyGoto action_19
action_87 (148) = happyGoto action_20
action_87 (149) = happyGoto action_21
action_87 (152) = happyGoto action_22
action_87 (153) = happyGoto action_23
action_87 (154) = happyGoto action_24
action_87 (161) = happyGoto action_25
action_87 (195) = happyGoto action_28
action_87 (198) = happyGoto action_29
action_87 (199) = happyGoto action_30
action_87 (201) = happyGoto action_31
action_87 (211) = happyGoto action_32
action_87 (212) = happyGoto action_33
action_87 (213) = happyGoto action_34
action_87 (214) = happyGoto action_35
action_87 (215) = happyGoto action_36
action_87 (216) = happyGoto action_37
action_87 (224) = happyGoto action_38
action_87 _ = happyFail
action_88 (262) = happyShift action_263
action_88 (186) = happyGoto action_270
action_88 (225) = happyGoto action_262
action_88 _ = happyReduce_615
action_89 _ = happyReduce_582
action_90 _ = happyReduce_581
action_91 _ = happyReduce_569
action_92 (234) = happyShift action_39
action_92 (235) = happyShift action_40
action_92 (236) = happyShift action_41
action_92 (237) = happyShift action_42
action_92 (238) = happyShift action_43
action_92 (239) = happyShift action_44
action_92 (245) = happyShift action_45
action_92 (246) = happyShift action_46
action_92 (247) = happyShift action_47
action_92 (248) = happyShift action_48
action_92 (249) = happyShift action_49
action_92 (250) = happyShift action_50
action_92 (251) = happyShift action_51
action_92 (252) = happyShift action_52
action_92 (253) = happyShift action_53
action_92 (254) = happyShift action_54
action_92 (255) = happyShift action_55
action_92 (257) = happyShift action_56
action_92 (265) = happyShift action_57
action_92 (268) = happyShift action_58
action_92 (275) = happyShift action_59
action_92 (280) = happyShift action_60
action_92 (282) = happyShift action_61
action_92 (289) = happyShift action_63
action_92 (292) = happyShift action_64
action_92 (293) = happyShift action_65
action_92 (294) = happyShift action_66
action_92 (295) = happyShift action_67
action_92 (296) = happyShift action_68
action_92 (297) = happyShift action_69
action_92 (299) = happyShift action_70
action_92 (300) = happyShift action_71
action_92 (301) = happyShift action_72
action_92 (303) = happyShift action_73
action_92 (305) = happyShift action_74
action_92 (306) = happyShift action_75
action_92 (313) = happyShift action_76
action_92 (314) = happyShift action_77
action_92 (315) = happyShift action_78
action_92 (316) = happyShift action_79
action_92 (318) = happyShift action_80
action_92 (319) = happyShift action_81
action_92 (320) = happyShift action_82
action_92 (321) = happyShift action_83
action_92 (322) = happyShift action_84
action_92 (323) = happyShift action_85
action_92 (325) = happyShift action_86
action_92 (327) = happyShift action_87
action_92 (332) = happyShift action_88
action_92 (334) = happyShift action_89
action_92 (335) = happyShift action_90
action_92 (337) = happyShift action_91
action_92 (338) = happyShift action_92
action_92 (345) = happyShift action_142
action_92 (346) = happyShift action_94
action_92 (350) = happyShift action_95
action_92 (356) = happyShift action_97
action_92 (363) = happyShift action_98
action_92 (364) = happyShift action_99
action_92 (365) = happyShift action_100
action_92 (140) = happyGoto action_269
action_92 (141) = happyGoto action_15
action_92 (142) = happyGoto action_16
action_92 (143) = happyGoto action_17
action_92 (144) = happyGoto action_18
action_92 (147) = happyGoto action_19
action_92 (148) = happyGoto action_20
action_92 (149) = happyGoto action_21
action_92 (152) = happyGoto action_22
action_92 (153) = happyGoto action_23
action_92 (154) = happyGoto action_24
action_92 (161) = happyGoto action_25
action_92 (195) = happyGoto action_28
action_92 (198) = happyGoto action_29
action_92 (199) = happyGoto action_30
action_92 (201) = happyGoto action_31
action_92 (211) = happyGoto action_32
action_92 (212) = happyGoto action_33
action_92 (213) = happyGoto action_34
action_92 (214) = happyGoto action_35
action_92 (215) = happyGoto action_36
action_92 (216) = happyGoto action_37
action_92 (224) = happyGoto action_38
action_92 _ = happyFail
action_93 (262) = happyShift action_195
action_93 (56) = happyGoto action_192
action_93 (61) = happyGoto action_268
action_93 (225) = happyGoto action_194
action_93 _ = happyReduce_615
action_94 (262) = happyShift action_263
action_94 (186) = happyGoto action_267
action_94 (225) = happyGoto action_262
action_94 _ = happyReduce_615
action_95 (234) = happyShift action_39
action_95 (235) = happyShift action_40
action_95 (236) = happyShift action_41
action_95 (237) = happyShift action_42
action_95 (238) = happyShift action_43
action_95 (239) = happyShift action_44
action_95 (245) = happyShift action_45
action_95 (246) = happyShift action_46
action_95 (247) = happyShift action_47
action_95 (248) = happyShift action_48
action_95 (249) = happyShift action_49
action_95 (250) = happyShift action_50
action_95 (251) = happyShift action_51
action_95 (252) = happyShift action_52
action_95 (253) = happyShift action_53
action_95 (254) = happyShift action_54
action_95 (255) = happyShift action_55
action_95 (257) = happyShift action_56
action_95 (265) = happyShift action_57
action_95 (268) = happyShift action_58
action_95 (280) = happyShift action_60
action_95 (283) = happyShift action_266
action_95 (289) = happyShift action_63
action_95 (292) = happyShift action_64
action_95 (293) = happyShift action_65
action_95 (294) = happyShift action_66
action_95 (295) = happyShift action_67
action_95 (296) = happyShift action_68
action_95 (297) = happyShift action_69
action_95 (299) = happyShift action_70
action_95 (300) = happyShift action_71
action_95 (301) = happyShift action_72
action_95 (303) = happyShift action_73
action_95 (305) = happyShift action_74
action_95 (306) = happyShift action_75
action_95 (313) = happyShift action_76
action_95 (314) = happyShift action_77
action_95 (315) = happyShift action_78
action_95 (316) = happyShift action_79
action_95 (318) = happyShift action_80
action_95 (319) = happyShift action_81
action_95 (320) = happyShift action_82
action_95 (321) = happyShift action_83
action_95 (322) = happyShift action_84
action_95 (323) = happyShift action_85
action_95 (325) = happyShift action_86
action_95 (334) = happyShift action_89
action_95 (335) = happyShift action_90
action_95 (337) = happyShift action_91
action_95 (356) = happyShift action_97
action_95 (151) = happyGoto action_264
action_95 (152) = happyGoto action_265
action_95 (153) = happyGoto action_23
action_95 (154) = happyGoto action_24
action_95 (161) = happyGoto action_25
action_95 (195) = happyGoto action_28
action_95 (198) = happyGoto action_29
action_95 (199) = happyGoto action_30
action_95 (201) = happyGoto action_31
action_95 (211) = happyGoto action_32
action_95 (212) = happyGoto action_33
action_95 (213) = happyGoto action_34
action_95 (214) = happyGoto action_35
action_95 (215) = happyGoto action_36
action_95 (216) = happyGoto action_37
action_95 (224) = happyGoto action_38
action_95 _ = happyFail
action_96 (262) = happyShift action_263
action_96 (186) = happyGoto action_261
action_96 (225) = happyGoto action_262
action_96 _ = happyReduce_615
action_97 _ = happyReduce_568
action_98 (248) = happyShift action_260
action_98 _ = happyFail
action_99 (248) = happyShift action_259
action_99 _ = happyFail
action_100 (248) = happyShift action_258
action_100 _ = happyFail
action_101 _ = happyReduce_190
action_102 _ = happyReduce_216
action_103 (234) = happyShift action_39
action_103 (238) = happyShift action_43
action_103 (239) = happyShift action_44
action_103 (241) = happyShift action_253
action_103 (242) = happyShift action_215
action_103 (244) = happyShift action_217
action_103 (255) = happyShift action_115
action_103 (257) = happyShift action_116
action_103 (265) = happyShift action_117
action_103 (269) = happyShift action_254
action_103 (272) = happyShift action_221
action_103 (278) = happyShift action_255
action_103 (280) = happyShift action_256
action_103 (281) = happyShift action_257
action_103 (313) = happyShift action_76
action_103 (314) = happyShift action_118
action_103 (315) = happyShift action_119
action_103 (316) = happyShift action_120
action_103 (318) = happyShift action_80
action_103 (319) = happyShift action_81
action_103 (320) = happyShift action_82
action_103 (321) = happyShift action_83
action_103 (322) = happyShift action_84
action_103 (323) = happyShift action_85
action_103 (325) = happyShift action_86
action_103 (337) = happyShift action_91
action_103 (356) = happyShift action_97
action_103 (84) = happyGoto action_248
action_103 (85) = happyGoto action_105
action_103 (86) = happyGoto action_106
action_103 (87) = happyGoto action_249
action_103 (206) = happyGoto action_250
action_103 (210) = happyGoto action_208
action_103 (212) = happyGoto action_111
action_103 (215) = happyGoto action_112
action_103 (216) = happyGoto action_37
action_103 (217) = happyGoto action_209
action_103 (218) = happyGoto action_210
action_103 (230) = happyGoto action_113
action_103 (231) = happyGoto action_114
action_103 (232) = happyGoto action_251
action_103 (233) = happyGoto action_252
action_103 _ = happyReduce_183
action_104 _ = happyReduce_193
action_105 _ = happyReduce_195
action_106 _ = happyReduce_202
action_107 (373) = happyAccept
action_107 _ = happyFail
action_108 _ = happyReduce_213
action_109 (234) = happyShift action_39
action_109 (236) = happyShift action_41
action_109 (237) = happyShift action_42
action_109 (238) = happyShift action_43
action_109 (239) = happyShift action_44
action_109 (255) = happyShift action_115
action_109 (257) = happyShift action_116
action_109 (265) = happyShift action_117
action_109 (313) = happyShift action_76
action_109 (314) = happyShift action_118
action_109 (315) = happyShift action_119
action_109 (316) = happyShift action_120
action_109 (318) = happyShift action_80
action_109 (319) = happyShift action_81
action_109 (320) = happyShift action_82
action_109 (321) = happyShift action_83
action_109 (322) = happyShift action_84
action_109 (323) = happyShift action_85
action_109 (325) = happyShift action_86
action_109 (335) = happyShift action_121
action_109 (337) = happyShift action_91
action_109 (356) = happyShift action_97
action_109 (78) = happyGoto action_101
action_109 (80) = happyGoto action_102
action_109 (82) = happyGoto action_103
action_109 (84) = happyGoto action_104
action_109 (85) = happyGoto action_105
action_109 (86) = happyGoto action_106
action_109 (89) = happyGoto action_247
action_109 (90) = happyGoto action_109
action_109 (199) = happyGoto action_110
action_109 (212) = happyGoto action_111
action_109 (214) = happyGoto action_35
action_109 (215) = happyGoto action_112
action_109 (216) = happyGoto action_37
action_109 (230) = happyGoto action_113
action_109 (231) = happyGoto action_114
action_109 _ = happyFail
action_110 (273) = happyShift action_246
action_110 _ = happyFail
action_111 _ = happyReduce_623
action_112 _ = happyReduce_209
action_113 _ = happyReduce_196
action_114 _ = happyReduce_622
action_115 (234) = happyShift action_39
action_115 (236) = happyShift action_41
action_115 (237) = happyShift action_42
action_115 (238) = happyShift action_43
action_115 (239) = happyShift action_44
action_115 (241) = happyShift action_214
action_115 (242) = happyShift action_215
action_115 (243) = happyShift action_216
action_115 (244) = happyShift action_217
action_115 (255) = happyShift action_115
action_115 (256) = happyShift action_244
action_115 (257) = happyShift action_116
action_115 (265) = happyShift action_117
action_115 (267) = happyShift action_237
action_115 (270) = happyShift action_220
action_115 (272) = happyShift action_221
action_115 (278) = happyShift action_245
action_115 (282) = happyShift action_223
action_115 (283) = happyShift action_224
action_115 (284) = happyShift action_225
action_115 (313) = happyShift action_76
action_115 (314) = happyShift action_118
action_115 (315) = happyShift action_119
action_115 (316) = happyShift action_120
action_115 (318) = happyShift action_80
action_115 (319) = happyShift action_81
action_115 (320) = happyShift action_82
action_115 (321) = happyShift action_83
action_115 (322) = happyShift action_84
action_115 (323) = happyShift action_85
action_115 (325) = happyShift action_86
action_115 (335) = happyShift action_121
action_115 (337) = happyShift action_91
action_115 (356) = happyShift action_97
action_115 (78) = happyGoto action_101
action_115 (80) = happyGoto action_102
action_115 (82) = happyGoto action_103
action_115 (84) = happyGoto action_104
action_115 (85) = happyGoto action_105
action_115 (86) = happyGoto action_106
action_115 (89) = happyGoto action_238
action_115 (90) = happyGoto action_109
action_115 (91) = happyGoto action_239
action_115 (92) = happyGoto action_240
action_115 (155) = happyGoto action_241
action_115 (199) = happyGoto action_110
action_115 (210) = happyGoto action_242
action_115 (212) = happyGoto action_111
action_115 (214) = happyGoto action_35
action_115 (215) = happyGoto action_112
action_115 (216) = happyGoto action_37
action_115 (217) = happyGoto action_209
action_115 (218) = happyGoto action_210
action_115 (219) = happyGoto action_243
action_115 (221) = happyGoto action_212
action_115 (223) = happyGoto action_213
action_115 (230) = happyGoto action_113
action_115 (231) = happyGoto action_114
action_115 _ = happyFail
action_116 (234) = happyShift action_39
action_116 (236) = happyShift action_41
action_116 (237) = happyShift action_42
action_116 (238) = happyShift action_43
action_116 (239) = happyShift action_44
action_116 (255) = happyShift action_115
action_116 (257) = happyShift action_116
action_116 (258) = happyShift action_236
action_116 (265) = happyShift action_117
action_116 (267) = happyShift action_237
action_116 (313) = happyShift action_76
action_116 (314) = happyShift action_118
action_116 (315) = happyShift action_119
action_116 (316) = happyShift action_120
action_116 (318) = happyShift action_80
action_116 (319) = happyShift action_81
action_116 (320) = happyShift action_82
action_116 (321) = happyShift action_83
action_116 (322) = happyShift action_84
action_116 (323) = happyShift action_85
action_116 (325) = happyShift action_86
action_116 (335) = happyShift action_121
action_116 (337) = happyShift action_91
action_116 (356) = happyShift action_97
action_116 (78) = happyGoto action_101
action_116 (80) = happyGoto action_102
action_116 (82) = happyGoto action_103
action_116 (84) = happyGoto action_104
action_116 (85) = happyGoto action_105
action_116 (86) = happyGoto action_106
action_116 (89) = happyGoto action_233
action_116 (90) = happyGoto action_109
action_116 (92) = happyGoto action_234
action_116 (155) = happyGoto action_235
action_116 (199) = happyGoto action_110
action_116 (212) = happyGoto action_111
action_116 (214) = happyGoto action_35
action_116 (215) = happyGoto action_112
action_116 (216) = happyGoto action_37
action_116 (230) = happyGoto action_113
action_116 (231) = happyGoto action_114
action_116 _ = happyFail
action_117 (234) = happyShift action_39
action_117 (236) = happyShift action_41
action_117 (237) = happyShift action_42
action_117 (238) = happyShift action_43
action_117 (239) = happyShift action_44
action_117 (255) = happyShift action_115
action_117 (257) = happyShift action_116
action_117 (265) = happyShift action_117
action_117 (266) = happyShift action_232
action_117 (313) = happyShift action_76
action_117 (314) = happyShift action_118
action_117 (315) = happyShift action_119
action_117 (316) = happyShift action_120
action_117 (318) = happyShift action_80
action_117 (319) = happyShift action_81
action_117 (320) = happyShift action_82
action_117 (321) = happyShift action_83
action_117 (322) = happyShift action_84
action_117 (323) = happyShift action_85
action_117 (325) = happyShift action_86
action_117 (337) = happyShift action_91
action_117 (356) = happyShift action_97
action_117 (78) = happyGoto action_101
action_117 (80) = happyGoto action_231
action_117 (82) = happyGoto action_189
action_117 (84) = happyGoto action_104
action_117 (85) = happyGoto action_105
action_117 (86) = happyGoto action_106
action_117 (199) = happyGoto action_110
action_117 (212) = happyGoto action_111
action_117 (214) = happyGoto action_35
action_117 (215) = happyGoto action_112
action_117 (216) = happyGoto action_37
action_117 (230) = happyGoto action_113
action_117 (231) = happyGoto action_114
action_117 _ = happyFail
action_118 _ = happyReduce_624
action_119 _ = happyReduce_625
action_120 _ = happyReduce_626
action_121 (93) = happyGoto action_230
action_121 _ = happyReduce_223
action_122 _ = happyReduce_122
action_123 (245) = happyShift action_229
action_123 (45) = happyGoto action_228
action_123 _ = happyReduce_82
action_124 (373) = happyAccept
action_124 _ = happyFail
action_125 (234) = happyShift action_39
action_125 (236) = happyShift action_41
action_125 (237) = happyShift action_42
action_125 (238) = happyShift action_43
action_125 (239) = happyShift action_44
action_125 (255) = happyShift action_115
action_125 (257) = happyShift action_116
action_125 (265) = happyShift action_117
action_125 (313) = happyShift action_76
action_125 (314) = happyShift action_118
action_125 (315) = happyShift action_119
action_125 (316) = happyShift action_120
action_125 (318) = happyShift action_80
action_125 (319) = happyShift action_81
action_125 (320) = happyShift action_82
action_125 (321) = happyShift action_83
action_125 (322) = happyShift action_84
action_125 (323) = happyShift action_85
action_125 (325) = happyShift action_86
action_125 (335) = happyShift action_121
action_125 (337) = happyShift action_91
action_125 (344) = happyShift action_227
action_125 (356) = happyShift action_97
action_125 (78) = happyGoto action_101
action_125 (80) = happyGoto action_102
action_125 (82) = happyGoto action_103
action_125 (84) = happyGoto action_104
action_125 (85) = happyGoto action_105
action_125 (86) = happyGoto action_106
action_125 (89) = happyGoto action_226
action_125 (90) = happyGoto action_109
action_125 (199) = happyGoto action_110
action_125 (212) = happyGoto action_111
action_125 (214) = happyGoto action_35
action_125 (215) = happyGoto action_112
action_125 (216) = happyGoto action_37
action_125 (230) = happyGoto action_113
action_125 (231) = happyGoto action_114
action_125 _ = happyFail
action_126 _ = happyReduce_111
action_127 _ = happyReduce_121
action_128 _ = happyReduce_128
action_129 _ = happyReduce_123
action_130 _ = happyReduce_104
action_131 (241) = happyShift action_214
action_131 (242) = happyShift action_215
action_131 (243) = happyShift action_216
action_131 (244) = happyShift action_217
action_131 (267) = happyShift action_218
action_131 (269) = happyShift action_219
action_131 (270) = happyShift action_220
action_131 (272) = happyShift action_221
action_131 (273) = happyShift action_222
action_131 (274) = happyReduce_313
action_131 (276) = happyReduce_313
action_131 (282) = happyShift action_223
action_131 (283) = happyShift action_224
action_131 (284) = happyShift action_225
action_131 (135) = happyGoto action_204
action_131 (203) = happyGoto action_205
action_131 (206) = happyGoto action_206
action_131 (208) = happyGoto action_207
action_131 (210) = happyGoto action_208
action_131 (217) = happyGoto action_209
action_131 (218) = happyGoto action_210
action_131 (219) = happyGoto action_211
action_131 (221) = happyGoto action_212
action_131 (223) = happyGoto action_213
action_131 _ = happyReduce_328
action_132 (234) = happyShift action_39
action_132 (235) = happyShift action_40
action_132 (236) = happyShift action_41
action_132 (237) = happyShift action_42
action_132 (238) = happyShift action_43
action_132 (239) = happyShift action_44
action_132 (245) = happyShift action_45
action_132 (246) = happyShift action_46
action_132 (247) = happyShift action_47
action_132 (248) = happyShift action_48
action_132 (249) = happyShift action_49
action_132 (250) = happyShift action_50
action_132 (251) = happyShift action_51
action_132 (252) = happyShift action_52
action_132 (253) = happyShift action_53
action_132 (254) = happyShift action_54
action_132 (255) = happyShift action_55
action_132 (257) = happyShift action_56
action_132 (265) = happyShift action_57
action_132 (268) = happyShift action_58
action_132 (280) = happyShift action_60
action_132 (289) = happyShift action_63
action_132 (292) = happyShift action_64
action_132 (293) = happyShift action_65
action_132 (294) = happyShift action_66
action_132 (295) = happyShift action_67
action_132 (296) = happyShift action_68
action_132 (297) = happyShift action_69
action_132 (299) = happyShift action_70
action_132 (300) = happyShift action_71
action_132 (301) = happyShift action_72
action_132 (303) = happyShift action_73
action_132 (305) = happyShift action_74
action_132 (306) = happyShift action_75
action_132 (313) = happyShift action_76
action_132 (314) = happyShift action_77
action_132 (315) = happyShift action_78
action_132 (316) = happyShift action_79
action_132 (318) = happyShift action_80
action_132 (319) = happyShift action_81
action_132 (320) = happyShift action_82
action_132 (321) = happyShift action_83
action_132 (322) = happyShift action_84
action_132 (323) = happyShift action_85
action_132 (325) = happyShift action_86
action_132 (334) = happyShift action_89
action_132 (335) = happyShift action_90
action_132 (337) = happyShift action_91
action_132 (356) = happyShift action_97
action_132 (152) = happyGoto action_203
action_132 (153) = happyGoto action_23
action_132 (154) = happyGoto action_24
action_132 (161) = happyGoto action_25
action_132 (195) = happyGoto action_28
action_132 (198) = happyGoto action_29
action_132 (199) = happyGoto action_30
action_132 (201) = happyGoto action_31
action_132 (211) = happyGoto action_32
action_132 (212) = happyGoto action_33
action_132 (213) = happyGoto action_34
action_132 (214) = happyGoto action_35
action_132 (215) = happyGoto action_36
action_132 (216) = happyGoto action_37
action_132 (224) = happyGoto action_38
action_132 _ = happyFail
action_133 (313) = happyShift action_201
action_133 (339) = happyShift action_202
action_133 _ = happyFail
action_134 (234) = happyShift action_39
action_134 (236) = happyShift action_41
action_134 (237) = happyShift action_42
action_134 (238) = happyShift action_43
action_134 (239) = happyShift action_44
action_134 (255) = happyShift action_115
action_134 (257) = happyShift action_116
action_134 (265) = happyShift action_117
action_134 (313) = happyShift action_76
action_134 (314) = happyShift action_118
action_134 (315) = happyShift action_119
action_134 (316) = happyShift action_120
action_134 (318) = happyShift action_80
action_134 (319) = happyShift action_81
action_134 (320) = happyShift action_82
action_134 (321) = happyShift action_83
action_134 (322) = happyShift action_84
action_134 (323) = happyShift action_85
action_134 (325) = happyShift action_86
action_134 (335) = happyShift action_121
action_134 (337) = happyShift action_91
action_134 (356) = happyShift action_97
action_134 (78) = happyGoto action_101
action_134 (80) = happyGoto action_102
action_134 (82) = happyGoto action_103
action_134 (84) = happyGoto action_104
action_134 (85) = happyGoto action_105
action_134 (86) = happyGoto action_106
action_134 (89) = happyGoto action_200
action_134 (90) = happyGoto action_109
action_134 (199) = happyGoto action_110
action_134 (212) = happyGoto action_111
action_134 (214) = happyGoto action_35
action_134 (215) = happyGoto action_112
action_134 (216) = happyGoto action_37
action_134 (230) = happyGoto action_113
action_134 (231) = happyGoto action_114
action_134 _ = happyFail
action_135 (334) = happyShift action_199
action_135 _ = happyReduce_112
action_136 (255) = happyShift action_198
action_136 _ = happyFail
action_137 (344) = happyShift action_197
action_137 _ = happyFail
action_138 _ = happyReduce_84
action_139 _ = happyReduce_85
action_140 _ = happyReduce_86
action_141 (234) = happyShift action_39
action_141 (236) = happyShift action_41
action_141 (237) = happyShift action_42
action_141 (238) = happyShift action_43
action_141 (239) = happyShift action_44
action_141 (255) = happyShift action_115
action_141 (257) = happyShift action_116
action_141 (265) = happyShift action_117
action_141 (313) = happyShift action_76
action_141 (314) = happyShift action_118
action_141 (315) = happyShift action_119
action_141 (316) = happyShift action_120
action_141 (318) = happyShift action_80
action_141 (319) = happyShift action_81
action_141 (320) = happyShift action_82
action_141 (321) = happyShift action_83
action_141 (322) = happyShift action_84
action_141 (323) = happyShift action_85
action_141 (325) = happyShift action_86
action_141 (335) = happyShift action_121
action_141 (337) = happyShift action_91
action_141 (356) = happyShift action_97
action_141 (78) = happyGoto action_101
action_141 (80) = happyGoto action_102
action_141 (82) = happyGoto action_103
action_141 (84) = happyGoto action_104
action_141 (85) = happyGoto action_105
action_141 (86) = happyGoto action_106
action_141 (89) = happyGoto action_196
action_141 (90) = happyGoto action_109
action_141 (199) = happyGoto action_110
action_141 (212) = happyGoto action_111
action_141 (214) = happyGoto action_35
action_141 (215) = happyGoto action_112
action_141 (216) = happyGoto action_37
action_141 (230) = happyGoto action_113
action_141 (231) = happyGoto action_114
action_141 _ = happyFail
action_142 (262) = happyShift action_195
action_142 (56) = happyGoto action_192
action_142 (61) = happyGoto action_193
action_142 (225) = happyGoto action_194
action_142 _ = happyReduce_615
action_143 _ = happyReduce_113
action_144 (234) = happyShift action_39
action_144 (238) = happyShift action_43
action_144 (239) = happyShift action_44
action_144 (255) = happyShift action_115
action_144 (257) = happyShift action_116
action_144 (265) = happyShift action_117
action_144 (313) = happyShift action_76
action_144 (314) = happyShift action_118
action_144 (315) = happyShift action_119
action_144 (316) = happyShift action_120
action_144 (318) = happyShift action_80
action_144 (319) = happyShift action_81
action_144 (320) = happyShift action_82
action_144 (321) = happyShift action_83
action_144 (322) = happyShift action_84
action_144 (323) = happyShift action_85
action_144 (325) = happyShift action_86
action_144 (334) = happyShift action_190
action_144 (337) = happyShift action_91
action_144 (344) = happyShift action_191
action_144 (356) = happyShift action_97
action_144 (78) = happyGoto action_188
action_144 (82) = happyGoto action_189
action_144 (84) = happyGoto action_104
action_144 (85) = happyGoto action_105
action_144 (86) = happyGoto action_106
action_144 (212) = happyGoto action_111
action_144 (215) = happyGoto action_112
action_144 (216) = happyGoto action_37
action_144 (230) = happyGoto action_113
action_144 (231) = happyGoto action_114
action_144 _ = happyFail
action_145 (265) = happyShift action_183
action_145 (68) = happyGoto action_187
action_145 _ = happyReduce_161
action_146 (265) = happyShift action_183
action_146 (68) = happyGoto action_186
action_146 _ = happyReduce_161
action_147 (265) = happyShift action_183
action_147 (344) = happyShift action_185
action_147 (68) = happyGoto action_184
action_147 _ = happyReduce_161
action_148 (265) = happyShift action_183
action_148 (68) = happyGoto action_182
action_148 _ = happyReduce_161
action_149 (248) = happyShift action_181
action_149 (66) = happyGoto action_179
action_149 (67) = happyGoto action_180
action_149 _ = happyReduce_159
action_150 (234) = happyShift action_39
action_150 (238) = happyShift action_43
action_150 (255) = happyShift action_171
action_150 (313) = happyShift action_76
action_150 (314) = happyShift action_77
action_150 (315) = happyShift action_78
action_150 (316) = happyShift action_79
action_150 (318) = happyShift action_80
action_150 (319) = happyShift action_81
action_150 (320) = happyShift action_82
action_150 (321) = happyShift action_83
action_150 (322) = happyShift action_84
action_150 (323) = happyShift action_85
action_150 (325) = happyShift action_86
action_150 (334) = happyShift action_89
action_150 (335) = happyShift action_90
action_150 (337) = happyShift action_91
action_150 (356) = happyShift action_97
action_150 (72) = happyGoto action_178
action_150 (73) = happyGoto action_175
action_150 (74) = happyGoto action_176
action_150 (75) = happyGoto action_177
action_150 (196) = happyGoto action_167
action_150 (200) = happyGoto action_168
action_150 (212) = happyGoto action_33
action_150 (213) = happyGoto action_169
action_150 (216) = happyGoto action_170
action_150 _ = happyReduce_173
action_151 (234) = happyShift action_39
action_151 (238) = happyShift action_43
action_151 (255) = happyShift action_171
action_151 (313) = happyShift action_76
action_151 (314) = happyShift action_77
action_151 (315) = happyShift action_78
action_151 (316) = happyShift action_79
action_151 (318) = happyShift action_80
action_151 (319) = happyShift action_81
action_151 (320) = happyShift action_82
action_151 (321) = happyShift action_83
action_151 (322) = happyShift action_84
action_151 (323) = happyShift action_85
action_151 (325) = happyShift action_86
action_151 (334) = happyShift action_89
action_151 (335) = happyShift action_90
action_151 (337) = happyShift action_91
action_151 (356) = happyShift action_97
action_151 (72) = happyGoto action_174
action_151 (73) = happyGoto action_175
action_151 (74) = happyGoto action_176
action_151 (75) = happyGoto action_177
action_151 (196) = happyGoto action_167
action_151 (200) = happyGoto action_168
action_151 (212) = happyGoto action_33
action_151 (213) = happyGoto action_169
action_151 (216) = happyGoto action_170
action_151 _ = happyReduce_173
action_152 (234) = happyShift action_39
action_152 (238) = happyShift action_43
action_152 (255) = happyShift action_171
action_152 (313) = happyShift action_76
action_152 (314) = happyShift action_77
action_152 (315) = happyShift action_78
action_152 (316) = happyShift action_79
action_152 (318) = happyShift action_80
action_152 (319) = happyShift action_81
action_152 (320) = happyShift action_82
action_152 (321) = happyShift action_83
action_152 (322) = happyShift action_84
action_152 (323) = happyShift action_85
action_152 (325) = happyShift action_86
action_152 (334) = happyShift action_89
action_152 (335) = happyShift action_90
action_152 (337) = happyShift action_91
action_152 (347) = happyShift action_172
action_152 (353) = happyShift action_173
action_152 (356) = happyShift action_97
action_152 (75) = happyGoto action_165
action_152 (76) = happyGoto action_166
action_152 (196) = happyGoto action_167
action_152 (200) = happyGoto action_168
action_152 (212) = happyGoto action_33
action_152 (213) = happyGoto action_169
action_152 (216) = happyGoto action_170
action_152 _ = happyFail
action_153 _ = happyReduce_507
action_154 (373) = happyAccept
action_154 _ = happyFail
action_155 (373) = happyAccept
action_155 _ = happyFail
action_156 _ = happyReduce_319
action_157 (373) = happyAccept
action_157 _ = happyFail
action_158 (303) = happyShift action_162
action_158 (305) = happyShift action_163
action_158 (347) = happyShift action_164
action_158 (14) = happyGoto action_159
action_158 (19) = happyGoto action_160
action_158 (20) = happyGoto action_161
action_158 _ = happyReduce_26
action_159 _ = happyReduce_11
action_160 _ = happyReduce_13
action_161 (262) = happyShift action_583
action_161 (22) = happyGoto action_581
action_161 (225) = happyGoto action_582
action_161 _ = happyReduce_615
action_162 (234) = happyShift action_277
action_162 (238) = happyShift action_278
action_162 (240) = happyShift action_279
action_162 (312) = happyShift action_280
action_162 (313) = happyShift action_281
action_162 (314) = happyShift action_282
action_162 (315) = happyShift action_283
action_162 (316) = happyShift action_284
action_162 (318) = happyShift action_285
action_162 (319) = happyShift action_286
action_162 (320) = happyShift action_287
action_162 (321) = happyShift action_288
action_162 (322) = happyShift action_289
action_162 (323) = happyShift action_290
action_162 (325) = happyShift action_291
action_162 (326) = happyShift action_292
action_162 (327) = happyShift action_293
action_162 (328) = happyShift action_294
action_162 (329) = happyShift action_295
action_162 (330) = happyShift action_296
action_162 (331) = happyShift action_297
action_162 (332) = happyShift action_298
action_162 (333) = happyShift action_299
action_162 (334) = happyShift action_300
action_162 (335) = happyShift action_301
action_162 (336) = happyShift action_302
action_162 (337) = happyShift action_303
action_162 (338) = happyShift action_304
action_162 (339) = happyShift action_305
action_162 (340) = happyShift action_306
action_162 (341) = happyShift action_307
action_162 (342) = happyShift action_308
action_162 (343) = happyShift action_309
action_162 (344) = happyShift action_310
action_162 (345) = happyShift action_311
action_162 (346) = happyShift action_312
action_162 (347) = happyShift action_313
action_162 (348) = happyShift action_314
action_162 (349) = happyShift action_315
action_162 (350) = happyShift action_316
action_162 (351) = happyShift action_317
action_162 (352) = happyShift action_318
action_162 (353) = happyShift action_319
action_162 (354) = happyShift action_320
action_162 (355) = happyShift action_321
action_162 (356) = happyShift action_322
action_162 (164) = happyGoto action_580
action_162 (165) = happyGoto action_275
action_162 (166) = happyGoto action_276
action_162 _ = happyFail
action_163 (347) = happyShift action_164
action_163 (19) = happyGoto action_579
action_163 (20) = happyGoto action_161
action_163 _ = happyReduce_26
action_164 (238) = happyShift action_577
action_164 (239) = happyShift action_578
action_164 (227) = happyGoto action_576
action_164 _ = happyFail
action_165 (234) = happyShift action_39
action_165 (235) = happyShift action_40
action_165 (236) = happyShift action_41
action_165 (237) = happyShift action_42
action_165 (238) = happyShift action_43
action_165 (239) = happyShift action_44
action_165 (245) = happyShift action_45
action_165 (246) = happyShift action_46
action_165 (247) = happyShift action_47
action_165 (248) = happyShift action_48
action_165 (249) = happyShift action_49
action_165 (250) = happyShift action_50
action_165 (251) = happyShift action_51
action_165 (252) = happyShift action_52
action_165 (253) = happyShift action_53
action_165 (254) = happyShift action_54
action_165 (255) = happyShift action_55
action_165 (257) = happyShift action_56
action_165 (265) = happyShift action_57
action_165 (268) = happyShift action_58
action_165 (280) = happyShift action_60
action_165 (289) = happyShift action_63
action_165 (292) = happyShift action_64
action_165 (293) = happyShift action_65
action_165 (294) = happyShift action_66
action_165 (295) = happyShift action_67
action_165 (296) = happyShift action_68
action_165 (297) = happyShift action_69
action_165 (299) = happyShift action_70
action_165 (300) = happyShift action_71
action_165 (301) = happyShift action_72
action_165 (303) = happyShift action_73
action_165 (305) = happyShift action_74
action_165 (306) = happyShift action_75
action_165 (313) = happyShift action_76
action_165 (314) = happyShift action_77
action_165 (315) = happyShift action_78
action_165 (316) = happyShift action_79
action_165 (318) = happyShift action_80
action_165 (319) = happyShift action_81
action_165 (320) = happyShift action_82
action_165 (321) = happyShift action_83
action_165 (322) = happyShift action_84
action_165 (323) = happyShift action_85
action_165 (325) = happyShift action_86
action_165 (334) = happyShift action_89
action_165 (335) = happyShift action_90
action_165 (337) = happyShift action_91
action_165 (356) = happyShift action_97
action_165 (152) = happyGoto action_575
action_165 (153) = happyGoto action_23
action_165 (154) = happyGoto action_24
action_165 (161) = happyGoto action_25
action_165 (195) = happyGoto action_28
action_165 (198) = happyGoto action_29
action_165 (199) = happyGoto action_30
action_165 (201) = happyGoto action_31
action_165 (211) = happyGoto action_32
action_165 (212) = happyGoto action_33
action_165 (213) = happyGoto action_34
action_165 (214) = happyGoto action_35
action_165 (215) = happyGoto action_36
action_165 (216) = happyGoto action_37
action_165 (224) = happyGoto action_38
action_165 _ = happyFail
action_166 (372) = happyShift action_574
action_166 _ = happyFail
action_167 _ = happyReduce_178
action_168 _ = happyReduce_177
action_169 _ = happyReduce_535
action_170 _ = happyReduce_542
action_171 (241) = happyShift action_214
action_171 (242) = happyShift action_215
action_171 (270) = happyShift action_220
action_171 (282) = happyShift action_223
action_171 (283) = happyShift action_224
action_171 (284) = happyShift action_225
action_171 (218) = happyGoto action_572
action_171 (221) = happyGoto action_573
action_171 _ = happyFail
action_172 (234) = happyShift action_39
action_172 (235) = happyShift action_40
action_172 (236) = happyShift action_41
action_172 (237) = happyShift action_42
action_172 (238) = happyShift action_43
action_172 (239) = happyShift action_44
action_172 (245) = happyShift action_45
action_172 (246) = happyShift action_46
action_172 (247) = happyShift action_47
action_172 (248) = happyShift action_48
action_172 (249) = happyShift action_49
action_172 (250) = happyShift action_50
action_172 (251) = happyShift action_51
action_172 (252) = happyShift action_52
action_172 (253) = happyShift action_53
action_172 (254) = happyShift action_54
action_172 (255) = happyShift action_55
action_172 (257) = happyShift action_56
action_172 (265) = happyShift action_57
action_172 (268) = happyShift action_58
action_172 (280) = happyShift action_60
action_172 (289) = happyShift action_63
action_172 (292) = happyShift action_64
action_172 (293) = happyShift action_65
action_172 (294) = happyShift action_66
action_172 (295) = happyShift action_67
action_172 (296) = happyShift action_68
action_172 (297) = happyShift action_69
action_172 (299) = happyShift action_70
action_172 (300) = happyShift action_71
action_172 (301) = happyShift action_72
action_172 (303) = happyShift action_73
action_172 (305) = happyShift action_74
action_172 (306) = happyShift action_75
action_172 (313) = happyShift action_76
action_172 (314) = happyShift action_77
action_172 (315) = happyShift action_78
action_172 (316) = happyShift action_79
action_172 (318) = happyShift action_80
action_172 (319) = happyShift action_81
action_172 (320) = happyShift action_82
action_172 (321) = happyShift action_83
action_172 (322) = happyShift action_84
action_172 (323) = happyShift action_85
action_172 (325) = happyShift action_86
action_172 (334) = happyShift action_89
action_172 (335) = happyShift action_90
action_172 (337) = happyShift action_91
action_172 (356) = happyShift action_97
action_172 (152) = happyGoto action_571
action_172 (153) = happyGoto action_23
action_172 (154) = happyGoto action_24
action_172 (161) = happyGoto action_25
action_172 (195) = happyGoto action_28
action_172 (198) = happyGoto action_29
action_172 (199) = happyGoto action_30
action_172 (201) = happyGoto action_31
action_172 (211) = happyGoto action_32
action_172 (212) = happyGoto action_33
action_172 (213) = happyGoto action_34
action_172 (214) = happyGoto action_35
action_172 (215) = happyGoto action_36
action_172 (216) = happyGoto action_37
action_172 (224) = happyGoto action_38
action_172 _ = happyFail
action_173 (238) = happyShift action_43
action_173 (216) = happyGoto action_570
action_173 _ = happyFail
action_174 (261) = happyShift action_565
action_174 (372) = happyShift action_569
action_174 _ = happyFail
action_175 _ = happyReduce_172
action_176 (248) = happyShift action_568
action_176 _ = happyFail
action_177 (267) = happyShift action_567
action_177 _ = happyReduce_175
action_178 (261) = happyShift action_565
action_178 (372) = happyShift action_566
action_178 _ = happyFail
action_179 (261) = happyShift action_563
action_179 (372) = happyShift action_564
action_179 _ = happyFail
action_180 _ = happyReduce_158
action_181 (265) = happyShift action_183
action_181 (68) = happyGoto action_562
action_181 _ = happyReduce_161
action_182 (234) = happyShift action_39
action_182 (235) = happyShift action_40
action_182 (255) = happyShift action_415
action_182 (313) = happyShift action_76
action_182 (314) = happyShift action_77
action_182 (315) = happyShift action_78
action_182 (316) = happyShift action_79
action_182 (318) = happyShift action_80
action_182 (319) = happyShift action_81
action_182 (320) = happyShift action_82
action_182 (321) = happyShift action_83
action_182 (322) = happyShift action_84
action_182 (323) = happyShift action_85
action_182 (325) = happyShift action_86
action_182 (334) = happyShift action_89
action_182 (335) = happyShift action_90
action_182 (337) = happyShift action_91
action_182 (356) = happyShift action_97
action_182 (198) = happyGoto action_561
action_182 (211) = happyGoto action_32
action_182 (212) = happyGoto action_33
action_182 (213) = happyGoto action_34
action_182 _ = happyFail
action_183 (245) = happyShift action_559
action_183 (280) = happyShift action_560
action_183 _ = happyFail
action_184 (234) = happyShift action_39
action_184 (235) = happyShift action_40
action_184 (255) = happyShift action_415
action_184 (313) = happyShift action_76
action_184 (314) = happyShift action_77
action_184 (315) = happyShift action_78
action_184 (316) = happyShift action_79
action_184 (318) = happyShift action_80
action_184 (319) = happyShift action_81
action_184 (320) = happyShift action_82
action_184 (321) = happyShift action_83
action_184 (322) = happyShift action_84
action_184 (323) = happyShift action_85
action_184 (325) = happyShift action_86
action_184 (334) = happyShift action_89
action_184 (335) = happyShift action_90
action_184 (337) = happyShift action_91
action_184 (356) = happyShift action_97
action_184 (198) = happyGoto action_558
action_184 (211) = happyGoto action_32
action_184 (212) = happyGoto action_33
action_184 (213) = happyGoto action_34
action_184 _ = happyFail
action_185 (234) = happyShift action_39
action_185 (236) = happyShift action_41
action_185 (237) = happyShift action_42
action_185 (238) = happyShift action_43
action_185 (239) = happyShift action_44
action_185 (255) = happyShift action_115
action_185 (257) = happyShift action_116
action_185 (265) = happyShift action_117
action_185 (313) = happyShift action_76
action_185 (314) = happyShift action_118
action_185 (315) = happyShift action_119
action_185 (316) = happyShift action_120
action_185 (318) = happyShift action_80
action_185 (319) = happyShift action_81
action_185 (320) = happyShift action_82
action_185 (321) = happyShift action_83
action_185 (322) = happyShift action_84
action_185 (323) = happyShift action_85
action_185 (325) = happyShift action_86
action_185 (335) = happyShift action_121
action_185 (337) = happyShift action_91
action_185 (356) = happyShift action_97
action_185 (78) = happyGoto action_101
action_185 (80) = happyGoto action_102
action_185 (82) = happyGoto action_103
action_185 (84) = happyGoto action_104
action_185 (85) = happyGoto action_105
action_185 (86) = happyGoto action_106
action_185 (89) = happyGoto action_557
action_185 (90) = happyGoto action_109
action_185 (199) = happyGoto action_110
action_185 (212) = happyGoto action_111
action_185 (214) = happyGoto action_35
action_185 (215) = happyGoto action_112
action_185 (216) = happyGoto action_37
action_185 (230) = happyGoto action_113
action_185 (231) = happyGoto action_114
action_185 _ = happyFail
action_186 (234) = happyShift action_39
action_186 (235) = happyShift action_40
action_186 (255) = happyShift action_415
action_186 (313) = happyShift action_76
action_186 (314) = happyShift action_77
action_186 (315) = happyShift action_78
action_186 (316) = happyShift action_79
action_186 (318) = happyShift action_80
action_186 (319) = happyShift action_81
action_186 (320) = happyShift action_82
action_186 (321) = happyShift action_83
action_186 (322) = happyShift action_84
action_186 (323) = happyShift action_85
action_186 (325) = happyShift action_86
action_186 (334) = happyShift action_89
action_186 (335) = happyShift action_90
action_186 (337) = happyShift action_91
action_186 (356) = happyShift action_97
action_186 (198) = happyGoto action_556
action_186 (211) = happyGoto action_32
action_186 (212) = happyGoto action_33
action_186 (213) = happyGoto action_34
action_186 _ = happyFail
action_187 (234) = happyShift action_39
action_187 (235) = happyShift action_40
action_187 (255) = happyShift action_415
action_187 (313) = happyShift action_76
action_187 (314) = happyShift action_77
action_187 (315) = happyShift action_78
action_187 (316) = happyShift action_79
action_187 (318) = happyShift action_80
action_187 (319) = happyShift action_81
action_187 (320) = happyShift action_82
action_187 (321) = happyShift action_83
action_187 (322) = happyShift action_84
action_187 (323) = happyShift action_85
action_187 (325) = happyShift action_86
action_187 (334) = happyShift action_89
action_187 (335) = happyShift action_90
action_187 (337) = happyShift action_91
action_187 (356) = happyShift action_97
action_187 (198) = happyGoto action_555
action_187 (211) = happyGoto action_32
action_187 (212) = happyGoto action_33
action_187 (213) = happyGoto action_34
action_187 _ = happyFail
action_188 (274) = happyShift action_554
action_188 _ = happyFail
action_189 (234) = happyShift action_39
action_189 (238) = happyShift action_43
action_189 (239) = happyShift action_44
action_189 (241) = happyShift action_253
action_189 (242) = happyShift action_215
action_189 (244) = happyShift action_217
action_189 (255) = happyShift action_115
action_189 (257) = happyShift action_116
action_189 (265) = happyShift action_117
action_189 (269) = happyShift action_254
action_189 (272) = happyShift action_221
action_189 (278) = happyShift action_255
action_189 (280) = happyShift action_553
action_189 (313) = happyShift action_76
action_189 (314) = happyShift action_118
action_189 (315) = happyShift action_119
action_189 (316) = happyShift action_120
action_189 (318) = happyShift action_80
action_189 (319) = happyShift action_81
action_189 (320) = happyShift action_82
action_189 (321) = happyShift action_83
action_189 (322) = happyShift action_84
action_189 (323) = happyShift action_85
action_189 (325) = happyShift action_86
action_189 (337) = happyShift action_91
action_189 (356) = happyShift action_97
action_189 (84) = happyGoto action_248
action_189 (85) = happyGoto action_105
action_189 (86) = happyGoto action_106
action_189 (87) = happyGoto action_249
action_189 (206) = happyGoto action_250
action_189 (210) = happyGoto action_208
action_189 (212) = happyGoto action_111
action_189 (215) = happyGoto action_112
action_189 (216) = happyGoto action_37
action_189 (217) = happyGoto action_209
action_189 (218) = happyGoto action_210
action_189 (230) = happyGoto action_113
action_189 (231) = happyGoto action_114
action_189 (232) = happyGoto action_251
action_189 (233) = happyGoto action_252
action_189 _ = happyReduce_183
action_190 (234) = happyShift action_39
action_190 (236) = happyShift action_41
action_190 (237) = happyShift action_42
action_190 (238) = happyShift action_43
action_190 (239) = happyShift action_44
action_190 (255) = happyShift action_115
action_190 (257) = happyShift action_116
action_190 (265) = happyShift action_117
action_190 (313) = happyShift action_76
action_190 (314) = happyShift action_118
action_190 (315) = happyShift action_119
action_190 (316) = happyShift action_120
action_190 (318) = happyShift action_80
action_190 (319) = happyShift action_81
action_190 (320) = happyShift action_82
action_190 (321) = happyShift action_83
action_190 (322) = happyShift action_84
action_190 (323) = happyShift action_85
action_190 (325) = happyShift action_86
action_190 (337) = happyShift action_91
action_190 (356) = happyShift action_97
action_190 (78) = happyGoto action_101
action_190 (80) = happyGoto action_552
action_190 (82) = happyGoto action_189
action_190 (84) = happyGoto action_104
action_190 (85) = happyGoto action_105
action_190 (86) = happyGoto action_106
action_190 (199) = happyGoto action_110
action_190 (212) = happyGoto action_111
action_190 (214) = happyGoto action_35
action_190 (215) = happyGoto action_112
action_190 (216) = happyGoto action_37
action_190 (230) = happyGoto action_113
action_190 (231) = happyGoto action_114
action_190 _ = happyFail
action_191 (234) = happyShift action_39
action_191 (238) = happyShift action_43
action_191 (239) = happyShift action_44
action_191 (255) = happyShift action_115
action_191 (257) = happyShift action_116
action_191 (265) = happyShift action_117
action_191 (313) = happyShift action_76
action_191 (314) = happyShift action_118
action_191 (315) = happyShift action_119
action_191 (316) = happyShift action_120
action_191 (318) = happyShift action_80
action_191 (319) = happyShift action_81
action_191 (320) = happyShift action_82
action_191 (321) = happyShift action_83
action_191 (322) = happyShift action_84
action_191 (323) = happyShift action_85
action_191 (325) = happyShift action_86
action_191 (337) = happyShift action_91
action_191 (356) = happyShift action_97
action_191 (77) = happyGoto action_550
action_191 (78) = happyGoto action_551
action_191 (82) = happyGoto action_189
action_191 (84) = happyGoto action_104
action_191 (85) = happyGoto action_105
action_191 (86) = happyGoto action_106
action_191 (212) = happyGoto action_111
action_191 (215) = happyGoto action_112
action_191 (216) = happyGoto action_37
action_191 (230) = happyGoto action_113
action_191 (231) = happyGoto action_114
action_191 _ = happyFail
action_192 _ = happyReduce_137
action_193 (340) = happyShift action_472
action_193 _ = happyFail
action_194 (24) = happyGoto action_399
action_194 (25) = happyGoto action_545
action_194 (53) = happyGoto action_548
action_194 (192) = happyGoto action_549
action_194 _ = happyReduce_38
action_195 (24) = happyGoto action_399
action_195 (25) = happyGoto action_545
action_195 (53) = happyGoto action_546
action_195 (192) = happyGoto action_547
action_195 _ = happyReduce_38
action_196 (355) = happyShift action_544
action_196 (128) = happyGoto action_543
action_196 _ = happyReduce_297
action_197 (234) = happyShift action_39
action_197 (236) = happyShift action_41
action_197 (237) = happyShift action_42
action_197 (238) = happyShift action_43
action_197 (239) = happyShift action_44
action_197 (255) = happyShift action_115
action_197 (257) = happyShift action_116
action_197 (265) = happyShift action_117
action_197 (313) = happyShift action_76
action_197 (314) = happyShift action_118
action_197 (315) = happyShift action_119
action_197 (316) = happyShift action_120
action_197 (318) = happyShift action_80
action_197 (319) = happyShift action_81
action_197 (320) = happyShift action_82
action_197 (321) = happyShift action_83
action_197 (322) = happyShift action_84
action_197 (323) = happyShift action_85
action_197 (325) = happyShift action_86
action_197 (335) = happyShift action_121
action_197 (337) = happyShift action_91
action_197 (356) = happyShift action_97
action_197 (78) = happyGoto action_101
action_197 (80) = happyGoto action_102
action_197 (82) = happyGoto action_103
action_197 (84) = happyGoto action_104
action_197 (85) = happyGoto action_105
action_197 (86) = happyGoto action_106
action_197 (89) = happyGoto action_542
action_197 (90) = happyGoto action_109
action_197 (199) = happyGoto action_110
action_197 (212) = happyGoto action_111
action_197 (214) = happyGoto action_35
action_197 (215) = happyGoto action_112
action_197 (216) = happyGoto action_37
action_197 (230) = happyGoto action_113
action_197 (231) = happyGoto action_114
action_197 _ = happyFail
action_198 (234) = happyShift action_39
action_198 (236) = happyShift action_41
action_198 (237) = happyShift action_42
action_198 (238) = happyShift action_43
action_198 (239) = happyShift action_44
action_198 (255) = happyShift action_115
action_198 (257) = happyShift action_116
action_198 (265) = happyShift action_117
action_198 (313) = happyShift action_76
action_198 (314) = happyShift action_118
action_198 (315) = happyShift action_119
action_198 (316) = happyShift action_120
action_198 (318) = happyShift action_80
action_198 (319) = happyShift action_81
action_198 (320) = happyShift action_82
action_198 (321) = happyShift action_83
action_198 (322) = happyShift action_84
action_198 (323) = happyShift action_85
action_198 (325) = happyShift action_86
action_198 (335) = happyShift action_121
action_198 (337) = happyShift action_91
action_198 (356) = happyShift action_97
action_198 (52) = happyGoto action_538
action_198 (78) = happyGoto action_101
action_198 (79) = happyGoto action_539
action_198 (80) = happyGoto action_540
action_198 (82) = happyGoto action_103
action_198 (84) = happyGoto action_104
action_198 (85) = happyGoto action_105
action_198 (86) = happyGoto action_106
action_198 (89) = happyGoto action_233
action_198 (90) = happyGoto action_109
action_198 (91) = happyGoto action_541
action_198 (92) = happyGoto action_240
action_198 (199) = happyGoto action_110
action_198 (212) = happyGoto action_111
action_198 (214) = happyGoto action_35
action_198 (215) = happyGoto action_112
action_198 (216) = happyGoto action_37
action_198 (230) = happyGoto action_113
action_198 (231) = happyGoto action_114
action_198 _ = happyReduce_116
action_199 (234) = happyShift action_39
action_199 (236) = happyShift action_41
action_199 (237) = happyShift action_42
action_199 (238) = happyShift action_43
action_199 (239) = happyShift action_44
action_199 (255) = happyShift action_115
action_199 (257) = happyShift action_116
action_199 (265) = happyShift action_117
action_199 (313) = happyShift action_76
action_199 (314) = happyShift action_118
action_199 (315) = happyShift action_119
action_199 (316) = happyShift action_120
action_199 (318) = happyShift action_80
action_199 (319) = happyShift action_81
action_199 (320) = happyShift action_82
action_199 (321) = happyShift action_83
action_199 (322) = happyShift action_84
action_199 (323) = happyShift action_85
action_199 (325) = happyShift action_86
action_199 (335) = happyShift action_121
action_199 (337) = happyShift action_91
action_199 (356) = happyShift action_97
action_199 (78) = happyGoto action_101
action_199 (80) = happyGoto action_102
action_199 (82) = happyGoto action_103
action_199 (84) = happyGoto action_104
action_199 (85) = happyGoto action_105
action_199 (86) = happyGoto action_106
action_199 (89) = happyGoto action_537
action_199 (90) = happyGoto action_109
action_199 (199) = happyGoto action_110
action_199 (212) = happyGoto action_111
action_199 (214) = happyGoto action_35
action_199 (215) = happyGoto action_112
action_199 (216) = happyGoto action_37
action_199 (230) = happyGoto action_113
action_199 (231) = happyGoto action_114
action_199 _ = happyFail
action_200 (276) = happyShift action_536
action_200 (97) = happyGoto action_535
action_200 _ = happyReduce_229
action_201 (318) = happyShift action_527
action_201 (319) = happyShift action_528
action_201 (320) = happyShift action_529
action_201 (321) = happyShift action_530
action_201 (322) = happyShift action_531
action_201 (323) = happyShift action_532
action_201 (324) = happyShift action_533
action_201 (63) = happyGoto action_534
action_201 _ = happyFail
action_202 (318) = happyShift action_527
action_202 (319) = happyShift action_528
action_202 (320) = happyShift action_529
action_202 (321) = happyShift action_530
action_202 (322) = happyShift action_531
action_202 (323) = happyShift action_532
action_202 (324) = happyShift action_533
action_202 (63) = happyGoto action_526
action_202 _ = happyFail
action_203 (274) = happyShift action_523
action_203 (276) = happyShift action_524
action_203 (136) = happyGoto action_525
action_203 (137) = happyGoto action_521
action_203 (138) = happyGoto action_522
action_203 _ = happyFail
action_204 (274) = happyShift action_523
action_204 (276) = happyShift action_524
action_204 (136) = happyGoto action_520
action_204 (137) = happyGoto action_521
action_204 (138) = happyGoto action_522
action_204 _ = happyFail
action_205 _ = happyReduce_558
action_206 _ = happyReduce_559
action_207 (234) = happyShift action_39
action_207 (235) = happyShift action_40
action_207 (236) = happyShift action_41
action_207 (237) = happyShift action_42
action_207 (238) = happyShift action_43
action_207 (239) = happyShift action_44
action_207 (245) = happyShift action_45
action_207 (246) = happyShift action_46
action_207 (247) = happyShift action_47
action_207 (248) = happyShift action_48
action_207 (249) = happyShift action_49
action_207 (250) = happyShift action_50
action_207 (251) = happyShift action_51
action_207 (252) = happyShift action_52
action_207 (253) = happyShift action_53
action_207 (254) = happyShift action_54
action_207 (255) = happyShift action_55
action_207 (257) = happyShift action_56
action_207 (265) = happyShift action_57
action_207 (268) = happyShift action_58
action_207 (275) = happyShift action_59
action_207 (280) = happyShift action_60
action_207 (282) = happyShift action_61
action_207 (289) = happyShift action_63
action_207 (292) = happyShift action_64
action_207 (293) = happyShift action_65
action_207 (294) = happyShift action_66
action_207 (295) = happyShift action_67
action_207 (296) = happyShift action_68
action_207 (297) = happyShift action_69
action_207 (299) = happyShift action_70
action_207 (300) = happyShift action_71
action_207 (301) = happyShift action_72
action_207 (303) = happyShift action_73
action_207 (305) = happyShift action_74
action_207 (306) = happyShift action_75
action_207 (313) = happyShift action_76
action_207 (314) = happyShift action_77
action_207 (315) = happyShift action_78
action_207 (316) = happyShift action_79
action_207 (318) = happyShift action_80
action_207 (319) = happyShift action_81
action_207 (320) = happyShift action_82
action_207 (321) = happyShift action_83
action_207 (322) = happyShift action_84
action_207 (323) = happyShift action_85
action_207 (325) = happyShift action_86
action_207 (327) = happyShift action_87
action_207 (332) = happyShift action_88
action_207 (334) = happyShift action_89
action_207 (335) = happyShift action_90
action_207 (337) = happyShift action_91
action_207 (338) = happyShift action_92
action_207 (345) = happyShift action_142
action_207 (346) = happyShift action_94
action_207 (350) = happyShift action_95
action_207 (356) = happyShift action_97
action_207 (363) = happyShift action_98
action_207 (364) = happyShift action_99
action_207 (365) = happyShift action_100
action_207 (144) = happyGoto action_410
action_207 (147) = happyGoto action_411
action_207 (148) = happyGoto action_20
action_207 (149) = happyGoto action_21
action_207 (152) = happyGoto action_22
action_207 (153) = happyGoto action_23
action_207 (154) = happyGoto action_24
action_207 (161) = happyGoto action_25
action_207 (195) = happyGoto action_28
action_207 (198) = happyGoto action_29
action_207 (199) = happyGoto action_30
action_207 (201) = happyGoto action_31
action_207 (211) = happyGoto action_32
action_207 (212) = happyGoto action_33
action_207 (213) = happyGoto action_34
action_207 (214) = happyGoto action_35
action_207 (215) = happyGoto action_36
action_207 (216) = happyGoto action_37
action_207 (224) = happyGoto action_38
action_207 _ = happyFail
action_208 _ = happyReduce_554
action_209 _ = happyReduce_563
action_210 _ = happyReduce_588
action_211 _ = happyReduce_548
action_212 _ = happyReduce_591
action_213 _ = happyReduce_592
action_214 _ = happyReduce_595
action_215 _ = happyReduce_590
action_216 _ = happyReduce_604
action_217 _ = happyReduce_589
action_218 (234) = happyShift action_39
action_218 (235) = happyShift action_40
action_218 (255) = happyShift action_415
action_218 (313) = happyShift action_76
action_218 (314) = happyShift action_77
action_218 (315) = happyShift action_78
action_218 (316) = happyShift action_79
action_218 (318) = happyShift action_80
action_218 (319) = happyShift action_81
action_218 (320) = happyShift action_82
action_218 (321) = happyShift action_83
action_218 (322) = happyShift action_84
action_218 (323) = happyShift action_85
action_218 (325) = happyShift action_86
action_218 (334) = happyShift action_89
action_218 (335) = happyShift action_90
action_218 (337) = happyShift action_91
action_218 (356) = happyShift action_97
action_218 (62) = happyGoto action_518
action_218 (198) = happyGoto action_519
action_218 (211) = happyGoto action_32
action_218 (212) = happyGoto action_33
action_218 (213) = happyGoto action_34
action_218 _ = happyFail
action_219 (234) = happyShift action_39
action_219 (235) = happyShift action_40
action_219 (238) = happyShift action_43
action_219 (239) = happyShift action_44
action_219 (313) = happyShift action_76
action_219 (314) = happyShift action_77
action_219 (315) = happyShift action_78
action_219 (316) = happyShift action_79
action_219 (318) = happyShift action_80
action_219 (319) = happyShift action_81
action_219 (320) = happyShift action_82
action_219 (321) = happyShift action_83
action_219 (322) = happyShift action_84
action_219 (323) = happyShift action_85
action_219 (325) = happyShift action_86
action_219 (334) = happyShift action_89
action_219 (335) = happyShift action_90
action_219 (337) = happyShift action_91
action_219 (356) = happyShift action_97
action_219 (211) = happyGoto action_517
action_219 (212) = happyGoto action_33
action_219 (213) = happyGoto action_34
action_219 (215) = happyGoto action_440
action_219 (216) = happyGoto action_37
action_219 _ = happyFail
action_220 _ = happyReduce_598
action_221 _ = happyReduce_562
action_222 (234) = happyShift action_39
action_222 (236) = happyShift action_41
action_222 (237) = happyShift action_42
action_222 (238) = happyShift action_43
action_222 (239) = happyShift action_44
action_222 (255) = happyShift action_115
action_222 (257) = happyShift action_116
action_222 (265) = happyShift action_117
action_222 (313) = happyShift action_76
action_222 (314) = happyShift action_118
action_222 (315) = happyShift action_119
action_222 (316) = happyShift action_120
action_222 (318) = happyShift action_80
action_222 (319) = happyShift action_81
action_222 (320) = happyShift action_82
action_222 (321) = happyShift action_83
action_222 (322) = happyShift action_84
action_222 (323) = happyShift action_85
action_222 (325) = happyShift action_86
action_222 (335) = happyShift action_121
action_222 (337) = happyShift action_91
action_222 (356) = happyShift action_97
action_222 (78) = happyGoto action_101
action_222 (80) = happyGoto action_102
action_222 (82) = happyGoto action_103
action_222 (84) = happyGoto action_104
action_222 (85) = happyGoto action_105
action_222 (86) = happyGoto action_106
action_222 (88) = happyGoto action_516
action_222 (89) = happyGoto action_108
action_222 (90) = happyGoto action_109
action_222 (199) = happyGoto action_110
action_222 (212) = happyGoto action_111
action_222 (214) = happyGoto action_35
action_222 (215) = happyGoto action_112
action_222 (216) = happyGoto action_37
action_222 (230) = happyGoto action_113
action_222 (231) = happyGoto action_114
action_222 _ = happyFail
action_223 _ = happyReduce_596
action_224 _ = happyReduce_597
action_225 _ = happyReduce_599
action_226 (273) = happyShift action_514
action_226 (274) = happyShift action_515
action_226 (104) = happyGoto action_512
action_226 (122) = happyGoto action_513
action_226 _ = happyReduce_281
action_227 (234) = happyShift action_39
action_227 (236) = happyShift action_41
action_227 (237) = happyShift action_42
action_227 (238) = happyShift action_43
action_227 (239) = happyShift action_44
action_227 (255) = happyShift action_115
action_227 (257) = happyShift action_116
action_227 (265) = happyShift action_117
action_227 (313) = happyShift action_76
action_227 (314) = happyShift action_118
action_227 (315) = happyShift action_119
action_227 (316) = happyShift action_120
action_227 (318) = happyShift action_80
action_227 (319) = happyShift action_81
action_227 (320) = happyShift action_82
action_227 (321) = happyShift action_83
action_227 (322) = happyShift action_84
action_227 (323) = happyShift action_85
action_227 (325) = happyShift action_86
action_227 (335) = happyShift action_121
action_227 (337) = happyShift action_91
action_227 (356) = happyShift action_97
action_227 (78) = happyGoto action_101
action_227 (80) = happyGoto action_102
action_227 (82) = happyGoto action_103
action_227 (84) = happyGoto action_104
action_227 (85) = happyGoto action_105
action_227 (86) = happyGoto action_106
action_227 (88) = happyGoto action_511
action_227 (89) = happyGoto action_108
action_227 (90) = happyGoto action_109
action_227 (199) = happyGoto action_110
action_227 (212) = happyGoto action_111
action_227 (214) = happyGoto action_35
action_227 (215) = happyGoto action_112
action_227 (216) = happyGoto action_37
action_227 (230) = happyGoto action_113
action_227 (231) = happyGoto action_114
action_227 _ = happyFail
action_228 (241) = happyShift action_214
action_228 (242) = happyShift action_215
action_228 (269) = happyShift action_510
action_228 (270) = happyShift action_220
action_228 (282) = happyShift action_223
action_228 (283) = happyShift action_224
action_228 (284) = happyShift action_225
action_228 (47) = happyGoto action_504
action_228 (202) = happyGoto action_505
action_228 (205) = happyGoto action_506
action_228 (207) = happyGoto action_507
action_228 (218) = happyGoto action_508
action_228 (221) = happyGoto action_509
action_228 _ = happyFail
action_229 _ = happyReduce_83
action_230 (234) = happyShift action_39
action_230 (255) = happyShift action_502
action_230 (270) = happyShift action_503
action_230 (313) = happyShift action_76
action_230 (314) = happyShift action_118
action_230 (315) = happyShift action_119
action_230 (316) = happyShift action_120
action_230 (318) = happyShift action_80
action_230 (319) = happyShift action_81
action_230 (320) = happyShift action_82
action_230 (321) = happyShift action_83
action_230 (322) = happyShift action_84
action_230 (323) = happyShift action_85
action_230 (325) = happyShift action_86
action_230 (337) = happyShift action_91
action_230 (356) = happyShift action_97
action_230 (94) = happyGoto action_500
action_230 (212) = happyGoto action_111
action_230 (230) = happyGoto action_501
action_230 (231) = happyGoto action_114
action_230 _ = happyFail
action_231 (266) = happyShift action_499
action_231 _ = happyFail
action_232 _ = happyReduce_205
action_233 _ = happyReduce_220
action_234 (258) = happyShift action_497
action_234 (267) = happyShift action_498
action_234 _ = happyFail
action_235 (258) = happyShift action_496
action_235 (267) = happyShift action_431
action_235 _ = happyFail
action_236 _ = happyReduce_207
action_237 _ = happyReduce_394
action_238 (256) = happyShift action_494
action_238 (273) = happyShift action_495
action_238 _ = happyReduce_220
action_239 (256) = happyShift action_493
action_239 _ = happyFail
action_240 (267) = happyShift action_492
action_240 _ = happyFail
action_241 (256) = happyShift action_491
action_241 (267) = happyShift action_431
action_241 _ = happyFail
action_242 (256) = happyShift action_490
action_242 _ = happyFail
action_243 (256) = happyShift action_489
action_243 _ = happyFail
action_244 _ = happyReduce_203
action_245 (256) = happyShift action_488
action_245 _ = happyFail
action_246 (234) = happyShift action_39
action_246 (238) = happyShift action_43
action_246 (239) = happyShift action_44
action_246 (255) = happyShift action_115
action_246 (257) = happyShift action_116
action_246 (265) = happyShift action_117
action_246 (313) = happyShift action_76
action_246 (314) = happyShift action_118
action_246 (315) = happyShift action_119
action_246 (316) = happyShift action_120
action_246 (318) = happyShift action_80
action_246 (319) = happyShift action_81
action_246 (320) = happyShift action_82
action_246 (321) = happyShift action_83
action_246 (322) = happyShift action_84
action_246 (323) = happyShift action_85
action_246 (325) = happyShift action_86
action_246 (337) = happyShift action_91
action_246 (356) = happyShift action_97
action_246 (78) = happyGoto action_487
action_246 (82) = happyGoto action_189
action_246 (84) = happyGoto action_104
action_246 (85) = happyGoto action_105
action_246 (86) = happyGoto action_106
action_246 (212) = happyGoto action_111
action_246 (215) = happyGoto action_112
action_246 (216) = happyGoto action_37
action_246 (230) = happyGoto action_113
action_246 (231) = happyGoto action_114
action_246 _ = happyFail
action_247 _ = happyReduce_215
action_248 _ = happyReduce_192
action_249 (234) = happyShift action_39
action_249 (238) = happyShift action_43
action_249 (239) = happyShift action_44
action_249 (255) = happyShift action_115
action_249 (257) = happyShift action_116
action_249 (265) = happyShift action_117
action_249 (313) = happyShift action_76
action_249 (314) = happyShift action_118
action_249 (315) = happyShift action_119
action_249 (316) = happyShift action_120
action_249 (318) = happyShift action_80
action_249 (319) = happyShift action_81
action_249 (320) = happyShift action_82
action_249 (321) = happyShift action_83
action_249 (322) = happyShift action_84
action_249 (323) = happyShift action_85
action_249 (325) = happyShift action_86
action_249 (337) = happyShift action_91
action_249 (356) = happyShift action_97
action_249 (78) = happyGoto action_486
action_249 (82) = happyGoto action_189
action_249 (84) = happyGoto action_104
action_249 (85) = happyGoto action_105
action_249 (86) = happyGoto action_106
action_249 (212) = happyGoto action_111
action_249 (215) = happyGoto action_112
action_249 (216) = happyGoto action_37
action_249 (230) = happyGoto action_113
action_249 (231) = happyGoto action_114
action_249 _ = happyFail
action_250 _ = happyReduce_212
action_251 (234) = happyShift action_39
action_251 (238) = happyShift action_43
action_251 (239) = happyShift action_44
action_251 (255) = happyShift action_115
action_251 (257) = happyShift action_116
action_251 (265) = happyShift action_117
action_251 (313) = happyShift action_76
action_251 (314) = happyShift action_118
action_251 (315) = happyShift action_119
action_251 (316) = happyShift action_120
action_251 (318) = happyShift action_80
action_251 (319) = happyShift action_81
action_251 (320) = happyShift action_82
action_251 (321) = happyShift action_83
action_251 (322) = happyShift action_84
action_251 (323) = happyShift action_85
action_251 (325) = happyShift action_86
action_251 (337) = happyShift action_91
action_251 (356) = happyShift action_97
action_251 (78) = happyGoto action_485
action_251 (82) = happyGoto action_189
action_251 (84) = happyGoto action_104
action_251 (85) = happyGoto action_105
action_251 (86) = happyGoto action_106
action_251 (212) = happyGoto action_111
action_251 (215) = happyGoto action_112
action_251 (216) = happyGoto action_37
action_251 (230) = happyGoto action_113
action_251 (231) = happyGoto action_114
action_251 _ = happyFail
action_252 _ = happyReduce_628
action_253 _ = happyReduce_629
action_254 (234) = happyShift action_39
action_254 (238) = happyShift action_43
action_254 (239) = happyShift action_44
action_254 (313) = happyShift action_76
action_254 (314) = happyShift action_118
action_254 (315) = happyShift action_119
action_254 (316) = happyShift action_120
action_254 (318) = happyShift action_80
action_254 (319) = happyShift action_81
action_254 (320) = happyShift action_82
action_254 (321) = happyShift action_83
action_254 (322) = happyShift action_84
action_254 (323) = happyShift action_85
action_254 (325) = happyShift action_86
action_254 (337) = happyShift action_91
action_254 (356) = happyShift action_97
action_254 (212) = happyGoto action_111
action_254 (215) = happyGoto action_440
action_254 (216) = happyGoto action_37
action_254 (230) = happyGoto action_484
action_254 (231) = happyGoto action_114
action_254 _ = happyFail
action_255 (234) = happyShift action_39
action_255 (236) = happyShift action_41
action_255 (237) = happyShift action_42
action_255 (238) = happyShift action_43
action_255 (239) = happyShift action_44
action_255 (255) = happyShift action_115
action_255 (257) = happyShift action_116
action_255 (265) = happyShift action_117
action_255 (313) = happyShift action_76
action_255 (314) = happyShift action_118
action_255 (315) = happyShift action_119
action_255 (316) = happyShift action_120
action_255 (318) = happyShift action_80
action_255 (319) = happyShift action_81
action_255 (320) = happyShift action_82
action_255 (321) = happyShift action_83
action_255 (322) = happyShift action_84
action_255 (323) = happyShift action_85
action_255 (325) = happyShift action_86
action_255 (335) = happyShift action_121
action_255 (337) = happyShift action_91
action_255 (356) = happyShift action_97
action_255 (78) = happyGoto action_101
action_255 (80) = happyGoto action_102
action_255 (82) = happyGoto action_103
action_255 (84) = happyGoto action_104
action_255 (85) = happyGoto action_105
action_255 (86) = happyGoto action_106
action_255 (89) = happyGoto action_483
action_255 (90) = happyGoto action_109
action_255 (199) = happyGoto action_110
action_255 (212) = happyGoto action_111
action_255 (214) = happyGoto action_35
action_255 (215) = happyGoto action_112
action_255 (216) = happyGoto action_37
action_255 (230) = happyGoto action_113
action_255 (231) = happyGoto action_114
action_255 _ = happyFail
action_256 (234) = happyShift action_39
action_256 (238) = happyShift action_43
action_256 (239) = happyShift action_44
action_256 (255) = happyShift action_115
action_256 (257) = happyShift action_116
action_256 (265) = happyShift action_117
action_256 (313) = happyShift action_76
action_256 (314) = happyShift action_118
action_256 (315) = happyShift action_119
action_256 (316) = happyShift action_120
action_256 (318) = happyShift action_80
action_256 (319) = happyShift action_81
action_256 (320) = happyShift action_82
action_256 (321) = happyShift action_83
action_256 (322) = happyShift action_84
action_256 (323) = happyShift action_85
action_256 (325) = happyShift action_86
action_256 (337) = happyShift action_91
action_256 (356) = happyShift action_97
action_256 (82) = happyGoto action_482
action_256 (84) = happyGoto action_104
action_256 (85) = happyGoto action_105
action_256 (86) = happyGoto action_106
action_256 (212) = happyGoto action_111
action_256 (215) = happyGoto action_112
action_256 (216) = happyGoto action_37
action_256 (230) = happyGoto action_113
action_256 (231) = happyGoto action_114
action_256 _ = happyFail
action_257 _ = happyReduce_217
action_258 (245) = happyShift action_481
action_258 _ = happyFail
action_259 (372) = happyShift action_480
action_259 _ = happyFail
action_260 (372) = happyShift action_479
action_260 _ = happyFail
action_261 _ = happyReduce_519
action_262 (234) = happyShift action_39
action_262 (235) = happyShift action_40
action_262 (236) = happyShift action_41
action_262 (237) = happyShift action_42
action_262 (238) = happyShift action_43
action_262 (239) = happyShift action_44
action_262 (245) = happyShift action_45
action_262 (246) = happyShift action_46
action_262 (247) = happyShift action_47
action_262 (248) = happyShift action_48
action_262 (249) = happyShift action_49
action_262 (250) = happyShift action_50
action_262 (251) = happyShift action_51
action_262 (252) = happyShift action_52
action_262 (253) = happyShift action_53
action_262 (254) = happyShift action_54
action_262 (255) = happyShift action_55
action_262 (257) = happyShift action_56
action_262 (261) = happyShift action_477
action_262 (265) = happyShift action_57
action_262 (268) = happyShift action_58
action_262 (275) = happyShift action_59
action_262 (280) = happyShift action_60
action_262 (282) = happyShift action_61
action_262 (283) = happyShift action_62
action_262 (289) = happyShift action_63
action_262 (292) = happyShift action_64
action_262 (293) = happyShift action_65
action_262 (294) = happyShift action_66
action_262 (295) = happyShift action_67
action_262 (296) = happyShift action_68
action_262 (297) = happyShift action_69
action_262 (299) = happyShift action_70
action_262 (300) = happyShift action_71
action_262 (301) = happyShift action_72
action_262 (303) = happyShift action_73
action_262 (305) = happyShift action_74
action_262 (306) = happyShift action_75
action_262 (313) = happyShift action_76
action_262 (314) = happyShift action_77
action_262 (315) = happyShift action_78
action_262 (316) = happyShift action_79
action_262 (318) = happyShift action_80
action_262 (319) = happyShift action_81
action_262 (320) = happyShift action_82
action_262 (321) = happyShift action_83
action_262 (322) = happyShift action_84
action_262 (323) = happyShift action_85
action_262 (325) = happyShift action_86
action_262 (327) = happyShift action_87
action_262 (332) = happyShift action_88
action_262 (334) = happyShift action_89
action_262 (335) = happyShift action_90
action_262 (337) = happyShift action_91
action_262 (338) = happyShift action_92
action_262 (345) = happyShift action_93
action_262 (346) = happyShift action_94
action_262 (350) = happyShift action_95
action_262 (351) = happyShift action_96
action_262 (356) = happyShift action_97
action_262 (363) = happyShift action_98
action_262 (364) = happyShift action_99
action_262 (365) = happyShift action_100
action_262 (139) = happyGoto action_13
action_262 (140) = happyGoto action_14
action_262 (141) = happyGoto action_15
action_262 (142) = happyGoto action_16
action_262 (143) = happyGoto action_17
action_262 (144) = happyGoto action_18
action_262 (147) = happyGoto action_19
action_262 (148) = happyGoto action_20
action_262 (149) = happyGoto action_21
action_262 (152) = happyGoto action_22
action_262 (153) = happyGoto action_23
action_262 (154) = happyGoto action_24
action_262 (161) = happyGoto action_25
action_262 (185) = happyGoto action_26
action_262 (187) = happyGoto action_478
action_262 (189) = happyGoto action_476
action_262 (195) = happyGoto action_28
action_262 (198) = happyGoto action_29
action_262 (199) = happyGoto action_30
action_262 (201) = happyGoto action_31
action_262 (211) = happyGoto action_32
action_262 (212) = happyGoto action_33
action_262 (213) = happyGoto action_34
action_262 (214) = happyGoto action_35
action_262 (215) = happyGoto action_36
action_262 (216) = happyGoto action_37
action_262 (224) = happyGoto action_38
action_262 _ = happyReduce_513
action_263 (234) = happyShift action_39
action_263 (235) = happyShift action_40
action_263 (236) = happyShift action_41
action_263 (237) = happyShift action_42
action_263 (238) = happyShift action_43
action_263 (239) = happyShift action_44
action_263 (245) = happyShift action_45
action_263 (246) = happyShift action_46
action_263 (247) = happyShift action_47
action_263 (248) = happyShift action_48
action_263 (249) = happyShift action_49
action_263 (250) = happyShift action_50
action_263 (251) = happyShift action_51
action_263 (252) = happyShift action_52
action_263 (253) = happyShift action_53
action_263 (254) = happyShift action_54
action_263 (255) = happyShift action_55
action_263 (257) = happyShift action_56
action_263 (261) = happyShift action_477
action_263 (265) = happyShift action_57
action_263 (268) = happyShift action_58
action_263 (275) = happyShift action_59
action_263 (280) = happyShift action_60
action_263 (282) = happyShift action_61
action_263 (283) = happyShift action_62
action_263 (289) = happyShift action_63
action_263 (292) = happyShift action_64
action_263 (293) = happyShift action_65
action_263 (294) = happyShift action_66
action_263 (295) = happyShift action_67
action_263 (296) = happyShift action_68
action_263 (297) = happyShift action_69
action_263 (299) = happyShift action_70
action_263 (300) = happyShift action_71
action_263 (301) = happyShift action_72
action_263 (303) = happyShift action_73
action_263 (305) = happyShift action_74
action_263 (306) = happyShift action_75
action_263 (313) = happyShift action_76
action_263 (314) = happyShift action_77
action_263 (315) = happyShift action_78
action_263 (316) = happyShift action_79
action_263 (318) = happyShift action_80
action_263 (319) = happyShift action_81
action_263 (320) = happyShift action_82
action_263 (321) = happyShift action_83
action_263 (322) = happyShift action_84
action_263 (323) = happyShift action_85
action_263 (325) = happyShift action_86
action_263 (327) = happyShift action_87
action_263 (332) = happyShift action_88
action_263 (334) = happyShift action_89
action_263 (335) = happyShift action_90
action_263 (337) = happyShift action_91
action_263 (338) = happyShift action_92
action_263 (345) = happyShift action_93
action_263 (346) = happyShift action_94
action_263 (350) = happyShift action_95
action_263 (351) = happyShift action_96
action_263 (356) = happyShift action_97
action_263 (363) = happyShift action_98
action_263 (364) = happyShift action_99
action_263 (365) = happyShift action_100
action_263 (139) = happyGoto action_13
action_263 (140) = happyGoto action_14
action_263 (141) = happyGoto action_15
action_263 (142) = happyGoto action_16
action_263 (143) = happyGoto action_17
action_263 (144) = happyGoto action_18
action_263 (147) = happyGoto action_19
action_263 (148) = happyGoto action_20
action_263 (149) = happyGoto action_21
action_263 (152) = happyGoto action_22
action_263 (153) = happyGoto action_23
action_263 (154) = happyGoto action_24
action_263 (161) = happyGoto action_25
action_263 (185) = happyGoto action_26
action_263 (187) = happyGoto action_475
action_263 (189) = happyGoto action_476
action_263 (195) = happyGoto action_28
action_263 (198) = happyGoto action_29
action_263 (199) = happyGoto action_30
action_263 (201) = happyGoto action_31
action_263 (211) = happyGoto action_32
action_263 (212) = happyGoto action_33
action_263 (213) = happyGoto action_34
action_263 (214) = happyGoto action_35
action_263 (215) = happyGoto action_36
action_263 (216) = happyGoto action_37
action_263 (224) = happyGoto action_38
action_263 _ = happyReduce_513
action_264 (278) = happyShift action_474
action_264 _ = happyFail
action_265 _ = happyReduce_354
action_266 (234) = happyShift action_39
action_266 (235) = happyShift action_40
action_266 (236) = happyShift action_41
action_266 (237) = happyShift action_42
action_266 (238) = happyShift action_43
action_266 (239) = happyShift action_44
action_266 (245) = happyShift action_45
action_266 (246) = happyShift action_46
action_266 (247) = happyShift action_47
action_266 (248) = happyShift action_48
action_266 (249) = happyShift action_49
action_266 (250) = happyShift action_50
action_266 (251) = happyShift action_51
action_266 (252) = happyShift action_52
action_266 (253) = happyShift action_53
action_266 (254) = happyShift action_54
action_266 (255) = happyShift action_55
action_266 (257) = happyShift action_56
action_266 (265) = happyShift action_57
action_266 (268) = happyShift action_58
action_266 (280) = happyShift action_60
action_266 (289) = happyShift action_63
action_266 (292) = happyShift action_64
action_266 (293) = happyShift action_65
action_266 (294) = happyShift action_66
action_266 (295) = happyShift action_67
action_266 (296) = happyShift action_68
action_266 (297) = happyShift action_69
action_266 (299) = happyShift action_70
action_266 (300) = happyShift action_71
action_266 (301) = happyShift action_72
action_266 (303) = happyShift action_73
action_266 (305) = happyShift action_74
action_266 (306) = happyShift action_75
action_266 (313) = happyShift action_76
action_266 (314) = happyShift action_77
action_266 (315) = happyShift action_78
action_266 (316) = happyShift action_79
action_266 (318) = happyShift action_80
action_266 (319) = happyShift action_81
action_266 (320) = happyShift action_82
action_266 (321) = happyShift action_83
action_266 (322) = happyShift action_84
action_266 (323) = happyShift action_85
action_266 (325) = happyShift action_86
action_266 (334) = happyShift action_89
action_266 (335) = happyShift action_90
action_266 (337) = happyShift action_91
action_266 (356) = happyShift action_97
action_266 (152) = happyGoto action_473
action_266 (153) = happyGoto action_23
action_266 (154) = happyGoto action_24
action_266 (161) = happyGoto action_25
action_266 (195) = happyGoto action_28
action_266 (198) = happyGoto action_29
action_266 (199) = happyGoto action_30
action_266 (201) = happyGoto action_31
action_266 (211) = happyGoto action_32
action_266 (212) = happyGoto action_33
action_266 (213) = happyGoto action_34
action_266 (214) = happyGoto action_35
action_266 (215) = happyGoto action_36
action_266 (216) = happyGoto action_37
action_266 (224) = happyGoto action_38
action_266 _ = happyFail
action_267 _ = happyReduce_345
action_268 (340) = happyShift action_472
action_268 _ = happyReduce_516
action_269 (261) = happyShift action_471
action_269 (145) = happyGoto action_470
action_269 _ = happyReduce_339
action_270 _ = happyReduce_344
action_271 (349) = happyShift action_469
action_271 _ = happyFail
action_272 (261) = happyShift action_466
action_272 (302) = happyShift action_467
action_272 (303) = happyShift action_73
action_272 (305) = happyShift action_74
action_272 (306) = happyShift action_75
action_272 (310) = happyShift action_468
action_272 (146) = happyGoto action_463
action_272 (161) = happyGoto action_464
action_272 (163) = happyGoto action_465
action_272 _ = happyReduce_341
action_273 (309) = happyShift action_462
action_273 _ = happyFail
action_274 (167) = happyGoto action_461
action_274 _ = happyReduce_467
action_275 (272) = happyShift action_460
action_275 _ = happyReduce_418
action_276 _ = happyReduce_422
action_277 _ = happyReduce_419
action_278 _ = happyReduce_420
action_279 _ = happyReduce_421
action_280 _ = happyReduce_426
action_281 _ = happyReduce_427
action_282 _ = happyReduce_428
action_283 _ = happyReduce_429
action_284 _ = happyReduce_430
action_285 _ = happyReduce_431
action_286 _ = happyReduce_432
action_287 _ = happyReduce_433
action_288 _ = happyReduce_434
action_289 _ = happyReduce_435
action_290 _ = happyReduce_436
action_291 _ = happyReduce_437
action_292 _ = happyReduce_438
action_293 _ = happyReduce_439
action_294 _ = happyReduce_424
action_295 _ = happyReduce_425
action_296 _ = happyReduce_440
action_297 _ = happyReduce_441
action_298 _ = happyReduce_442
action_299 _ = happyReduce_443
action_300 _ = happyReduce_444
action_301 _ = happyReduce_445
action_302 _ = happyReduce_446
action_303 _ = happyReduce_447
action_304 _ = happyReduce_448
action_305 _ = happyReduce_449
action_306 _ = happyReduce_450
action_307 _ = happyReduce_451
action_308 _ = happyReduce_452
action_309 _ = happyReduce_453
action_310 _ = happyReduce_454
action_311 _ = happyReduce_455
action_312 _ = happyReduce_456
action_313 _ = happyReduce_457
action_314 _ = happyReduce_458
action_315 _ = happyReduce_459
action_316 _ = happyReduce_460
action_317 _ = happyReduce_461
action_318 _ = happyReduce_462
action_319 _ = happyReduce_423
action_320 _ = happyReduce_463
action_321 _ = happyReduce_464
action_322 _ = happyReduce_465
action_323 _ = happyReduce_391
action_324 _ = happyReduce_390
action_325 (241) = happyShift action_214
action_325 (242) = happyShift action_215
action_325 (243) = happyShift action_216
action_325 (244) = happyShift action_217
action_325 (256) = happyShift action_244
action_325 (267) = happyShift action_237
action_325 (270) = happyShift action_220
action_325 (272) = happyShift action_221
action_325 (278) = happyShift action_245
action_325 (282) = happyShift action_223
action_325 (283) = happyShift action_224
action_325 (284) = happyShift action_225
action_325 (155) = happyGoto action_241
action_325 (210) = happyGoto action_242
action_325 (217) = happyGoto action_209
action_325 (218) = happyGoto action_210
action_325 (219) = happyGoto action_243
action_325 (221) = happyGoto action_212
action_325 (223) = happyGoto action_213
action_325 _ = happyFail
action_326 (258) = happyShift action_236
action_326 (267) = happyShift action_237
action_326 (155) = happyGoto action_235
action_326 _ = happyFail
action_327 (266) = happyShift action_232
action_327 _ = happyFail
action_328 _ = happyReduce_388
action_329 _ = happyReduce_389
action_330 (241) = happyShift action_214
action_330 (242) = happyShift action_215
action_330 (243) = happyShift action_216
action_330 (244) = happyShift action_217
action_330 (270) = happyShift action_220
action_330 (272) = happyShift action_221
action_330 (282) = happyShift action_223
action_330 (283) = happyShift action_224
action_330 (284) = happyShift action_225
action_330 (210) = happyGoto action_459
action_330 (217) = happyGoto action_209
action_330 (218) = happyGoto action_210
action_330 (219) = happyGoto action_368
action_330 (221) = happyGoto action_212
action_330 (223) = happyGoto action_213
action_330 _ = happyFail
action_331 (234) = happyShift action_39
action_331 (235) = happyShift action_40
action_331 (236) = happyShift action_41
action_331 (237) = happyShift action_42
action_331 (238) = happyShift action_43
action_331 (239) = happyShift action_44
action_331 (245) = happyShift action_45
action_331 (246) = happyShift action_46
action_331 (247) = happyShift action_47
action_331 (248) = happyShift action_48
action_331 (249) = happyShift action_49
action_331 (250) = happyShift action_50
action_331 (251) = happyShift action_51
action_331 (252) = happyShift action_52
action_331 (253) = happyShift action_53
action_331 (254) = happyShift action_54
action_331 (255) = happyShift action_55
action_331 (257) = happyShift action_56
action_331 (265) = happyShift action_57
action_331 (268) = happyShift action_58
action_331 (275) = happyShift action_59
action_331 (280) = happyShift action_60
action_331 (282) = happyShift action_61
action_331 (283) = happyShift action_132
action_331 (289) = happyShift action_63
action_331 (292) = happyShift action_64
action_331 (293) = happyShift action_65
action_331 (294) = happyShift action_66
action_331 (295) = happyShift action_67
action_331 (296) = happyShift action_68
action_331 (297) = happyShift action_69
action_331 (299) = happyShift action_70
action_331 (300) = happyShift action_71
action_331 (301) = happyShift action_72
action_331 (303) = happyShift action_73
action_331 (305) = happyShift action_74
action_331 (306) = happyShift action_75
action_331 (312) = happyShift action_133
action_331 (313) = happyShift action_76
action_331 (314) = happyShift action_77
action_331 (315) = happyShift action_78
action_331 (316) = happyShift action_79
action_331 (318) = happyShift action_80
action_331 (319) = happyShift action_81
action_331 (320) = happyShift action_82
action_331 (321) = happyShift action_83
action_331 (322) = happyShift action_84
action_331 (323) = happyShift action_85
action_331 (325) = happyShift action_86
action_331 (327) = happyShift action_87
action_331 (328) = happyShift action_134
action_331 (329) = happyShift action_135
action_331 (330) = happyShift action_136
action_331 (331) = happyShift action_137
action_331 (332) = happyShift action_88
action_331 (334) = happyShift action_89
action_331 (335) = happyShift action_90
action_331 (337) = happyShift action_91
action_331 (338) = happyShift action_92
action_331 (341) = happyShift action_138
action_331 (342) = happyShift action_139
action_331 (343) = happyShift action_140
action_331 (344) = happyShift action_141
action_331 (345) = happyShift action_142
action_331 (346) = happyShift action_94
action_331 (348) = happyShift action_143
action_331 (350) = happyShift action_95
action_331 (353) = happyShift action_144
action_331 (356) = happyShift action_97
action_331 (357) = happyShift action_145
action_331 (358) = happyShift action_146
action_331 (359) = happyShift action_147
action_331 (360) = happyShift action_148
action_331 (362) = happyShift action_149
action_331 (363) = happyShift action_98
action_331 (364) = happyShift action_99
action_331 (365) = happyShift action_100
action_331 (366) = happyShift action_150
action_331 (367) = happyShift action_151
action_331 (371) = happyShift action_152
action_331 (44) = happyGoto action_122
action_331 (46) = happyGoto action_123
action_331 (48) = happyGoto action_456
action_331 (49) = happyGoto action_457
action_331 (50) = happyGoto action_458
action_331 (51) = happyGoto action_125
action_331 (55) = happyGoto action_126
action_331 (57) = happyGoto action_127
action_331 (58) = happyGoto action_128
action_331 (133) = happyGoto action_129
action_331 (141) = happyGoto action_130
action_331 (142) = happyGoto action_16
action_331 (143) = happyGoto action_131
action_331 (144) = happyGoto action_18
action_331 (147) = happyGoto action_19
action_331 (148) = happyGoto action_20
action_331 (149) = happyGoto action_21
action_331 (152) = happyGoto action_22
action_331 (153) = happyGoto action_23
action_331 (154) = happyGoto action_24
action_331 (161) = happyGoto action_25
action_331 (195) = happyGoto action_28
action_331 (198) = happyGoto action_29
action_331 (199) = happyGoto action_30
action_331 (201) = happyGoto action_31
action_331 (211) = happyGoto action_32
action_331 (212) = happyGoto action_33
action_331 (213) = happyGoto action_34
action_331 (214) = happyGoto action_35
action_331 (215) = happyGoto action_36
action_331 (216) = happyGoto action_37
action_331 (224) = happyGoto action_38
action_331 _ = happyFail
action_332 (298) = happyShift action_455
action_332 _ = happyFail
action_333 (298) = happyShift action_454
action_333 _ = happyFail
action_334 (241) = happyShift action_214
action_334 (242) = happyShift action_215
action_334 (243) = happyShift action_216
action_334 (244) = happyShift action_217
action_334 (269) = happyShift action_219
action_334 (270) = happyShift action_220
action_334 (272) = happyShift action_221
action_334 (282) = happyShift action_223
action_334 (283) = happyShift action_224
action_334 (284) = happyShift action_225
action_334 (203) = happyGoto action_205
action_334 (206) = happyGoto action_206
action_334 (208) = happyGoto action_207
action_334 (210) = happyGoto action_208
action_334 (217) = happyGoto action_209
action_334 (218) = happyGoto action_210
action_334 (219) = happyGoto action_211
action_334 (221) = happyGoto action_212
action_334 (223) = happyGoto action_213
action_334 _ = happyReduce_328
action_335 (298) = happyShift action_453
action_335 _ = happyFail
action_336 (256) = happyShift action_452
action_336 _ = happyFail
action_337 (276) = happyShift action_451
action_337 _ = happyReduce_405
action_338 (267) = happyShift action_449
action_338 (290) = happyShift action_450
action_338 _ = happyFail
action_339 _ = happyReduce_508
action_340 (234) = happyShift action_39
action_340 (235) = happyShift action_40
action_340 (236) = happyShift action_41
action_340 (237) = happyShift action_42
action_340 (238) = happyShift action_43
action_340 (239) = happyShift action_44
action_340 (245) = happyShift action_45
action_340 (246) = happyShift action_46
action_340 (247) = happyShift action_47
action_340 (248) = happyShift action_48
action_340 (249) = happyShift action_49
action_340 (250) = happyShift action_50
action_340 (251) = happyShift action_51
action_340 (252) = happyShift action_52
action_340 (253) = happyShift action_53
action_340 (254) = happyShift action_54
action_340 (255) = happyShift action_55
action_340 (257) = happyShift action_56
action_340 (265) = happyShift action_57
action_340 (268) = happyShift action_58
action_340 (280) = happyShift action_60
action_340 (289) = happyShift action_63
action_340 (292) = happyShift action_64
action_340 (293) = happyShift action_65
action_340 (294) = happyShift action_66
action_340 (295) = happyShift action_67
action_340 (296) = happyShift action_68
action_340 (297) = happyShift action_69
action_340 (299) = happyShift action_70
action_340 (300) = happyShift action_71
action_340 (301) = happyShift action_72
action_340 (303) = happyShift action_73
action_340 (305) = happyShift action_74
action_340 (306) = happyShift action_75
action_340 (313) = happyShift action_76
action_340 (314) = happyShift action_77
action_340 (315) = happyShift action_78
action_340 (316) = happyShift action_79
action_340 (318) = happyShift action_80
action_340 (319) = happyShift action_81
action_340 (320) = happyShift action_82
action_340 (321) = happyShift action_83
action_340 (322) = happyShift action_84
action_340 (323) = happyShift action_85
action_340 (325) = happyShift action_86
action_340 (334) = happyShift action_89
action_340 (335) = happyShift action_90
action_340 (337) = happyShift action_91
action_340 (356) = happyShift action_97
action_340 (152) = happyGoto action_381
action_340 (153) = happyGoto action_23
action_340 (154) = happyGoto action_24
action_340 (161) = happyGoto action_25
action_340 (195) = happyGoto action_28
action_340 (198) = happyGoto action_29
action_340 (199) = happyGoto action_30
action_340 (201) = happyGoto action_31
action_340 (211) = happyGoto action_32
action_340 (212) = happyGoto action_33
action_340 (213) = happyGoto action_34
action_340 (214) = happyGoto action_35
action_340 (215) = happyGoto action_36
action_340 (216) = happyGoto action_37
action_340 (224) = happyGoto action_38
action_340 _ = happyReduce_343
action_341 _ = happyReduce_358
action_342 (234) = happyShift action_39
action_342 (235) = happyShift action_40
action_342 (236) = happyShift action_41
action_342 (237) = happyShift action_42
action_342 (238) = happyShift action_43
action_342 (239) = happyShift action_44
action_342 (245) = happyShift action_45
action_342 (246) = happyShift action_46
action_342 (247) = happyShift action_47
action_342 (248) = happyShift action_48
action_342 (249) = happyShift action_49
action_342 (250) = happyShift action_50
action_342 (251) = happyShift action_51
action_342 (252) = happyShift action_52
action_342 (253) = happyShift action_53
action_342 (254) = happyShift action_54
action_342 (255) = happyShift action_55
action_342 (257) = happyShift action_56
action_342 (265) = happyShift action_57
action_342 (268) = happyShift action_58
action_342 (278) = happyShift action_448
action_342 (280) = happyShift action_60
action_342 (283) = happyShift action_266
action_342 (289) = happyShift action_63
action_342 (292) = happyShift action_64
action_342 (293) = happyShift action_65
action_342 (294) = happyShift action_66
action_342 (295) = happyShift action_67
action_342 (296) = happyShift action_68
action_342 (297) = happyShift action_69
action_342 (299) = happyShift action_70
action_342 (300) = happyShift action_71
action_342 (301) = happyShift action_72
action_342 (303) = happyShift action_73
action_342 (305) = happyShift action_74
action_342 (306) = happyShift action_75
action_342 (313) = happyShift action_76
action_342 (314) = happyShift action_77
action_342 (315) = happyShift action_78
action_342 (316) = happyShift action_79
action_342 (318) = happyShift action_80
action_342 (319) = happyShift action_81
action_342 (320) = happyShift action_82
action_342 (321) = happyShift action_83
action_342 (322) = happyShift action_84
action_342 (323) = happyShift action_85
action_342 (325) = happyShift action_86
action_342 (334) = happyShift action_89
action_342 (335) = happyShift action_90
action_342 (337) = happyShift action_91
action_342 (356) = happyShift action_97
action_342 (151) = happyGoto action_447
action_342 (152) = happyGoto action_265
action_342 (153) = happyGoto action_23
action_342 (154) = happyGoto action_24
action_342 (161) = happyGoto action_25
action_342 (195) = happyGoto action_28
action_342 (198) = happyGoto action_29
action_342 (199) = happyGoto action_30
action_342 (201) = happyGoto action_31
action_342 (211) = happyGoto action_32
action_342 (212) = happyGoto action_33
action_342 (213) = happyGoto action_34
action_342 (214) = happyGoto action_35
action_342 (215) = happyGoto action_36
action_342 (216) = happyGoto action_37
action_342 (224) = happyGoto action_38
action_342 _ = happyFail
action_343 _ = happyReduce_353
action_344 (278) = happyShift action_433
action_344 _ = happyReduce_395
action_345 (267) = happyShift action_444
action_345 (271) = happyShift action_445
action_345 (276) = happyShift action_446
action_345 _ = happyReduce_471
action_346 (266) = happyShift action_443
action_346 _ = happyFail
action_347 (267) = happyShift action_442
action_347 _ = happyReduce_472
action_348 _ = happyReduce_560
action_349 _ = happyReduce_561
action_350 (234) = happyShift action_39
action_350 (235) = happyShift action_40
action_350 (236) = happyShift action_41
action_350 (237) = happyShift action_42
action_350 (238) = happyShift action_43
action_350 (239) = happyShift action_44
action_350 (245) = happyShift action_45
action_350 (246) = happyShift action_46
action_350 (247) = happyShift action_47
action_350 (248) = happyShift action_48
action_350 (249) = happyShift action_49
action_350 (250) = happyShift action_50
action_350 (251) = happyShift action_51
action_350 (252) = happyShift action_52
action_350 (253) = happyShift action_53
action_350 (254) = happyShift action_54
action_350 (255) = happyShift action_55
action_350 (257) = happyShift action_56
action_350 (265) = happyShift action_57
action_350 (268) = happyShift action_58
action_350 (275) = happyShift action_59
action_350 (280) = happyShift action_60
action_350 (282) = happyShift action_61
action_350 (289) = happyShift action_63
action_350 (292) = happyShift action_64
action_350 (293) = happyShift action_65
action_350 (294) = happyShift action_66
action_350 (295) = happyShift action_67
action_350 (296) = happyShift action_68
action_350 (297) = happyShift action_69
action_350 (299) = happyShift action_70
action_350 (300) = happyShift action_71
action_350 (301) = happyShift action_72
action_350 (303) = happyShift action_73
action_350 (305) = happyShift action_74
action_350 (306) = happyShift action_75
action_350 (313) = happyShift action_76
action_350 (314) = happyShift action_77
action_350 (315) = happyShift action_78
action_350 (316) = happyShift action_79
action_350 (318) = happyShift action_80
action_350 (319) = happyShift action_81
action_350 (320) = happyShift action_82
action_350 (321) = happyShift action_83
action_350 (322) = happyShift action_84
action_350 (323) = happyShift action_85
action_350 (325) = happyShift action_86
action_350 (327) = happyShift action_87
action_350 (332) = happyShift action_88
action_350 (334) = happyShift action_89
action_350 (335) = happyShift action_90
action_350 (337) = happyShift action_91
action_350 (338) = happyShift action_92
action_350 (345) = happyShift action_142
action_350 (346) = happyShift action_94
action_350 (350) = happyShift action_95
action_350 (356) = happyShift action_97
action_350 (363) = happyShift action_98
action_350 (364) = happyShift action_99
action_350 (365) = happyShift action_100
action_350 (141) = happyGoto action_441
action_350 (142) = happyGoto action_16
action_350 (143) = happyGoto action_334
action_350 (144) = happyGoto action_18
action_350 (147) = happyGoto action_19
action_350 (148) = happyGoto action_20
action_350 (149) = happyGoto action_21
action_350 (152) = happyGoto action_22
action_350 (153) = happyGoto action_23
action_350 (154) = happyGoto action_24
action_350 (161) = happyGoto action_25
action_350 (195) = happyGoto action_28
action_350 (198) = happyGoto action_29
action_350 (199) = happyGoto action_30
action_350 (201) = happyGoto action_31
action_350 (211) = happyGoto action_32
action_350 (212) = happyGoto action_33
action_350 (213) = happyGoto action_34
action_350 (214) = happyGoto action_35
action_350 (215) = happyGoto action_36
action_350 (216) = happyGoto action_37
action_350 (224) = happyGoto action_38
action_350 _ = happyFail
action_351 _ = happyReduce_550
action_352 _ = happyReduce_593
action_353 _ = happyReduce_594
action_354 _ = happyReduce_600
action_355 _ = happyReduce_530
action_356 (234) = happyShift action_39
action_356 (235) = happyShift action_40
action_356 (238) = happyShift action_43
action_356 (239) = happyShift action_44
action_356 (313) = happyShift action_76
action_356 (314) = happyShift action_77
action_356 (315) = happyShift action_78
action_356 (316) = happyShift action_79
action_356 (318) = happyShift action_80
action_356 (319) = happyShift action_81
action_356 (320) = happyShift action_82
action_356 (321) = happyShift action_83
action_356 (322) = happyShift action_84
action_356 (323) = happyShift action_85
action_356 (325) = happyShift action_86
action_356 (334) = happyShift action_89
action_356 (335) = happyShift action_90
action_356 (337) = happyShift action_91
action_356 (356) = happyShift action_97
action_356 (211) = happyGoto action_439
action_356 (212) = happyGoto action_33
action_356 (213) = happyGoto action_34
action_356 (215) = happyGoto action_440
action_356 (216) = happyGoto action_37
action_356 _ = happyFail
action_357 _ = happyReduce_602
action_358 _ = happyReduce_601
action_359 _ = happyReduce_603
action_360 (234) = happyShift action_39
action_360 (235) = happyShift action_40
action_360 (236) = happyShift action_41
action_360 (237) = happyShift action_42
action_360 (238) = happyShift action_43
action_360 (239) = happyShift action_44
action_360 (241) = happyShift action_354
action_360 (242) = happyShift action_215
action_360 (243) = happyShift action_216
action_360 (244) = happyShift action_217
action_360 (245) = happyShift action_45
action_360 (246) = happyShift action_46
action_360 (247) = happyShift action_47
action_360 (248) = happyShift action_48
action_360 (249) = happyShift action_49
action_360 (250) = happyShift action_50
action_360 (251) = happyShift action_51
action_360 (252) = happyShift action_52
action_360 (253) = happyShift action_53
action_360 (254) = happyShift action_54
action_360 (255) = happyShift action_55
action_360 (257) = happyShift action_56
action_360 (258) = happyShift action_438
action_360 (265) = happyShift action_57
action_360 (267) = happyShift action_431
action_360 (268) = happyShift action_58
action_360 (269) = happyShift action_356
action_360 (270) = happyShift action_357
action_360 (272) = happyShift action_221
action_360 (275) = happyShift action_59
action_360 (280) = happyShift action_60
action_360 (282) = happyShift action_61
action_360 (283) = happyShift action_358
action_360 (284) = happyShift action_359
action_360 (289) = happyShift action_63
action_360 (292) = happyShift action_64
action_360 (293) = happyShift action_65
action_360 (294) = happyShift action_66
action_360 (295) = happyShift action_67
action_360 (296) = happyShift action_68
action_360 (297) = happyShift action_69
action_360 (299) = happyShift action_70
action_360 (300) = happyShift action_71
action_360 (301) = happyShift action_72
action_360 (303) = happyShift action_73
action_360 (305) = happyShift action_74
action_360 (306) = happyShift action_75
action_360 (313) = happyShift action_76
action_360 (314) = happyShift action_77
action_360 (315) = happyShift action_78
action_360 (316) = happyShift action_79
action_360 (318) = happyShift action_80
action_360 (319) = happyShift action_81
action_360 (320) = happyShift action_82
action_360 (321) = happyShift action_83
action_360 (322) = happyShift action_84
action_360 (323) = happyShift action_85
action_360 (325) = happyShift action_86
action_360 (327) = happyShift action_87
action_360 (332) = happyShift action_88
action_360 (334) = happyShift action_89
action_360 (335) = happyShift action_90
action_360 (337) = happyShift action_91
action_360 (338) = happyShift action_92
action_360 (345) = happyShift action_142
action_360 (346) = happyShift action_94
action_360 (350) = happyShift action_95
action_360 (356) = happyShift action_97
action_360 (363) = happyShift action_98
action_360 (364) = happyShift action_99
action_360 (365) = happyShift action_100
action_360 (140) = happyGoto action_344
action_360 (141) = happyGoto action_15
action_360 (142) = happyGoto action_16
action_360 (143) = happyGoto action_17
action_360 (144) = happyGoto action_18
action_360 (147) = happyGoto action_19
action_360 (148) = happyGoto action_20
action_360 (149) = happyGoto action_21
action_360 (152) = happyGoto action_22
action_360 (153) = happyGoto action_23
action_360 (154) = happyGoto action_24
action_360 (156) = happyGoto action_437
action_360 (161) = happyGoto action_25
action_360 (195) = happyGoto action_28
action_360 (198) = happyGoto action_29
action_360 (199) = happyGoto action_30
action_360 (201) = happyGoto action_31
action_360 (204) = happyGoto action_348
action_360 (206) = happyGoto action_349
action_360 (209) = happyGoto action_350
action_360 (210) = happyGoto action_208
action_360 (211) = happyGoto action_32
action_360 (212) = happyGoto action_33
action_360 (213) = happyGoto action_34
action_360 (214) = happyGoto action_35
action_360 (215) = happyGoto action_36
action_360 (216) = happyGoto action_37
action_360 (217) = happyGoto action_209
action_360 (218) = happyGoto action_210
action_360 (220) = happyGoto action_351
action_360 (222) = happyGoto action_352
action_360 (223) = happyGoto action_353
action_360 (224) = happyGoto action_38
action_360 _ = happyFail
action_361 (258) = happyShift action_436
action_361 (267) = happyShift action_237
action_361 (155) = happyGoto action_434
action_361 (158) = happyGoto action_435
action_361 _ = happyFail
action_362 _ = happyReduce_532
action_363 (276) = happyShift action_432
action_363 (278) = happyShift action_433
action_363 _ = happyReduce_395
action_364 (234) = happyShift action_39
action_364 (235) = happyShift action_40
action_364 (236) = happyShift action_41
action_364 (237) = happyShift action_42
action_364 (238) = happyShift action_43
action_364 (239) = happyShift action_44
action_364 (241) = happyShift action_354
action_364 (242) = happyShift action_215
action_364 (243) = happyShift action_216
action_364 (244) = happyShift action_217
action_364 (245) = happyShift action_45
action_364 (246) = happyShift action_46
action_364 (247) = happyShift action_47
action_364 (248) = happyShift action_48
action_364 (249) = happyShift action_49
action_364 (250) = happyShift action_50
action_364 (251) = happyShift action_51
action_364 (252) = happyShift action_52
action_364 (253) = happyShift action_53
action_364 (254) = happyShift action_54
action_364 (255) = happyShift action_55
action_364 (256) = happyShift action_430
action_364 (257) = happyShift action_56
action_364 (265) = happyShift action_57
action_364 (267) = happyShift action_431
action_364 (268) = happyShift action_58
action_364 (269) = happyShift action_356
action_364 (270) = happyShift action_357
action_364 (272) = happyShift action_221
action_364 (275) = happyShift action_59
action_364 (280) = happyShift action_60
action_364 (282) = happyShift action_61
action_364 (283) = happyShift action_358
action_364 (284) = happyShift action_359
action_364 (289) = happyShift action_63
action_364 (292) = happyShift action_64
action_364 (293) = happyShift action_65
action_364 (294) = happyShift action_66
action_364 (295) = happyShift action_67
action_364 (296) = happyShift action_68
action_364 (297) = happyShift action_69
action_364 (299) = happyShift action_70
action_364 (300) = happyShift action_71
action_364 (301) = happyShift action_72
action_364 (303) = happyShift action_73
action_364 (305) = happyShift action_74
action_364 (306) = happyShift action_75
action_364 (313) = happyShift action_76
action_364 (314) = happyShift action_77
action_364 (315) = happyShift action_78
action_364 (316) = happyShift action_79
action_364 (318) = happyShift action_80
action_364 (319) = happyShift action_81
action_364 (320) = happyShift action_82
action_364 (321) = happyShift action_83
action_364 (322) = happyShift action_84
action_364 (323) = happyShift action_85
action_364 (325) = happyShift action_86
action_364 (327) = happyShift action_87
action_364 (332) = happyShift action_88
action_364 (334) = happyShift action_89
action_364 (335) = happyShift action_90
action_364 (337) = happyShift action_91
action_364 (338) = happyShift action_92
action_364 (345) = happyShift action_142
action_364 (346) = happyShift action_94
action_364 (350) = happyShift action_95
action_364 (356) = happyShift action_97
action_364 (363) = happyShift action_98
action_364 (364) = happyShift action_99
action_364 (365) = happyShift action_100
action_364 (140) = happyGoto action_344
action_364 (141) = happyGoto action_15
action_364 (142) = happyGoto action_16
action_364 (143) = happyGoto action_17
action_364 (144) = happyGoto action_18
action_364 (147) = happyGoto action_19
action_364 (148) = happyGoto action_20
action_364 (149) = happyGoto action_21
action_364 (152) = happyGoto action_22
action_364 (153) = happyGoto action_23
action_364 (154) = happyGoto action_24
action_364 (156) = happyGoto action_429
action_364 (161) = happyGoto action_25
action_364 (195) = happyGoto action_28
action_364 (198) = happyGoto action_29
action_364 (199) = happyGoto action_30
action_364 (201) = happyGoto action_31
action_364 (204) = happyGoto action_348
action_364 (206) = happyGoto action_349
action_364 (209) = happyGoto action_350
action_364 (210) = happyGoto action_208
action_364 (211) = happyGoto action_32
action_364 (212) = happyGoto action_33
action_364 (213) = happyGoto action_34
action_364 (214) = happyGoto action_35
action_364 (215) = happyGoto action_36
action_364 (216) = happyGoto action_37
action_364 (217) = happyGoto action_209
action_364 (218) = happyGoto action_210
action_364 (220) = happyGoto action_351
action_364 (222) = happyGoto action_352
action_364 (223) = happyGoto action_353
action_364 (224) = happyGoto action_38
action_364 _ = happyFail
action_365 (256) = happyShift action_428
action_365 (267) = happyShift action_237
action_365 (155) = happyGoto action_426
action_365 (157) = happyGoto action_427
action_365 _ = happyFail
action_366 (256) = happyShift action_425
action_366 _ = happyFail
action_367 (256) = happyShift action_424
action_367 _ = happyReduce_554
action_368 (256) = happyShift action_423
action_368 _ = happyFail
action_369 (256) = happyReduce_592
action_369 _ = happyReduce_594
action_370 (256) = happyReduce_595
action_370 _ = happyReduce_600
action_371 _ = happyReduce_529
action_372 (256) = happyReduce_598
action_372 _ = happyReduce_602
action_373 (234) = happyShift action_39
action_373 (235) = happyShift action_40
action_373 (236) = happyShift action_41
action_373 (237) = happyShift action_42
action_373 (238) = happyShift action_43
action_373 (239) = happyShift action_44
action_373 (245) = happyShift action_45
action_373 (246) = happyShift action_46
action_373 (247) = happyShift action_47
action_373 (248) = happyShift action_48
action_373 (249) = happyShift action_49
action_373 (250) = happyShift action_50
action_373 (251) = happyShift action_51
action_373 (252) = happyShift action_52
action_373 (253) = happyShift action_53
action_373 (254) = happyShift action_54
action_373 (255) = happyShift action_55
action_373 (257) = happyShift action_56
action_373 (265) = happyShift action_57
action_373 (268) = happyShift action_58
action_373 (280) = happyShift action_60
action_373 (289) = happyShift action_63
action_373 (292) = happyShift action_64
action_373 (293) = happyShift action_65
action_373 (294) = happyShift action_66
action_373 (295) = happyShift action_67
action_373 (296) = happyShift action_68
action_373 (297) = happyShift action_69
action_373 (299) = happyShift action_70
action_373 (300) = happyShift action_71
action_373 (301) = happyShift action_72
action_373 (303) = happyShift action_73
action_373 (305) = happyShift action_74
action_373 (306) = happyShift action_75
action_373 (313) = happyShift action_76
action_373 (314) = happyShift action_77
action_373 (315) = happyShift action_78
action_373 (316) = happyShift action_79
action_373 (318) = happyShift action_80
action_373 (319) = happyShift action_81
action_373 (320) = happyShift action_82
action_373 (321) = happyShift action_83
action_373 (322) = happyShift action_84
action_373 (323) = happyShift action_85
action_373 (325) = happyShift action_86
action_373 (334) = happyShift action_89
action_373 (335) = happyShift action_90
action_373 (337) = happyShift action_91
action_373 (356) = happyShift action_97
action_373 (149) = happyGoto action_340
action_373 (152) = happyGoto action_22
action_373 (153) = happyGoto action_23
action_373 (154) = happyGoto action_24
action_373 (161) = happyGoto action_25
action_373 (195) = happyGoto action_28
action_373 (198) = happyGoto action_29
action_373 (199) = happyGoto action_30
action_373 (201) = happyGoto action_31
action_373 (211) = happyGoto action_32
action_373 (212) = happyGoto action_33
action_373 (213) = happyGoto action_34
action_373 (214) = happyGoto action_35
action_373 (215) = happyGoto action_36
action_373 (216) = happyGoto action_37
action_373 (224) = happyGoto action_38
action_373 _ = happyReduce_596
action_374 (256) = happyReduce_597
action_374 _ = happyReduce_601
action_375 (256) = happyReduce_599
action_375 _ = happyReduce_603
action_376 (234) = happyShift action_39
action_376 (236) = happyShift action_41
action_376 (237) = happyShift action_42
action_376 (238) = happyShift action_43
action_376 (239) = happyShift action_44
action_376 (255) = happyShift action_115
action_376 (257) = happyShift action_116
action_376 (265) = happyShift action_117
action_376 (313) = happyShift action_76
action_376 (314) = happyShift action_118
action_376 (315) = happyShift action_119
action_376 (316) = happyShift action_120
action_376 (318) = happyShift action_80
action_376 (319) = happyShift action_81
action_376 (320) = happyShift action_82
action_376 (321) = happyShift action_83
action_376 (322) = happyShift action_84
action_376 (323) = happyShift action_85
action_376 (325) = happyShift action_86
action_376 (337) = happyShift action_91
action_376 (356) = happyShift action_97
action_376 (78) = happyGoto action_101
action_376 (79) = happyGoto action_421
action_376 (80) = happyGoto action_422
action_376 (82) = happyGoto action_189
action_376 (84) = happyGoto action_104
action_376 (85) = happyGoto action_105
action_376 (86) = happyGoto action_106
action_376 (199) = happyGoto action_110
action_376 (212) = happyGoto action_111
action_376 (214) = happyGoto action_35
action_376 (215) = happyGoto action_112
action_376 (216) = happyGoto action_37
action_376 (230) = happyGoto action_113
action_376 (231) = happyGoto action_114
action_376 _ = happyFail
action_377 (234) = happyShift action_39
action_377 (235) = happyShift action_40
action_377 (236) = happyShift action_41
action_377 (237) = happyShift action_42
action_377 (238) = happyShift action_43
action_377 (239) = happyShift action_44
action_377 (245) = happyShift action_45
action_377 (246) = happyShift action_46
action_377 (247) = happyShift action_47
action_377 (248) = happyShift action_48
action_377 (249) = happyShift action_49
action_377 (250) = happyShift action_50
action_377 (251) = happyShift action_51
action_377 (252) = happyShift action_52
action_377 (253) = happyShift action_53
action_377 (254) = happyShift action_54
action_377 (255) = happyShift action_55
action_377 (257) = happyShift action_56
action_377 (265) = happyShift action_57
action_377 (268) = happyShift action_58
action_377 (280) = happyShift action_60
action_377 (289) = happyShift action_63
action_377 (292) = happyShift action_64
action_377 (293) = happyShift action_65
action_377 (294) = happyShift action_66
action_377 (295) = happyShift action_67
action_377 (296) = happyShift action_68
action_377 (297) = happyShift action_69
action_377 (299) = happyShift action_70
action_377 (300) = happyShift action_71
action_377 (301) = happyShift action_72
action_377 (303) = happyShift action_73
action_377 (305) = happyShift action_74
action_377 (306) = happyShift action_75
action_377 (313) = happyShift action_76
action_377 (314) = happyShift action_77
action_377 (315) = happyShift action_78
action_377 (316) = happyShift action_79
action_377 (318) = happyShift action_80
action_377 (319) = happyShift action_81
action_377 (320) = happyShift action_82
action_377 (321) = happyShift action_83
action_377 (322) = happyShift action_84
action_377 (323) = happyShift action_85
action_377 (325) = happyShift action_86
action_377 (334) = happyShift action_89
action_377 (335) = happyShift action_90
action_377 (337) = happyShift action_91
action_377 (356) = happyShift action_97
action_377 (152) = happyGoto action_420
action_377 (153) = happyGoto action_23
action_377 (154) = happyGoto action_24
action_377 (161) = happyGoto action_25
action_377 (195) = happyGoto action_28
action_377 (198) = happyGoto action_29
action_377 (199) = happyGoto action_30
action_377 (201) = happyGoto action_31
action_377 (211) = happyGoto action_32
action_377 (212) = happyGoto action_33
action_377 (213) = happyGoto action_34
action_377 (214) = happyGoto action_35
action_377 (215) = happyGoto action_36
action_377 (216) = happyGoto action_37
action_377 (224) = happyGoto action_38
action_377 _ = happyFail
action_378 (234) = happyShift action_39
action_378 (235) = happyShift action_40
action_378 (236) = happyShift action_41
action_378 (237) = happyShift action_42
action_378 (238) = happyShift action_43
action_378 (239) = happyShift action_44
action_378 (245) = happyShift action_45
action_378 (246) = happyShift action_46
action_378 (247) = happyShift action_47
action_378 (248) = happyShift action_48
action_378 (249) = happyShift action_49
action_378 (250) = happyShift action_50
action_378 (251) = happyShift action_51
action_378 (252) = happyShift action_52
action_378 (253) = happyShift action_53
action_378 (254) = happyShift action_54
action_378 (255) = happyShift action_55
action_378 (257) = happyShift action_56
action_378 (265) = happyShift action_57
action_378 (268) = happyShift action_58
action_378 (280) = happyShift action_60
action_378 (289) = happyShift action_63
action_378 (292) = happyShift action_64
action_378 (293) = happyShift action_65
action_378 (294) = happyShift action_66
action_378 (295) = happyShift action_67
action_378 (296) = happyShift action_68
action_378 (297) = happyShift action_69
action_378 (299) = happyShift action_70
action_378 (300) = happyShift action_71
action_378 (301) = happyShift action_72
action_378 (303) = happyShift action_73
action_378 (305) = happyShift action_74
action_378 (306) = happyShift action_75
action_378 (313) = happyShift action_76
action_378 (314) = happyShift action_77
action_378 (315) = happyShift action_78
action_378 (316) = happyShift action_79
action_378 (318) = happyShift action_80
action_378 (319) = happyShift action_81
action_378 (320) = happyShift action_82
action_378 (321) = happyShift action_83
action_378 (322) = happyShift action_84
action_378 (323) = happyShift action_85
action_378 (325) = happyShift action_86
action_378 (334) = happyShift action_89
action_378 (335) = happyShift action_90
action_378 (337) = happyShift action_91
action_378 (356) = happyShift action_97
action_378 (152) = happyGoto action_419
action_378 (153) = happyGoto action_23
action_378 (154) = happyGoto action_24
action_378 (161) = happyGoto action_25
action_378 (195) = happyGoto action_28
action_378 (198) = happyGoto action_29
action_378 (199) = happyGoto action_30
action_378 (201) = happyGoto action_31
action_378 (211) = happyGoto action_32
action_378 (212) = happyGoto action_33
action_378 (213) = happyGoto action_34
action_378 (214) = happyGoto action_35
action_378 (215) = happyGoto action_36
action_378 (216) = happyGoto action_37
action_378 (224) = happyGoto action_38
action_378 _ = happyFail
action_379 (234) = happyShift action_39
action_379 (235) = happyShift action_40
action_379 (236) = happyShift action_41
action_379 (237) = happyShift action_42
action_379 (238) = happyShift action_43
action_379 (239) = happyShift action_44
action_379 (245) = happyShift action_45
action_379 (246) = happyShift action_46
action_379 (247) = happyShift action_47
action_379 (248) = happyShift action_48
action_379 (249) = happyShift action_49
action_379 (250) = happyShift action_50
action_379 (251) = happyShift action_51
action_379 (252) = happyShift action_52
action_379 (253) = happyShift action_53
action_379 (254) = happyShift action_54
action_379 (255) = happyShift action_55
action_379 (257) = happyShift action_56
action_379 (265) = happyShift action_57
action_379 (268) = happyShift action_58
action_379 (275) = happyShift action_59
action_379 (280) = happyShift action_60
action_379 (282) = happyShift action_61
action_379 (289) = happyShift action_63
action_379 (292) = happyShift action_64
action_379 (293) = happyShift action_65
action_379 (294) = happyShift action_66
action_379 (295) = happyShift action_67
action_379 (296) = happyShift action_68
action_379 (297) = happyShift action_69
action_379 (299) = happyShift action_70
action_379 (300) = happyShift action_71
action_379 (301) = happyShift action_72
action_379 (303) = happyShift action_73
action_379 (305) = happyShift action_74
action_379 (306) = happyShift action_75
action_379 (313) = happyShift action_76
action_379 (314) = happyShift action_77
action_379 (315) = happyShift action_78
action_379 (316) = happyShift action_79
action_379 (318) = happyShift action_80
action_379 (319) = happyShift action_81
action_379 (320) = happyShift action_82
action_379 (321) = happyShift action_83
action_379 (322) = happyShift action_84
action_379 (323) = happyShift action_85
action_379 (325) = happyShift action_86
action_379 (327) = happyShift action_87
action_379 (332) = happyShift action_88
action_379 (334) = happyShift action_89
action_379 (335) = happyShift action_90
action_379 (337) = happyShift action_91
action_379 (338) = happyShift action_92
action_379 (345) = happyShift action_142
action_379 (346) = happyShift action_94
action_379 (350) = happyShift action_95
action_379 (356) = happyShift action_97
action_379 (363) = happyShift action_98
action_379 (364) = happyShift action_99
action_379 (365) = happyShift action_100
action_379 (139) = happyGoto action_418
action_379 (140) = happyGoto action_156
action_379 (141) = happyGoto action_15
action_379 (142) = happyGoto action_16
action_379 (143) = happyGoto action_17
action_379 (144) = happyGoto action_18
action_379 (147) = happyGoto action_19
action_379 (148) = happyGoto action_20
action_379 (149) = happyGoto action_21
action_379 (152) = happyGoto action_22
action_379 (153) = happyGoto action_23
action_379 (154) = happyGoto action_24
action_379 (161) = happyGoto action_25
action_379 (195) = happyGoto action_28
action_379 (198) = happyGoto action_29
action_379 (199) = happyGoto action_30
action_379 (201) = happyGoto action_31
action_379 (211) = happyGoto action_32
action_379 (212) = happyGoto action_33
action_379 (213) = happyGoto action_34
action_379 (214) = happyGoto action_35
action_379 (215) = happyGoto action_36
action_379 (216) = happyGoto action_37
action_379 (224) = happyGoto action_38
action_379 _ = happyFail
action_380 (234) = happyShift action_39
action_380 (235) = happyShift action_40
action_380 (255) = happyShift action_415
action_380 (263) = happyShift action_416
action_380 (271) = happyShift action_417
action_380 (313) = happyShift action_76
action_380 (314) = happyShift action_77
action_380 (315) = happyShift action_78
action_380 (316) = happyShift action_79
action_380 (318) = happyShift action_80
action_380 (319) = happyShift action_81
action_380 (320) = happyShift action_82
action_380 (321) = happyShift action_83
action_380 (322) = happyShift action_84
action_380 (323) = happyShift action_85
action_380 (325) = happyShift action_86
action_380 (334) = happyShift action_89
action_380 (335) = happyShift action_90
action_380 (337) = happyShift action_91
action_380 (356) = happyShift action_97
action_380 (190) = happyGoto action_412
action_380 (191) = happyGoto action_413
action_380 (198) = happyGoto action_414
action_380 (211) = happyGoto action_32
action_380 (212) = happyGoto action_33
action_380 (213) = happyGoto action_34
action_380 _ = happyFail
action_381 _ = happyReduce_350
action_382 (234) = happyShift action_39
action_382 (235) = happyShift action_40
action_382 (236) = happyShift action_41
action_382 (237) = happyShift action_42
action_382 (238) = happyShift action_43
action_382 (239) = happyShift action_44
action_382 (245) = happyShift action_45
action_382 (246) = happyShift action_46
action_382 (247) = happyShift action_47
action_382 (248) = happyShift action_48
action_382 (249) = happyShift action_49
action_382 (250) = happyShift action_50
action_382 (251) = happyShift action_51
action_382 (252) = happyShift action_52
action_382 (253) = happyShift action_53
action_382 (254) = happyShift action_54
action_382 (255) = happyShift action_55
action_382 (257) = happyShift action_56
action_382 (265) = happyShift action_57
action_382 (268) = happyShift action_58
action_382 (275) = happyShift action_59
action_382 (280) = happyShift action_60
action_382 (282) = happyShift action_61
action_382 (289) = happyShift action_63
action_382 (292) = happyShift action_64
action_382 (293) = happyShift action_65
action_382 (294) = happyShift action_66
action_382 (295) = happyShift action_67
action_382 (296) = happyShift action_68
action_382 (297) = happyShift action_69
action_382 (299) = happyShift action_70
action_382 (300) = happyShift action_71
action_382 (301) = happyShift action_72
action_382 (303) = happyShift action_73
action_382 (305) = happyShift action_74
action_382 (306) = happyShift action_75
action_382 (313) = happyShift action_76
action_382 (314) = happyShift action_77
action_382 (315) = happyShift action_78
action_382 (316) = happyShift action_79
action_382 (318) = happyShift action_80
action_382 (319) = happyShift action_81
action_382 (320) = happyShift action_82
action_382 (321) = happyShift action_83
action_382 (322) = happyShift action_84
action_382 (323) = happyShift action_85
action_382 (325) = happyShift action_86
action_382 (327) = happyShift action_87
action_382 (332) = happyShift action_88
action_382 (334) = happyShift action_89
action_382 (335) = happyShift action_90
action_382 (337) = happyShift action_91
action_382 (338) = happyShift action_92
action_382 (345) = happyShift action_142
action_382 (346) = happyShift action_94
action_382 (350) = happyShift action_95
action_382 (356) = happyShift action_97
action_382 (363) = happyShift action_98
action_382 (364) = happyShift action_99
action_382 (365) = happyShift action_100
action_382 (144) = happyGoto action_410
action_382 (147) = happyGoto action_411
action_382 (148) = happyGoto action_20
action_382 (149) = happyGoto action_21
action_382 (152) = happyGoto action_22
action_382 (153) = happyGoto action_23
action_382 (154) = happyGoto action_24
action_382 (161) = happyGoto action_25
action_382 (195) = happyGoto action_28
action_382 (198) = happyGoto action_29
action_382 (199) = happyGoto action_30
action_382 (201) = happyGoto action_31
action_382 (211) = happyGoto action_32
action_382 (212) = happyGoto action_33
action_382 (213) = happyGoto action_34
action_382 (214) = happyGoto action_35
action_382 (215) = happyGoto action_36
action_382 (216) = happyGoto action_37
action_382 (224) = happyGoto action_38
action_382 _ = happyReduce_322
action_383 (234) = happyShift action_39
action_383 (236) = happyShift action_41
action_383 (237) = happyShift action_42
action_383 (238) = happyShift action_43
action_383 (239) = happyShift action_44
action_383 (255) = happyShift action_115
action_383 (257) = happyShift action_116
action_383 (265) = happyShift action_117
action_383 (313) = happyShift action_76
action_383 (314) = happyShift action_118
action_383 (315) = happyShift action_119
action_383 (316) = happyShift action_120
action_383 (318) = happyShift action_80
action_383 (319) = happyShift action_81
action_383 (320) = happyShift action_82
action_383 (321) = happyShift action_83
action_383 (322) = happyShift action_84
action_383 (323) = happyShift action_85
action_383 (325) = happyShift action_86
action_383 (335) = happyShift action_121
action_383 (337) = happyShift action_91
action_383 (356) = happyShift action_97
action_383 (78) = happyGoto action_101
action_383 (80) = happyGoto action_102
action_383 (82) = happyGoto action_103
action_383 (84) = happyGoto action_104
action_383 (85) = happyGoto action_105
action_383 (86) = happyGoto action_106
action_383 (88) = happyGoto action_409
action_383 (89) = happyGoto action_108
action_383 (90) = happyGoto action_109
action_383 (199) = happyGoto action_110
action_383 (212) = happyGoto action_111
action_383 (214) = happyGoto action_35
action_383 (215) = happyGoto action_112
action_383 (216) = happyGoto action_37
action_383 (230) = happyGoto action_113
action_383 (231) = happyGoto action_114
action_383 _ = happyFail
action_384 (234) = happyShift action_39
action_384 (235) = happyShift action_40
action_384 (236) = happyShift action_41
action_384 (237) = happyShift action_42
action_384 (238) = happyShift action_43
action_384 (239) = happyShift action_44
action_384 (245) = happyShift action_45
action_384 (246) = happyShift action_46
action_384 (247) = happyShift action_47
action_384 (248) = happyShift action_48
action_384 (249) = happyShift action_49
action_384 (250) = happyShift action_50
action_384 (251) = happyShift action_51
action_384 (252) = happyShift action_52
action_384 (253) = happyShift action_53
action_384 (254) = happyShift action_54
action_384 (255) = happyShift action_55
action_384 (257) = happyShift action_56
action_384 (265) = happyShift action_57
action_384 (268) = happyShift action_58
action_384 (275) = happyShift action_59
action_384 (280) = happyShift action_60
action_384 (282) = happyShift action_61
action_384 (289) = happyShift action_63
action_384 (292) = happyShift action_64
action_384 (293) = happyShift action_65
action_384 (294) = happyShift action_66
action_384 (295) = happyShift action_67
action_384 (296) = happyShift action_68
action_384 (297) = happyShift action_69
action_384 (299) = happyShift action_70
action_384 (300) = happyShift action_71
action_384 (301) = happyShift action_72
action_384 (303) = happyShift action_73
action_384 (305) = happyShift action_74
action_384 (306) = happyShift action_75
action_384 (313) = happyShift action_76
action_384 (314) = happyShift action_77
action_384 (315) = happyShift action_78
action_384 (316) = happyShift action_79
action_384 (318) = happyShift action_80
action_384 (319) = happyShift action_81
action_384 (320) = happyShift action_82
action_384 (321) = happyShift action_83
action_384 (322) = happyShift action_84
action_384 (323) = happyShift action_85
action_384 (325) = happyShift action_86
action_384 (327) = happyShift action_87
action_384 (332) = happyShift action_88
action_384 (334) = happyShift action_89
action_384 (335) = happyShift action_90
action_384 (337) = happyShift action_91
action_384 (338) = happyShift action_92
action_384 (345) = happyShift action_142
action_384 (346) = happyShift action_94
action_384 (350) = happyShift action_95
action_384 (356) = happyShift action_97
action_384 (363) = happyShift action_98
action_384 (364) = happyShift action_99
action_384 (365) = happyShift action_100
action_384 (140) = happyGoto action_408
action_384 (141) = happyGoto action_15
action_384 (142) = happyGoto action_16
action_384 (143) = happyGoto action_17
action_384 (144) = happyGoto action_18
action_384 (147) = happyGoto action_19
action_384 (148) = happyGoto action_20
action_384 (149) = happyGoto action_21
action_384 (152) = happyGoto action_22
action_384 (153) = happyGoto action_23
action_384 (154) = happyGoto action_24
action_384 (161) = happyGoto action_25
action_384 (195) = happyGoto action_28
action_384 (198) = happyGoto action_29
action_384 (199) = happyGoto action_30
action_384 (201) = happyGoto action_31
action_384 (211) = happyGoto action_32
action_384 (212) = happyGoto action_33
action_384 (213) = happyGoto action_34
action_384 (214) = happyGoto action_35
action_384 (215) = happyGoto action_36
action_384 (216) = happyGoto action_37
action_384 (224) = happyGoto action_38
action_384 _ = happyFail
action_385 (234) = happyShift action_39
action_385 (235) = happyShift action_40
action_385 (236) = happyShift action_41
action_385 (237) = happyShift action_42
action_385 (238) = happyShift action_43
action_385 (239) = happyShift action_44
action_385 (245) = happyShift action_45
action_385 (246) = happyShift action_46
action_385 (247) = happyShift action_47
action_385 (248) = happyShift action_48
action_385 (249) = happyShift action_49
action_385 (250) = happyShift action_50
action_385 (251) = happyShift action_51
action_385 (252) = happyShift action_52
action_385 (253) = happyShift action_53
action_385 (254) = happyShift action_54
action_385 (255) = happyShift action_55
action_385 (257) = happyShift action_56
action_385 (265) = happyShift action_57
action_385 (268) = happyShift action_58
action_385 (275) = happyShift action_59
action_385 (280) = happyShift action_60
action_385 (282) = happyShift action_61
action_385 (289) = happyShift action_63
action_385 (292) = happyShift action_64
action_385 (293) = happyShift action_65
action_385 (294) = happyShift action_66
action_385 (295) = happyShift action_67
action_385 (296) = happyShift action_68
action_385 (297) = happyShift action_69
action_385 (299) = happyShift action_70
action_385 (300) = happyShift action_71
action_385 (301) = happyShift action_72
action_385 (303) = happyShift action_73
action_385 (305) = happyShift action_74
action_385 (306) = happyShift action_75
action_385 (313) = happyShift action_76
action_385 (314) = happyShift action_77
action_385 (315) = happyShift action_78
action_385 (316) = happyShift action_79
action_385 (318) = happyShift action_80
action_385 (319) = happyShift action_81
action_385 (320) = happyShift action_82
action_385 (321) = happyShift action_83
action_385 (322) = happyShift action_84
action_385 (323) = happyShift action_85
action_385 (325) = happyShift action_86
action_385 (327) = happyShift action_87
action_385 (332) = happyShift action_88
action_385 (334) = happyShift action_89
action_385 (335) = happyShift action_90
action_385 (337) = happyShift action_91
action_385 (338) = happyShift action_92
action_385 (345) = happyShift action_142
action_385 (346) = happyShift action_94
action_385 (350) = happyShift action_95
action_385 (356) = happyShift action_97
action_385 (363) = happyShift action_98
action_385 (364) = happyShift action_99
action_385 (365) = happyShift action_100
action_385 (140) = happyGoto action_407
action_385 (141) = happyGoto action_15
action_385 (142) = happyGoto action_16
action_385 (143) = happyGoto action_17
action_385 (144) = happyGoto action_18
action_385 (147) = happyGoto action_19
action_385 (148) = happyGoto action_20
action_385 (149) = happyGoto action_21
action_385 (152) = happyGoto action_22
action_385 (153) = happyGoto action_23
action_385 (154) = happyGoto action_24
action_385 (161) = happyGoto action_25
action_385 (195) = happyGoto action_28
action_385 (198) = happyGoto action_29
action_385 (199) = happyGoto action_30
action_385 (201) = happyGoto action_31
action_385 (211) = happyGoto action_32
action_385 (212) = happyGoto action_33
action_385 (213) = happyGoto action_34
action_385 (214) = happyGoto action_35
action_385 (215) = happyGoto action_36
action_385 (216) = happyGoto action_37
action_385 (224) = happyGoto action_38
action_385 _ = happyFail
action_386 (234) = happyShift action_39
action_386 (235) = happyShift action_40
action_386 (236) = happyShift action_41
action_386 (237) = happyShift action_42
action_386 (238) = happyShift action_43
action_386 (239) = happyShift action_44
action_386 (245) = happyShift action_45
action_386 (246) = happyShift action_46
action_386 (247) = happyShift action_47
action_386 (248) = happyShift action_48
action_386 (249) = happyShift action_49
action_386 (250) = happyShift action_50
action_386 (251) = happyShift action_51
action_386 (252) = happyShift action_52
action_386 (253) = happyShift action_53
action_386 (254) = happyShift action_54
action_386 (255) = happyShift action_55
action_386 (257) = happyShift action_56
action_386 (265) = happyShift action_57
action_386 (268) = happyShift action_58
action_386 (275) = happyShift action_59
action_386 (280) = happyShift action_60
action_386 (282) = happyShift action_61
action_386 (289) = happyShift action_63
action_386 (292) = happyShift action_64
action_386 (293) = happyShift action_65
action_386 (294) = happyShift action_66
action_386 (295) = happyShift action_67
action_386 (296) = happyShift action_68
action_386 (297) = happyShift action_69
action_386 (299) = happyShift action_70
action_386 (300) = happyShift action_71
action_386 (301) = happyShift action_72
action_386 (303) = happyShift action_73
action_386 (305) = happyShift action_74
action_386 (306) = happyShift action_75
action_386 (313) = happyShift action_76
action_386 (314) = happyShift action_77
action_386 (315) = happyShift action_78
action_386 (316) = happyShift action_79
action_386 (318) = happyShift action_80
action_386 (319) = happyShift action_81
action_386 (320) = happyShift action_82
action_386 (321) = happyShift action_83
action_386 (322) = happyShift action_84
action_386 (323) = happyShift action_85
action_386 (325) = happyShift action_86
action_386 (327) = happyShift action_87
action_386 (332) = happyShift action_88
action_386 (334) = happyShift action_89
action_386 (335) = happyShift action_90
action_386 (337) = happyShift action_91
action_386 (338) = happyShift action_92
action_386 (345) = happyShift action_142
action_386 (346) = happyShift action_94
action_386 (350) = happyShift action_95
action_386 (356) = happyShift action_97
action_386 (363) = happyShift action_98
action_386 (364) = happyShift action_99
action_386 (365) = happyShift action_100
action_386 (140) = happyGoto action_406
action_386 (141) = happyGoto action_15
action_386 (142) = happyGoto action_16
action_386 (143) = happyGoto action_17
action_386 (144) = happyGoto action_18
action_386 (147) = happyGoto action_19
action_386 (148) = happyGoto action_20
action_386 (149) = happyGoto action_21
action_386 (152) = happyGoto action_22
action_386 (153) = happyGoto action_23
action_386 (154) = happyGoto action_24
action_386 (161) = happyGoto action_25
action_386 (195) = happyGoto action_28
action_386 (198) = happyGoto action_29
action_386 (199) = happyGoto action_30
action_386 (201) = happyGoto action_31
action_386 (211) = happyGoto action_32
action_386 (212) = happyGoto action_33
action_386 (213) = happyGoto action_34
action_386 (214) = happyGoto action_35
action_386 (215) = happyGoto action_36
action_386 (216) = happyGoto action_37
action_386 (224) = happyGoto action_38
action_386 _ = happyFail
action_387 (234) = happyShift action_39
action_387 (235) = happyShift action_40
action_387 (236) = happyShift action_41
action_387 (237) = happyShift action_42
action_387 (238) = happyShift action_43
action_387 (239) = happyShift action_44
action_387 (245) = happyShift action_45
action_387 (246) = happyShift action_46
action_387 (247) = happyShift action_47
action_387 (248) = happyShift action_48
action_387 (249) = happyShift action_49
action_387 (250) = happyShift action_50
action_387 (251) = happyShift action_51
action_387 (252) = happyShift action_52
action_387 (253) = happyShift action_53
action_387 (254) = happyShift action_54
action_387 (255) = happyShift action_55
action_387 (257) = happyShift action_56
action_387 (265) = happyShift action_57
action_387 (268) = happyShift action_58
action_387 (275) = happyShift action_59
action_387 (280) = happyShift action_60
action_387 (282) = happyShift action_61
action_387 (289) = happyShift action_63
action_387 (292) = happyShift action_64
action_387 (293) = happyShift action_65
action_387 (294) = happyShift action_66
action_387 (295) = happyShift action_67
action_387 (296) = happyShift action_68
action_387 (297) = happyShift action_69
action_387 (299) = happyShift action_70
action_387 (300) = happyShift action_71
action_387 (301) = happyShift action_72
action_387 (303) = happyShift action_73
action_387 (305) = happyShift action_74
action_387 (306) = happyShift action_75
action_387 (313) = happyShift action_76
action_387 (314) = happyShift action_77
action_387 (315) = happyShift action_78
action_387 (316) = happyShift action_79
action_387 (318) = happyShift action_80
action_387 (319) = happyShift action_81
action_387 (320) = happyShift action_82
action_387 (321) = happyShift action_83
action_387 (322) = happyShift action_84
action_387 (323) = happyShift action_85
action_387 (325) = happyShift action_86
action_387 (327) = happyShift action_87
action_387 (332) = happyShift action_88
action_387 (334) = happyShift action_89
action_387 (335) = happyShift action_90
action_387 (337) = happyShift action_91
action_387 (338) = happyShift action_92
action_387 (345) = happyShift action_142
action_387 (346) = happyShift action_94
action_387 (350) = happyShift action_95
action_387 (356) = happyShift action_97
action_387 (363) = happyShift action_98
action_387 (364) = happyShift action_99
action_387 (365) = happyShift action_100
action_387 (140) = happyGoto action_405
action_387 (141) = happyGoto action_15
action_387 (142) = happyGoto action_16
action_387 (143) = happyGoto action_17
action_387 (144) = happyGoto action_18
action_387 (147) = happyGoto action_19
action_387 (148) = happyGoto action_20
action_387 (149) = happyGoto action_21
action_387 (152) = happyGoto action_22
action_387 (153) = happyGoto action_23
action_387 (154) = happyGoto action_24
action_387 (161) = happyGoto action_25
action_387 (195) = happyGoto action_28
action_387 (198) = happyGoto action_29
action_387 (199) = happyGoto action_30
action_387 (201) = happyGoto action_31
action_387 (211) = happyGoto action_32
action_387 (212) = happyGoto action_33
action_387 (213) = happyGoto action_34
action_387 (214) = happyGoto action_35
action_387 (215) = happyGoto action_36
action_387 (216) = happyGoto action_37
action_387 (224) = happyGoto action_38
action_387 _ = happyFail
action_388 (1) = happyShift action_403
action_388 (264) = happyShift action_404
action_388 (226) = happyGoto action_402
action_388 _ = happyFail
action_389 (261) = happyShift action_401
action_389 _ = happyFail
action_390 (24) = happyGoto action_399
action_390 (25) = happyGoto action_400
action_390 _ = happyReduce_38
action_391 (238) = happyShift action_43
action_391 (18) = happyGoto action_397
action_391 (216) = happyGoto action_398
action_391 _ = happyFail
action_392 (234) = happyShift action_39
action_392 (238) = happyShift action_43
action_392 (255) = happyShift action_171
action_392 (313) = happyShift action_76
action_392 (314) = happyShift action_77
action_392 (315) = happyShift action_78
action_392 (316) = happyShift action_79
action_392 (318) = happyShift action_80
action_392 (319) = happyShift action_81
action_392 (320) = happyShift action_82
action_392 (321) = happyShift action_83
action_392 (322) = happyShift action_84
action_392 (323) = happyShift action_85
action_392 (325) = happyShift action_86
action_392 (334) = happyShift action_89
action_392 (335) = happyShift action_90
action_392 (337) = happyShift action_91
action_392 (347) = happyShift action_172
action_392 (353) = happyShift action_173
action_392 (356) = happyShift action_97
action_392 (75) = happyGoto action_165
action_392 (76) = happyGoto action_396
action_392 (196) = happyGoto action_167
action_392 (200) = happyGoto action_168
action_392 (212) = happyGoto action_33
action_392 (213) = happyGoto action_169
action_392 (216) = happyGoto action_170
action_392 _ = happyFail
action_393 _ = happyReduce_8
action_394 (347) = happyShift action_164
action_394 (373) = happyReduce_10
action_394 (12) = happyGoto action_395
action_394 (19) = happyGoto action_394
action_394 (20) = happyGoto action_161
action_394 _ = happyReduce_26
action_395 _ = happyReduce_9
action_396 (372) = happyShift action_756
action_396 _ = happyFail
action_397 (24) = happyGoto action_399
action_397 (25) = happyGoto action_755
action_397 _ = happyReduce_38
action_398 (267) = happyShift action_754
action_398 _ = happyReduce_23
action_399 _ = happyReduce_37
action_400 (261) = happyShift action_621
action_400 (372) = happyShift action_753
action_400 _ = happyFail
action_401 (369) = happyShift action_390
action_401 (370) = happyShift action_391
action_401 (371) = happyShift action_392
action_401 (16) = happyGoto action_752
action_401 (17) = happyGoto action_389
action_401 _ = happyReduce_18
action_402 _ = happyReduce_16
action_403 _ = happyReduce_617
action_404 _ = happyReduce_616
action_405 _ = happyReduce_326
action_406 _ = happyReduce_325
action_407 _ = happyReduce_324
action_408 _ = happyReduce_323
action_409 _ = happyReduce_320
action_410 _ = happyReduce_329
action_411 _ = happyReduce_331
action_412 (263) = happyShift action_750
action_412 (267) = happyShift action_751
action_412 _ = happyFail
action_413 _ = happyReduce_521
action_414 (274) = happyShift action_749
action_414 _ = happyReduce_523
action_415 (241) = happyShift action_214
action_415 (243) = happyShift action_216
action_415 (270) = happyShift action_220
action_415 (282) = happyShift action_223
action_415 (283) = happyShift action_224
action_415 (284) = happyShift action_225
action_415 (219) = happyGoto action_368
action_415 (221) = happyGoto action_212
action_415 (223) = happyGoto action_213
action_415 _ = happyFail
action_416 _ = happyReduce_360
action_417 _ = happyReduce_524
action_418 _ = happyReduce_517
action_419 _ = happyReduce_357
action_420 _ = happyReduce_356
action_421 (260) = happyShift action_748
action_421 _ = happyFail
action_422 _ = happyReduce_188
action_423 _ = happyReduce_540
action_424 _ = happyReduce_545
action_425 _ = happyReduce_378
action_426 (234) = happyShift action_39
action_426 (235) = happyShift action_40
action_426 (236) = happyShift action_41
action_426 (237) = happyShift action_42
action_426 (238) = happyShift action_43
action_426 (239) = happyShift action_44
action_426 (241) = happyShift action_354
action_426 (242) = happyShift action_215
action_426 (243) = happyShift action_216
action_426 (244) = happyShift action_217
action_426 (245) = happyShift action_45
action_426 (246) = happyShift action_46
action_426 (247) = happyShift action_47
action_426 (248) = happyShift action_48
action_426 (249) = happyShift action_49
action_426 (250) = happyShift action_50
action_426 (251) = happyShift action_51
action_426 (252) = happyShift action_52
action_426 (253) = happyShift action_53
action_426 (254) = happyShift action_54
action_426 (255) = happyShift action_55
action_426 (256) = happyShift action_747
action_426 (257) = happyShift action_56
action_426 (265) = happyShift action_57
action_426 (267) = happyShift action_431
action_426 (268) = happyShift action_58
action_426 (269) = happyShift action_356
action_426 (270) = happyShift action_357
action_426 (272) = happyShift action_221
action_426 (275) = happyShift action_59
action_426 (280) = happyShift action_60
action_426 (282) = happyShift action_61
action_426 (283) = happyShift action_358
action_426 (284) = happyShift action_359
action_426 (289) = happyShift action_63
action_426 (292) = happyShift action_64
action_426 (293) = happyShift action_65
action_426 (294) = happyShift action_66
action_426 (295) = happyShift action_67
action_426 (296) = happyShift action_68
action_426 (297) = happyShift action_69
action_426 (299) = happyShift action_70
action_426 (300) = happyShift action_71
action_426 (301) = happyShift action_72
action_426 (303) = happyShift action_73
action_426 (305) = happyShift action_74
action_426 (306) = happyShift action_75
action_426 (313) = happyShift action_76
action_426 (314) = happyShift action_77
action_426 (315) = happyShift action_78
action_426 (316) = happyShift action_79
action_426 (318) = happyShift action_80
action_426 (319) = happyShift action_81
action_426 (320) = happyShift action_82
action_426 (321) = happyShift action_83
action_426 (322) = happyShift action_84
action_426 (323) = happyShift action_85
action_426 (325) = happyShift action_86
action_426 (327) = happyShift action_87
action_426 (332) = happyShift action_88
action_426 (334) = happyShift action_89
action_426 (335) = happyShift action_90
action_426 (337) = happyShift action_91
action_426 (338) = happyShift action_92
action_426 (345) = happyShift action_142
action_426 (346) = happyShift action_94
action_426 (350) = happyShift action_95
action_426 (356) = happyShift action_97
action_426 (363) = happyShift action_98
action_426 (364) = happyShift action_99
action_426 (365) = happyShift action_100
action_426 (140) = happyGoto action_344
action_426 (141) = happyGoto action_15
action_426 (142) = happyGoto action_16
action_426 (143) = happyGoto action_17
action_426 (144) = happyGoto action_18
action_426 (147) = happyGoto action_19
action_426 (148) = happyGoto action_20
action_426 (149) = happyGoto action_21
action_426 (152) = happyGoto action_22
action_426 (153) = happyGoto action_23
action_426 (154) = happyGoto action_24
action_426 (156) = happyGoto action_746
action_426 (161) = happyGoto action_25
action_426 (195) = happyGoto action_28
action_426 (198) = happyGoto action_29
action_426 (199) = happyGoto action_30
action_426 (201) = happyGoto action_31
action_426 (204) = happyGoto action_348
action_426 (206) = happyGoto action_349
action_426 (209) = happyGoto action_350
action_426 (210) = happyGoto action_208
action_426 (211) = happyGoto action_32
action_426 (212) = happyGoto action_33
action_426 (213) = happyGoto action_34
action_426 (214) = happyGoto action_35
action_426 (215) = happyGoto action_36
action_426 (216) = happyGoto action_37
action_426 (217) = happyGoto action_209
action_426 (218) = happyGoto action_210
action_426 (220) = happyGoto action_351
action_426 (222) = happyGoto action_352
action_426 (223) = happyGoto action_353
action_426 (224) = happyGoto action_38
action_426 _ = happyFail
action_427 _ = happyReduce_369
action_428 _ = happyReduce_368
action_429 (256) = happyShift action_745
action_429 (267) = happyShift action_237
action_429 (155) = happyGoto action_426
action_429 (157) = happyGoto action_744
action_429 _ = happyFail
action_430 _ = happyReduce_531
action_431 _ = happyReduce_393
action_432 (234) = happyShift action_39
action_432 (235) = happyShift action_40
action_432 (236) = happyShift action_41
action_432 (237) = happyShift action_42
action_432 (238) = happyShift action_43
action_432 (239) = happyShift action_44
action_432 (245) = happyShift action_45
action_432 (246) = happyShift action_46
action_432 (247) = happyShift action_47
action_432 (248) = happyShift action_48
action_432 (249) = happyShift action_49
action_432 (250) = happyShift action_50
action_432 (251) = happyShift action_51
action_432 (252) = happyShift action_52
action_432 (253) = happyShift action_53
action_432 (254) = happyShift action_54
action_432 (255) = happyShift action_55
action_432 (257) = happyShift action_56
action_432 (265) = happyShift action_57
action_432 (268) = happyShift action_58
action_432 (275) = happyShift action_59
action_432 (280) = happyShift action_60
action_432 (282) = happyShift action_61
action_432 (289) = happyShift action_63
action_432 (292) = happyShift action_64
action_432 (293) = happyShift action_65
action_432 (294) = happyShift action_66
action_432 (295) = happyShift action_67
action_432 (296) = happyShift action_68
action_432 (297) = happyShift action_69
action_432 (299) = happyShift action_70
action_432 (300) = happyShift action_71
action_432 (301) = happyShift action_72
action_432 (303) = happyShift action_73
action_432 (305) = happyShift action_74
action_432 (306) = happyShift action_75
action_432 (313) = happyShift action_76
action_432 (314) = happyShift action_77
action_432 (315) = happyShift action_78
action_432 (316) = happyShift action_79
action_432 (318) = happyShift action_80
action_432 (319) = happyShift action_81
action_432 (320) = happyShift action_82
action_432 (321) = happyShift action_83
action_432 (322) = happyShift action_84
action_432 (323) = happyShift action_85
action_432 (325) = happyShift action_86
action_432 (327) = happyShift action_87
action_432 (332) = happyShift action_88
action_432 (334) = happyShift action_89
action_432 (335) = happyShift action_90
action_432 (337) = happyShift action_91
action_432 (338) = happyShift action_92
action_432 (345) = happyShift action_142
action_432 (346) = happyShift action_94
action_432 (350) = happyShift action_95
action_432 (356) = happyShift action_97
action_432 (363) = happyShift action_98
action_432 (364) = happyShift action_99
action_432 (365) = happyShift action_100
action_432 (140) = happyGoto action_742
action_432 (141) = happyGoto action_15
action_432 (142) = happyGoto action_16
action_432 (143) = happyGoto action_17
action_432 (144) = happyGoto action_18
action_432 (147) = happyGoto action_19
action_432 (148) = happyGoto action_20
action_432 (149) = happyGoto action_21
action_432 (152) = happyGoto action_22
action_432 (153) = happyGoto action_23
action_432 (154) = happyGoto action_24
action_432 (160) = happyGoto action_743
action_432 (161) = happyGoto action_25
action_432 (195) = happyGoto action_28
action_432 (198) = happyGoto action_29
action_432 (199) = happyGoto action_30
action_432 (201) = happyGoto action_31
action_432 (211) = happyGoto action_32
action_432 (212) = happyGoto action_33
action_432 (213) = happyGoto action_34
action_432 (214) = happyGoto action_35
action_432 (215) = happyGoto action_36
action_432 (216) = happyGoto action_37
action_432 (224) = happyGoto action_38
action_432 _ = happyFail
action_433 (234) = happyShift action_39
action_433 (235) = happyShift action_40
action_433 (236) = happyShift action_41
action_433 (237) = happyShift action_42
action_433 (238) = happyShift action_43
action_433 (239) = happyShift action_44
action_433 (245) = happyShift action_45
action_433 (246) = happyShift action_46
action_433 (247) = happyShift action_47
action_433 (248) = happyShift action_48
action_433 (249) = happyShift action_49
action_433 (250) = happyShift action_50
action_433 (251) = happyShift action_51
action_433 (252) = happyShift action_52
action_433 (253) = happyShift action_53
action_433 (254) = happyShift action_54
action_433 (255) = happyShift action_55
action_433 (257) = happyShift action_56
action_433 (265) = happyShift action_57
action_433 (268) = happyShift action_58
action_433 (275) = happyShift action_59
action_433 (280) = happyShift action_60
action_433 (282) = happyShift action_61
action_433 (289) = happyShift action_63
action_433 (292) = happyShift action_64
action_433 (293) = happyShift action_65
action_433 (294) = happyShift action_66
action_433 (295) = happyShift action_67
action_433 (296) = happyShift action_68
action_433 (297) = happyShift action_69
action_433 (299) = happyShift action_70
action_433 (300) = happyShift action_71
action_433 (301) = happyShift action_72
action_433 (303) = happyShift action_73
action_433 (305) = happyShift action_74
action_433 (306) = happyShift action_75
action_433 (313) = happyShift action_76
action_433 (314) = happyShift action_77
action_433 (315) = happyShift action_78
action_433 (316) = happyShift action_79
action_433 (318) = happyShift action_80
action_433 (319) = happyShift action_81
action_433 (320) = happyShift action_82
action_433 (321) = happyShift action_83
action_433 (322) = happyShift action_84
action_433 (323) = happyShift action_85
action_433 (325) = happyShift action_86
action_433 (327) = happyShift action_87
action_433 (332) = happyShift action_88
action_433 (334) = happyShift action_89
action_433 (335) = happyShift action_90
action_433 (337) = happyShift action_91
action_433 (338) = happyShift action_92
action_433 (345) = happyShift action_142
action_433 (346) = happyShift action_94
action_433 (350) = happyShift action_95
action_433 (356) = happyShift action_97
action_433 (363) = happyShift action_98
action_433 (364) = happyShift action_99
action_433 (365) = happyShift action_100
action_433 (140) = happyGoto action_741
action_433 (141) = happyGoto action_15
action_433 (142) = happyGoto action_16
action_433 (143) = happyGoto action_17
action_433 (144) = happyGoto action_18
action_433 (147) = happyGoto action_19
action_433 (148) = happyGoto action_20
action_433 (149) = happyGoto action_21
action_433 (152) = happyGoto action_22
action_433 (153) = happyGoto action_23
action_433 (154) = happyGoto action_24
action_433 (161) = happyGoto action_25
action_433 (195) = happyGoto action_28
action_433 (198) = happyGoto action_29
action_433 (199) = happyGoto action_30
action_433 (201) = happyGoto action_31
action_433 (211) = happyGoto action_32
action_433 (212) = happyGoto action_33
action_433 (213) = happyGoto action_34
action_433 (214) = happyGoto action_35
action_433 (215) = happyGoto action_36
action_433 (216) = happyGoto action_37
action_433 (224) = happyGoto action_38
action_433 _ = happyFail
action_434 (234) = happyShift action_39
action_434 (235) = happyShift action_40
action_434 (236) = happyShift action_41
action_434 (237) = happyShift action_42
action_434 (238) = happyShift action_43
action_434 (239) = happyShift action_44
action_434 (241) = happyShift action_354
action_434 (242) = happyShift action_215
action_434 (243) = happyShift action_216
action_434 (244) = happyShift action_217
action_434 (245) = happyShift action_45
action_434 (246) = happyShift action_46
action_434 (247) = happyShift action_47
action_434 (248) = happyShift action_48
action_434 (249) = happyShift action_49
action_434 (250) = happyShift action_50
action_434 (251) = happyShift action_51
action_434 (252) = happyShift action_52
action_434 (253) = happyShift action_53
action_434 (254) = happyShift action_54
action_434 (255) = happyShift action_55
action_434 (257) = happyShift action_56
action_434 (258) = happyShift action_740
action_434 (265) = happyShift action_57
action_434 (267) = happyShift action_431
action_434 (268) = happyShift action_58
action_434 (269) = happyShift action_356
action_434 (270) = happyShift action_357
action_434 (272) = happyShift action_221
action_434 (275) = happyShift action_59
action_434 (280) = happyShift action_60
action_434 (282) = happyShift action_61
action_434 (283) = happyShift action_358
action_434 (284) = happyShift action_359
action_434 (289) = happyShift action_63
action_434 (292) = happyShift action_64
action_434 (293) = happyShift action_65
action_434 (294) = happyShift action_66
action_434 (295) = happyShift action_67
action_434 (296) = happyShift action_68
action_434 (297) = happyShift action_69
action_434 (299) = happyShift action_70
action_434 (300) = happyShift action_71
action_434 (301) = happyShift action_72
action_434 (303) = happyShift action_73
action_434 (305) = happyShift action_74
action_434 (306) = happyShift action_75
action_434 (313) = happyShift action_76
action_434 (314) = happyShift action_77
action_434 (315) = happyShift action_78
action_434 (316) = happyShift action_79
action_434 (318) = happyShift action_80
action_434 (319) = happyShift action_81
action_434 (320) = happyShift action_82
action_434 (321) = happyShift action_83
action_434 (322) = happyShift action_84
action_434 (323) = happyShift action_85
action_434 (325) = happyShift action_86
action_434 (327) = happyShift action_87
action_434 (332) = happyShift action_88
action_434 (334) = happyShift action_89
action_434 (335) = happyShift action_90
action_434 (337) = happyShift action_91
action_434 (338) = happyShift action_92
action_434 (345) = happyShift action_142
action_434 (346) = happyShift action_94
action_434 (350) = happyShift action_95
action_434 (356) = happyShift action_97
action_434 (363) = happyShift action_98
action_434 (364) = happyShift action_99
action_434 (365) = happyShift action_100
action_434 (140) = happyGoto action_344
action_434 (141) = happyGoto action_15
action_434 (142) = happyGoto action_16
action_434 (143) = happyGoto action_17
action_434 (144) = happyGoto action_18
action_434 (147) = happyGoto action_19
action_434 (148) = happyGoto action_20
action_434 (149) = happyGoto action_21
action_434 (152) = happyGoto action_22
action_434 (153) = happyGoto action_23
action_434 (154) = happyGoto action_24
action_434 (156) = happyGoto action_739
action_434 (161) = happyGoto action_25
action_434 (195) = happyGoto action_28
action_434 (198) = happyGoto action_29
action_434 (199) = happyGoto action_30
action_434 (201) = happyGoto action_31
action_434 (204) = happyGoto action_348
action_434 (206) = happyGoto action_349
action_434 (209) = happyGoto action_350
action_434 (210) = happyGoto action_208
action_434 (211) = happyGoto action_32
action_434 (212) = happyGoto action_33
action_434 (213) = happyGoto action_34
action_434 (214) = happyGoto action_35
action_434 (215) = happyGoto action_36
action_434 (216) = happyGoto action_37
action_434 (217) = happyGoto action_209
action_434 (218) = happyGoto action_210
action_434 (220) = happyGoto action_351
action_434 (222) = happyGoto action_352
action_434 (223) = happyGoto action_353
action_434 (224) = happyGoto action_38
action_434 _ = happyFail
action_435 _ = happyReduce_372
action_436 _ = happyReduce_373
action_437 (258) = happyShift action_738
action_437 (267) = happyShift action_237
action_437 (155) = happyGoto action_434
action_437 (158) = happyGoto action_737
action_437 _ = happyFail
action_438 _ = happyReduce_533
action_439 (269) = happyShift action_736
action_439 _ = happyFail
action_440 (269) = happyShift action_735
action_440 _ = happyFail
action_441 _ = happyReduce_396
action_442 (234) = happyShift action_39
action_442 (235) = happyShift action_40
action_442 (236) = happyShift action_41
action_442 (237) = happyShift action_42
action_442 (238) = happyShift action_43
action_442 (239) = happyShift action_44
action_442 (241) = happyShift action_354
action_442 (242) = happyShift action_215
action_442 (243) = happyShift action_216
action_442 (244) = happyShift action_217
action_442 (245) = happyShift action_45
action_442 (246) = happyShift action_46
action_442 (247) = happyShift action_47
action_442 (248) = happyShift action_48
action_442 (249) = happyShift action_49
action_442 (250) = happyShift action_50
action_442 (251) = happyShift action_51
action_442 (252) = happyShift action_52
action_442 (253) = happyShift action_53
action_442 (254) = happyShift action_54
action_442 (255) = happyShift action_55
action_442 (257) = happyShift action_56
action_442 (265) = happyShift action_57
action_442 (268) = happyShift action_58
action_442 (269) = happyShift action_356
action_442 (270) = happyShift action_357
action_442 (272) = happyShift action_221
action_442 (275) = happyShift action_59
action_442 (280) = happyShift action_60
action_442 (282) = happyShift action_61
action_442 (283) = happyShift action_358
action_442 (284) = happyShift action_359
action_442 (289) = happyShift action_63
action_442 (292) = happyShift action_64
action_442 (293) = happyShift action_65
action_442 (294) = happyShift action_66
action_442 (295) = happyShift action_67
action_442 (296) = happyShift action_68
action_442 (297) = happyShift action_69
action_442 (299) = happyShift action_70
action_442 (300) = happyShift action_71
action_442 (301) = happyShift action_72
action_442 (303) = happyShift action_73
action_442 (305) = happyShift action_74
action_442 (306) = happyShift action_75
action_442 (313) = happyShift action_76
action_442 (314) = happyShift action_77
action_442 (315) = happyShift action_78
action_442 (316) = happyShift action_79
action_442 (318) = happyShift action_80
action_442 (319) = happyShift action_81
action_442 (320) = happyShift action_82
action_442 (321) = happyShift action_83
action_442 (322) = happyShift action_84
action_442 (323) = happyShift action_85
action_442 (325) = happyShift action_86
action_442 (327) = happyShift action_87
action_442 (332) = happyShift action_88
action_442 (334) = happyShift action_89
action_442 (335) = happyShift action_90
action_442 (337) = happyShift action_91
action_442 (338) = happyShift action_92
action_442 (345) = happyShift action_142
action_442 (346) = happyShift action_94
action_442 (350) = happyShift action_95
action_442 (356) = happyShift action_97
action_442 (363) = happyShift action_98
action_442 (364) = happyShift action_99
action_442 (365) = happyShift action_100
action_442 (140) = happyGoto action_344
action_442 (141) = happyGoto action_15
action_442 (142) = happyGoto action_16
action_442 (143) = happyGoto action_17
action_442 (144) = happyGoto action_18
action_442 (147) = happyGoto action_19
action_442 (148) = happyGoto action_20
action_442 (149) = happyGoto action_21
action_442 (152) = happyGoto action_22
action_442 (153) = happyGoto action_23
action_442 (154) = happyGoto action_24
action_442 (156) = happyGoto action_734
action_442 (161) = happyGoto action_25
action_442 (195) = happyGoto action_28
action_442 (198) = happyGoto action_29
action_442 (199) = happyGoto action_30
action_442 (201) = happyGoto action_31
action_442 (204) = happyGoto action_348
action_442 (206) = happyGoto action_349
action_442 (209) = happyGoto action_350
action_442 (210) = happyGoto action_208
action_442 (211) = happyGoto action_32
action_442 (212) = happyGoto action_33
action_442 (213) = happyGoto action_34
action_442 (214) = happyGoto action_35
action_442 (215) = happyGoto action_36
action_442 (216) = happyGoto action_37
action_442 (217) = happyGoto action_209
action_442 (218) = happyGoto action_210
action_442 (220) = happyGoto action_351
action_442 (222) = happyGoto action_352
action_442 (223) = happyGoto action_353
action_442 (224) = happyGoto action_38
action_442 _ = happyFail
action_443 _ = happyReduce_376
action_444 (234) = happyShift action_39
action_444 (235) = happyShift action_40
action_444 (236) = happyShift action_41
action_444 (237) = happyShift action_42
action_444 (238) = happyShift action_43
action_444 (239) = happyShift action_44
action_444 (241) = happyShift action_354
action_444 (242) = happyShift action_215
action_444 (243) = happyShift action_216
action_444 (244) = happyShift action_217
action_444 (245) = happyShift action_45
action_444 (246) = happyShift action_46
action_444 (247) = happyShift action_47
action_444 (248) = happyShift action_48
action_444 (249) = happyShift action_49
action_444 (250) = happyShift action_50
action_444 (251) = happyShift action_51
action_444 (252) = happyShift action_52
action_444 (253) = happyShift action_53
action_444 (254) = happyShift action_54
action_444 (255) = happyShift action_55
action_444 (257) = happyShift action_56
action_444 (265) = happyShift action_57
action_444 (268) = happyShift action_58
action_444 (269) = happyShift action_356
action_444 (270) = happyShift action_357
action_444 (272) = happyShift action_221
action_444 (275) = happyShift action_59
action_444 (280) = happyShift action_60
action_444 (282) = happyShift action_61
action_444 (283) = happyShift action_358
action_444 (284) = happyShift action_359
action_444 (289) = happyShift action_63
action_444 (292) = happyShift action_64
action_444 (293) = happyShift action_65
action_444 (294) = happyShift action_66
action_444 (295) = happyShift action_67
action_444 (296) = happyShift action_68
action_444 (297) = happyShift action_69
action_444 (299) = happyShift action_70
action_444 (300) = happyShift action_71
action_444 (301) = happyShift action_72
action_444 (303) = happyShift action_73
action_444 (305) = happyShift action_74
action_444 (306) = happyShift action_75
action_444 (313) = happyShift action_76
action_444 (314) = happyShift action_77
action_444 (315) = happyShift action_78
action_444 (316) = happyShift action_79
action_444 (318) = happyShift action_80
action_444 (319) = happyShift action_81
action_444 (320) = happyShift action_82
action_444 (321) = happyShift action_83
action_444 (322) = happyShift action_84
action_444 (323) = happyShift action_85
action_444 (325) = happyShift action_86
action_444 (327) = happyShift action_87
action_444 (332) = happyShift action_88
action_444 (334) = happyShift action_89
action_444 (335) = happyShift action_90
action_444 (337) = happyShift action_91
action_444 (338) = happyShift action_92
action_444 (345) = happyShift action_142
action_444 (346) = happyShift action_94
action_444 (350) = happyShift action_95
action_444 (356) = happyShift action_97
action_444 (363) = happyShift action_98
action_444 (364) = happyShift action_99
action_444 (365) = happyShift action_100
action_444 (140) = happyGoto action_732
action_444 (141) = happyGoto action_15
action_444 (142) = happyGoto action_16
action_444 (143) = happyGoto action_17
action_444 (144) = happyGoto action_18
action_444 (147) = happyGoto action_19
action_444 (148) = happyGoto action_20
action_444 (149) = happyGoto action_21
action_444 (152) = happyGoto action_22
action_444 (153) = happyGoto action_23
action_444 (154) = happyGoto action_24
action_444 (156) = happyGoto action_733
action_444 (161) = happyGoto action_25
action_444 (195) = happyGoto action_28
action_444 (198) = happyGoto action_29
action_444 (199) = happyGoto action_30
action_444 (201) = happyGoto action_31
action_444 (204) = happyGoto action_348
action_444 (206) = happyGoto action_349
action_444 (209) = happyGoto action_350
action_444 (210) = happyGoto action_208
action_444 (211) = happyGoto action_32
action_444 (212) = happyGoto action_33
action_444 (213) = happyGoto action_34
action_444 (214) = happyGoto action_35
action_444 (215) = happyGoto action_36
action_444 (216) = happyGoto action_37
action_444 (217) = happyGoto action_209
action_444 (218) = happyGoto action_210
action_444 (220) = happyGoto action_351
action_444 (222) = happyGoto action_352
action_444 (223) = happyGoto action_353
action_444 (224) = happyGoto action_38
action_444 _ = happyFail
action_445 (234) = happyShift action_39
action_445 (235) = happyShift action_40
action_445 (236) = happyShift action_41
action_445 (237) = happyShift action_42
action_445 (238) = happyShift action_43
action_445 (239) = happyShift action_44
action_445 (245) = happyShift action_45
action_445 (246) = happyShift action_46
action_445 (247) = happyShift action_47
action_445 (248) = happyShift action_48
action_445 (249) = happyShift action_49
action_445 (250) = happyShift action_50
action_445 (251) = happyShift action_51
action_445 (252) = happyShift action_52
action_445 (253) = happyShift action_53
action_445 (254) = happyShift action_54
action_445 (255) = happyShift action_55
action_445 (257) = happyShift action_56
action_445 (265) = happyShift action_57
action_445 (268) = happyShift action_58
action_445 (275) = happyShift action_59
action_445 (280) = happyShift action_60
action_445 (282) = happyShift action_61
action_445 (289) = happyShift action_63
action_445 (292) = happyShift action_64
action_445 (293) = happyShift action_65
action_445 (294) = happyShift action_66
action_445 (295) = happyShift action_67
action_445 (296) = happyShift action_68
action_445 (297) = happyShift action_69
action_445 (299) = happyShift action_70
action_445 (300) = happyShift action_71
action_445 (301) = happyShift action_72
action_445 (303) = happyShift action_73
action_445 (305) = happyShift action_74
action_445 (306) = happyShift action_75
action_445 (313) = happyShift action_76
action_445 (314) = happyShift action_77
action_445 (315) = happyShift action_78
action_445 (316) = happyShift action_79
action_445 (318) = happyShift action_80
action_445 (319) = happyShift action_81
action_445 (320) = happyShift action_82
action_445 (321) = happyShift action_83
action_445 (322) = happyShift action_84
action_445 (323) = happyShift action_85
action_445 (325) = happyShift action_86
action_445 (327) = happyShift action_87
action_445 (332) = happyShift action_88
action_445 (334) = happyShift action_89
action_445 (335) = happyShift action_90
action_445 (337) = happyShift action_91
action_445 (338) = happyShift action_92
action_445 (345) = happyShift action_142
action_445 (346) = happyShift action_94
action_445 (350) = happyShift action_95
action_445 (356) = happyShift action_97
action_445 (363) = happyShift action_98
action_445 (364) = happyShift action_99
action_445 (365) = happyShift action_100
action_445 (140) = happyGoto action_731
action_445 (141) = happyGoto action_15
action_445 (142) = happyGoto action_16
action_445 (143) = happyGoto action_17
action_445 (144) = happyGoto action_18
action_445 (147) = happyGoto action_19
action_445 (148) = happyGoto action_20
action_445 (149) = happyGoto action_21
action_445 (152) = happyGoto action_22
action_445 (153) = happyGoto action_23
action_445 (154) = happyGoto action_24
action_445 (161) = happyGoto action_25
action_445 (195) = happyGoto action_28
action_445 (198) = happyGoto action_29
action_445 (199) = happyGoto action_30
action_445 (201) = happyGoto action_31
action_445 (211) = happyGoto action_32
action_445 (212) = happyGoto action_33
action_445 (213) = happyGoto action_34
action_445 (214) = happyGoto action_35
action_445 (215) = happyGoto action_36
action_445 (216) = happyGoto action_37
action_445 (224) = happyGoto action_38
action_445 _ = happyReduce_473
action_446 (234) = happyShift action_39
action_446 (235) = happyShift action_40
action_446 (236) = happyShift action_41
action_446 (237) = happyShift action_42
action_446 (238) = happyShift action_43
action_446 (239) = happyShift action_44
action_446 (245) = happyShift action_45
action_446 (246) = happyShift action_46
action_446 (247) = happyShift action_47
action_446 (248) = happyShift action_48
action_446 (249) = happyShift action_49
action_446 (250) = happyShift action_50
action_446 (251) = happyShift action_51
action_446 (252) = happyShift action_52
action_446 (253) = happyShift action_53
action_446 (254) = happyShift action_54
action_446 (255) = happyShift action_55
action_446 (257) = happyShift action_56
action_446 (265) = happyShift action_57
action_446 (268) = happyShift action_58
action_446 (275) = happyShift action_59
action_446 (280) = happyShift action_60
action_446 (282) = happyShift action_61
action_446 (283) = happyShift action_62
action_446 (289) = happyShift action_63
action_446 (292) = happyShift action_64
action_446 (293) = happyShift action_65
action_446 (294) = happyShift action_66
action_446 (295) = happyShift action_67
action_446 (296) = happyShift action_68
action_446 (297) = happyShift action_69
action_446 (299) = happyShift action_70
action_446 (300) = happyShift action_71
action_446 (301) = happyShift action_72
action_446 (303) = happyShift action_73
action_446 (305) = happyShift action_74
action_446 (306) = happyShift action_75
action_446 (313) = happyShift action_76
action_446 (314) = happyShift action_77
action_446 (315) = happyShift action_78
action_446 (316) = happyShift action_79
action_446 (318) = happyShift action_80
action_446 (319) = happyShift action_81
action_446 (320) = happyShift action_82
action_446 (321) = happyShift action_83
action_446 (322) = happyShift action_84
action_446 (323) = happyShift action_85
action_446 (325) = happyShift action_86
action_446 (327) = happyShift action_87
action_446 (332) = happyShift action_88
action_446 (334) = happyShift action_89
action_446 (335) = happyShift action_90
action_446 (337) = happyShift action_91
action_446 (338) = happyShift action_92
action_446 (345) = happyShift action_647
action_446 (346) = happyShift action_94
action_446 (350) = happyShift action_95
action_446 (352) = happyShift action_730
action_446 (356) = happyShift action_97
action_446 (363) = happyShift action_98
action_446 (364) = happyShift action_99
action_446 (365) = happyShift action_100
action_446 (139) = happyGoto action_643
action_446 (140) = happyGoto action_14
action_446 (141) = happyGoto action_15
action_446 (142) = happyGoto action_16
action_446 (143) = happyGoto action_17
action_446 (144) = happyGoto action_18
action_446 (147) = happyGoto action_19
action_446 (148) = happyGoto action_20
action_446 (149) = happyGoto action_21
action_446 (152) = happyGoto action_22
action_446 (153) = happyGoto action_23
action_446 (154) = happyGoto action_24
action_446 (161) = happyGoto action_25
action_446 (172) = happyGoto action_725
action_446 (173) = happyGoto action_726
action_446 (174) = happyGoto action_727
action_446 (175) = happyGoto action_728
action_446 (177) = happyGoto action_729
action_446 (185) = happyGoto action_646
action_446 (195) = happyGoto action_28
action_446 (198) = happyGoto action_29
action_446 (199) = happyGoto action_30
action_446 (201) = happyGoto action_31
action_446 (211) = happyGoto action_32
action_446 (212) = happyGoto action_33
action_446 (213) = happyGoto action_34
action_446 (214) = happyGoto action_35
action_446 (215) = happyGoto action_36
action_446 (216) = happyGoto action_37
action_446 (224) = happyGoto action_38
action_446 _ = happyFail
action_447 _ = happyReduce_352
action_448 (234) = happyShift action_39
action_448 (235) = happyShift action_40
action_448 (236) = happyShift action_41
action_448 (237) = happyShift action_42
action_448 (238) = happyShift action_43
action_448 (239) = happyShift action_44
action_448 (245) = happyShift action_45
action_448 (246) = happyShift action_46
action_448 (247) = happyShift action_47
action_448 (248) = happyShift action_48
action_448 (249) = happyShift action_49
action_448 (250) = happyShift action_50
action_448 (251) = happyShift action_51
action_448 (252) = happyShift action_52
action_448 (253) = happyShift action_53
action_448 (254) = happyShift action_54
action_448 (255) = happyShift action_55
action_448 (257) = happyShift action_56
action_448 (265) = happyShift action_57
action_448 (268) = happyShift action_58
action_448 (275) = happyShift action_59
action_448 (280) = happyShift action_60
action_448 (282) = happyShift action_61
action_448 (289) = happyShift action_63
action_448 (292) = happyShift action_64
action_448 (293) = happyShift action_65
action_448 (294) = happyShift action_66
action_448 (295) = happyShift action_67
action_448 (296) = happyShift action_68
action_448 (297) = happyShift action_69
action_448 (299) = happyShift action_70
action_448 (300) = happyShift action_71
action_448 (301) = happyShift action_72
action_448 (303) = happyShift action_73
action_448 (305) = happyShift action_74
action_448 (306) = happyShift action_75
action_448 (313) = happyShift action_76
action_448 (314) = happyShift action_77
action_448 (315) = happyShift action_78
action_448 (316) = happyShift action_79
action_448 (318) = happyShift action_80
action_448 (319) = happyShift action_81
action_448 (320) = happyShift action_82
action_448 (321) = happyShift action_83
action_448 (322) = happyShift action_84
action_448 (323) = happyShift action_85
action_448 (325) = happyShift action_86
action_448 (327) = happyShift action_87
action_448 (332) = happyShift action_88
action_448 (334) = happyShift action_89
action_448 (335) = happyShift action_90
action_448 (337) = happyShift action_91
action_448 (338) = happyShift action_92
action_448 (345) = happyShift action_142
action_448 (346) = happyShift action_94
action_448 (350) = happyShift action_95
action_448 (356) = happyShift action_97
action_448 (363) = happyShift action_98
action_448 (364) = happyShift action_99
action_448 (365) = happyShift action_100
action_448 (140) = happyGoto action_724
action_448 (141) = happyGoto action_15
action_448 (142) = happyGoto action_16
action_448 (143) = happyGoto action_17
action_448 (144) = happyGoto action_18
action_448 (147) = happyGoto action_19
action_448 (148) = happyGoto action_20
action_448 (149) = happyGoto action_21
action_448 (152) = happyGoto action_22
action_448 (153) = happyGoto action_23
action_448 (154) = happyGoto action_24
action_448 (161) = happyGoto action_25
action_448 (195) = happyGoto action_28
action_448 (198) = happyGoto action_29
action_448 (199) = happyGoto action_30
action_448 (201) = happyGoto action_31
action_448 (211) = happyGoto action_32
action_448 (212) = happyGoto action_33
action_448 (213) = happyGoto action_34
action_448 (214) = happyGoto action_35
action_448 (215) = happyGoto action_36
action_448 (216) = happyGoto action_37
action_448 (224) = happyGoto action_38
action_448 _ = happyFail
action_449 (234) = happyShift action_39
action_449 (235) = happyShift action_40
action_449 (236) = happyShift action_41
action_449 (237) = happyShift action_42
action_449 (238) = happyShift action_43
action_449 (239) = happyShift action_44
action_449 (245) = happyShift action_45
action_449 (246) = happyShift action_46
action_449 (247) = happyShift action_47
action_449 (248) = happyShift action_48
action_449 (249) = happyShift action_49
action_449 (250) = happyShift action_50
action_449 (251) = happyShift action_51
action_449 (252) = happyShift action_52
action_449 (253) = happyShift action_53
action_449 (254) = happyShift action_54
action_449 (255) = happyShift action_55
action_449 (257) = happyShift action_56
action_449 (265) = happyShift action_57
action_449 (268) = happyShift action_58
action_449 (275) = happyShift action_59
action_449 (280) = happyShift action_60
action_449 (282) = happyShift action_61
action_449 (289) = happyShift action_63
action_449 (292) = happyShift action_64
action_449 (293) = happyShift action_65
action_449 (294) = happyShift action_66
action_449 (295) = happyShift action_67
action_449 (296) = happyShift action_68
action_449 (297) = happyShift action_69
action_449 (299) = happyShift action_70
action_449 (300) = happyShift action_71
action_449 (301) = happyShift action_72
action_449 (303) = happyShift action_73
action_449 (305) = happyShift action_74
action_449 (306) = happyShift action_75
action_449 (313) = happyShift action_76
action_449 (314) = happyShift action_77
action_449 (315) = happyShift action_78
action_449 (316) = happyShift action_79
action_449 (318) = happyShift action_80
action_449 (319) = happyShift action_81
action_449 (320) = happyShift action_82
action_449 (321) = happyShift action_83
action_449 (322) = happyShift action_84
action_449 (323) = happyShift action_85
action_449 (325) = happyShift action_86
action_449 (327) = happyShift action_87
action_449 (332) = happyShift action_88
action_449 (334) = happyShift action_89
action_449 (335) = happyShift action_90
action_449 (337) = happyShift action_91
action_449 (338) = happyShift action_92
action_449 (345) = happyShift action_142
action_449 (346) = happyShift action_94
action_449 (350) = happyShift action_95
action_449 (356) = happyShift action_97
action_449 (363) = happyShift action_98
action_449 (364) = happyShift action_99
action_449 (365) = happyShift action_100
action_449 (140) = happyGoto action_723
action_449 (141) = happyGoto action_15
action_449 (142) = happyGoto action_16
action_449 (143) = happyGoto action_17
action_449 (144) = happyGoto action_18
action_449 (147) = happyGoto action_19
action_449 (148) = happyGoto action_20
action_449 (149) = happyGoto action_21
action_449 (152) = happyGoto action_22
action_449 (153) = happyGoto action_23
action_449 (154) = happyGoto action_24
action_449 (161) = happyGoto action_25
action_449 (195) = happyGoto action_28
action_449 (198) = happyGoto action_29
action_449 (199) = happyGoto action_30
action_449 (201) = happyGoto action_31
action_449 (211) = happyGoto action_32
action_449 (212) = happyGoto action_33
action_449 (213) = happyGoto action_34
action_449 (214) = happyGoto action_35
action_449 (215) = happyGoto action_36
action_449 (216) = happyGoto action_37
action_449 (224) = happyGoto action_38
action_449 _ = happyFail
action_450 _ = happyReduce_379
action_451 (234) = happyShift action_39
action_451 (235) = happyShift action_40
action_451 (236) = happyShift action_41
action_451 (237) = happyShift action_42
action_451 (238) = happyShift action_43
action_451 (239) = happyShift action_44
action_451 (245) = happyShift action_45
action_451 (246) = happyShift action_46
action_451 (247) = happyShift action_47
action_451 (248) = happyShift action_48
action_451 (249) = happyShift action_49
action_451 (250) = happyShift action_50
action_451 (251) = happyShift action_51
action_451 (252) = happyShift action_52
action_451 (253) = happyShift action_53
action_451 (254) = happyShift action_54
action_451 (255) = happyShift action_55
action_451 (257) = happyShift action_56
action_451 (265) = happyShift action_57
action_451 (268) = happyShift action_58
action_451 (275) = happyShift action_59
action_451 (280) = happyShift action_60
action_451 (282) = happyShift action_61
action_451 (283) = happyShift action_62
action_451 (289) = happyShift action_63
action_451 (292) = happyShift action_64
action_451 (293) = happyShift action_65
action_451 (294) = happyShift action_66
action_451 (295) = happyShift action_67
action_451 (296) = happyShift action_68
action_451 (297) = happyShift action_69
action_451 (299) = happyShift action_70
action_451 (300) = happyShift action_71
action_451 (301) = happyShift action_72
action_451 (303) = happyShift action_73
action_451 (305) = happyShift action_74
action_451 (306) = happyShift action_75
action_451 (313) = happyShift action_76
action_451 (314) = happyShift action_77
action_451 (315) = happyShift action_78
action_451 (316) = happyShift action_79
action_451 (318) = happyShift action_80
action_451 (319) = happyShift action_81
action_451 (320) = happyShift action_82
action_451 (321) = happyShift action_83
action_451 (322) = happyShift action_84
action_451 (323) = happyShift action_85
action_451 (325) = happyShift action_86
action_451 (327) = happyShift action_87
action_451 (332) = happyShift action_88
action_451 (334) = happyShift action_89
action_451 (335) = happyShift action_90
action_451 (337) = happyShift action_91
action_451 (338) = happyShift action_92
action_451 (345) = happyShift action_647
action_451 (346) = happyShift action_94
action_451 (350) = happyShift action_95
action_451 (356) = happyShift action_97
action_451 (363) = happyShift action_98
action_451 (364) = happyShift action_99
action_451 (365) = happyShift action_100
action_451 (139) = happyGoto action_643
action_451 (140) = happyGoto action_14
action_451 (141) = happyGoto action_15
action_451 (142) = happyGoto action_16
action_451 (143) = happyGoto action_17
action_451 (144) = happyGoto action_18
action_451 (147) = happyGoto action_19
action_451 (148) = happyGoto action_20
action_451 (149) = happyGoto action_21
action_451 (152) = happyGoto action_22
action_451 (153) = happyGoto action_23
action_451 (154) = happyGoto action_24
action_451 (161) = happyGoto action_25
action_451 (176) = happyGoto action_722
action_451 (177) = happyGoto action_645
action_451 (185) = happyGoto action_646
action_451 (195) = happyGoto action_28
action_451 (198) = happyGoto action_29
action_451 (199) = happyGoto action_30
action_451 (201) = happyGoto action_31
action_451 (211) = happyGoto action_32
action_451 (212) = happyGoto action_33
action_451 (213) = happyGoto action_34
action_451 (214) = happyGoto action_35
action_451 (215) = happyGoto action_36
action_451 (216) = happyGoto action_37
action_451 (224) = happyGoto action_38
action_451 _ = happyFail
action_452 _ = happyReduce_383
action_453 _ = happyReduce_384
action_454 _ = happyReduce_385
action_455 _ = happyReduce_386
action_456 (1) = happyShift action_403
action_456 (264) = happyShift action_404
action_456 (226) = happyGoto action_721
action_456 _ = happyFail
action_457 (24) = happyGoto action_719
action_457 (25) = happyGoto action_720
action_457 _ = happyReduce_38
action_458 _ = happyReduce_91
action_459 (256) = happyShift action_424
action_459 _ = happyFail
action_460 (234) = happyShift action_277
action_460 (238) = happyShift action_278
action_460 (240) = happyShift action_279
action_460 (312) = happyShift action_280
action_460 (313) = happyShift action_281
action_460 (314) = happyShift action_282
action_460 (315) = happyShift action_283
action_460 (316) = happyShift action_284
action_460 (318) = happyShift action_285
action_460 (319) = happyShift action_286
action_460 (320) = happyShift action_287
action_460 (321) = happyShift action_288
action_460 (322) = happyShift action_289
action_460 (323) = happyShift action_290
action_460 (325) = happyShift action_291
action_460 (326) = happyShift action_292
action_460 (327) = happyShift action_293
action_460 (328) = happyShift action_294
action_460 (329) = happyShift action_295
action_460 (330) = happyShift action_296
action_460 (331) = happyShift action_297
action_460 (332) = happyShift action_298
action_460 (333) = happyShift action_299
action_460 (334) = happyShift action_300
action_460 (335) = happyShift action_301
action_460 (336) = happyShift action_302
action_460 (337) = happyShift action_303
action_460 (338) = happyShift action_304
action_460 (339) = happyShift action_305
action_460 (340) = happyShift action_306
action_460 (341) = happyShift action_307
action_460 (342) = happyShift action_308
action_460 (343) = happyShift action_309
action_460 (344) = happyShift action_310
action_460 (345) = happyShift action_311
action_460 (346) = happyShift action_312
action_460 (347) = happyShift action_313
action_460 (348) = happyShift action_314
action_460 (349) = happyShift action_315
action_460 (350) = happyShift action_316
action_460 (351) = happyShift action_317
action_460 (352) = happyShift action_318
action_460 (353) = happyShift action_319
action_460 (354) = happyShift action_320
action_460 (355) = happyShift action_321
action_460 (356) = happyShift action_322
action_460 (165) = happyGoto action_718
action_460 (166) = happyGoto action_276
action_460 _ = happyFail
action_461 (234) = happyShift action_701
action_461 (235) = happyShift action_40
action_461 (236) = happyShift action_41
action_461 (237) = happyShift action_42
action_461 (238) = happyShift action_702
action_461 (239) = happyShift action_44
action_461 (240) = happyShift action_279
action_461 (245) = happyShift action_45
action_461 (246) = happyShift action_46
action_461 (247) = happyShift action_47
action_461 (248) = happyShift action_48
action_461 (249) = happyShift action_49
action_461 (250) = happyShift action_50
action_461 (251) = happyShift action_51
action_461 (252) = happyShift action_52
action_461 (253) = happyShift action_53
action_461 (254) = happyShift action_54
action_461 (255) = happyShift action_55
action_461 (257) = happyShift action_56
action_461 (265) = happyShift action_57
action_461 (268) = happyShift action_58
action_461 (280) = happyShift action_60
action_461 (289) = happyShift action_63
action_461 (292) = happyShift action_64
action_461 (293) = happyShift action_65
action_461 (294) = happyShift action_66
action_461 (295) = happyShift action_67
action_461 (296) = happyShift action_68
action_461 (297) = happyShift action_69
action_461 (299) = happyShift action_70
action_461 (300) = happyShift action_71
action_461 (301) = happyShift action_72
action_461 (303) = happyShift action_73
action_461 (305) = happyShift action_74
action_461 (306) = happyShift action_75
action_461 (312) = happyShift action_280
action_461 (313) = happyShift action_703
action_461 (314) = happyShift action_704
action_461 (315) = happyShift action_705
action_461 (316) = happyShift action_706
action_461 (318) = happyShift action_707
action_461 (319) = happyShift action_708
action_461 (320) = happyShift action_709
action_461 (321) = happyShift action_710
action_461 (322) = happyShift action_711
action_461 (323) = happyShift action_712
action_461 (325) = happyShift action_713
action_461 (326) = happyShift action_292
action_461 (327) = happyShift action_293
action_461 (328) = happyShift action_294
action_461 (329) = happyShift action_295
action_461 (330) = happyShift action_296
action_461 (331) = happyShift action_297
action_461 (332) = happyShift action_298
action_461 (333) = happyShift action_299
action_461 (334) = happyShift action_714
action_461 (335) = happyShift action_715
action_461 (336) = happyShift action_302
action_461 (337) = happyShift action_716
action_461 (338) = happyShift action_304
action_461 (339) = happyShift action_305
action_461 (340) = happyShift action_306
action_461 (341) = happyShift action_307
action_461 (342) = happyShift action_308
action_461 (343) = happyShift action_309
action_461 (344) = happyShift action_310
action_461 (345) = happyShift action_311
action_461 (346) = happyShift action_312
action_461 (347) = happyShift action_313
action_461 (348) = happyShift action_314
action_461 (349) = happyShift action_315
action_461 (350) = happyShift action_316
action_461 (351) = happyShift action_317
action_461 (352) = happyShift action_318
action_461 (353) = happyShift action_319
action_461 (354) = happyShift action_320
action_461 (355) = happyShift action_321
action_461 (356) = happyShift action_717
action_461 (152) = happyGoto action_697
action_461 (153) = happyGoto action_23
action_461 (154) = happyGoto action_24
action_461 (161) = happyGoto action_25
action_461 (164) = happyGoto action_698
action_461 (165) = happyGoto action_275
action_461 (166) = happyGoto action_276
action_461 (168) = happyGoto action_699
action_461 (169) = happyGoto action_700
action_461 (195) = happyGoto action_28
action_461 (198) = happyGoto action_29
action_461 (199) = happyGoto action_30
action_461 (201) = happyGoto action_31
action_461 (211) = happyGoto action_32
action_461 (212) = happyGoto action_33
action_461 (213) = happyGoto action_34
action_461 (214) = happyGoto action_35
action_461 (215) = happyGoto action_36
action_461 (216) = happyGoto action_37
action_461 (224) = happyGoto action_38
action_461 _ = happyReduce_470
action_462 _ = happyReduce_410
action_463 (304) = happyShift action_696
action_463 _ = happyFail
action_464 _ = happyReduce_416
action_465 _ = happyReduce_412
action_466 _ = happyReduce_340
action_467 _ = happyReduce_414
action_468 (234) = happyShift action_39
action_468 (235) = happyShift action_40
action_468 (236) = happyShift action_41
action_468 (237) = happyShift action_42
action_468 (238) = happyShift action_43
action_468 (239) = happyShift action_44
action_468 (245) = happyShift action_45
action_468 (246) = happyShift action_46
action_468 (247) = happyShift action_47
action_468 (248) = happyShift action_48
action_468 (249) = happyShift action_49
action_468 (250) = happyShift action_50
action_468 (251) = happyShift action_51
action_468 (252) = happyShift action_52
action_468 (253) = happyShift action_53
action_468 (254) = happyShift action_54
action_468 (255) = happyShift action_55
action_468 (257) = happyShift action_56
action_468 (265) = happyShift action_57
action_468 (268) = happyShift action_58
action_468 (275) = happyShift action_59
action_468 (280) = happyShift action_60
action_468 (282) = happyShift action_61
action_468 (289) = happyShift action_63
action_468 (292) = happyShift action_64
action_468 (293) = happyShift action_65
action_468 (294) = happyShift action_66
action_468 (295) = happyShift action_67
action_468 (296) = happyShift action_68
action_468 (297) = happyShift action_69
action_468 (299) = happyShift action_70
action_468 (300) = happyShift action_71
action_468 (301) = happyShift action_72
action_468 (303) = happyShift action_73
action_468 (305) = happyShift action_74
action_468 (306) = happyShift action_75
action_468 (313) = happyShift action_76
action_468 (314) = happyShift action_77
action_468 (315) = happyShift action_78
action_468 (316) = happyShift action_79
action_468 (318) = happyShift action_80
action_468 (319) = happyShift action_81
action_468 (320) = happyShift action_82
action_468 (321) = happyShift action_83
action_468 (322) = happyShift action_84
action_468 (323) = happyShift action_85
action_468 (325) = happyShift action_86
action_468 (327) = happyShift action_87
action_468 (332) = happyShift action_88
action_468 (334) = happyShift action_89
action_468 (335) = happyShift action_90
action_468 (337) = happyShift action_91
action_468 (338) = happyShift action_92
action_468 (345) = happyShift action_142
action_468 (346) = happyShift action_94
action_468 (350) = happyShift action_95
action_468 (356) = happyShift action_97
action_468 (363) = happyShift action_98
action_468 (364) = happyShift action_99
action_468 (365) = happyShift action_100
action_468 (140) = happyGoto action_694
action_468 (141) = happyGoto action_15
action_468 (142) = happyGoto action_16
action_468 (143) = happyGoto action_17
action_468 (144) = happyGoto action_18
action_468 (147) = happyGoto action_19
action_468 (148) = happyGoto action_20
action_468 (149) = happyGoto action_21
action_468 (152) = happyGoto action_22
action_468 (153) = happyGoto action_23
action_468 (154) = happyGoto action_24
action_468 (159) = happyGoto action_695
action_468 (161) = happyGoto action_25
action_468 (195) = happyGoto action_28
action_468 (198) = happyGoto action_29
action_468 (199) = happyGoto action_30
action_468 (201) = happyGoto action_31
action_468 (211) = happyGoto action_32
action_468 (212) = happyGoto action_33
action_468 (213) = happyGoto action_34
action_468 (214) = happyGoto action_35
action_468 (215) = happyGoto action_36
action_468 (216) = happyGoto action_37
action_468 (224) = happyGoto action_38
action_468 _ = happyFail
action_469 (262) = happyShift action_693
action_469 (178) = happyGoto action_691
action_469 (225) = happyGoto action_692
action_469 _ = happyReduce_615
action_470 (352) = happyShift action_690
action_470 _ = happyFail
action_471 _ = happyReduce_338
action_472 (234) = happyShift action_39
action_472 (235) = happyShift action_40
action_472 (236) = happyShift action_41
action_472 (237) = happyShift action_42
action_472 (238) = happyShift action_43
action_472 (239) = happyShift action_44
action_472 (245) = happyShift action_45
action_472 (246) = happyShift action_46
action_472 (247) = happyShift action_47
action_472 (248) = happyShift action_48
action_472 (249) = happyShift action_49
action_472 (250) = happyShift action_50
action_472 (251) = happyShift action_51
action_472 (252) = happyShift action_52
action_472 (253) = happyShift action_53
action_472 (254) = happyShift action_54
action_472 (255) = happyShift action_55
action_472 (257) = happyShift action_56
action_472 (265) = happyShift action_57
action_472 (268) = happyShift action_58
action_472 (275) = happyShift action_59
action_472 (280) = happyShift action_60
action_472 (282) = happyShift action_61
action_472 (289) = happyShift action_63
action_472 (292) = happyShift action_64
action_472 (293) = happyShift action_65
action_472 (294) = happyShift action_66
action_472 (295) = happyShift action_67
action_472 (296) = happyShift action_68
action_472 (297) = happyShift action_69
action_472 (299) = happyShift action_70
action_472 (300) = happyShift action_71
action_472 (301) = happyShift action_72
action_472 (303) = happyShift action_73
action_472 (305) = happyShift action_74
action_472 (306) = happyShift action_75
action_472 (313) = happyShift action_76
action_472 (314) = happyShift action_77
action_472 (315) = happyShift action_78
action_472 (316) = happyShift action_79
action_472 (318) = happyShift action_80
action_472 (319) = happyShift action_81
action_472 (320) = happyShift action_82
action_472 (321) = happyShift action_83
action_472 (322) = happyShift action_84
action_472 (323) = happyShift action_85
action_472 (325) = happyShift action_86
action_472 (327) = happyShift action_87
action_472 (332) = happyShift action_88
action_472 (334) = happyShift action_89
action_472 (335) = happyShift action_90
action_472 (337) = happyShift action_91
action_472 (338) = happyShift action_92
action_472 (345) = happyShift action_142
action_472 (346) = happyShift action_94
action_472 (350) = happyShift action_95
action_472 (356) = happyShift action_97
action_472 (363) = happyShift action_98
action_472 (364) = happyShift action_99
action_472 (365) = happyShift action_100
action_472 (140) = happyGoto action_689
action_472 (141) = happyGoto action_15
action_472 (142) = happyGoto action_16
action_472 (143) = happyGoto action_17
action_472 (144) = happyGoto action_18
action_472 (147) = happyGoto action_19
action_472 (148) = happyGoto action_20
action_472 (149) = happyGoto action_21
action_472 (152) = happyGoto action_22
action_472 (153) = happyGoto action_23
action_472 (154) = happyGoto action_24
action_472 (161) = happyGoto action_25
action_472 (195) = happyGoto action_28
action_472 (198) = happyGoto action_29
action_472 (199) = happyGoto action_30
action_472 (201) = happyGoto action_31
action_472 (211) = happyGoto action_32
action_472 (212) = happyGoto action_33
action_472 (213) = happyGoto action_34
action_472 (214) = happyGoto action_35
action_472 (215) = happyGoto action_36
action_472 (216) = happyGoto action_37
action_472 (224) = happyGoto action_38
action_472 _ = happyFail
action_473 _ = happyReduce_355
action_474 (234) = happyShift action_39
action_474 (235) = happyShift action_40
action_474 (236) = happyShift action_41
action_474 (237) = happyShift action_42
action_474 (238) = happyShift action_43
action_474 (239) = happyShift action_44
action_474 (245) = happyShift action_45
action_474 (246) = happyShift action_46
action_474 (247) = happyShift action_47
action_474 (248) = happyShift action_48
action_474 (249) = happyShift action_49
action_474 (250) = happyShift action_50
action_474 (251) = happyShift action_51
action_474 (252) = happyShift action_52
action_474 (253) = happyShift action_53
action_474 (254) = happyShift action_54
action_474 (255) = happyShift action_55
action_474 (257) = happyShift action_56
action_474 (265) = happyShift action_57
action_474 (268) = happyShift action_58
action_474 (275) = happyShift action_59
action_474 (280) = happyShift action_60
action_474 (282) = happyShift action_61
action_474 (289) = happyShift action_63
action_474 (292) = happyShift action_64
action_474 (293) = happyShift action_65
action_474 (294) = happyShift action_66
action_474 (295) = happyShift action_67
action_474 (296) = happyShift action_68
action_474 (297) = happyShift action_69
action_474 (299) = happyShift action_70
action_474 (300) = happyShift action_71
action_474 (301) = happyShift action_72
action_474 (303) = happyShift action_73
action_474 (305) = happyShift action_74
action_474 (306) = happyShift action_75
action_474 (313) = happyShift action_76
action_474 (314) = happyShift action_77
action_474 (315) = happyShift action_78
action_474 (316) = happyShift action_79
action_474 (318) = happyShift action_80
action_474 (319) = happyShift action_81
action_474 (320) = happyShift action_82
action_474 (321) = happyShift action_83
action_474 (322) = happyShift action_84
action_474 (323) = happyShift action_85
action_474 (325) = happyShift action_86
action_474 (327) = happyShift action_87
action_474 (332) = happyShift action_88
action_474 (334) = happyShift action_89
action_474 (335) = happyShift action_90
action_474 (337) = happyShift action_91
action_474 (338) = happyShift action_92
action_474 (345) = happyShift action_142
action_474 (346) = happyShift action_94
action_474 (350) = happyShift action_95
action_474 (356) = happyShift action_97
action_474 (363) = happyShift action_98
action_474 (364) = happyShift action_99
action_474 (365) = happyShift action_100
action_474 (140) = happyGoto action_688
action_474 (141) = happyGoto action_15
action_474 (142) = happyGoto action_16
action_474 (143) = happyGoto action_17
action_474 (144) = happyGoto action_18
action_474 (147) = happyGoto action_19
action_474 (148) = happyGoto action_20
action_474 (149) = happyGoto action_21
action_474 (152) = happyGoto action_22
action_474 (153) = happyGoto action_23
action_474 (154) = happyGoto action_24
action_474 (161) = happyGoto action_25
action_474 (195) = happyGoto action_28
action_474 (198) = happyGoto action_29
action_474 (199) = happyGoto action_30
action_474 (201) = happyGoto action_31
action_474 (211) = happyGoto action_32
action_474 (212) = happyGoto action_33
action_474 (213) = happyGoto action_34
action_474 (214) = happyGoto action_35
action_474 (215) = happyGoto action_36
action_474 (216) = happyGoto action_37
action_474 (224) = happyGoto action_38
action_474 _ = happyFail
action_475 (263) = happyShift action_687
action_475 _ = happyFail
action_476 (261) = happyShift action_686
action_476 (188) = happyGoto action_685
action_476 _ = happyReduce_515
action_477 (234) = happyShift action_39
action_477 (235) = happyShift action_40
action_477 (236) = happyShift action_41
action_477 (237) = happyShift action_42
action_477 (238) = happyShift action_43
action_477 (239) = happyShift action_44
action_477 (245) = happyShift action_45
action_477 (246) = happyShift action_46
action_477 (247) = happyShift action_47
action_477 (248) = happyShift action_48
action_477 (249) = happyShift action_49
action_477 (250) = happyShift action_50
action_477 (251) = happyShift action_51
action_477 (252) = happyShift action_52
action_477 (253) = happyShift action_53
action_477 (254) = happyShift action_54
action_477 (255) = happyShift action_55
action_477 (257) = happyShift action_56
action_477 (261) = happyShift action_477
action_477 (265) = happyShift action_57
action_477 (268) = happyShift action_58
action_477 (275) = happyShift action_59
action_477 (280) = happyShift action_60
action_477 (282) = happyShift action_61
action_477 (283) = happyShift action_62
action_477 (289) = happyShift action_63
action_477 (292) = happyShift action_64
action_477 (293) = happyShift action_65
action_477 (294) = happyShift action_66
action_477 (295) = happyShift action_67
action_477 (296) = happyShift action_68
action_477 (297) = happyShift action_69
action_477 (299) = happyShift action_70
action_477 (300) = happyShift action_71
action_477 (301) = happyShift action_72
action_477 (303) = happyShift action_73
action_477 (305) = happyShift action_74
action_477 (306) = happyShift action_75
action_477 (313) = happyShift action_76
action_477 (314) = happyShift action_77
action_477 (315) = happyShift action_78
action_477 (316) = happyShift action_79
action_477 (318) = happyShift action_80
action_477 (319) = happyShift action_81
action_477 (320) = happyShift action_82
action_477 (321) = happyShift action_83
action_477 (322) = happyShift action_84
action_477 (323) = happyShift action_85
action_477 (325) = happyShift action_86
action_477 (327) = happyShift action_87
action_477 (332) = happyShift action_88
action_477 (334) = happyShift action_89
action_477 (335) = happyShift action_90
action_477 (337) = happyShift action_91
action_477 (338) = happyShift action_92
action_477 (345) = happyShift action_93
action_477 (346) = happyShift action_94
action_477 (350) = happyShift action_95
action_477 (351) = happyShift action_96
action_477 (356) = happyShift action_97
action_477 (363) = happyShift action_98
action_477 (364) = happyShift action_99
action_477 (365) = happyShift action_100
action_477 (139) = happyGoto action_13
action_477 (140) = happyGoto action_14
action_477 (141) = happyGoto action_15
action_477 (142) = happyGoto action_16
action_477 (143) = happyGoto action_17
action_477 (144) = happyGoto action_18
action_477 (147) = happyGoto action_19
action_477 (148) = happyGoto action_20
action_477 (149) = happyGoto action_21
action_477 (152) = happyGoto action_22
action_477 (153) = happyGoto action_23
action_477 (154) = happyGoto action_24
action_477 (161) = happyGoto action_25
action_477 (185) = happyGoto action_26
action_477 (187) = happyGoto action_684
action_477 (189) = happyGoto action_476
action_477 (195) = happyGoto action_28
action_477 (198) = happyGoto action_29
action_477 (199) = happyGoto action_30
action_477 (201) = happyGoto action_31
action_477 (211) = happyGoto action_32
action_477 (212) = happyGoto action_33
action_477 (213) = happyGoto action_34
action_477 (214) = happyGoto action_35
action_477 (215) = happyGoto action_36
action_477 (216) = happyGoto action_37
action_477 (224) = happyGoto action_38
action_477 _ = happyReduce_513
action_478 (1) = happyShift action_403
action_478 (264) = happyShift action_404
action_478 (226) = happyGoto action_683
action_478 _ = happyFail
action_479 (234) = happyShift action_39
action_479 (235) = happyShift action_40
action_479 (236) = happyShift action_41
action_479 (237) = happyShift action_42
action_479 (238) = happyShift action_43
action_479 (239) = happyShift action_44
action_479 (245) = happyShift action_45
action_479 (246) = happyShift action_46
action_479 (247) = happyShift action_47
action_479 (248) = happyShift action_48
action_479 (249) = happyShift action_49
action_479 (250) = happyShift action_50
action_479 (251) = happyShift action_51
action_479 (252) = happyShift action_52
action_479 (253) = happyShift action_53
action_479 (254) = happyShift action_54
action_479 (255) = happyShift action_55
action_479 (257) = happyShift action_56
action_479 (265) = happyShift action_57
action_479 (268) = happyShift action_58
action_479 (275) = happyShift action_59
action_479 (280) = happyShift action_60
action_479 (282) = happyShift action_61
action_479 (289) = happyShift action_63
action_479 (292) = happyShift action_64
action_479 (293) = happyShift action_65
action_479 (294) = happyShift action_66
action_479 (295) = happyShift action_67
action_479 (296) = happyShift action_68
action_479 (297) = happyShift action_69
action_479 (299) = happyShift action_70
action_479 (300) = happyShift action_71
action_479 (301) = happyShift action_72
action_479 (303) = happyShift action_73
action_479 (305) = happyShift action_74
action_479 (306) = happyShift action_75
action_479 (313) = happyShift action_76
action_479 (314) = happyShift action_77
action_479 (315) = happyShift action_78
action_479 (316) = happyShift action_79
action_479 (318) = happyShift action_80
action_479 (319) = happyShift action_81
action_479 (320) = happyShift action_82
action_479 (321) = happyShift action_83
action_479 (322) = happyShift action_84
action_479 (323) = happyShift action_85
action_479 (325) = happyShift action_86
action_479 (327) = happyShift action_87
action_479 (332) = happyShift action_88
action_479 (334) = happyShift action_89
action_479 (335) = happyShift action_90
action_479 (337) = happyShift action_91
action_479 (338) = happyShift action_92
action_479 (345) = happyShift action_142
action_479 (346) = happyShift action_94
action_479 (350) = happyShift action_95
action_479 (356) = happyShift action_97
action_479 (363) = happyShift action_98
action_479 (364) = happyShift action_99
action_479 (365) = happyShift action_100
action_479 (140) = happyGoto action_682
action_479 (141) = happyGoto action_15
action_479 (142) = happyGoto action_16
action_479 (143) = happyGoto action_17
action_479 (144) = happyGoto action_18
action_479 (147) = happyGoto action_19
action_479 (148) = happyGoto action_20
action_479 (149) = happyGoto action_21
action_479 (152) = happyGoto action_22
action_479 (153) = happyGoto action_23
action_479 (154) = happyGoto action_24
action_479 (161) = happyGoto action_25
action_479 (195) = happyGoto action_28
action_479 (198) = happyGoto action_29
action_479 (199) = happyGoto action_30
action_479 (201) = happyGoto action_31
action_479 (211) = happyGoto action_32
action_479 (212) = happyGoto action_33
action_479 (213) = happyGoto action_34
action_479 (214) = happyGoto action_35
action_479 (215) = happyGoto action_36
action_479 (216) = happyGoto action_37
action_479 (224) = happyGoto action_38
action_479 _ = happyFail
action_480 (234) = happyShift action_39
action_480 (235) = happyShift action_40
action_480 (236) = happyShift action_41
action_480 (237) = happyShift action_42
action_480 (238) = happyShift action_43
action_480 (239) = happyShift action_44
action_480 (245) = happyShift action_45
action_480 (246) = happyShift action_46
action_480 (247) = happyShift action_47
action_480 (248) = happyShift action_48
action_480 (249) = happyShift action_49
action_480 (250) = happyShift action_50
action_480 (251) = happyShift action_51
action_480 (252) = happyShift action_52
action_480 (253) = happyShift action_53
action_480 (254) = happyShift action_54
action_480 (255) = happyShift action_55
action_480 (257) = happyShift action_56
action_480 (265) = happyShift action_57
action_480 (268) = happyShift action_58
action_480 (275) = happyShift action_59
action_480 (280) = happyShift action_60
action_480 (282) = happyShift action_61
action_480 (289) = happyShift action_63
action_480 (292) = happyShift action_64
action_480 (293) = happyShift action_65
action_480 (294) = happyShift action_66
action_480 (295) = happyShift action_67
action_480 (296) = happyShift action_68
action_480 (297) = happyShift action_69
action_480 (299) = happyShift action_70
action_480 (300) = happyShift action_71
action_480 (301) = happyShift action_72
action_480 (303) = happyShift action_73
action_480 (305) = happyShift action_74
action_480 (306) = happyShift action_75
action_480 (313) = happyShift action_76
action_480 (314) = happyShift action_77
action_480 (315) = happyShift action_78
action_480 (316) = happyShift action_79
action_480 (318) = happyShift action_80
action_480 (319) = happyShift action_81
action_480 (320) = happyShift action_82
action_480 (321) = happyShift action_83
action_480 (322) = happyShift action_84
action_480 (323) = happyShift action_85
action_480 (325) = happyShift action_86
action_480 (327) = happyShift action_87
action_480 (332) = happyShift action_88
action_480 (334) = happyShift action_89
action_480 (335) = happyShift action_90
action_480 (337) = happyShift action_91
action_480 (338) = happyShift action_92
action_480 (345) = happyShift action_142
action_480 (346) = happyShift action_94
action_480 (350) = happyShift action_95
action_480 (356) = happyShift action_97
action_480 (363) = happyShift action_98
action_480 (364) = happyShift action_99
action_480 (365) = happyShift action_100
action_480 (140) = happyGoto action_681
action_480 (141) = happyGoto action_15
action_480 (142) = happyGoto action_16
action_480 (143) = happyGoto action_17
action_480 (144) = happyGoto action_18
action_480 (147) = happyGoto action_19
action_480 (148) = happyGoto action_20
action_480 (149) = happyGoto action_21
action_480 (152) = happyGoto action_22
action_480 (153) = happyGoto action_23
action_480 (154) = happyGoto action_24
action_480 (161) = happyGoto action_25
action_480 (195) = happyGoto action_28
action_480 (198) = happyGoto action_29
action_480 (199) = happyGoto action_30
action_480 (201) = happyGoto action_31
action_480 (211) = happyGoto action_32
action_480 (212) = happyGoto action_33
action_480 (213) = happyGoto action_34
action_480 (214) = happyGoto action_35
action_480 (215) = happyGoto action_36
action_480 (216) = happyGoto action_37
action_480 (224) = happyGoto action_38
action_480 _ = happyFail
action_481 (272) = happyShift action_680
action_481 _ = happyFail
action_482 (234) = happyShift action_39
action_482 (238) = happyShift action_43
action_482 (239) = happyShift action_44
action_482 (255) = happyShift action_115
action_482 (257) = happyShift action_116
action_482 (265) = happyShift action_117
action_482 (281) = happyShift action_679
action_482 (313) = happyShift action_76
action_482 (314) = happyShift action_118
action_482 (315) = happyShift action_119
action_482 (316) = happyShift action_120
action_482 (318) = happyShift action_80
action_482 (319) = happyShift action_81
action_482 (320) = happyShift action_82
action_482 (321) = happyShift action_83
action_482 (322) = happyShift action_84
action_482 (323) = happyShift action_85
action_482 (325) = happyShift action_86
action_482 (337) = happyShift action_91
action_482 (356) = happyShift action_97
action_482 (84) = happyGoto action_248
action_482 (85) = happyGoto action_105
action_482 (86) = happyGoto action_106
action_482 (212) = happyGoto action_111
action_482 (215) = happyGoto action_112
action_482 (216) = happyGoto action_37
action_482 (230) = happyGoto action_113
action_482 (231) = happyGoto action_114
action_482 _ = happyReduce_187
action_483 _ = happyReduce_186
action_484 (269) = happyShift action_678
action_484 _ = happyFail
action_485 _ = happyReduce_185
action_486 _ = happyReduce_184
action_487 _ = happyReduce_189
action_488 _ = happyReduce_204
action_489 _ = happyReduce_211
action_490 _ = happyReduce_210
action_491 _ = happyReduce_206
action_492 (234) = happyShift action_39
action_492 (236) = happyShift action_41
action_492 (237) = happyShift action_42
action_492 (238) = happyShift action_43
action_492 (239) = happyShift action_44
action_492 (255) = happyShift action_115
action_492 (257) = happyShift action_116
action_492 (265) = happyShift action_117
action_492 (313) = happyShift action_76
action_492 (314) = happyShift action_118
action_492 (315) = happyShift action_119
action_492 (316) = happyShift action_120
action_492 (318) = happyShift action_80
action_492 (319) = happyShift action_81
action_492 (320) = happyShift action_82
action_492 (321) = happyShift action_83
action_492 (322) = happyShift action_84
action_492 (323) = happyShift action_85
action_492 (325) = happyShift action_86
action_492 (335) = happyShift action_121
action_492 (337) = happyShift action_91
action_492 (356) = happyShift action_97
action_492 (78) = happyGoto action_101
action_492 (80) = happyGoto action_102
action_492 (82) = happyGoto action_103
action_492 (84) = happyGoto action_104
action_492 (85) = happyGoto action_105
action_492 (86) = happyGoto action_106
action_492 (89) = happyGoto action_677
action_492 (90) = happyGoto action_109
action_492 (199) = happyGoto action_110
action_492 (212) = happyGoto action_111
action_492 (214) = happyGoto action_35
action_492 (215) = happyGoto action_112
action_492 (216) = happyGoto action_37
action_492 (230) = happyGoto action_113
action_492 (231) = happyGoto action_114
action_492 _ = happyFail
action_493 _ = happyReduce_197
action_494 _ = happyReduce_200
action_495 (255) = happyShift action_661
action_495 (283) = happyShift action_662
action_495 (284) = happyShift action_663
action_495 (119) = happyGoto action_676
action_495 (120) = happyGoto action_659
action_495 (121) = happyGoto action_660
action_495 _ = happyFail
action_496 _ = happyReduce_208
action_497 _ = happyReduce_198
action_498 (234) = happyShift action_39
action_498 (236) = happyShift action_41
action_498 (237) = happyShift action_42
action_498 (238) = happyShift action_43
action_498 (239) = happyShift action_44
action_498 (255) = happyShift action_115
action_498 (257) = happyShift action_116
action_498 (265) = happyShift action_117
action_498 (313) = happyShift action_76
action_498 (314) = happyShift action_118
action_498 (315) = happyShift action_119
action_498 (316) = happyShift action_120
action_498 (318) = happyShift action_80
action_498 (319) = happyShift action_81
action_498 (320) = happyShift action_82
action_498 (321) = happyShift action_83
action_498 (322) = happyShift action_84
action_498 (323) = happyShift action_85
action_498 (325) = happyShift action_86
action_498 (335) = happyShift action_121
action_498 (337) = happyShift action_91
action_498 (356) = happyShift action_97
action_498 (78) = happyGoto action_101
action_498 (80) = happyGoto action_102
action_498 (82) = happyGoto action_103
action_498 (84) = happyGoto action_104
action_498 (85) = happyGoto action_105
action_498 (86) = happyGoto action_106
action_498 (89) = happyGoto action_675
action_498 (90) = happyGoto action_109
action_498 (199) = happyGoto action_110
action_498 (212) = happyGoto action_111
action_498 (214) = happyGoto action_35
action_498 (215) = happyGoto action_112
action_498 (216) = happyGoto action_37
action_498 (230) = happyGoto action_113
action_498 (231) = happyGoto action_114
action_498 _ = happyFail
action_499 _ = happyReduce_199
action_500 _ = happyReduce_222
action_501 _ = happyReduce_224
action_502 (234) = happyShift action_39
action_502 (313) = happyShift action_76
action_502 (314) = happyShift action_118
action_502 (315) = happyShift action_119
action_502 (316) = happyShift action_120
action_502 (318) = happyShift action_80
action_502 (319) = happyShift action_81
action_502 (320) = happyShift action_82
action_502 (321) = happyShift action_83
action_502 (322) = happyShift action_84
action_502 (323) = happyShift action_85
action_502 (325) = happyShift action_86
action_502 (337) = happyShift action_91
action_502 (356) = happyShift action_97
action_502 (212) = happyGoto action_111
action_502 (230) = happyGoto action_674
action_502 (231) = happyGoto action_114
action_502 _ = happyFail
action_503 (234) = happyShift action_39
action_503 (236) = happyShift action_41
action_503 (237) = happyShift action_42
action_503 (238) = happyShift action_43
action_503 (239) = happyShift action_44
action_503 (255) = happyShift action_115
action_503 (257) = happyShift action_116
action_503 (265) = happyShift action_117
action_503 (313) = happyShift action_76
action_503 (314) = happyShift action_118
action_503 (315) = happyShift action_119
action_503 (316) = happyShift action_120
action_503 (318) = happyShift action_80
action_503 (319) = happyShift action_81
action_503 (320) = happyShift action_82
action_503 (321) = happyShift action_83
action_503 (322) = happyShift action_84
action_503 (323) = happyShift action_85
action_503 (325) = happyShift action_86
action_503 (335) = happyShift action_121
action_503 (337) = happyShift action_91
action_503 (356) = happyShift action_97
action_503 (78) = happyGoto action_101
action_503 (80) = happyGoto action_102
action_503 (82) = happyGoto action_103
action_503 (84) = happyGoto action_104
action_503 (85) = happyGoto action_105
action_503 (86) = happyGoto action_106
action_503 (89) = happyGoto action_673
action_503 (90) = happyGoto action_109
action_503 (199) = happyGoto action_110
action_503 (212) = happyGoto action_111
action_503 (214) = happyGoto action_35
action_503 (215) = happyGoto action_112
action_503 (216) = happyGoto action_37
action_503 (230) = happyGoto action_113
action_503 (231) = happyGoto action_114
action_503 _ = happyFail
action_504 (267) = happyShift action_672
action_504 _ = happyReduce_81
action_505 _ = happyReduce_556
action_506 _ = happyReduce_557
action_507 _ = happyReduce_88
action_508 _ = happyReduce_552
action_509 _ = happyReduce_546
action_510 (234) = happyShift action_39
action_510 (238) = happyShift action_43
action_510 (313) = happyShift action_76
action_510 (314) = happyShift action_77
action_510 (315) = happyShift action_78
action_510 (316) = happyShift action_79
action_510 (318) = happyShift action_80
action_510 (319) = happyShift action_81
action_510 (320) = happyShift action_82
action_510 (321) = happyShift action_83
action_510 (322) = happyShift action_84
action_510 (323) = happyShift action_85
action_510 (325) = happyShift action_86
action_510 (334) = happyShift action_89
action_510 (335) = happyShift action_90
action_510 (337) = happyShift action_91
action_510 (356) = happyShift action_97
action_510 (212) = happyGoto action_33
action_510 (213) = happyGoto action_670
action_510 (216) = happyGoto action_671
action_510 _ = happyFail
action_511 (273) = happyShift action_514
action_511 (274) = happyShift action_515
action_511 (104) = happyGoto action_668
action_511 (122) = happyGoto action_669
action_511 _ = happyReduce_281
action_512 (331) = happyShift action_667
action_512 (116) = happyGoto action_666
action_512 _ = happyReduce_269
action_513 (355) = happyShift action_665
action_513 (100) = happyGoto action_664
action_513 _ = happyReduce_236
action_514 (255) = happyShift action_661
action_514 (283) = happyShift action_662
action_514 (284) = happyShift action_663
action_514 (119) = happyGoto action_658
action_514 (120) = happyGoto action_659
action_514 (121) = happyGoto action_660
action_514 _ = happyFail
action_515 (335) = happyShift action_657
action_515 (105) = happyGoto action_654
action_515 (106) = happyGoto action_655
action_515 (107) = happyGoto action_656
action_515 _ = happyReduce_247
action_516 (274) = happyReduce_312
action_516 (276) = happyReduce_312
action_516 _ = happyReduce_126
action_517 (269) = happyShift action_653
action_517 _ = happyFail
action_518 (267) = happyShift action_651
action_518 (273) = happyShift action_652
action_518 _ = happyFail
action_519 _ = happyReduce_141
action_520 (355) = happyShift action_642
action_520 (134) = happyGoto action_650
action_520 _ = happyReduce_311
action_521 (276) = happyShift action_524
action_521 (138) = happyGoto action_649
action_521 _ = happyReduce_315
action_522 _ = happyReduce_317
action_523 (234) = happyShift action_39
action_523 (235) = happyShift action_40
action_523 (236) = happyShift action_41
action_523 (237) = happyShift action_42
action_523 (238) = happyShift action_43
action_523 (239) = happyShift action_44
action_523 (245) = happyShift action_45
action_523 (246) = happyShift action_46
action_523 (247) = happyShift action_47
action_523 (248) = happyShift action_48
action_523 (249) = happyShift action_49
action_523 (250) = happyShift action_50
action_523 (251) = happyShift action_51
action_523 (252) = happyShift action_52
action_523 (253) = happyShift action_53
action_523 (254) = happyShift action_54
action_523 (255) = happyShift action_55
action_523 (257) = happyShift action_56
action_523 (265) = happyShift action_57
action_523 (268) = happyShift action_58
action_523 (275) = happyShift action_59
action_523 (280) = happyShift action_60
action_523 (282) = happyShift action_61
action_523 (289) = happyShift action_63
action_523 (292) = happyShift action_64
action_523 (293) = happyShift action_65
action_523 (294) = happyShift action_66
action_523 (295) = happyShift action_67
action_523 (296) = happyShift action_68
action_523 (297) = happyShift action_69
action_523 (299) = happyShift action_70
action_523 (300) = happyShift action_71
action_523 (301) = happyShift action_72
action_523 (303) = happyShift action_73
action_523 (305) = happyShift action_74
action_523 (306) = happyShift action_75
action_523 (313) = happyShift action_76
action_523 (314) = happyShift action_77
action_523 (315) = happyShift action_78
action_523 (316) = happyShift action_79
action_523 (318) = happyShift action_80
action_523 (319) = happyShift action_81
action_523 (320) = happyShift action_82
action_523 (321) = happyShift action_83
action_523 (322) = happyShift action_84
action_523 (323) = happyShift action_85
action_523 (325) = happyShift action_86
action_523 (327) = happyShift action_87
action_523 (332) = happyShift action_88
action_523 (334) = happyShift action_89
action_523 (335) = happyShift action_90
action_523 (337) = happyShift action_91
action_523 (338) = happyShift action_92
action_523 (345) = happyShift action_142
action_523 (346) = happyShift action_94
action_523 (350) = happyShift action_95
action_523 (356) = happyShift action_97
action_523 (363) = happyShift action_98
action_523 (364) = happyShift action_99
action_523 (365) = happyShift action_100
action_523 (139) = happyGoto action_648
action_523 (140) = happyGoto action_156
action_523 (141) = happyGoto action_15
action_523 (142) = happyGoto action_16
action_523 (143) = happyGoto action_17
action_523 (144) = happyGoto action_18
action_523 (147) = happyGoto action_19
action_523 (148) = happyGoto action_20
action_523 (149) = happyGoto action_21
action_523 (152) = happyGoto action_22
action_523 (153) = happyGoto action_23
action_523 (154) = happyGoto action_24
action_523 (161) = happyGoto action_25
action_523 (195) = happyGoto action_28
action_523 (198) = happyGoto action_29
action_523 (199) = happyGoto action_30
action_523 (201) = happyGoto action_31
action_523 (211) = happyGoto action_32
action_523 (212) = happyGoto action_33
action_523 (213) = happyGoto action_34
action_523 (214) = happyGoto action_35
action_523 (215) = happyGoto action_36
action_523 (216) = happyGoto action_37
action_523 (224) = happyGoto action_38
action_523 _ = happyFail
action_524 (234) = happyShift action_39
action_524 (235) = happyShift action_40
action_524 (236) = happyShift action_41
action_524 (237) = happyShift action_42
action_524 (238) = happyShift action_43
action_524 (239) = happyShift action_44
action_524 (245) = happyShift action_45
action_524 (246) = happyShift action_46
action_524 (247) = happyShift action_47
action_524 (248) = happyShift action_48
action_524 (249) = happyShift action_49
action_524 (250) = happyShift action_50
action_524 (251) = happyShift action_51
action_524 (252) = happyShift action_52
action_524 (253) = happyShift action_53
action_524 (254) = happyShift action_54
action_524 (255) = happyShift action_55
action_524 (257) = happyShift action_56
action_524 (265) = happyShift action_57
action_524 (268) = happyShift action_58
action_524 (275) = happyShift action_59
action_524 (280) = happyShift action_60
action_524 (282) = happyShift action_61
action_524 (283) = happyShift action_62
action_524 (289) = happyShift action_63
action_524 (292) = happyShift action_64
action_524 (293) = happyShift action_65
action_524 (294) = happyShift action_66
action_524 (295) = happyShift action_67
action_524 (296) = happyShift action_68
action_524 (297) = happyShift action_69
action_524 (299) = happyShift action_70
action_524 (300) = happyShift action_71
action_524 (301) = happyShift action_72
action_524 (303) = happyShift action_73
action_524 (305) = happyShift action_74
action_524 (306) = happyShift action_75
action_524 (313) = happyShift action_76
action_524 (314) = happyShift action_77
action_524 (315) = happyShift action_78
action_524 (316) = happyShift action_79
action_524 (318) = happyShift action_80
action_524 (319) = happyShift action_81
action_524 (320) = happyShift action_82
action_524 (321) = happyShift action_83
action_524 (322) = happyShift action_84
action_524 (323) = happyShift action_85
action_524 (325) = happyShift action_86
action_524 (327) = happyShift action_87
action_524 (332) = happyShift action_88
action_524 (334) = happyShift action_89
action_524 (335) = happyShift action_90
action_524 (337) = happyShift action_91
action_524 (338) = happyShift action_92
action_524 (345) = happyShift action_647
action_524 (346) = happyShift action_94
action_524 (350) = happyShift action_95
action_524 (356) = happyShift action_97
action_524 (363) = happyShift action_98
action_524 (364) = happyShift action_99
action_524 (365) = happyShift action_100
action_524 (139) = happyGoto action_643
action_524 (140) = happyGoto action_14
action_524 (141) = happyGoto action_15
action_524 (142) = happyGoto action_16
action_524 (143) = happyGoto action_17
action_524 (144) = happyGoto action_18
action_524 (147) = happyGoto action_19
action_524 (148) = happyGoto action_20
action_524 (149) = happyGoto action_21
action_524 (152) = happyGoto action_22
action_524 (153) = happyGoto action_23
action_524 (154) = happyGoto action_24
action_524 (161) = happyGoto action_25
action_524 (176) = happyGoto action_644
action_524 (177) = happyGoto action_645
action_524 (185) = happyGoto action_646
action_524 (195) = happyGoto action_28
action_524 (198) = happyGoto action_29
action_524 (199) = happyGoto action_30
action_524 (201) = happyGoto action_31
action_524 (211) = happyGoto action_32
action_524 (212) = happyGoto action_33
action_524 (213) = happyGoto action_34
action_524 (214) = happyGoto action_35
action_524 (215) = happyGoto action_36
action_524 (216) = happyGoto action_37
action_524 (224) = happyGoto action_38
action_524 _ = happyFail
action_525 (355) = happyShift action_642
action_525 (134) = happyGoto action_641
action_525 _ = happyReduce_311
action_526 (314) = happyShift action_637
action_526 (315) = happyShift action_638
action_526 (316) = happyShift action_639
action_526 (317) = happyShift action_640
action_526 (64) = happyGoto action_636
action_526 _ = happyReduce_153
action_527 _ = happyReduce_142
action_528 _ = happyReduce_143
action_529 _ = happyReduce_144
action_530 _ = happyReduce_145
action_531 _ = happyReduce_146
action_532 _ = happyReduce_147
action_533 _ = happyReduce_148
action_534 (234) = happyShift action_39
action_534 (248) = happyShift action_634
action_534 (255) = happyShift action_635
action_534 (313) = happyShift action_76
action_534 (318) = happyShift action_80
action_534 (319) = happyShift action_81
action_534 (320) = happyShift action_82
action_534 (321) = happyShift action_83
action_534 (322) = happyShift action_84
action_534 (323) = happyShift action_85
action_534 (325) = happyShift action_86
action_534 (337) = happyShift action_91
action_534 (356) = happyShift action_97
action_534 (65) = happyGoto action_631
action_534 (197) = happyGoto action_632
action_534 (212) = happyGoto action_633
action_534 _ = happyFail
action_535 (355) = happyShift action_630
action_535 (123) = happyGoto action_629
action_535 _ = happyReduce_285
action_536 (95) = happyGoto action_626
action_536 (98) = happyGoto action_627
action_536 (99) = happyGoto action_628
action_536 _ = happyReduce_227
action_537 (273) = happyShift action_514
action_537 (122) = happyGoto action_625
action_537 _ = happyReduce_281
action_538 (256) = happyShift action_624
action_538 _ = happyFail
action_539 _ = happyReduce_115
action_540 (267) = happyReduce_216
action_540 _ = happyReduce_188
action_541 _ = happyReduce_114
action_542 _ = happyReduce_102
action_543 _ = happyReduce_101
action_544 (262) = happyShift action_623
action_544 (225) = happyGoto action_622
action_544 _ = happyReduce_615
action_545 (234) = happyShift action_39
action_545 (235) = happyShift action_40
action_545 (236) = happyShift action_41
action_545 (237) = happyShift action_42
action_545 (238) = happyShift action_43
action_545 (239) = happyShift action_44
action_545 (245) = happyShift action_45
action_545 (246) = happyShift action_46
action_545 (247) = happyShift action_47
action_545 (248) = happyShift action_48
action_545 (249) = happyShift action_49
action_545 (250) = happyShift action_50
action_545 (251) = happyShift action_51
action_545 (252) = happyShift action_52
action_545 (253) = happyShift action_53
action_545 (254) = happyShift action_54
action_545 (255) = happyShift action_55
action_545 (257) = happyShift action_56
action_545 (261) = happyShift action_621
action_545 (265) = happyShift action_57
action_545 (268) = happyShift action_58
action_545 (280) = happyShift action_60
action_545 (282) = happyShift action_61
action_545 (283) = happyShift action_132
action_545 (289) = happyShift action_63
action_545 (292) = happyShift action_64
action_545 (293) = happyShift action_65
action_545 (294) = happyShift action_66
action_545 (295) = happyShift action_67
action_545 (296) = happyShift action_68
action_545 (297) = happyShift action_69
action_545 (299) = happyShift action_70
action_545 (300) = happyShift action_71
action_545 (301) = happyShift action_72
action_545 (303) = happyShift action_73
action_545 (305) = happyShift action_74
action_545 (306) = happyShift action_75
action_545 (313) = happyShift action_76
action_545 (314) = happyShift action_77
action_545 (315) = happyShift action_78
action_545 (316) = happyShift action_79
action_545 (318) = happyShift action_80
action_545 (319) = happyShift action_81
action_545 (320) = happyShift action_82
action_545 (321) = happyShift action_83
action_545 (322) = happyShift action_84
action_545 (323) = happyShift action_85
action_545 (325) = happyShift action_86
action_545 (327) = happyShift action_87
action_545 (332) = happyShift action_88
action_545 (334) = happyShift action_89
action_545 (335) = happyShift action_90
action_545 (337) = happyShift action_91
action_545 (341) = happyShift action_138
action_545 (342) = happyShift action_139
action_545 (343) = happyShift action_140
action_545 (346) = happyShift action_94
action_545 (356) = happyShift action_97
action_545 (357) = happyShift action_145
action_545 (358) = happyShift action_146
action_545 (359) = happyShift action_147
action_545 (360) = happyShift action_148
action_545 (44) = happyGoto action_122
action_545 (46) = happyGoto action_123
action_545 (54) = happyGoto action_615
action_545 (55) = happyGoto action_616
action_545 (57) = happyGoto action_127
action_545 (58) = happyGoto action_128
action_545 (133) = happyGoto action_129
action_545 (143) = happyGoto action_617
action_545 (147) = happyGoto action_19
action_545 (149) = happyGoto action_21
action_545 (152) = happyGoto action_22
action_545 (153) = happyGoto action_23
action_545 (154) = happyGoto action_24
action_545 (161) = happyGoto action_25
action_545 (193) = happyGoto action_618
action_545 (194) = happyGoto action_619
action_545 (195) = happyGoto action_28
action_545 (198) = happyGoto action_29
action_545 (199) = happyGoto action_620
action_545 (201) = happyGoto action_31
action_545 (211) = happyGoto action_32
action_545 (212) = happyGoto action_33
action_545 (213) = happyGoto action_34
action_545 (214) = happyGoto action_35
action_545 (215) = happyGoto action_36
action_545 (216) = happyGoto action_37
action_545 (224) = happyGoto action_38
action_545 _ = happyReduce_118
action_546 (263) = happyShift action_614
action_546 _ = happyFail
action_547 (263) = happyShift action_613
action_547 _ = happyFail
action_548 (1) = happyShift action_403
action_548 (264) = happyShift action_404
action_548 (226) = happyGoto action_612
action_548 _ = happyFail
action_549 (1) = happyShift action_403
action_549 (264) = happyShift action_404
action_549 (226) = happyGoto action_611
action_549 _ = happyFail
action_550 (274) = happyShift action_610
action_550 _ = happyFail
action_551 _ = happyReduce_182
action_552 (273) = happyShift action_514
action_552 (122) = happyGoto action_609
action_552 _ = happyReduce_281
action_553 (234) = happyShift action_39
action_553 (238) = happyShift action_43
action_553 (239) = happyShift action_44
action_553 (255) = happyShift action_115
action_553 (257) = happyShift action_116
action_553 (265) = happyShift action_117
action_553 (313) = happyShift action_76
action_553 (314) = happyShift action_118
action_553 (315) = happyShift action_119
action_553 (316) = happyShift action_120
action_553 (318) = happyShift action_80
action_553 (319) = happyShift action_81
action_553 (320) = happyShift action_82
action_553 (321) = happyShift action_83
action_553 (322) = happyShift action_84
action_553 (323) = happyShift action_85
action_553 (325) = happyShift action_86
action_553 (337) = happyShift action_91
action_553 (356) = happyShift action_97
action_553 (82) = happyGoto action_608
action_553 (84) = happyGoto action_104
action_553 (85) = happyGoto action_105
action_553 (86) = happyGoto action_106
action_553 (212) = happyGoto action_111
action_553 (215) = happyGoto action_112
action_553 (216) = happyGoto action_37
action_553 (230) = happyGoto action_113
action_553 (231) = happyGoto action_114
action_553 _ = happyFail
action_554 (234) = happyShift action_39
action_554 (236) = happyShift action_41
action_554 (237) = happyShift action_42
action_554 (238) = happyShift action_43
action_554 (239) = happyShift action_44
action_554 (255) = happyShift action_115
action_554 (257) = happyShift action_116
action_554 (265) = happyShift action_117
action_554 (313) = happyShift action_76
action_554 (314) = happyShift action_118
action_554 (315) = happyShift action_119
action_554 (316) = happyShift action_120
action_554 (318) = happyShift action_80
action_554 (319) = happyShift action_81
action_554 (320) = happyShift action_82
action_554 (321) = happyShift action_83
action_554 (322) = happyShift action_84
action_554 (323) = happyShift action_85
action_554 (325) = happyShift action_86
action_554 (335) = happyShift action_121
action_554 (337) = happyShift action_91
action_554 (356) = happyShift action_97
action_554 (78) = happyGoto action_101
action_554 (80) = happyGoto action_102
action_554 (82) = happyGoto action_103
action_554 (84) = happyGoto action_104
action_554 (85) = happyGoto action_105
action_554 (86) = happyGoto action_106
action_554 (88) = happyGoto action_607
action_554 (89) = happyGoto action_108
action_554 (90) = happyGoto action_109
action_554 (199) = happyGoto action_110
action_554 (212) = happyGoto action_111
action_554 (214) = happyGoto action_35
action_554 (215) = happyGoto action_112
action_554 (216) = happyGoto action_37
action_554 (230) = happyGoto action_113
action_554 (231) = happyGoto action_114
action_554 _ = happyFail
action_555 (372) = happyShift action_606
action_555 _ = happyFail
action_556 (372) = happyShift action_605
action_556 _ = happyFail
action_557 (372) = happyShift action_604
action_557 _ = happyFail
action_558 (273) = happyShift action_603
action_558 _ = happyFail
action_559 (266) = happyShift action_602
action_559 _ = happyFail
action_560 (245) = happyShift action_601
action_560 _ = happyFail
action_561 (273) = happyShift action_600
action_561 _ = happyFail
action_562 (335) = happyShift action_599
action_562 (69) = happyGoto action_598
action_562 _ = happyReduce_164
action_563 (248) = happyShift action_181
action_563 (67) = happyGoto action_597
action_563 _ = happyReduce_157
action_564 _ = happyReduce_107
action_565 (234) = happyShift action_39
action_565 (238) = happyShift action_43
action_565 (255) = happyShift action_171
action_565 (313) = happyShift action_76
action_565 (314) = happyShift action_77
action_565 (315) = happyShift action_78
action_565 (316) = happyShift action_79
action_565 (318) = happyShift action_80
action_565 (319) = happyShift action_81
action_565 (320) = happyShift action_82
action_565 (321) = happyShift action_83
action_565 (322) = happyShift action_84
action_565 (323) = happyShift action_85
action_565 (325) = happyShift action_86
action_565 (334) = happyShift action_89
action_565 (335) = happyShift action_90
action_565 (337) = happyShift action_91
action_565 (356) = happyShift action_97
action_565 (73) = happyGoto action_596
action_565 (74) = happyGoto action_176
action_565 (75) = happyGoto action_177
action_565 (196) = happyGoto action_167
action_565 (200) = happyGoto action_168
action_565 (212) = happyGoto action_33
action_565 (213) = happyGoto action_169
action_565 (216) = happyGoto action_170
action_565 _ = happyReduce_171
action_566 _ = happyReduce_108
action_567 (234) = happyShift action_39
action_567 (238) = happyShift action_43
action_567 (255) = happyShift action_171
action_567 (313) = happyShift action_76
action_567 (314) = happyShift action_77
action_567 (315) = happyShift action_78
action_567 (316) = happyShift action_79
action_567 (318) = happyShift action_80
action_567 (319) = happyShift action_81
action_567 (320) = happyShift action_82
action_567 (321) = happyShift action_83
action_567 (322) = happyShift action_84
action_567 (323) = happyShift action_85
action_567 (325) = happyShift action_86
action_567 (334) = happyShift action_89
action_567 (335) = happyShift action_90
action_567 (337) = happyShift action_91
action_567 (356) = happyShift action_97
action_567 (74) = happyGoto action_595
action_567 (75) = happyGoto action_177
action_567 (196) = happyGoto action_167
action_567 (200) = happyGoto action_168
action_567 (212) = happyGoto action_33
action_567 (213) = happyGoto action_169
action_567 (216) = happyGoto action_170
action_567 _ = happyFail
action_568 _ = happyReduce_174
action_569 _ = happyReduce_109
action_570 (234) = happyShift action_39
action_570 (235) = happyShift action_40
action_570 (236) = happyShift action_41
action_570 (237) = happyShift action_42
action_570 (238) = happyShift action_43
action_570 (239) = happyShift action_44
action_570 (245) = happyShift action_45
action_570 (246) = happyShift action_46
action_570 (247) = happyShift action_47
action_570 (248) = happyShift action_48
action_570 (249) = happyShift action_49
action_570 (250) = happyShift action_50
action_570 (251) = happyShift action_51
action_570 (252) = happyShift action_52
action_570 (253) = happyShift action_53
action_570 (254) = happyShift action_54
action_570 (255) = happyShift action_55
action_570 (257) = happyShift action_56
action_570 (265) = happyShift action_57
action_570 (268) = happyShift action_58
action_570 (280) = happyShift action_60
action_570 (289) = happyShift action_63
action_570 (292) = happyShift action_64
action_570 (293) = happyShift action_65
action_570 (294) = happyShift action_66
action_570 (295) = happyShift action_67
action_570 (296) = happyShift action_68
action_570 (297) = happyShift action_69
action_570 (299) = happyShift action_70
action_570 (300) = happyShift action_71
action_570 (301) = happyShift action_72
action_570 (303) = happyShift action_73
action_570 (305) = happyShift action_74
action_570 (306) = happyShift action_75
action_570 (313) = happyShift action_76
action_570 (314) = happyShift action_77
action_570 (315) = happyShift action_78
action_570 (316) = happyShift action_79
action_570 (318) = happyShift action_80
action_570 (319) = happyShift action_81
action_570 (320) = happyShift action_82
action_570 (321) = happyShift action_83
action_570 (322) = happyShift action_84
action_570 (323) = happyShift action_85
action_570 (325) = happyShift action_86
action_570 (334) = happyShift action_89
action_570 (335) = happyShift action_90
action_570 (337) = happyShift action_91
action_570 (356) = happyShift action_97
action_570 (152) = happyGoto action_594
action_570 (153) = happyGoto action_23
action_570 (154) = happyGoto action_24
action_570 (161) = happyGoto action_25
action_570 (195) = happyGoto action_28
action_570 (198) = happyGoto action_29
action_570 (199) = happyGoto action_30
action_570 (201) = happyGoto action_31
action_570 (211) = happyGoto action_32
action_570 (212) = happyGoto action_33
action_570 (213) = happyGoto action_34
action_570 (214) = happyGoto action_35
action_570 (215) = happyGoto action_36
action_570 (216) = happyGoto action_37
action_570 (224) = happyGoto action_38
action_570 _ = happyFail
action_571 _ = happyReduce_180
action_572 (256) = happyShift action_593
action_572 _ = happyFail
action_573 (256) = happyShift action_592
action_573 _ = happyFail
action_574 _ = happyReduce_110
action_575 _ = happyReduce_181
action_576 (366) = happyShift action_590
action_576 (367) = happyShift action_591
action_576 (21) = happyGoto action_589
action_576 _ = happyReduce_29
action_577 _ = happyReduce_618
action_578 _ = happyReduce_619
action_579 (309) = happyShift action_588
action_579 _ = happyFail
action_580 (167) = happyGoto action_587
action_580 _ = happyReduce_467
action_581 _ = happyReduce_24
action_582 (23) = happyGoto action_586
action_582 (24) = happyGoto action_399
action_582 (25) = happyGoto action_585
action_582 _ = happyReduce_38
action_583 (23) = happyGoto action_584
action_583 (24) = happyGoto action_399
action_583 (25) = happyGoto action_585
action_583 _ = happyReduce_38
action_584 (263) = happyShift action_862
action_584 _ = happyFail
action_585 (234) = happyShift action_39
action_585 (235) = happyShift action_40
action_585 (236) = happyShift action_41
action_585 (237) = happyShift action_42
action_585 (238) = happyShift action_43
action_585 (239) = happyShift action_44
action_585 (245) = happyShift action_45
action_585 (246) = happyShift action_46
action_585 (247) = happyShift action_47
action_585 (248) = happyShift action_48
action_585 (249) = happyShift action_49
action_585 (250) = happyShift action_50
action_585 (251) = happyShift action_51
action_585 (252) = happyShift action_52
action_585 (253) = happyShift action_53
action_585 (254) = happyShift action_54
action_585 (255) = happyShift action_55
action_585 (257) = happyShift action_56
action_585 (261) = happyShift action_621
action_585 (265) = happyShift action_57
action_585 (268) = happyShift action_58
action_585 (275) = happyShift action_59
action_585 (280) = happyShift action_60
action_585 (282) = happyShift action_61
action_585 (283) = happyShift action_132
action_585 (289) = happyShift action_63
action_585 (292) = happyShift action_64
action_585 (293) = happyShift action_65
action_585 (294) = happyShift action_66
action_585 (295) = happyShift action_67
action_585 (296) = happyShift action_68
action_585 (297) = happyShift action_69
action_585 (299) = happyShift action_70
action_585 (300) = happyShift action_71
action_585 (301) = happyShift action_72
action_585 (303) = happyShift action_73
action_585 (305) = happyShift action_74
action_585 (306) = happyShift action_75
action_585 (312) = happyShift action_133
action_585 (313) = happyShift action_76
action_585 (314) = happyShift action_77
action_585 (315) = happyShift action_78
action_585 (316) = happyShift action_79
action_585 (318) = happyShift action_80
action_585 (319) = happyShift action_81
action_585 (320) = happyShift action_82
action_585 (321) = happyShift action_83
action_585 (322) = happyShift action_84
action_585 (323) = happyShift action_85
action_585 (325) = happyShift action_86
action_585 (327) = happyShift action_87
action_585 (328) = happyShift action_134
action_585 (329) = happyShift action_135
action_585 (330) = happyShift action_136
action_585 (331) = happyShift action_137
action_585 (332) = happyShift action_88
action_585 (334) = happyShift action_89
action_585 (335) = happyShift action_90
action_585 (337) = happyShift action_91
action_585 (338) = happyShift action_92
action_585 (339) = happyShift action_861
action_585 (341) = happyShift action_138
action_585 (342) = happyShift action_139
action_585 (343) = happyShift action_140
action_585 (344) = happyShift action_141
action_585 (345) = happyShift action_142
action_585 (346) = happyShift action_94
action_585 (348) = happyShift action_143
action_585 (350) = happyShift action_95
action_585 (353) = happyShift action_144
action_585 (356) = happyShift action_97
action_585 (357) = happyShift action_145
action_585 (358) = happyShift action_146
action_585 (359) = happyShift action_147
action_585 (360) = happyShift action_148
action_585 (362) = happyShift action_149
action_585 (363) = happyShift action_98
action_585 (364) = happyShift action_99
action_585 (365) = happyShift action_100
action_585 (366) = happyShift action_150
action_585 (367) = happyShift action_151
action_585 (371) = happyShift action_152
action_585 (31) = happyGoto action_858
action_585 (32) = happyGoto action_859
action_585 (44) = happyGoto action_122
action_585 (46) = happyGoto action_123
action_585 (48) = happyGoto action_860
action_585 (49) = happyGoto action_457
action_585 (50) = happyGoto action_458
action_585 (51) = happyGoto action_125
action_585 (55) = happyGoto action_126
action_585 (57) = happyGoto action_127
action_585 (58) = happyGoto action_128
action_585 (133) = happyGoto action_129
action_585 (141) = happyGoto action_130
action_585 (142) = happyGoto action_16
action_585 (143) = happyGoto action_131
action_585 (144) = happyGoto action_18
action_585 (147) = happyGoto action_19
action_585 (148) = happyGoto action_20
action_585 (149) = happyGoto action_21
action_585 (152) = happyGoto action_22
action_585 (153) = happyGoto action_23
action_585 (154) = happyGoto action_24
action_585 (161) = happyGoto action_25
action_585 (195) = happyGoto action_28
action_585 (198) = happyGoto action_29
action_585 (199) = happyGoto action_30
action_585 (201) = happyGoto action_31
action_585 (211) = happyGoto action_32
action_585 (212) = happyGoto action_33
action_585 (213) = happyGoto action_34
action_585 (214) = happyGoto action_35
action_585 (215) = happyGoto action_36
action_585 (216) = happyGoto action_37
action_585 (224) = happyGoto action_38
action_585 _ = happyReduce_35
action_586 (1) = happyShift action_403
action_586 (264) = happyShift action_404
action_586 (226) = happyGoto action_857
action_586 _ = happyFail
action_587 (234) = happyShift action_701
action_587 (235) = happyShift action_40
action_587 (236) = happyShift action_41
action_587 (237) = happyShift action_42
action_587 (238) = happyShift action_702
action_587 (239) = happyShift action_44
action_587 (240) = happyShift action_279
action_587 (245) = happyShift action_45
action_587 (246) = happyShift action_46
action_587 (247) = happyShift action_47
action_587 (248) = happyShift action_48
action_587 (249) = happyShift action_49
action_587 (250) = happyShift action_50
action_587 (251) = happyShift action_51
action_587 (252) = happyShift action_52
action_587 (253) = happyShift action_53
action_587 (254) = happyShift action_54
action_587 (255) = happyShift action_55
action_587 (257) = happyShift action_56
action_587 (265) = happyShift action_57
action_587 (268) = happyShift action_58
action_587 (280) = happyShift action_60
action_587 (289) = happyShift action_63
action_587 (292) = happyShift action_64
action_587 (293) = happyShift action_65
action_587 (294) = happyShift action_66
action_587 (295) = happyShift action_67
action_587 (296) = happyShift action_68
action_587 (297) = happyShift action_69
action_587 (299) = happyShift action_70
action_587 (300) = happyShift action_71
action_587 (301) = happyShift action_72
action_587 (303) = happyShift action_73
action_587 (305) = happyShift action_74
action_587 (306) = happyShift action_75
action_587 (312) = happyShift action_280
action_587 (313) = happyShift action_703
action_587 (314) = happyShift action_704
action_587 (315) = happyShift action_705
action_587 (316) = happyShift action_706
action_587 (318) = happyShift action_707
action_587 (319) = happyShift action_708
action_587 (320) = happyShift action_709
action_587 (321) = happyShift action_710
action_587 (322) = happyShift action_711
action_587 (323) = happyShift action_712
action_587 (325) = happyShift action_713
action_587 (326) = happyShift action_292
action_587 (327) = happyShift action_293
action_587 (328) = happyShift action_294
action_587 (329) = happyShift action_295
action_587 (330) = happyShift action_296
action_587 (331) = happyShift action_297
action_587 (332) = happyShift action_298
action_587 (333) = happyShift action_299
action_587 (334) = happyShift action_714
action_587 (335) = happyShift action_715
action_587 (336) = happyShift action_302
action_587 (337) = happyShift action_716
action_587 (338) = happyShift action_304
action_587 (339) = happyShift action_305
action_587 (340) = happyShift action_306
action_587 (341) = happyShift action_307
action_587 (342) = happyShift action_308
action_587 (343) = happyShift action_309
action_587 (344) = happyShift action_310
action_587 (345) = happyShift action_311
action_587 (346) = happyShift action_312
action_587 (347) = happyShift action_313
action_587 (348) = happyShift action_314
action_587 (349) = happyShift action_315
action_587 (350) = happyShift action_316
action_587 (351) = happyShift action_317
action_587 (352) = happyShift action_318
action_587 (353) = happyShift action_319
action_587 (354) = happyShift action_320
action_587 (355) = happyShift action_321
action_587 (356) = happyShift action_717
action_587 (152) = happyGoto action_697
action_587 (153) = happyGoto action_23
action_587 (154) = happyGoto action_24
action_587 (161) = happyGoto action_25
action_587 (164) = happyGoto action_698
action_587 (165) = happyGoto action_275
action_587 (166) = happyGoto action_276
action_587 (168) = happyGoto action_699
action_587 (169) = happyGoto action_856
action_587 (195) = happyGoto action_28
action_587 (198) = happyGoto action_29
action_587 (199) = happyGoto action_30
action_587 (201) = happyGoto action_31
action_587 (211) = happyGoto action_32
action_587 (212) = happyGoto action_33
action_587 (213) = happyGoto action_34
action_587 (214) = happyGoto action_35
action_587 (215) = happyGoto action_36
action_587 (216) = happyGoto action_37
action_587 (224) = happyGoto action_38
action_587 _ = happyReduce_470
action_588 (303) = happyShift action_162
action_588 (14) = happyGoto action_855
action_588 _ = happyFail
action_589 (255) = happyShift action_854
action_589 (26) = happyGoto action_852
action_589 (27) = happyGoto action_853
action_589 _ = happyReduce_40
action_590 (248) = happyShift action_851
action_590 _ = happyFail
action_591 (248) = happyShift action_850
action_591 _ = happyFail
action_592 _ = happyReduce_536
action_593 _ = happyReduce_543
action_594 _ = happyReduce_179
action_595 _ = happyReduce_176
action_596 _ = happyReduce_170
action_597 _ = happyReduce_156
action_598 (234) = happyShift action_39
action_598 (235) = happyShift action_40
action_598 (236) = happyShift action_41
action_598 (237) = happyShift action_42
action_598 (238) = happyShift action_43
action_598 (239) = happyShift action_44
action_598 (245) = happyShift action_45
action_598 (246) = happyShift action_46
action_598 (247) = happyShift action_47
action_598 (248) = happyShift action_48
action_598 (249) = happyShift action_49
action_598 (250) = happyShift action_50
action_598 (251) = happyShift action_51
action_598 (252) = happyShift action_52
action_598 (253) = happyShift action_53
action_598 (254) = happyShift action_54
action_598 (255) = happyShift action_55
action_598 (257) = happyShift action_56
action_598 (265) = happyShift action_57
action_598 (268) = happyShift action_58
action_598 (275) = happyShift action_59
action_598 (280) = happyShift action_60
action_598 (282) = happyShift action_61
action_598 (289) = happyShift action_63
action_598 (292) = happyShift action_64
action_598 (293) = happyShift action_65
action_598 (294) = happyShift action_66
action_598 (295) = happyShift action_67
action_598 (296) = happyShift action_68
action_598 (297) = happyShift action_69
action_598 (299) = happyShift action_70
action_598 (300) = happyShift action_71
action_598 (301) = happyShift action_72
action_598 (303) = happyShift action_73
action_598 (305) = happyShift action_74
action_598 (306) = happyShift action_75
action_598 (313) = happyShift action_76
action_598 (314) = happyShift action_77
action_598 (315) = happyShift action_78
action_598 (316) = happyShift action_79
action_598 (318) = happyShift action_80
action_598 (319) = happyShift action_81
action_598 (320) = happyShift action_82
action_598 (321) = happyShift action_83
action_598 (322) = happyShift action_84
action_598 (323) = happyShift action_85
action_598 (325) = happyShift action_86
action_598 (327) = happyShift action_87
action_598 (332) = happyShift action_88
action_598 (334) = happyShift action_89
action_598 (335) = happyShift action_90
action_598 (337) = happyShift action_91
action_598 (338) = happyShift action_92
action_598 (345) = happyShift action_142
action_598 (346) = happyShift action_94
action_598 (350) = happyShift action_95
action_598 (356) = happyShift action_97
action_598 (363) = happyShift action_98
action_598 (364) = happyShift action_99
action_598 (365) = happyShift action_100
action_598 (141) = happyGoto action_849
action_598 (142) = happyGoto action_16
action_598 (143) = happyGoto action_334
action_598 (144) = happyGoto action_18
action_598 (147) = happyGoto action_19
action_598 (148) = happyGoto action_20
action_598 (149) = happyGoto action_21
action_598 (152) = happyGoto action_22
action_598 (153) = happyGoto action_23
action_598 (154) = happyGoto action_24
action_598 (161) = happyGoto action_25
action_598 (195) = happyGoto action_28
action_598 (198) = happyGoto action_29
action_598 (199) = happyGoto action_30
action_598 (201) = happyGoto action_31
action_598 (211) = happyGoto action_32
action_598 (212) = happyGoto action_33
action_598 (213) = happyGoto action_34
action_598 (214) = happyGoto action_35
action_598 (215) = happyGoto action_36
action_598 (216) = happyGoto action_37
action_598 (224) = happyGoto action_38
action_598 _ = happyFail
action_599 (234) = happyShift action_39
action_599 (255) = happyShift action_848
action_599 (313) = happyShift action_76
action_599 (314) = happyShift action_77
action_599 (315) = happyShift action_78
action_599 (316) = happyShift action_79
action_599 (318) = happyShift action_80
action_599 (319) = happyShift action_81
action_599 (320) = happyShift action_82
action_599 (321) = happyShift action_83
action_599 (322) = happyShift action_84
action_599 (323) = happyShift action_85
action_599 (325) = happyShift action_86
action_599 (334) = happyShift action_89
action_599 (335) = happyShift action_90
action_599 (337) = happyShift action_91
action_599 (356) = happyShift action_97
action_599 (70) = happyGoto action_845
action_599 (71) = happyGoto action_846
action_599 (212) = happyGoto action_33
action_599 (213) = happyGoto action_847
action_599 _ = happyFail
action_600 (234) = happyShift action_39
action_600 (236) = happyShift action_41
action_600 (237) = happyShift action_42
action_600 (238) = happyShift action_43
action_600 (239) = happyShift action_44
action_600 (255) = happyShift action_115
action_600 (257) = happyShift action_116
action_600 (265) = happyShift action_117
action_600 (313) = happyShift action_76
action_600 (314) = happyShift action_118
action_600 (315) = happyShift action_119
action_600 (316) = happyShift action_120
action_600 (318) = happyShift action_80
action_600 (319) = happyShift action_81
action_600 (320) = happyShift action_82
action_600 (321) = happyShift action_83
action_600 (322) = happyShift action_84
action_600 (323) = happyShift action_85
action_600 (325) = happyShift action_86
action_600 (335) = happyShift action_121
action_600 (337) = happyShift action_91
action_600 (356) = happyShift action_97
action_600 (59) = happyGoto action_844
action_600 (60) = happyGoto action_841
action_600 (78) = happyGoto action_101
action_600 (80) = happyGoto action_102
action_600 (82) = happyGoto action_103
action_600 (84) = happyGoto action_104
action_600 (85) = happyGoto action_105
action_600 (86) = happyGoto action_106
action_600 (89) = happyGoto action_842
action_600 (90) = happyGoto action_109
action_600 (199) = happyGoto action_110
action_600 (212) = happyGoto action_111
action_600 (214) = happyGoto action_35
action_600 (215) = happyGoto action_112
action_600 (216) = happyGoto action_37
action_600 (230) = happyGoto action_113
action_600 (231) = happyGoto action_114
action_600 _ = happyFail
action_601 (266) = happyShift action_843
action_601 _ = happyFail
action_602 _ = happyReduce_162
action_603 (234) = happyShift action_39
action_603 (236) = happyShift action_41
action_603 (237) = happyShift action_42
action_603 (238) = happyShift action_43
action_603 (239) = happyShift action_44
action_603 (255) = happyShift action_115
action_603 (257) = happyShift action_116
action_603 (265) = happyShift action_117
action_603 (313) = happyShift action_76
action_603 (314) = happyShift action_118
action_603 (315) = happyShift action_119
action_603 (316) = happyShift action_120
action_603 (318) = happyShift action_80
action_603 (319) = happyShift action_81
action_603 (320) = happyShift action_82
action_603 (321) = happyShift action_83
action_603 (322) = happyShift action_84
action_603 (323) = happyShift action_85
action_603 (325) = happyShift action_86
action_603 (335) = happyShift action_121
action_603 (337) = happyShift action_91
action_603 (356) = happyShift action_97
action_603 (59) = happyGoto action_840
action_603 (60) = happyGoto action_841
action_603 (78) = happyGoto action_101
action_603 (80) = happyGoto action_102
action_603 (82) = happyGoto action_103
action_603 (84) = happyGoto action_104
action_603 (85) = happyGoto action_105
action_603 (86) = happyGoto action_106
action_603 (89) = happyGoto action_842
action_603 (90) = happyGoto action_109
action_603 (199) = happyGoto action_110
action_603 (212) = happyGoto action_111
action_603 (214) = happyGoto action_35
action_603 (215) = happyGoto action_112
action_603 (216) = happyGoto action_37
action_603 (230) = happyGoto action_113
action_603 (231) = happyGoto action_114
action_603 _ = happyFail
action_604 _ = happyReduce_133
action_605 _ = happyReduce_130
action_606 _ = happyReduce_129
action_607 _ = happyReduce_92
action_608 (234) = happyShift action_39
action_608 (238) = happyShift action_43
action_608 (239) = happyShift action_44
action_608 (255) = happyShift action_115
action_608 (257) = happyShift action_116
action_608 (265) = happyShift action_117
action_608 (313) = happyShift action_76
action_608 (314) = happyShift action_118
action_608 (315) = happyShift action_119
action_608 (316) = happyShift action_120
action_608 (318) = happyShift action_80
action_608 (319) = happyShift action_81
action_608 (320) = happyShift action_82
action_608 (321) = happyShift action_83
action_608 (322) = happyShift action_84
action_608 (323) = happyShift action_85
action_608 (325) = happyShift action_86
action_608 (337) = happyShift action_91
action_608 (356) = happyShift action_97
action_608 (84) = happyGoto action_248
action_608 (85) = happyGoto action_105
action_608 (86) = happyGoto action_106
action_608 (212) = happyGoto action_111
action_608 (215) = happyGoto action_112
action_608 (216) = happyGoto action_37
action_608 (230) = happyGoto action_113
action_608 (231) = happyGoto action_114
action_608 _ = happyReduce_187
action_609 _ = happyReduce_93
action_610 (234) = happyShift action_39
action_610 (236) = happyShift action_41
action_610 (237) = happyShift action_42
action_610 (238) = happyShift action_43
action_610 (239) = happyShift action_44
action_610 (255) = happyShift action_115
action_610 (257) = happyShift action_116
action_610 (265) = happyShift action_117
action_610 (313) = happyShift action_76
action_610 (314) = happyShift action_118
action_610 (315) = happyShift action_119
action_610 (316) = happyShift action_120
action_610 (318) = happyShift action_80
action_610 (319) = happyShift action_81
action_610 (320) = happyShift action_82
action_610 (321) = happyShift action_83
action_610 (322) = happyShift action_84
action_610 (323) = happyShift action_85
action_610 (325) = happyShift action_86
action_610 (335) = happyShift action_121
action_610 (337) = happyShift action_91
action_610 (356) = happyShift action_97
action_610 (78) = happyGoto action_101
action_610 (80) = happyGoto action_102
action_610 (82) = happyGoto action_103
action_610 (84) = happyGoto action_104
action_610 (85) = happyGoto action_105
action_610 (86) = happyGoto action_106
action_610 (88) = happyGoto action_839
action_610 (89) = happyGoto action_108
action_610 (90) = happyGoto action_109
action_610 (199) = happyGoto action_110
action_610 (212) = happyGoto action_111
action_610 (214) = happyGoto action_35
action_610 (215) = happyGoto action_112
action_610 (216) = happyGoto action_37
action_610 (230) = happyGoto action_113
action_610 (231) = happyGoto action_114
action_610 _ = happyFail
action_611 _ = happyReduce_139
action_612 _ = happyReduce_125
action_613 _ = happyReduce_138
action_614 _ = happyReduce_124
action_615 (24) = happyGoto action_837
action_615 (25) = happyGoto action_838
action_615 _ = happyReduce_38
action_616 _ = happyReduce_120
action_617 (241) = happyShift action_214
action_617 (242) = happyShift action_215
action_617 (243) = happyShift action_216
action_617 (244) = happyShift action_217
action_617 (267) = happyShift action_218
action_617 (269) = happyShift action_219
action_617 (270) = happyShift action_220
action_617 (272) = happyShift action_221
action_617 (273) = happyShift action_222
action_617 (282) = happyShift action_223
action_617 (283) = happyShift action_224
action_617 (284) = happyShift action_225
action_617 (135) = happyGoto action_204
action_617 (203) = happyGoto action_205
action_617 (206) = happyGoto action_206
action_617 (208) = happyGoto action_836
action_617 (210) = happyGoto action_208
action_617 (217) = happyGoto action_209
action_617 (218) = happyGoto action_210
action_617 (219) = happyGoto action_211
action_617 (221) = happyGoto action_212
action_617 (223) = happyGoto action_213
action_617 _ = happyReduce_313
action_618 (24) = happyGoto action_834
action_618 (25) = happyGoto action_835
action_618 _ = happyReduce_38
action_619 _ = happyReduce_527
action_620 (274) = happyShift action_833
action_620 _ = happyReduce_364
action_621 _ = happyReduce_36
action_622 (24) = happyGoto action_399
action_622 (25) = happyGoto action_830
action_622 (129) = happyGoto action_832
action_622 _ = happyReduce_38
action_623 (24) = happyGoto action_399
action_623 (25) = happyGoto action_830
action_623 (129) = happyGoto action_831
action_623 _ = happyReduce_38
action_624 _ = happyReduce_103
action_625 _ = happyReduce_97
action_626 (234) = happyShift action_39
action_626 (278) = happyShift action_829
action_626 (313) = happyShift action_76
action_626 (314) = happyShift action_118
action_626 (315) = happyShift action_119
action_626 (316) = happyShift action_120
action_626 (318) = happyShift action_80
action_626 (319) = happyShift action_81
action_626 (320) = happyShift action_82
action_626 (321) = happyShift action_83
action_626 (322) = happyShift action_84
action_626 (323) = happyShift action_85
action_626 (325) = happyShift action_86
action_626 (337) = happyShift action_91
action_626 (356) = happyShift action_97
action_626 (212) = happyGoto action_111
action_626 (230) = happyGoto action_828
action_626 (231) = happyGoto action_114
action_626 _ = happyFail
action_627 (267) = happyShift action_827
action_627 _ = happyReduce_230
action_628 _ = happyReduce_232
action_629 _ = happyReduce_100
action_630 (262) = happyShift action_826
action_630 (225) = happyGoto action_825
action_630 _ = happyReduce_615
action_631 _ = happyReduce_106
action_632 (273) = happyShift action_824
action_632 _ = happyFail
action_633 _ = happyReduce_537
action_634 (234) = happyShift action_39
action_634 (255) = happyShift action_635
action_634 (313) = happyShift action_76
action_634 (318) = happyShift action_80
action_634 (319) = happyShift action_81
action_634 (320) = happyShift action_82
action_634 (321) = happyShift action_83
action_634 (322) = happyShift action_84
action_634 (323) = happyShift action_85
action_634 (325) = happyShift action_86
action_634 (337) = happyShift action_91
action_634 (356) = happyShift action_97
action_634 (197) = happyGoto action_823
action_634 (212) = happyGoto action_633
action_634 _ = happyFail
action_635 (241) = happyShift action_214
action_635 (270) = happyShift action_220
action_635 (282) = happyShift action_223
action_635 (283) = happyShift action_224
action_635 (284) = happyShift action_225
action_635 (221) = happyGoto action_822
action_635 _ = happyFail
action_636 (234) = happyShift action_39
action_636 (248) = happyShift action_634
action_636 (255) = happyShift action_635
action_636 (313) = happyShift action_76
action_636 (318) = happyShift action_80
action_636 (319) = happyShift action_81
action_636 (320) = happyShift action_82
action_636 (321) = happyShift action_83
action_636 (322) = happyShift action_84
action_636 (323) = happyShift action_85
action_636 (325) = happyShift action_86
action_636 (337) = happyShift action_91
action_636 (356) = happyShift action_97
action_636 (65) = happyGoto action_821
action_636 (197) = happyGoto action_632
action_636 (212) = happyGoto action_633
action_636 _ = happyFail
action_637 _ = happyReduce_149
action_638 _ = happyReduce_150
action_639 _ = happyReduce_151
action_640 _ = happyReduce_152
action_641 _ = happyReduce_309
action_642 (262) = happyShift action_195
action_642 (56) = happyGoto action_192
action_642 (61) = happyGoto action_820
action_642 (225) = happyGoto action_194
action_642 _ = happyReduce_615
action_643 _ = happyReduce_494
action_644 (267) = happyShift action_770
action_644 (274) = happyShift action_819
action_644 _ = happyFail
action_645 _ = happyReduce_492
action_646 (277) = happyShift action_818
action_646 _ = happyFail
action_647 (262) = happyShift action_195
action_647 (56) = happyGoto action_192
action_647 (61) = happyGoto action_817
action_647 (225) = happyGoto action_194
action_647 _ = happyReduce_615
action_648 _ = happyReduce_314
action_649 _ = happyReduce_316
action_650 _ = happyReduce_308
action_651 (234) = happyShift action_39
action_651 (255) = happyShift action_816
action_651 (313) = happyShift action_76
action_651 (314) = happyShift action_77
action_651 (315) = happyShift action_78
action_651 (316) = happyShift action_79
action_651 (318) = happyShift action_80
action_651 (319) = happyShift action_81
action_651 (320) = happyShift action_82
action_651 (321) = happyShift action_83
action_651 (322) = happyShift action_84
action_651 (323) = happyShift action_85
action_651 (325) = happyShift action_86
action_651 (334) = happyShift action_89
action_651 (335) = happyShift action_90
action_651 (337) = happyShift action_91
action_651 (356) = happyShift action_97
action_651 (196) = happyGoto action_815
action_651 (212) = happyGoto action_33
action_651 (213) = happyGoto action_169
action_651 _ = happyFail
action_652 (234) = happyShift action_39
action_652 (236) = happyShift action_41
action_652 (237) = happyShift action_42
action_652 (238) = happyShift action_43
action_652 (239) = happyShift action_44
action_652 (255) = happyShift action_115
action_652 (257) = happyShift action_116
action_652 (265) = happyShift action_117
action_652 (313) = happyShift action_76
action_652 (314) = happyShift action_118
action_652 (315) = happyShift action_119
action_652 (316) = happyShift action_120
action_652 (318) = happyShift action_80
action_652 (319) = happyShift action_81
action_652 (320) = happyShift action_82
action_652 (321) = happyShift action_83
action_652 (322) = happyShift action_84
action_652 (323) = happyShift action_85
action_652 (325) = happyShift action_86
action_652 (335) = happyShift action_121
action_652 (337) = happyShift action_91
action_652 (356) = happyShift action_97
action_652 (78) = happyGoto action_101
action_652 (80) = happyGoto action_102
action_652 (82) = happyGoto action_103
action_652 (84) = happyGoto action_104
action_652 (85) = happyGoto action_105
action_652 (86) = happyGoto action_106
action_652 (88) = happyGoto action_814
action_652 (89) = happyGoto action_108
action_652 (90) = happyGoto action_109
action_652 (199) = happyGoto action_110
action_652 (212) = happyGoto action_111
action_652 (214) = happyGoto action_35
action_652 (215) = happyGoto action_112
action_652 (216) = happyGoto action_37
action_652 (230) = happyGoto action_113
action_652 (231) = happyGoto action_114
action_652 _ = happyFail
action_653 _ = happyReduce_549
action_654 (276) = happyShift action_813
action_654 _ = happyReduce_241
action_655 _ = happyReduce_243
action_656 (234) = happyShift action_39
action_656 (238) = happyShift action_43
action_656 (239) = happyShift action_44
action_656 (255) = happyShift action_810
action_656 (257) = happyShift action_116
action_656 (265) = happyShift action_117
action_656 (283) = happyShift action_811
action_656 (313) = happyShift action_76
action_656 (314) = happyShift action_118
action_656 (315) = happyShift action_119
action_656 (316) = happyShift action_120
action_656 (318) = happyShift action_80
action_656 (319) = happyShift action_81
action_656 (320) = happyShift action_82
action_656 (321) = happyShift action_83
action_656 (322) = happyShift action_84
action_656 (323) = happyShift action_85
action_656 (325) = happyShift action_86
action_656 (337) = happyShift action_91
action_656 (356) = happyShift action_97
action_656 (368) = happyShift action_812
action_656 (81) = happyGoto action_801
action_656 (82) = happyGoto action_802
action_656 (84) = happyGoto action_104
action_656 (85) = happyGoto action_105
action_656 (86) = happyGoto action_106
action_656 (90) = happyGoto action_803
action_656 (108) = happyGoto action_804
action_656 (109) = happyGoto action_805
action_656 (110) = happyGoto action_806
action_656 (112) = happyGoto action_807
action_656 (201) = happyGoto action_808
action_656 (212) = happyGoto action_111
action_656 (215) = happyGoto action_809
action_656 (216) = happyGoto action_37
action_656 (230) = happyGoto action_113
action_656 (231) = happyGoto action_114
action_656 _ = happyFail
action_657 (93) = happyGoto action_800
action_657 _ = happyReduce_223
action_658 _ = happyReduce_282
action_659 _ = happyReduce_275
action_660 (278) = happyShift action_799
action_660 _ = happyReduce_276
action_661 (255) = happyShift action_661
action_661 (283) = happyShift action_662
action_661 (284) = happyShift action_663
action_661 (120) = happyGoto action_798
action_661 (121) = happyGoto action_660
action_661 _ = happyFail
action_662 _ = happyReduce_279
action_663 _ = happyReduce_278
action_664 (331) = happyShift action_667
action_664 (116) = happyGoto action_797
action_664 _ = happyReduce_269
action_665 (262) = happyShift action_796
action_665 (225) = happyGoto action_795
action_665 _ = happyReduce_615
action_666 _ = happyReduce_95
action_667 (238) = happyShift action_43
action_667 (239) = happyShift action_44
action_667 (255) = happyShift action_794
action_667 (118) = happyGoto action_792
action_667 (215) = happyGoto action_793
action_667 (216) = happyGoto action_37
action_667 _ = happyFail
action_668 (331) = happyShift action_667
action_668 (116) = happyGoto action_791
action_668 _ = happyReduce_269
action_669 (355) = happyShift action_665
action_669 (100) = happyGoto action_790
action_669 _ = happyReduce_236
action_670 (269) = happyShift action_789
action_670 _ = happyFail
action_671 (269) = happyShift action_788
action_671 _ = happyFail
action_672 (241) = happyShift action_214
action_672 (242) = happyShift action_215
action_672 (269) = happyShift action_510
action_672 (270) = happyShift action_220
action_672 (282) = happyShift action_223
action_672 (283) = happyShift action_224
action_672 (284) = happyShift action_225
action_672 (202) = happyGoto action_505
action_672 (205) = happyGoto action_506
action_672 (207) = happyGoto action_787
action_672 (218) = happyGoto action_508
action_672 (221) = happyGoto action_509
action_672 _ = happyFail
action_673 _ = happyReduce_214
action_674 (273) = happyShift action_786
action_674 _ = happyFail
action_675 _ = happyReduce_221
action_676 (256) = happyShift action_785
action_676 _ = happyFail
action_677 (267) = happyReduce_221
action_677 _ = happyReduce_219
action_678 _ = happyReduce_627
action_679 _ = happyReduce_218
action_680 (245) = happyShift action_784
action_680 _ = happyFail
action_681 _ = happyReduce_348
action_682 _ = happyReduce_347
action_683 _ = happyReduce_510
action_684 _ = happyReduce_512
action_685 _ = happyReduce_511
action_686 (234) = happyShift action_39
action_686 (235) = happyShift action_40
action_686 (236) = happyShift action_41
action_686 (237) = happyShift action_42
action_686 (238) = happyShift action_43
action_686 (239) = happyShift action_44
action_686 (245) = happyShift action_45
action_686 (246) = happyShift action_46
action_686 (247) = happyShift action_47
action_686 (248) = happyShift action_48
action_686 (249) = happyShift action_49
action_686 (250) = happyShift action_50
action_686 (251) = happyShift action_51
action_686 (252) = happyShift action_52
action_686 (253) = happyShift action_53
action_686 (254) = happyShift action_54
action_686 (255) = happyShift action_55
action_686 (257) = happyShift action_56
action_686 (261) = happyShift action_477
action_686 (265) = happyShift action_57
action_686 (268) = happyShift action_58
action_686 (275) = happyShift action_59
action_686 (280) = happyShift action_60
action_686 (282) = happyShift action_61
action_686 (283) = happyShift action_62
action_686 (289) = happyShift action_63
action_686 (292) = happyShift action_64
action_686 (293) = happyShift action_65
action_686 (294) = happyShift action_66
action_686 (295) = happyShift action_67
action_686 (296) = happyShift action_68
action_686 (297) = happyShift action_69
action_686 (299) = happyShift action_70
action_686 (300) = happyShift action_71
action_686 (301) = happyShift action_72
action_686 (303) = happyShift action_73
action_686 (305) = happyShift action_74
action_686 (306) = happyShift action_75
action_686 (313) = happyShift action_76
action_686 (314) = happyShift action_77
action_686 (315) = happyShift action_78
action_686 (316) = happyShift action_79
action_686 (318) = happyShift action_80
action_686 (319) = happyShift action_81
action_686 (320) = happyShift action_82
action_686 (321) = happyShift action_83
action_686 (322) = happyShift action_84
action_686 (323) = happyShift action_85
action_686 (325) = happyShift action_86
action_686 (327) = happyShift action_87
action_686 (332) = happyShift action_88
action_686 (334) = happyShift action_89
action_686 (335) = happyShift action_90
action_686 (337) = happyShift action_91
action_686 (338) = happyShift action_92
action_686 (345) = happyShift action_93
action_686 (346) = happyShift action_94
action_686 (350) = happyShift action_95
action_686 (351) = happyShift action_96
action_686 (356) = happyShift action_97
action_686 (363) = happyShift action_98
action_686 (364) = happyShift action_99
action_686 (365) = happyShift action_100
action_686 (139) = happyGoto action_13
action_686 (140) = happyGoto action_14
action_686 (141) = happyGoto action_15
action_686 (142) = happyGoto action_16
action_686 (143) = happyGoto action_17
action_686 (144) = happyGoto action_18
action_686 (147) = happyGoto action_19
action_686 (148) = happyGoto action_20
action_686 (149) = happyGoto action_21
action_686 (152) = happyGoto action_22
action_686 (153) = happyGoto action_23
action_686 (154) = happyGoto action_24
action_686 (161) = happyGoto action_25
action_686 (185) = happyGoto action_26
action_686 (187) = happyGoto action_783
action_686 (189) = happyGoto action_476
action_686 (195) = happyGoto action_28
action_686 (198) = happyGoto action_29
action_686 (199) = happyGoto action_30
action_686 (201) = happyGoto action_31
action_686 (211) = happyGoto action_32
action_686 (212) = happyGoto action_33
action_686 (213) = happyGoto action_34
action_686 (214) = happyGoto action_35
action_686 (215) = happyGoto action_36
action_686 (216) = happyGoto action_37
action_686 (224) = happyGoto action_38
action_686 _ = happyReduce_513
action_687 _ = happyReduce_509
action_688 _ = happyReduce_336
action_689 _ = happyReduce_334
action_690 (234) = happyShift action_39
action_690 (235) = happyShift action_40
action_690 (236) = happyShift action_41
action_690 (237) = happyShift action_42
action_690 (238) = happyShift action_43
action_690 (239) = happyShift action_44
action_690 (245) = happyShift action_45
action_690 (246) = happyShift action_46
action_690 (247) = happyShift action_47
action_690 (248) = happyShift action_48
action_690 (249) = happyShift action_49
action_690 (250) = happyShift action_50
action_690 (251) = happyShift action_51
action_690 (252) = happyShift action_52
action_690 (253) = happyShift action_53
action_690 (254) = happyShift action_54
action_690 (255) = happyShift action_55
action_690 (257) = happyShift action_56
action_690 (265) = happyShift action_57
action_690 (268) = happyShift action_58
action_690 (275) = happyShift action_59
action_690 (280) = happyShift action_60
action_690 (282) = happyShift action_61
action_690 (289) = happyShift action_63
action_690 (292) = happyShift action_64
action_690 (293) = happyShift action_65
action_690 (294) = happyShift action_66
action_690 (295) = happyShift action_67
action_690 (296) = happyShift action_68
action_690 (297) = happyShift action_69
action_690 (299) = happyShift action_70
action_690 (300) = happyShift action_71
action_690 (301) = happyShift action_72
action_690 (303) = happyShift action_73
action_690 (305) = happyShift action_74
action_690 (306) = happyShift action_75
action_690 (313) = happyShift action_76
action_690 (314) = happyShift action_77
action_690 (315) = happyShift action_78
action_690 (316) = happyShift action_79
action_690 (318) = happyShift action_80
action_690 (319) = happyShift action_81
action_690 (320) = happyShift action_82
action_690 (321) = happyShift action_83
action_690 (322) = happyShift action_84
action_690 (323) = happyShift action_85
action_690 (325) = happyShift action_86
action_690 (327) = happyShift action_87
action_690 (332) = happyShift action_88
action_690 (334) = happyShift action_89
action_690 (335) = happyShift action_90
action_690 (337) = happyShift action_91
action_690 (338) = happyShift action_92
action_690 (345) = happyShift action_142
action_690 (346) = happyShift action_94
action_690 (350) = happyShift action_95
action_690 (356) = happyShift action_97
action_690 (363) = happyShift action_98
action_690 (364) = happyShift action_99
action_690 (365) = happyShift action_100
action_690 (140) = happyGoto action_782
action_690 (141) = happyGoto action_15
action_690 (142) = happyGoto action_16
action_690 (143) = happyGoto action_17
action_690 (144) = happyGoto action_18
action_690 (147) = happyGoto action_19
action_690 (148) = happyGoto action_20
action_690 (149) = happyGoto action_21
action_690 (152) = happyGoto action_22
action_690 (153) = happyGoto action_23
action_690 (154) = happyGoto action_24
action_690 (161) = happyGoto action_25
action_690 (195) = happyGoto action_28
action_690 (198) = happyGoto action_29
action_690 (199) = happyGoto action_30
action_690 (201) = happyGoto action_31
action_690 (211) = happyGoto action_32
action_690 (212) = happyGoto action_33
action_690 (213) = happyGoto action_34
action_690 (214) = happyGoto action_35
action_690 (215) = happyGoto action_36
action_690 (216) = happyGoto action_37
action_690 (224) = happyGoto action_38
action_690 _ = happyFail
action_691 _ = happyReduce_342
action_692 (24) = happyGoto action_399
action_692 (25) = happyGoto action_779
action_692 (179) = happyGoto action_781
action_692 _ = happyReduce_38
action_693 (24) = happyGoto action_399
action_693 (25) = happyGoto action_779
action_693 (179) = happyGoto action_780
action_693 _ = happyReduce_38
action_694 _ = happyReduce_405
action_695 (267) = happyShift action_449
action_695 (311) = happyShift action_778
action_695 _ = happyFail
action_696 (309) = happyShift action_777
action_696 _ = happyFail
action_697 _ = happyReduce_469
action_698 (274) = happyShift action_776
action_698 _ = happyFail
action_699 _ = happyReduce_466
action_700 (307) = happyShift action_774
action_700 (308) = happyShift action_775
action_700 _ = happyFail
action_701 (272) = happyReduce_419
action_701 (274) = happyReduce_419
action_701 _ = happyReduce_566
action_702 (272) = happyReduce_420
action_702 (274) = happyReduce_420
action_702 _ = happyReduce_587
action_703 (272) = happyReduce_427
action_703 (274) = happyReduce_427
action_703 _ = happyReduce_570
action_704 (272) = happyReduce_428
action_704 (274) = happyReduce_428
action_704 _ = happyReduce_578
action_705 (272) = happyReduce_429
action_705 (274) = happyReduce_429
action_705 _ = happyReduce_579
action_706 (272) = happyReduce_430
action_706 (274) = happyReduce_430
action_706 _ = happyReduce_580
action_707 (272) = happyReduce_431
action_707 (274) = happyReduce_431
action_707 _ = happyReduce_571
action_708 (272) = happyReduce_432
action_708 (274) = happyReduce_432
action_708 _ = happyReduce_572
action_709 (272) = happyReduce_433
action_709 (274) = happyReduce_433
action_709 _ = happyReduce_573
action_710 (272) = happyReduce_434
action_710 (274) = happyReduce_434
action_710 _ = happyReduce_574
action_711 (272) = happyReduce_435
action_711 (274) = happyReduce_435
action_711 _ = happyReduce_575
action_712 (272) = happyReduce_436
action_712 (274) = happyReduce_436
action_712 _ = happyReduce_576
action_713 (272) = happyReduce_437
action_713 (274) = happyReduce_437
action_713 _ = happyReduce_567
action_714 (272) = happyReduce_444
action_714 (274) = happyReduce_444
action_714 _ = happyReduce_582
action_715 (272) = happyReduce_445
action_715 (274) = happyReduce_445
action_715 _ = happyReduce_581
action_716 (272) = happyReduce_447
action_716 (274) = happyReduce_447
action_716 _ = happyReduce_569
action_717 (272) = happyReduce_465
action_717 (274) = happyReduce_465
action_717 _ = happyReduce_568
action_718 _ = happyReduce_417
action_719 (234) = happyShift action_39
action_719 (235) = happyShift action_40
action_719 (236) = happyShift action_41
action_719 (237) = happyShift action_42
action_719 (238) = happyShift action_43
action_719 (239) = happyShift action_44
action_719 (245) = happyShift action_45
action_719 (246) = happyShift action_46
action_719 (247) = happyShift action_47
action_719 (248) = happyShift action_48
action_719 (249) = happyShift action_49
action_719 (250) = happyShift action_50
action_719 (251) = happyShift action_51
action_719 (252) = happyShift action_52
action_719 (253) = happyShift action_53
action_719 (254) = happyShift action_54
action_719 (255) = happyShift action_55
action_719 (257) = happyShift action_56
action_719 (265) = happyShift action_57
action_719 (268) = happyShift action_58
action_719 (275) = happyShift action_59
action_719 (280) = happyShift action_60
action_719 (282) = happyShift action_61
action_719 (283) = happyShift action_132
action_719 (289) = happyShift action_63
action_719 (292) = happyShift action_64
action_719 (293) = happyShift action_65
action_719 (294) = happyShift action_66
action_719 (295) = happyShift action_67
action_719 (296) = happyShift action_68
action_719 (297) = happyShift action_69
action_719 (299) = happyShift action_70
action_719 (300) = happyShift action_71
action_719 (301) = happyShift action_72
action_719 (303) = happyShift action_73
action_719 (305) = happyShift action_74
action_719 (306) = happyShift action_75
action_719 (312) = happyShift action_133
action_719 (313) = happyShift action_76
action_719 (314) = happyShift action_77
action_719 (315) = happyShift action_78
action_719 (316) = happyShift action_79
action_719 (318) = happyShift action_80
action_719 (319) = happyShift action_81
action_719 (320) = happyShift action_82
action_719 (321) = happyShift action_83
action_719 (322) = happyShift action_84
action_719 (323) = happyShift action_85
action_719 (325) = happyShift action_86
action_719 (327) = happyShift action_87
action_719 (328) = happyShift action_134
action_719 (329) = happyShift action_135
action_719 (330) = happyShift action_136
action_719 (331) = happyShift action_137
action_719 (332) = happyShift action_88
action_719 (334) = happyShift action_89
action_719 (335) = happyShift action_90
action_719 (337) = happyShift action_91
action_719 (338) = happyShift action_92
action_719 (341) = happyShift action_138
action_719 (342) = happyShift action_139
action_719 (343) = happyShift action_140
action_719 (344) = happyShift action_141
action_719 (345) = happyShift action_142
action_719 (346) = happyShift action_94
action_719 (348) = happyShift action_143
action_719 (350) = happyShift action_95
action_719 (353) = happyShift action_144
action_719 (356) = happyShift action_97
action_719 (357) = happyShift action_145
action_719 (358) = happyShift action_146
action_719 (359) = happyShift action_147
action_719 (360) = happyShift action_148
action_719 (362) = happyShift action_149
action_719 (363) = happyShift action_98
action_719 (364) = happyShift action_99
action_719 (365) = happyShift action_100
action_719 (366) = happyShift action_150
action_719 (367) = happyShift action_151
action_719 (371) = happyShift action_152
action_719 (44) = happyGoto action_122
action_719 (46) = happyGoto action_123
action_719 (50) = happyGoto action_773
action_719 (51) = happyGoto action_125
action_719 (55) = happyGoto action_126
action_719 (57) = happyGoto action_127
action_719 (58) = happyGoto action_128
action_719 (133) = happyGoto action_129
action_719 (141) = happyGoto action_130
action_719 (142) = happyGoto action_16
action_719 (143) = happyGoto action_131
action_719 (144) = happyGoto action_18
action_719 (147) = happyGoto action_19
action_719 (148) = happyGoto action_20
action_719 (149) = happyGoto action_21
action_719 (152) = happyGoto action_22
action_719 (153) = happyGoto action_23
action_719 (154) = happyGoto action_24
action_719 (161) = happyGoto action_25
action_719 (195) = happyGoto action_28
action_719 (198) = happyGoto action_29
action_719 (199) = happyGoto action_30
action_719 (201) = happyGoto action_31
action_719 (211) = happyGoto action_32
action_719 (212) = happyGoto action_33
action_719 (213) = happyGoto action_34
action_719 (214) = happyGoto action_35
action_719 (215) = happyGoto action_36
action_719 (216) = happyGoto action_37
action_719 (224) = happyGoto action_38
action_719 _ = happyReduce_37
action_720 (261) = happyShift action_621
action_720 _ = happyReduce_89
action_721 (298) = happyShift action_772
action_721 _ = happyFail
action_722 (267) = happyShift action_770
action_722 (290) = happyShift action_771
action_722 _ = happyFail
action_723 _ = happyReduce_404
action_724 _ = happyReduce_333
action_725 (276) = happyShift action_769
action_725 _ = happyReduce_477
action_726 (267) = happyShift action_768
action_726 _ = happyReduce_481
action_727 _ = happyReduce_483
action_728 _ = happyReduce_484
action_729 _ = happyReduce_485
action_730 (234) = happyShift action_39
action_730 (235) = happyShift action_40
action_730 (236) = happyShift action_41
action_730 (237) = happyShift action_42
action_730 (238) = happyShift action_43
action_730 (239) = happyShift action_44
action_730 (245) = happyShift action_45
action_730 (246) = happyShift action_46
action_730 (247) = happyShift action_47
action_730 (248) = happyShift action_48
action_730 (249) = happyShift action_49
action_730 (250) = happyShift action_50
action_730 (251) = happyShift action_51
action_730 (252) = happyShift action_52
action_730 (253) = happyShift action_53
action_730 (254) = happyShift action_54
action_730 (255) = happyShift action_55
action_730 (257) = happyShift action_56
action_730 (265) = happyShift action_57
action_730 (268) = happyShift action_58
action_730 (275) = happyShift action_59
action_730 (280) = happyShift action_60
action_730 (282) = happyShift action_61
action_730 (289) = happyShift action_63
action_730 (292) = happyShift action_64
action_730 (293) = happyShift action_65
action_730 (294) = happyShift action_66
action_730 (295) = happyShift action_67
action_730 (296) = happyShift action_68
action_730 (297) = happyShift action_69
action_730 (299) = happyShift action_70
action_730 (300) = happyShift action_71
action_730 (301) = happyShift action_72
action_730 (303) = happyShift action_73
action_730 (305) = happyShift action_74
action_730 (306) = happyShift action_75
action_730 (313) = happyShift action_76
action_730 (314) = happyShift action_77
action_730 (315) = happyShift action_78
action_730 (316) = happyShift action_79
action_730 (318) = happyShift action_80
action_730 (319) = happyShift action_81
action_730 (320) = happyShift action_82
action_730 (321) = happyShift action_83
action_730 (322) = happyShift action_84
action_730 (323) = happyShift action_85
action_730 (325) = happyShift action_86
action_730 (327) = happyShift action_87
action_730 (332) = happyShift action_88
action_730 (334) = happyShift action_89
action_730 (335) = happyShift action_90
action_730 (336) = happyShift action_767
action_730 (337) = happyShift action_91
action_730 (338) = happyShift action_92
action_730 (345) = happyShift action_142
action_730 (346) = happyShift action_94
action_730 (350) = happyShift action_95
action_730 (356) = happyShift action_97
action_730 (363) = happyShift action_98
action_730 (364) = happyShift action_99
action_730 (365) = happyShift action_100
action_730 (139) = happyGoto action_766
action_730 (140) = happyGoto action_156
action_730 (141) = happyGoto action_15
action_730 (142) = happyGoto action_16
action_730 (143) = happyGoto action_17
action_730 (144) = happyGoto action_18
action_730 (147) = happyGoto action_19
action_730 (148) = happyGoto action_20
action_730 (149) = happyGoto action_21
action_730 (152) = happyGoto action_22
action_730 (153) = happyGoto action_23
action_730 (154) = happyGoto action_24
action_730 (161) = happyGoto action_25
action_730 (195) = happyGoto action_28
action_730 (198) = happyGoto action_29
action_730 (199) = happyGoto action_30
action_730 (201) = happyGoto action_31
action_730 (211) = happyGoto action_32
action_730 (212) = happyGoto action_33
action_730 (213) = happyGoto action_34
action_730 (214) = happyGoto action_35
action_730 (215) = happyGoto action_36
action_730 (216) = happyGoto action_37
action_730 (224) = happyGoto action_38
action_730 _ = happyFail
action_731 _ = happyReduce_475
action_732 (271) = happyShift action_765
action_732 (278) = happyShift action_433
action_732 _ = happyReduce_395
action_733 _ = happyReduce_479
action_734 _ = happyReduce_478
action_735 _ = happyReduce_555
action_736 _ = happyReduce_551
action_737 _ = happyReduce_375
action_738 _ = happyReduce_374
action_739 (258) = happyShift action_764
action_739 (267) = happyShift action_237
action_739 (155) = happyGoto action_434
action_739 (158) = happyGoto action_763
action_739 _ = happyFail
action_740 _ = happyReduce_403
action_741 _ = happyReduce_397
action_742 (276) = happyShift action_432
action_742 _ = happyReduce_407
action_743 _ = happyReduce_406
action_744 _ = happyReduce_371
action_745 _ = happyReduce_370
action_746 (256) = happyShift action_762
action_746 (267) = happyShift action_237
action_746 (155) = happyGoto action_426
action_746 (157) = happyGoto action_761
action_746 _ = happyFail
action_747 _ = happyReduce_400
action_748 _ = happyReduce_362
action_749 (234) = happyShift action_39
action_749 (235) = happyShift action_40
action_749 (236) = happyShift action_41
action_749 (237) = happyShift action_42
action_749 (238) = happyShift action_43
action_749 (239) = happyShift action_44
action_749 (245) = happyShift action_45
action_749 (246) = happyShift action_46
action_749 (247) = happyShift action_47
action_749 (248) = happyShift action_48
action_749 (249) = happyShift action_49
action_749 (250) = happyShift action_50
action_749 (251) = happyShift action_51
action_749 (252) = happyShift action_52
action_749 (253) = happyShift action_53
action_749 (254) = happyShift action_54
action_749 (255) = happyShift action_55
action_749 (257) = happyShift action_56
action_749 (265) = happyShift action_57
action_749 (268) = happyShift action_58
action_749 (275) = happyShift action_59
action_749 (280) = happyShift action_60
action_749 (282) = happyShift action_61
action_749 (289) = happyShift action_63
action_749 (292) = happyShift action_64
action_749 (293) = happyShift action_65
action_749 (294) = happyShift action_66
action_749 (295) = happyShift action_67
action_749 (296) = happyShift action_68
action_749 (297) = happyShift action_69
action_749 (299) = happyShift action_70
action_749 (300) = happyShift action_71
action_749 (301) = happyShift action_72
action_749 (303) = happyShift action_73
action_749 (305) = happyShift action_74
action_749 (306) = happyShift action_75
action_749 (313) = happyShift action_76
action_749 (314) = happyShift action_77
action_749 (315) = happyShift action_78
action_749 (316) = happyShift action_79
action_749 (318) = happyShift action_80
action_749 (319) = happyShift action_81
action_749 (320) = happyShift action_82
action_749 (321) = happyShift action_83
action_749 (322) = happyShift action_84
action_749 (323) = happyShift action_85
action_749 (325) = happyShift action_86
action_749 (327) = happyShift action_87
action_749 (332) = happyShift action_88
action_749 (334) = happyShift action_89
action_749 (335) = happyShift action_90
action_749 (337) = happyShift action_91
action_749 (338) = happyShift action_92
action_749 (345) = happyShift action_142
action_749 (346) = happyShift action_94
action_749 (350) = happyShift action_95
action_749 (356) = happyShift action_97
action_749 (363) = happyShift action_98
action_749 (364) = happyShift action_99
action_749 (365) = happyShift action_100
action_749 (140) = happyGoto action_760
action_749 (141) = happyGoto action_15
action_749 (142) = happyGoto action_16
action_749 (143) = happyGoto action_17
action_749 (144) = happyGoto action_18
action_749 (147) = happyGoto action_19
action_749 (148) = happyGoto action_20
action_749 (149) = happyGoto action_21
action_749 (152) = happyGoto action_22
action_749 (153) = happyGoto action_23
action_749 (154) = happyGoto action_24
action_749 (161) = happyGoto action_25
action_749 (195) = happyGoto action_28
action_749 (198) = happyGoto action_29
action_749 (199) = happyGoto action_30
action_749 (201) = happyGoto action_31
action_749 (211) = happyGoto action_32
action_749 (212) = happyGoto action_33
action_749 (213) = happyGoto action_34
action_749 (214) = happyGoto action_35
action_749 (215) = happyGoto action_36
action_749 (216) = happyGoto action_37
action_749 (224) = happyGoto action_38
action_749 _ = happyFail
action_750 _ = happyReduce_361
action_751 (234) = happyShift action_39
action_751 (235) = happyShift action_40
action_751 (255) = happyShift action_415
action_751 (271) = happyShift action_417
action_751 (313) = happyShift action_76
action_751 (314) = happyShift action_77
action_751 (315) = happyShift action_78
action_751 (316) = happyShift action_79
action_751 (318) = happyShift action_80
action_751 (319) = happyShift action_81
action_751 (320) = happyShift action_82
action_751 (321) = happyShift action_83
action_751 (322) = happyShift action_84
action_751 (323) = happyShift action_85
action_751 (325) = happyShift action_86
action_751 (334) = happyShift action_89
action_751 (335) = happyShift action_90
action_751 (337) = happyShift action_91
action_751 (356) = happyShift action_97
action_751 (191) = happyGoto action_759
action_751 (198) = happyGoto action_414
action_751 (211) = happyGoto action_32
action_751 (212) = happyGoto action_33
action_751 (213) = happyGoto action_34
action_751 _ = happyFail
action_752 _ = happyReduce_17
action_753 _ = happyReduce_20
action_754 (238) = happyShift action_43
action_754 (18) = happyGoto action_758
action_754 (216) = happyGoto action_398
action_754 _ = happyFail
action_755 (261) = happyShift action_621
action_755 (372) = happyShift action_757
action_755 _ = happyFail
action_756 _ = happyReduce_21
action_757 _ = happyReduce_19
action_758 _ = happyReduce_22
action_759 _ = happyReduce_520
action_760 _ = happyReduce_522
action_761 _ = happyReduce_398
action_762 _ = happyReduce_399
action_763 _ = happyReduce_401
action_764 _ = happyReduce_402
action_765 (234) = happyShift action_39
action_765 (235) = happyShift action_40
action_765 (236) = happyShift action_41
action_765 (237) = happyShift action_42
action_765 (238) = happyShift action_43
action_765 (239) = happyShift action_44
action_765 (245) = happyShift action_45
action_765 (246) = happyShift action_46
action_765 (247) = happyShift action_47
action_765 (248) = happyShift action_48
action_765 (249) = happyShift action_49
action_765 (250) = happyShift action_50
action_765 (251) = happyShift action_51
action_765 (252) = happyShift action_52
action_765 (253) = happyShift action_53
action_765 (254) = happyShift action_54
action_765 (255) = happyShift action_55
action_765 (257) = happyShift action_56
action_765 (265) = happyShift action_57
action_765 (268) = happyShift action_58
action_765 (275) = happyShift action_59
action_765 (280) = happyShift action_60
action_765 (282) = happyShift action_61
action_765 (289) = happyShift action_63
action_765 (292) = happyShift action_64
action_765 (293) = happyShift action_65
action_765 (294) = happyShift action_66
action_765 (295) = happyShift action_67
action_765 (296) = happyShift action_68
action_765 (297) = happyShift action_69
action_765 (299) = happyShift action_70
action_765 (300) = happyShift action_71
action_765 (301) = happyShift action_72
action_765 (303) = happyShift action_73
action_765 (305) = happyShift action_74
action_765 (306) = happyShift action_75
action_765 (313) = happyShift action_76
action_765 (314) = happyShift action_77
action_765 (315) = happyShift action_78
action_765 (316) = happyShift action_79
action_765 (318) = happyShift action_80
action_765 (319) = happyShift action_81
action_765 (320) = happyShift action_82
action_765 (321) = happyShift action_83
action_765 (322) = happyShift action_84
action_765 (323) = happyShift action_85
action_765 (325) = happyShift action_86
action_765 (327) = happyShift action_87
action_765 (332) = happyShift action_88
action_765 (334) = happyShift action_89
action_765 (335) = happyShift action_90
action_765 (337) = happyShift action_91
action_765 (338) = happyShift action_92
action_765 (345) = happyShift action_142
action_765 (346) = happyShift action_94
action_765 (350) = happyShift action_95
action_765 (356) = happyShift action_97
action_765 (363) = happyShift action_98
action_765 (364) = happyShift action_99
action_765 (365) = happyShift action_100
action_765 (140) = happyGoto action_956
action_765 (141) = happyGoto action_15
action_765 (142) = happyGoto action_16
action_765 (143) = happyGoto action_17
action_765 (144) = happyGoto action_18
action_765 (147) = happyGoto action_19
action_765 (148) = happyGoto action_20
action_765 (149) = happyGoto action_21
action_765 (152) = happyGoto action_22
action_765 (153) = happyGoto action_23
action_765 (154) = happyGoto action_24
action_765 (161) = happyGoto action_25
action_765 (195) = happyGoto action_28
action_765 (198) = happyGoto action_29
action_765 (199) = happyGoto action_30
action_765 (201) = happyGoto action_31
action_765 (211) = happyGoto action_32
action_765 (212) = happyGoto action_33
action_765 (213) = happyGoto action_34
action_765 (214) = happyGoto action_35
action_765 (215) = happyGoto action_36
action_765 (216) = happyGoto action_37
action_765 (224) = happyGoto action_38
action_765 _ = happyReduce_474
action_766 (326) = happyShift action_955
action_766 _ = happyReduce_486
action_767 (326) = happyShift action_953
action_767 (354) = happyShift action_954
action_767 _ = happyFail
action_768 (234) = happyShift action_39
action_768 (235) = happyShift action_40
action_768 (236) = happyShift action_41
action_768 (237) = happyShift action_42
action_768 (238) = happyShift action_43
action_768 (239) = happyShift action_44
action_768 (245) = happyShift action_45
action_768 (246) = happyShift action_46
action_768 (247) = happyShift action_47
action_768 (248) = happyShift action_48
action_768 (249) = happyShift action_49
action_768 (250) = happyShift action_50
action_768 (251) = happyShift action_51
action_768 (252) = happyShift action_52
action_768 (253) = happyShift action_53
action_768 (254) = happyShift action_54
action_768 (255) = happyShift action_55
action_768 (257) = happyShift action_56
action_768 (265) = happyShift action_57
action_768 (268) = happyShift action_58
action_768 (275) = happyShift action_59
action_768 (280) = happyShift action_60
action_768 (282) = happyShift action_61
action_768 (283) = happyShift action_62
action_768 (289) = happyShift action_63
action_768 (292) = happyShift action_64
action_768 (293) = happyShift action_65
action_768 (294) = happyShift action_66
action_768 (295) = happyShift action_67
action_768 (296) = happyShift action_68
action_768 (297) = happyShift action_69
action_768 (299) = happyShift action_70
action_768 (300) = happyShift action_71
action_768 (301) = happyShift action_72
action_768 (303) = happyShift action_73
action_768 (305) = happyShift action_74
action_768 (306) = happyShift action_75
action_768 (313) = happyShift action_76
action_768 (314) = happyShift action_77
action_768 (315) = happyShift action_78
action_768 (316) = happyShift action_79
action_768 (318) = happyShift action_80
action_768 (319) = happyShift action_81
action_768 (320) = happyShift action_82
action_768 (321) = happyShift action_83
action_768 (322) = happyShift action_84
action_768 (323) = happyShift action_85
action_768 (325) = happyShift action_86
action_768 (327) = happyShift action_87
action_768 (332) = happyShift action_88
action_768 (334) = happyShift action_89
action_768 (335) = happyShift action_90
action_768 (337) = happyShift action_91
action_768 (338) = happyShift action_92
action_768 (345) = happyShift action_647
action_768 (346) = happyShift action_94
action_768 (350) = happyShift action_95
action_768 (352) = happyShift action_730
action_768 (356) = happyShift action_97
action_768 (363) = happyShift action_98
action_768 (364) = happyShift action_99
action_768 (365) = happyShift action_100
action_768 (139) = happyGoto action_643
action_768 (140) = happyGoto action_14
action_768 (141) = happyGoto action_15
action_768 (142) = happyGoto action_16
action_768 (143) = happyGoto action_17
action_768 (144) = happyGoto action_18
action_768 (147) = happyGoto action_19
action_768 (148) = happyGoto action_20
action_768 (149) = happyGoto action_21
action_768 (152) = happyGoto action_22
action_768 (153) = happyGoto action_23
action_768 (154) = happyGoto action_24
action_768 (161) = happyGoto action_25
action_768 (174) = happyGoto action_952
action_768 (175) = happyGoto action_728
action_768 (177) = happyGoto action_729
action_768 (185) = happyGoto action_646
action_768 (195) = happyGoto action_28
action_768 (198) = happyGoto action_29
action_768 (199) = happyGoto action_30
action_768 (201) = happyGoto action_31
action_768 (211) = happyGoto action_32
action_768 (212) = happyGoto action_33
action_768 (213) = happyGoto action_34
action_768 (214) = happyGoto action_35
action_768 (215) = happyGoto action_36
action_768 (216) = happyGoto action_37
action_768 (224) = happyGoto action_38
action_768 _ = happyFail
action_769 (234) = happyShift action_39
action_769 (235) = happyShift action_40
action_769 (236) = happyShift action_41
action_769 (237) = happyShift action_42
action_769 (238) = happyShift action_43
action_769 (239) = happyShift action_44
action_769 (245) = happyShift action_45
action_769 (246) = happyShift action_46
action_769 (247) = happyShift action_47
action_769 (248) = happyShift action_48
action_769 (249) = happyShift action_49
action_769 (250) = happyShift action_50
action_769 (251) = happyShift action_51
action_769 (252) = happyShift action_52
action_769 (253) = happyShift action_53
action_769 (254) = happyShift action_54
action_769 (255) = happyShift action_55
action_769 (257) = happyShift action_56
action_769 (265) = happyShift action_57
action_769 (268) = happyShift action_58
action_769 (275) = happyShift action_59
action_769 (280) = happyShift action_60
action_769 (282) = happyShift action_61
action_769 (283) = happyShift action_62
action_769 (289) = happyShift action_63
action_769 (292) = happyShift action_64
action_769 (293) = happyShift action_65
action_769 (294) = happyShift action_66
action_769 (295) = happyShift action_67
action_769 (296) = happyShift action_68
action_769 (297) = happyShift action_69
action_769 (299) = happyShift action_70
action_769 (300) = happyShift action_71
action_769 (301) = happyShift action_72
action_769 (303) = happyShift action_73
action_769 (305) = happyShift action_74
action_769 (306) = happyShift action_75
action_769 (313) = happyShift action_76
action_769 (314) = happyShift action_77
action_769 (315) = happyShift action_78
action_769 (316) = happyShift action_79
action_769 (318) = happyShift action_80
action_769 (319) = happyShift action_81
action_769 (320) = happyShift action_82
action_769 (321) = happyShift action_83
action_769 (322) = happyShift action_84
action_769 (323) = happyShift action_85
action_769 (325) = happyShift action_86
action_769 (327) = happyShift action_87
action_769 (332) = happyShift action_88
action_769 (334) = happyShift action_89
action_769 (335) = happyShift action_90
action_769 (337) = happyShift action_91
action_769 (338) = happyShift action_92
action_769 (345) = happyShift action_647
action_769 (346) = happyShift action_94
action_769 (350) = happyShift action_95
action_769 (352) = happyShift action_730
action_769 (356) = happyShift action_97
action_769 (363) = happyShift action_98
action_769 (364) = happyShift action_99
action_769 (365) = happyShift action_100
action_769 (139) = happyGoto action_643
action_769 (140) = happyGoto action_14
action_769 (141) = happyGoto action_15
action_769 (142) = happyGoto action_16
action_769 (143) = happyGoto action_17
action_769 (144) = happyGoto action_18
action_769 (147) = happyGoto action_19
action_769 (148) = happyGoto action_20
action_769 (149) = happyGoto action_21
action_769 (152) = happyGoto action_22
action_769 (153) = happyGoto action_23
action_769 (154) = happyGoto action_24
action_769 (161) = happyGoto action_25
action_769 (173) = happyGoto action_951
action_769 (174) = happyGoto action_727
action_769 (175) = happyGoto action_728
action_769 (177) = happyGoto action_729
action_769 (185) = happyGoto action_646
action_769 (195) = happyGoto action_28
action_769 (198) = happyGoto action_29
action_769 (199) = happyGoto action_30
action_769 (201) = happyGoto action_31
action_769 (211) = happyGoto action_32
action_769 (212) = happyGoto action_33
action_769 (213) = happyGoto action_34
action_769 (214) = happyGoto action_35
action_769 (215) = happyGoto action_36
action_769 (216) = happyGoto action_37
action_769 (224) = happyGoto action_38
action_769 _ = happyFail
action_770 (234) = happyShift action_39
action_770 (235) = happyShift action_40
action_770 (236) = happyShift action_41
action_770 (237) = happyShift action_42
action_770 (238) = happyShift action_43
action_770 (239) = happyShift action_44
action_770 (245) = happyShift action_45
action_770 (246) = happyShift action_46
action_770 (247) = happyShift action_47
action_770 (248) = happyShift action_48
action_770 (249) = happyShift action_49
action_770 (250) = happyShift action_50
action_770 (251) = happyShift action_51
action_770 (252) = happyShift action_52
action_770 (253) = happyShift action_53
action_770 (254) = happyShift action_54
action_770 (255) = happyShift action_55
action_770 (257) = happyShift action_56
action_770 (265) = happyShift action_57
action_770 (268) = happyShift action_58
action_770 (275) = happyShift action_59
action_770 (280) = happyShift action_60
action_770 (282) = happyShift action_61
action_770 (283) = happyShift action_62
action_770 (289) = happyShift action_63
action_770 (292) = happyShift action_64
action_770 (293) = happyShift action_65
action_770 (294) = happyShift action_66
action_770 (295) = happyShift action_67
action_770 (296) = happyShift action_68
action_770 (297) = happyShift action_69
action_770 (299) = happyShift action_70
action_770 (300) = happyShift action_71
action_770 (301) = happyShift action_72
action_770 (303) = happyShift action_73
action_770 (305) = happyShift action_74
action_770 (306) = happyShift action_75
action_770 (313) = happyShift action_76
action_770 (314) = happyShift action_77
action_770 (315) = happyShift action_78
action_770 (316) = happyShift action_79
action_770 (318) = happyShift action_80
action_770 (319) = happyShift action_81
action_770 (320) = happyShift action_82
action_770 (321) = happyShift action_83
action_770 (322) = happyShift action_84
action_770 (323) = happyShift action_85
action_770 (325) = happyShift action_86
action_770 (327) = happyShift action_87
action_770 (332) = happyShift action_88
action_770 (334) = happyShift action_89
action_770 (335) = happyShift action_90
action_770 (337) = happyShift action_91
action_770 (338) = happyShift action_92
action_770 (345) = happyShift action_647
action_770 (346) = happyShift action_94
action_770 (350) = happyShift action_95
action_770 (356) = happyShift action_97
action_770 (363) = happyShift action_98
action_770 (364) = happyShift action_99
action_770 (365) = happyShift action_100
action_770 (139) = happyGoto action_643
action_770 (140) = happyGoto action_14
action_770 (141) = happyGoto action_15
action_770 (142) = happyGoto action_16
action_770 (143) = happyGoto action_17
action_770 (144) = happyGoto action_18
action_770 (147) = happyGoto action_19
action_770 (148) = happyGoto action_20
action_770 (149) = happyGoto action_21
action_770 (152) = happyGoto action_22
action_770 (153) = happyGoto action_23
action_770 (154) = happyGoto action_24
action_770 (161) = happyGoto action_25
action_770 (177) = happyGoto action_950
action_770 (185) = happyGoto action_646
action_770 (195) = happyGoto action_28
action_770 (198) = happyGoto action_29
action_770 (199) = happyGoto action_30
action_770 (201) = happyGoto action_31
action_770 (211) = happyGoto action_32
action_770 (212) = happyGoto action_33
action_770 (213) = happyGoto action_34
action_770 (214) = happyGoto action_35
action_770 (215) = happyGoto action_36
action_770 (216) = happyGoto action_37
action_770 (224) = happyGoto action_38
action_770 _ = happyFail
action_771 _ = happyReduce_380
action_772 _ = happyReduce_387
action_773 _ = happyReduce_90
action_774 (162) = happyGoto action_949
action_774 _ = happyReduce_413
action_775 _ = happyReduce_409
action_776 (234) = happyShift action_39
action_776 (235) = happyShift action_40
action_776 (236) = happyShift action_41
action_776 (237) = happyShift action_42
action_776 (238) = happyShift action_43
action_776 (239) = happyShift action_44
action_776 (245) = happyShift action_45
action_776 (246) = happyShift action_46
action_776 (247) = happyShift action_47
action_776 (248) = happyShift action_48
action_776 (249) = happyShift action_49
action_776 (250) = happyShift action_50
action_776 (251) = happyShift action_51
action_776 (252) = happyShift action_52
action_776 (253) = happyShift action_53
action_776 (254) = happyShift action_54
action_776 (255) = happyShift action_55
action_776 (257) = happyShift action_56
action_776 (265) = happyShift action_57
action_776 (268) = happyShift action_58
action_776 (280) = happyShift action_60
action_776 (289) = happyShift action_63
action_776 (292) = happyShift action_64
action_776 (293) = happyShift action_65
action_776 (294) = happyShift action_66
action_776 (295) = happyShift action_67
action_776 (296) = happyShift action_68
action_776 (297) = happyShift action_69
action_776 (299) = happyShift action_70
action_776 (300) = happyShift action_71
action_776 (301) = happyShift action_72
action_776 (303) = happyShift action_73
action_776 (305) = happyShift action_74
action_776 (306) = happyShift action_75
action_776 (313) = happyShift action_76
action_776 (314) = happyShift action_77
action_776 (315) = happyShift action_78
action_776 (316) = happyShift action_79
action_776 (318) = happyShift action_80
action_776 (319) = happyShift action_81
action_776 (320) = happyShift action_82
action_776 (321) = happyShift action_83
action_776 (322) = happyShift action_84
action_776 (323) = happyShift action_85
action_776 (325) = happyShift action_86
action_776 (334) = happyShift action_89
action_776 (335) = happyShift action_90
action_776 (337) = happyShift action_91
action_776 (356) = happyShift action_97
action_776 (152) = happyGoto action_948
action_776 (153) = happyGoto action_23
action_776 (154) = happyGoto action_24
action_776 (161) = happyGoto action_25
action_776 (195) = happyGoto action_28
action_776 (198) = happyGoto action_29
action_776 (199) = happyGoto action_30
action_776 (201) = happyGoto action_31
action_776 (211) = happyGoto action_32
action_776 (212) = happyGoto action_33
action_776 (213) = happyGoto action_34
action_776 (214) = happyGoto action_35
action_776 (215) = happyGoto action_36
action_776 (216) = happyGoto action_37
action_776 (224) = happyGoto action_38
action_776 _ = happyFail
action_777 _ = happyReduce_411
action_778 _ = happyReduce_415
action_779 (234) = happyShift action_39
action_779 (235) = happyShift action_40
action_779 (236) = happyShift action_41
action_779 (237) = happyShift action_42
action_779 (238) = happyShift action_43
action_779 (239) = happyShift action_44
action_779 (245) = happyShift action_45
action_779 (246) = happyShift action_46
action_779 (247) = happyShift action_47
action_779 (248) = happyShift action_48
action_779 (249) = happyShift action_49
action_779 (250) = happyShift action_50
action_779 (251) = happyShift action_51
action_779 (252) = happyShift action_52
action_779 (253) = happyShift action_53
action_779 (254) = happyShift action_54
action_779 (255) = happyShift action_55
action_779 (257) = happyShift action_56
action_779 (261) = happyShift action_621
action_779 (265) = happyShift action_57
action_779 (268) = happyShift action_58
action_779 (275) = happyShift action_59
action_779 (280) = happyShift action_60
action_779 (282) = happyShift action_61
action_779 (283) = happyShift action_62
action_779 (289) = happyShift action_63
action_779 (292) = happyShift action_64
action_779 (293) = happyShift action_65
action_779 (294) = happyShift action_66
action_779 (295) = happyShift action_67
action_779 (296) = happyShift action_68
action_779 (297) = happyShift action_69
action_779 (299) = happyShift action_70
action_779 (300) = happyShift action_71
action_779 (301) = happyShift action_72
action_779 (303) = happyShift action_73
action_779 (305) = happyShift action_74
action_779 (306) = happyShift action_75
action_779 (313) = happyShift action_76
action_779 (314) = happyShift action_77
action_779 (315) = happyShift action_78
action_779 (316) = happyShift action_79
action_779 (318) = happyShift action_80
action_779 (319) = happyShift action_81
action_779 (320) = happyShift action_82
action_779 (321) = happyShift action_83
action_779 (322) = happyShift action_84
action_779 (323) = happyShift action_85
action_779 (325) = happyShift action_86
action_779 (327) = happyShift action_87
action_779 (332) = happyShift action_88
action_779 (334) = happyShift action_89
action_779 (335) = happyShift action_90
action_779 (337) = happyShift action_91
action_779 (338) = happyShift action_92
action_779 (345) = happyShift action_142
action_779 (346) = happyShift action_94
action_779 (350) = happyShift action_95
action_779 (356) = happyShift action_97
action_779 (363) = happyShift action_98
action_779 (364) = happyShift action_99
action_779 (365) = happyShift action_100
action_779 (140) = happyGoto action_153
action_779 (141) = happyGoto action_15
action_779 (142) = happyGoto action_16
action_779 (143) = happyGoto action_17
action_779 (144) = happyGoto action_18
action_779 (147) = happyGoto action_19
action_779 (148) = happyGoto action_20
action_779 (149) = happyGoto action_21
action_779 (152) = happyGoto action_22
action_779 (153) = happyGoto action_23
action_779 (154) = happyGoto action_24
action_779 (161) = happyGoto action_25
action_779 (180) = happyGoto action_945
action_779 (181) = happyGoto action_946
action_779 (185) = happyGoto action_947
action_779 (195) = happyGoto action_28
action_779 (198) = happyGoto action_29
action_779 (199) = happyGoto action_30
action_779 (201) = happyGoto action_31
action_779 (211) = happyGoto action_32
action_779 (212) = happyGoto action_33
action_779 (213) = happyGoto action_34
action_779 (214) = happyGoto action_35
action_779 (215) = happyGoto action_36
action_779 (216) = happyGoto action_37
action_779 (224) = happyGoto action_38
action_779 _ = happyFail
action_780 (263) = happyShift action_944
action_780 _ = happyFail
action_781 (1) = happyShift action_403
action_781 (264) = happyShift action_404
action_781 (226) = happyGoto action_943
action_781 _ = happyFail
action_782 (261) = happyShift action_471
action_782 (145) = happyGoto action_942
action_782 _ = happyReduce_339
action_783 _ = happyReduce_514
action_784 (282) = happyShift action_941
action_784 _ = happyFail
action_785 _ = happyReduce_201
action_786 (255) = happyShift action_661
action_786 (283) = happyShift action_662
action_786 (284) = happyShift action_663
action_786 (119) = happyGoto action_940
action_786 (120) = happyGoto action_659
action_786 (121) = happyGoto action_660
action_786 _ = happyFail
action_787 _ = happyReduce_87
action_788 _ = happyReduce_553
action_789 _ = happyReduce_547
action_790 (331) = happyShift action_667
action_790 (116) = happyGoto action_939
action_790 _ = happyReduce_269
action_791 _ = happyReduce_98
action_792 _ = happyReduce_270
action_793 _ = happyReduce_274
action_794 (234) = happyShift action_39
action_794 (236) = happyShift action_41
action_794 (237) = happyShift action_42
action_794 (238) = happyShift action_43
action_794 (239) = happyShift action_44
action_794 (255) = happyShift action_115
action_794 (256) = happyShift action_938
action_794 (257) = happyShift action_116
action_794 (265) = happyShift action_117
action_794 (313) = happyShift action_76
action_794 (314) = happyShift action_118
action_794 (315) = happyShift action_119
action_794 (316) = happyShift action_120
action_794 (318) = happyShift action_80
action_794 (319) = happyShift action_81
action_794 (320) = happyShift action_82
action_794 (321) = happyShift action_83
action_794 (322) = happyShift action_84
action_794 (323) = happyShift action_85
action_794 (325) = happyShift action_86
action_794 (335) = happyShift action_121
action_794 (337) = happyShift action_91
action_794 (356) = happyShift action_97
action_794 (78) = happyGoto action_101
action_794 (80) = happyGoto action_102
action_794 (82) = happyGoto action_103
action_794 (84) = happyGoto action_104
action_794 (85) = happyGoto action_105
action_794 (86) = happyGoto action_106
action_794 (89) = happyGoto action_233
action_794 (90) = happyGoto action_109
action_794 (92) = happyGoto action_936
action_794 (117) = happyGoto action_937
action_794 (199) = happyGoto action_110
action_794 (212) = happyGoto action_111
action_794 (214) = happyGoto action_35
action_794 (215) = happyGoto action_112
action_794 (216) = happyGoto action_37
action_794 (230) = happyGoto action_113
action_794 (231) = happyGoto action_114
action_794 _ = happyFail
action_795 (24) = happyGoto action_399
action_795 (25) = happyGoto action_933
action_795 (101) = happyGoto action_935
action_795 _ = happyReduce_38
action_796 (24) = happyGoto action_399
action_796 (25) = happyGoto action_933
action_796 (101) = happyGoto action_934
action_796 _ = happyReduce_38
action_797 _ = happyReduce_96
action_798 (256) = happyShift action_932
action_798 _ = happyFail
action_799 (255) = happyShift action_661
action_799 (283) = happyShift action_662
action_799 (284) = happyShift action_663
action_799 (120) = happyGoto action_931
action_799 (121) = happyGoto action_660
action_799 _ = happyFail
action_800 (234) = happyShift action_39
action_800 (255) = happyShift action_502
action_800 (270) = happyShift action_930
action_800 (313) = happyShift action_76
action_800 (314) = happyShift action_118
action_800 (315) = happyShift action_119
action_800 (316) = happyShift action_120
action_800 (318) = happyShift action_80
action_800 (319) = happyShift action_81
action_800 (320) = happyShift action_82
action_800 (321) = happyShift action_83
action_800 (322) = happyShift action_84
action_800 (323) = happyShift action_85
action_800 (325) = happyShift action_86
action_800 (337) = happyShift action_91
action_800 (356) = happyShift action_97
action_800 (94) = happyGoto action_500
action_800 (212) = happyGoto action_111
action_800 (230) = happyGoto action_501
action_800 (231) = happyGoto action_114
action_800 _ = happyFail
action_801 _ = happyReduce_260
action_802 (234) = happyShift action_39
action_802 (238) = happyShift action_43
action_802 (239) = happyShift action_44
action_802 (242) = happyReduce_191
action_802 (255) = happyShift action_115
action_802 (257) = happyShift action_116
action_802 (265) = happyShift action_117
action_802 (269) = happyReduce_191
action_802 (280) = happyShift action_927
action_802 (281) = happyShift action_257
action_802 (283) = happyShift action_928
action_802 (313) = happyShift action_76
action_802 (314) = happyShift action_118
action_802 (315) = happyShift action_119
action_802 (316) = happyShift action_120
action_802 (318) = happyShift action_80
action_802 (319) = happyShift action_81
action_802 (320) = happyShift action_82
action_802 (321) = happyShift action_83
action_802 (322) = happyShift action_84
action_802 (323) = happyShift action_85
action_802 (325) = happyShift action_86
action_802 (337) = happyShift action_91
action_802 (356) = happyShift action_97
action_802 (368) = happyShift action_929
action_802 (84) = happyGoto action_248
action_802 (85) = happyGoto action_105
action_802 (86) = happyGoto action_106
action_802 (212) = happyGoto action_111
action_802 (215) = happyGoto action_112
action_802 (216) = happyGoto action_37
action_802 (230) = happyGoto action_113
action_802 (231) = happyGoto action_114
action_802 _ = happyReduce_252
action_803 (234) = happyShift action_39
action_803 (238) = happyShift action_43
action_803 (239) = happyShift action_44
action_803 (255) = happyShift action_810
action_803 (257) = happyShift action_116
action_803 (265) = happyShift action_117
action_803 (283) = happyShift action_811
action_803 (313) = happyShift action_76
action_803 (314) = happyShift action_118
action_803 (315) = happyShift action_119
action_803 (316) = happyShift action_120
action_803 (318) = happyShift action_80
action_803 (319) = happyShift action_81
action_803 (320) = happyShift action_82
action_803 (321) = happyShift action_83
action_803 (322) = happyShift action_84
action_803 (323) = happyShift action_85
action_803 (325) = happyShift action_86
action_803 (337) = happyShift action_91
action_803 (356) = happyShift action_97
action_803 (368) = happyShift action_812
action_803 (81) = happyGoto action_801
action_803 (82) = happyGoto action_925
action_803 (84) = happyGoto action_104
action_803 (85) = happyGoto action_105
action_803 (86) = happyGoto action_106
action_803 (108) = happyGoto action_926
action_803 (109) = happyGoto action_805
action_803 (110) = happyGoto action_806
action_803 (112) = happyGoto action_807
action_803 (201) = happyGoto action_808
action_803 (212) = happyGoto action_111
action_803 (215) = happyGoto action_809
action_803 (216) = happyGoto action_37
action_803 (230) = happyGoto action_113
action_803 (231) = happyGoto action_114
action_803 _ = happyFail
action_804 _ = happyReduce_245
action_805 _ = happyReduce_248
action_806 (234) = happyShift action_39
action_806 (238) = happyShift action_43
action_806 (239) = happyShift action_44
action_806 (255) = happyShift action_115
action_806 (257) = happyShift action_116
action_806 (265) = happyShift action_117
action_806 (283) = happyShift action_923
action_806 (313) = happyShift action_76
action_806 (314) = happyShift action_118
action_806 (315) = happyShift action_119
action_806 (316) = happyShift action_120
action_806 (318) = happyShift action_80
action_806 (319) = happyShift action_81
action_806 (320) = happyShift action_82
action_806 (321) = happyShift action_83
action_806 (322) = happyShift action_84
action_806 (323) = happyShift action_85
action_806 (325) = happyShift action_86
action_806 (337) = happyShift action_91
action_806 (356) = happyShift action_97
action_806 (368) = happyShift action_924
action_806 (83) = happyGoto action_921
action_806 (84) = happyGoto action_916
action_806 (85) = happyGoto action_105
action_806 (86) = happyGoto action_106
action_806 (111) = happyGoto action_922
action_806 (212) = happyGoto action_111
action_806 (215) = happyGoto action_112
action_806 (216) = happyGoto action_37
action_806 (230) = happyGoto action_113
action_806 (231) = happyGoto action_114
action_806 _ = happyReduce_253
action_807 (242) = happyShift action_215
action_807 (269) = happyShift action_920
action_807 (205) = happyGoto action_919
action_807 (218) = happyGoto action_508
action_807 _ = happyFail
action_808 (262) = happyShift action_918
action_808 _ = happyFail
action_809 (262) = happyReduce_544
action_809 _ = happyReduce_209
action_810 (234) = happyShift action_39
action_810 (236) = happyShift action_41
action_810 (237) = happyShift action_42
action_810 (238) = happyShift action_43
action_810 (239) = happyShift action_44
action_810 (241) = happyShift action_214
action_810 (242) = happyShift action_215
action_810 (243) = happyShift action_216
action_810 (244) = happyShift action_217
action_810 (255) = happyShift action_115
action_810 (256) = happyShift action_244
action_810 (257) = happyShift action_116
action_810 (265) = happyShift action_117
action_810 (267) = happyShift action_237
action_810 (270) = happyShift action_220
action_810 (272) = happyShift action_221
action_810 (278) = happyShift action_245
action_810 (282) = happyShift action_223
action_810 (283) = happyShift action_224
action_810 (284) = happyShift action_225
action_810 (313) = happyShift action_76
action_810 (314) = happyShift action_118
action_810 (315) = happyShift action_119
action_810 (316) = happyShift action_120
action_810 (318) = happyShift action_80
action_810 (319) = happyShift action_81
action_810 (320) = happyShift action_82
action_810 (321) = happyShift action_83
action_810 (322) = happyShift action_84
action_810 (323) = happyShift action_85
action_810 (325) = happyShift action_86
action_810 (335) = happyShift action_121
action_810 (337) = happyShift action_91
action_810 (356) = happyShift action_97
action_810 (78) = happyGoto action_101
action_810 (80) = happyGoto action_102
action_810 (82) = happyGoto action_103
action_810 (84) = happyGoto action_104
action_810 (85) = happyGoto action_105
action_810 (86) = happyGoto action_106
action_810 (89) = happyGoto action_238
action_810 (90) = happyGoto action_109
action_810 (91) = happyGoto action_239
action_810 (92) = happyGoto action_240
action_810 (155) = happyGoto action_241
action_810 (199) = happyGoto action_110
action_810 (210) = happyGoto action_917
action_810 (212) = happyGoto action_111
action_810 (214) = happyGoto action_35
action_810 (215) = happyGoto action_112
action_810 (216) = happyGoto action_37
action_810 (217) = happyGoto action_209
action_810 (218) = happyGoto action_210
action_810 (219) = happyGoto action_243
action_810 (221) = happyGoto action_212
action_810 (223) = happyGoto action_213
action_810 (230) = happyGoto action_113
action_810 (231) = happyGoto action_114
action_810 _ = happyFail
action_811 (234) = happyShift action_39
action_811 (238) = happyShift action_43
action_811 (239) = happyShift action_44
action_811 (255) = happyShift action_115
action_811 (257) = happyShift action_116
action_811 (265) = happyShift action_117
action_811 (313) = happyShift action_76
action_811 (314) = happyShift action_118
action_811 (315) = happyShift action_119
action_811 (316) = happyShift action_120
action_811 (318) = happyShift action_80
action_811 (319) = happyShift action_81
action_811 (320) = happyShift action_82
action_811 (321) = happyShift action_83
action_811 (322) = happyShift action_84
action_811 (323) = happyShift action_85
action_811 (325) = happyShift action_86
action_811 (337) = happyShift action_91
action_811 (356) = happyShift action_97
action_811 (83) = happyGoto action_915
action_811 (84) = happyGoto action_916
action_811 (85) = happyGoto action_105
action_811 (86) = happyGoto action_106
action_811 (212) = happyGoto action_111
action_811 (215) = happyGoto action_112
action_811 (216) = happyGoto action_37
action_811 (230) = happyGoto action_113
action_811 (231) = happyGoto action_114
action_811 _ = happyFail
action_812 (372) = happyShift action_914
action_812 _ = happyFail
action_813 (335) = happyShift action_657
action_813 (106) = happyGoto action_913
action_813 (107) = happyGoto action_656
action_813 _ = happyReduce_247
action_814 _ = happyReduce_127
action_815 _ = happyReduce_140
action_816 (241) = happyShift action_214
action_816 (270) = happyShift action_220
action_816 (282) = happyShift action_223
action_816 (283) = happyShift action_224
action_816 (284) = happyShift action_225
action_816 (221) = happyGoto action_573
action_816 _ = happyFail
action_817 (340) = happyShift action_472
action_817 _ = happyReduce_495
action_818 (234) = happyShift action_39
action_818 (235) = happyShift action_40
action_818 (236) = happyShift action_41
action_818 (237) = happyShift action_42
action_818 (238) = happyShift action_43
action_818 (239) = happyShift action_44
action_818 (245) = happyShift action_45
action_818 (246) = happyShift action_46
action_818 (247) = happyShift action_47
action_818 (248) = happyShift action_48
action_818 (249) = happyShift action_49
action_818 (250) = happyShift action_50
action_818 (251) = happyShift action_51
action_818 (252) = happyShift action_52
action_818 (253) = happyShift action_53
action_818 (254) = happyShift action_54
action_818 (255) = happyShift action_55
action_818 (257) = happyShift action_56
action_818 (265) = happyShift action_57
action_818 (268) = happyShift action_58
action_818 (275) = happyShift action_59
action_818 (280) = happyShift action_60
action_818 (282) = happyShift action_61
action_818 (289) = happyShift action_63
action_818 (292) = happyShift action_64
action_818 (293) = happyShift action_65
action_818 (294) = happyShift action_66
action_818 (295) = happyShift action_67
action_818 (296) = happyShift action_68
action_818 (297) = happyShift action_69
action_818 (299) = happyShift action_70
action_818 (300) = happyShift action_71
action_818 (301) = happyShift action_72
action_818 (303) = happyShift action_73
action_818 (305) = happyShift action_74
action_818 (306) = happyShift action_75
action_818 (313) = happyShift action_76
action_818 (314) = happyShift action_77
action_818 (315) = happyShift action_78
action_818 (316) = happyShift action_79
action_818 (318) = happyShift action_80
action_818 (319) = happyShift action_81
action_818 (320) = happyShift action_82
action_818 (321) = happyShift action_83
action_818 (322) = happyShift action_84
action_818 (323) = happyShift action_85
action_818 (325) = happyShift action_86
action_818 (327) = happyShift action_87
action_818 (332) = happyShift action_88
action_818 (334) = happyShift action_89
action_818 (335) = happyShift action_90
action_818 (337) = happyShift action_91
action_818 (338) = happyShift action_92
action_818 (345) = happyShift action_142
action_818 (346) = happyShift action_94
action_818 (350) = happyShift action_95
action_818 (356) = happyShift action_97
action_818 (363) = happyShift action_98
action_818 (364) = happyShift action_99
action_818 (365) = happyShift action_100
action_818 (139) = happyGoto action_912
action_818 (140) = happyGoto action_156
action_818 (141) = happyGoto action_15
action_818 (142) = happyGoto action_16
action_818 (143) = happyGoto action_17
action_818 (144) = happyGoto action_18
action_818 (147) = happyGoto action_19
action_818 (148) = happyGoto action_20
action_818 (149) = happyGoto action_21
action_818 (152) = happyGoto action_22
action_818 (153) = happyGoto action_23
action_818 (154) = happyGoto action_24
action_818 (161) = happyGoto action_25
action_818 (195) = happyGoto action_28
action_818 (198) = happyGoto action_29
action_818 (199) = happyGoto action_30
action_818 (201) = happyGoto action_31
action_818 (211) = happyGoto action_32
action_818 (212) = happyGoto action_33
action_818 (213) = happyGoto action_34
action_818 (214) = happyGoto action_35
action_818 (215) = happyGoto action_36
action_818 (216) = happyGoto action_37
action_818 (224) = happyGoto action_38
action_818 _ = happyFail
action_819 (234) = happyShift action_39
action_819 (235) = happyShift action_40
action_819 (236) = happyShift action_41
action_819 (237) = happyShift action_42
action_819 (238) = happyShift action_43
action_819 (239) = happyShift action_44
action_819 (245) = happyShift action_45
action_819 (246) = happyShift action_46
action_819 (247) = happyShift action_47
action_819 (248) = happyShift action_48
action_819 (249) = happyShift action_49
action_819 (250) = happyShift action_50
action_819 (251) = happyShift action_51
action_819 (252) = happyShift action_52
action_819 (253) = happyShift action_53
action_819 (254) = happyShift action_54
action_819 (255) = happyShift action_55
action_819 (257) = happyShift action_56
action_819 (265) = happyShift action_57
action_819 (268) = happyShift action_58
action_819 (275) = happyShift action_59
action_819 (280) = happyShift action_60
action_819 (282) = happyShift action_61
action_819 (289) = happyShift action_63
action_819 (292) = happyShift action_64
action_819 (293) = happyShift action_65
action_819 (294) = happyShift action_66
action_819 (295) = happyShift action_67
action_819 (296) = happyShift action_68
action_819 (297) = happyShift action_69
action_819 (299) = happyShift action_70
action_819 (300) = happyShift action_71
action_819 (301) = happyShift action_72
action_819 (303) = happyShift action_73
action_819 (305) = happyShift action_74
action_819 (306) = happyShift action_75
action_819 (313) = happyShift action_76
action_819 (314) = happyShift action_77
action_819 (315) = happyShift action_78
action_819 (316) = happyShift action_79
action_819 (318) = happyShift action_80
action_819 (319) = happyShift action_81
action_819 (320) = happyShift action_82
action_819 (321) = happyShift action_83
action_819 (322) = happyShift action_84
action_819 (323) = happyShift action_85
action_819 (325) = happyShift action_86
action_819 (327) = happyShift action_87
action_819 (332) = happyShift action_88
action_819 (334) = happyShift action_89
action_819 (335) = happyShift action_90
action_819 (337) = happyShift action_91
action_819 (338) = happyShift action_92
action_819 (345) = happyShift action_142
action_819 (346) = happyShift action_94
action_819 (350) = happyShift action_95
action_819 (356) = happyShift action_97
action_819 (363) = happyShift action_98
action_819 (364) = happyShift action_99
action_819 (365) = happyShift action_100
action_819 (139) = happyGoto action_911
action_819 (140) = happyGoto action_156
action_819 (141) = happyGoto action_15
action_819 (142) = happyGoto action_16
action_819 (143) = happyGoto action_17
action_819 (144) = happyGoto action_18
action_819 (147) = happyGoto action_19
action_819 (148) = happyGoto action_20
action_819 (149) = happyGoto action_21
action_819 (152) = happyGoto action_22
action_819 (153) = happyGoto action_23
action_819 (154) = happyGoto action_24
action_819 (161) = happyGoto action_25
action_819 (195) = happyGoto action_28
action_819 (198) = happyGoto action_29
action_819 (199) = happyGoto action_30
action_819 (201) = happyGoto action_31
action_819 (211) = happyGoto action_32
action_819 (212) = happyGoto action_33
action_819 (213) = happyGoto action_34
action_819 (214) = happyGoto action_35
action_819 (215) = happyGoto action_36
action_819 (216) = happyGoto action_37
action_819 (224) = happyGoto action_38
action_819 _ = happyFail
action_820 _ = happyReduce_310
action_821 _ = happyReduce_105
action_822 (256) = happyShift action_910
action_822 _ = happyFail
action_823 (273) = happyShift action_909
action_823 _ = happyFail
action_824 (234) = happyShift action_39
action_824 (238) = happyShift action_43
action_824 (239) = happyShift action_44
action_824 (255) = happyShift action_115
action_824 (257) = happyShift action_116
action_824 (265) = happyShift action_117
action_824 (313) = happyShift action_76
action_824 (314) = happyShift action_118
action_824 (315) = happyShift action_119
action_824 (316) = happyShift action_120
action_824 (318) = happyShift action_80
action_824 (319) = happyShift action_81
action_824 (320) = happyShift action_82
action_824 (321) = happyShift action_83
action_824 (322) = happyShift action_84
action_824 (323) = happyShift action_85
action_824 (325) = happyShift action_86
action_824 (337) = happyShift action_91
action_824 (356) = happyShift action_97
action_824 (77) = happyGoto action_908
action_824 (78) = happyGoto action_551
action_824 (82) = happyGoto action_189
action_824 (84) = happyGoto action_104
action_824 (85) = happyGoto action_105
action_824 (86) = happyGoto action_106
action_824 (212) = happyGoto action_111
action_824 (215) = happyGoto action_112
action_824 (216) = happyGoto action_37
action_824 (230) = happyGoto action_113
action_824 (231) = happyGoto action_114
action_824 _ = happyFail
action_825 (24) = happyGoto action_399
action_825 (25) = happyGoto action_905
action_825 (124) = happyGoto action_907
action_825 _ = happyReduce_38
action_826 (24) = happyGoto action_399
action_826 (25) = happyGoto action_905
action_826 (124) = happyGoto action_906
action_826 _ = happyReduce_38
action_827 (95) = happyGoto action_626
action_827 (99) = happyGoto action_904
action_827 _ = happyReduce_227
action_828 _ = happyReduce_226
action_829 (95) = happyGoto action_902
action_829 (96) = happyGoto action_903
action_829 _ = happyReduce_227
action_830 (234) = happyShift action_39
action_830 (235) = happyShift action_40
action_830 (236) = happyShift action_41
action_830 (237) = happyShift action_42
action_830 (238) = happyShift action_43
action_830 (239) = happyShift action_44
action_830 (245) = happyShift action_45
action_830 (246) = happyShift action_46
action_830 (247) = happyShift action_47
action_830 (248) = happyShift action_48
action_830 (249) = happyShift action_49
action_830 (250) = happyShift action_50
action_830 (251) = happyShift action_51
action_830 (252) = happyShift action_52
action_830 (253) = happyShift action_53
action_830 (254) = happyShift action_54
action_830 (255) = happyShift action_55
action_830 (257) = happyShift action_56
action_830 (261) = happyShift action_621
action_830 (265) = happyShift action_57
action_830 (268) = happyShift action_58
action_830 (280) = happyShift action_60
action_830 (282) = happyShift action_61
action_830 (283) = happyShift action_132
action_830 (289) = happyShift action_63
action_830 (292) = happyShift action_64
action_830 (293) = happyShift action_65
action_830 (294) = happyShift action_66
action_830 (295) = happyShift action_67
action_830 (296) = happyShift action_68
action_830 (297) = happyShift action_69
action_830 (299) = happyShift action_70
action_830 (300) = happyShift action_71
action_830 (301) = happyShift action_72
action_830 (303) = happyShift action_73
action_830 (305) = happyShift action_74
action_830 (306) = happyShift action_75
action_830 (313) = happyShift action_76
action_830 (314) = happyShift action_77
action_830 (315) = happyShift action_78
action_830 (316) = happyShift action_79
action_830 (318) = happyShift action_80
action_830 (319) = happyShift action_81
action_830 (320) = happyShift action_82
action_830 (321) = happyShift action_83
action_830 (322) = happyShift action_84
action_830 (323) = happyShift action_85
action_830 (325) = happyShift action_86
action_830 (327) = happyShift action_87
action_830 (329) = happyShift action_900
action_830 (332) = happyShift action_88
action_830 (334) = happyShift action_89
action_830 (335) = happyShift action_90
action_830 (337) = happyShift action_91
action_830 (346) = happyShift action_94
action_830 (348) = happyShift action_143
action_830 (353) = happyShift action_901
action_830 (356) = happyShift action_97
action_830 (357) = happyShift action_145
action_830 (358) = happyShift action_146
action_830 (359) = happyShift action_147
action_830 (360) = happyShift action_148
action_830 (51) = happyGoto action_893
action_830 (58) = happyGoto action_894
action_830 (130) = happyGoto action_895
action_830 (131) = happyGoto action_896
action_830 (132) = happyGoto action_897
action_830 (133) = happyGoto action_898
action_830 (143) = happyGoto action_899
action_830 (147) = happyGoto action_19
action_830 (149) = happyGoto action_21
action_830 (152) = happyGoto action_22
action_830 (153) = happyGoto action_23
action_830 (154) = happyGoto action_24
action_830 (161) = happyGoto action_25
action_830 (195) = happyGoto action_28
action_830 (198) = happyGoto action_29
action_830 (199) = happyGoto action_30
action_830 (201) = happyGoto action_31
action_830 (211) = happyGoto action_32
action_830 (212) = happyGoto action_33
action_830 (213) = happyGoto action_34
action_830 (214) = happyGoto action_35
action_830 (215) = happyGoto action_36
action_830 (216) = happyGoto action_37
action_830 (224) = happyGoto action_38
action_830 _ = happyReduce_299
action_831 (263) = happyShift action_892
action_831 _ = happyFail
action_832 (1) = happyShift action_403
action_832 (264) = happyShift action_404
action_832 (226) = happyGoto action_891
action_832 _ = happyFail
action_833 (234) = happyShift action_39
action_833 (235) = happyShift action_40
action_833 (236) = happyShift action_41
action_833 (237) = happyShift action_42
action_833 (238) = happyShift action_43
action_833 (239) = happyShift action_44
action_833 (245) = happyShift action_45
action_833 (246) = happyShift action_46
action_833 (247) = happyShift action_47
action_833 (248) = happyShift action_48
action_833 (249) = happyShift action_49
action_833 (250) = happyShift action_50
action_833 (251) = happyShift action_51
action_833 (252) = happyShift action_52
action_833 (253) = happyShift action_53
action_833 (254) = happyShift action_54
action_833 (255) = happyShift action_55
action_833 (257) = happyShift action_56
action_833 (265) = happyShift action_57
action_833 (268) = happyShift action_58
action_833 (275) = happyShift action_59
action_833 (280) = happyShift action_60
action_833 (282) = happyShift action_61
action_833 (289) = happyShift action_63
action_833 (292) = happyShift action_64
action_833 (293) = happyShift action_65
action_833 (294) = happyShift action_66
action_833 (295) = happyShift action_67
action_833 (296) = happyShift action_68
action_833 (297) = happyShift action_69
action_833 (299) = happyShift action_70
action_833 (300) = happyShift action_71
action_833 (301) = happyShift action_72
action_833 (303) = happyShift action_73
action_833 (305) = happyShift action_74
action_833 (306) = happyShift action_75
action_833 (313) = happyShift action_76
action_833 (314) = happyShift action_77
action_833 (315) = happyShift action_78
action_833 (316) = happyShift action_79
action_833 (318) = happyShift action_80
action_833 (319) = happyShift action_81
action_833 (320) = happyShift action_82
action_833 (321) = happyShift action_83
action_833 (322) = happyShift action_84
action_833 (323) = happyShift action_85
action_833 (325) = happyShift action_86
action_833 (327) = happyShift action_87
action_833 (332) = happyShift action_88
action_833 (334) = happyShift action_89
action_833 (335) = happyShift action_90
action_833 (337) = happyShift action_91
action_833 (338) = happyShift action_92
action_833 (345) = happyShift action_142
action_833 (346) = happyShift action_94
action_833 (350) = happyShift action_95
action_833 (356) = happyShift action_97
action_833 (363) = happyShift action_98
action_833 (364) = happyShift action_99
action_833 (365) = happyShift action_100
action_833 (139) = happyGoto action_890
action_833 (140) = happyGoto action_156
action_833 (141) = happyGoto action_15
action_833 (142) = happyGoto action_16
action_833 (143) = happyGoto action_17
action_833 (144) = happyGoto action_18
action_833 (147) = happyGoto action_19
action_833 (148) = happyGoto action_20
action_833 (149) = happyGoto action_21
action_833 (152) = happyGoto action_22
action_833 (153) = happyGoto action_23
action_833 (154) = happyGoto action_24
action_833 (161) = happyGoto action_25
action_833 (195) = happyGoto action_28
action_833 (198) = happyGoto action_29
action_833 (199) = happyGoto action_30
action_833 (201) = happyGoto action_31
action_833 (211) = happyGoto action_32
action_833 (212) = happyGoto action_33
action_833 (213) = happyGoto action_34
action_833 (214) = happyGoto action_35
action_833 (215) = happyGoto action_36
action_833 (216) = happyGoto action_37
action_833 (224) = happyGoto action_38
action_833 _ = happyFail
action_834 (236) = happyShift action_41
action_834 (237) = happyShift action_42
action_834 (194) = happyGoto action_888
action_834 (199) = happyGoto action_889
action_834 (214) = happyGoto action_35
action_834 _ = happyReduce_37
action_835 (261) = happyShift action_621
action_835 _ = happyReduce_525
action_836 (234) = happyShift action_39
action_836 (235) = happyShift action_40
action_836 (236) = happyShift action_41
action_836 (237) = happyShift action_42
action_836 (238) = happyShift action_43
action_836 (239) = happyShift action_44
action_836 (245) = happyShift action_45
action_836 (246) = happyShift action_46
action_836 (247) = happyShift action_47
action_836 (248) = happyShift action_48
action_836 (249) = happyShift action_49
action_836 (250) = happyShift action_50
action_836 (251) = happyShift action_51
action_836 (252) = happyShift action_52
action_836 (253) = happyShift action_53
action_836 (254) = happyShift action_54
action_836 (255) = happyShift action_55
action_836 (257) = happyShift action_56
action_836 (265) = happyShift action_57
action_836 (268) = happyShift action_58
action_836 (280) = happyShift action_60
action_836 (282) = happyShift action_61
action_836 (289) = happyShift action_63
action_836 (292) = happyShift action_64
action_836 (293) = happyShift action_65
action_836 (294) = happyShift action_66
action_836 (295) = happyShift action_67
action_836 (296) = happyShift action_68
action_836 (297) = happyShift action_69
action_836 (299) = happyShift action_70
action_836 (300) = happyShift action_71
action_836 (301) = happyShift action_72
action_836 (303) = happyShift action_73
action_836 (305) = happyShift action_74
action_836 (306) = happyShift action_75
action_836 (313) = happyShift action_76
action_836 (314) = happyShift action_77
action_836 (315) = happyShift action_78
action_836 (316) = happyShift action_79
action_836 (318) = happyShift action_80
action_836 (319) = happyShift action_81
action_836 (320) = happyShift action_82
action_836 (321) = happyShift action_83
action_836 (322) = happyShift action_84
action_836 (323) = happyShift action_85
action_836 (325) = happyShift action_86
action_836 (327) = happyShift action_87
action_836 (332) = happyShift action_88
action_836 (334) = happyShift action_89
action_836 (335) = happyShift action_90
action_836 (337) = happyShift action_91
action_836 (346) = happyShift action_94
action_836 (356) = happyShift action_97
action_836 (147) = happyGoto action_411
action_836 (149) = happyGoto action_21
action_836 (152) = happyGoto action_22
action_836 (153) = happyGoto action_23
action_836 (154) = happyGoto action_24
action_836 (161) = happyGoto action_25
action_836 (195) = happyGoto action_28
action_836 (198) = happyGoto action_29
action_836 (199) = happyGoto action_30
action_836 (201) = happyGoto action_31
action_836 (211) = happyGoto action_32
action_836 (212) = happyGoto action_33
action_836 (213) = happyGoto action_34
action_836 (214) = happyGoto action_35
action_836 (215) = happyGoto action_36
action_836 (216) = happyGoto action_37
action_836 (224) = happyGoto action_38
action_836 _ = happyFail
action_837 (234) = happyShift action_39
action_837 (235) = happyShift action_40
action_837 (236) = happyShift action_41
action_837 (237) = happyShift action_42
action_837 (238) = happyShift action_43
action_837 (239) = happyShift action_44
action_837 (245) = happyShift action_45
action_837 (246) = happyShift action_46
action_837 (247) = happyShift action_47
action_837 (248) = happyShift action_48
action_837 (249) = happyShift action_49
action_837 (250) = happyShift action_50
action_837 (251) = happyShift action_51
action_837 (252) = happyShift action_52
action_837 (253) = happyShift action_53
action_837 (254) = happyShift action_54
action_837 (255) = happyShift action_55
action_837 (257) = happyShift action_56
action_837 (265) = happyShift action_57
action_837 (268) = happyShift action_58
action_837 (280) = happyShift action_60
action_837 (282) = happyShift action_61
action_837 (283) = happyShift action_132
action_837 (289) = happyShift action_63
action_837 (292) = happyShift action_64
action_837 (293) = happyShift action_65
action_837 (294) = happyShift action_66
action_837 (295) = happyShift action_67
action_837 (296) = happyShift action_68
action_837 (297) = happyShift action_69
action_837 (299) = happyShift action_70
action_837 (300) = happyShift action_71
action_837 (301) = happyShift action_72
action_837 (303) = happyShift action_73
action_837 (305) = happyShift action_74
action_837 (306) = happyShift action_75
action_837 (313) = happyShift action_76
action_837 (314) = happyShift action_77
action_837 (315) = happyShift action_78
action_837 (316) = happyShift action_79
action_837 (318) = happyShift action_80
action_837 (319) = happyShift action_81
action_837 (320) = happyShift action_82
action_837 (321) = happyShift action_83
action_837 (322) = happyShift action_84
action_837 (323) = happyShift action_85
action_837 (325) = happyShift action_86
action_837 (327) = happyShift action_87
action_837 (332) = happyShift action_88
action_837 (334) = happyShift action_89
action_837 (335) = happyShift action_90
action_837 (337) = happyShift action_91
action_837 (341) = happyShift action_138
action_837 (342) = happyShift action_139
action_837 (343) = happyShift action_140
action_837 (346) = happyShift action_94
action_837 (356) = happyShift action_97
action_837 (357) = happyShift action_145
action_837 (358) = happyShift action_146
action_837 (359) = happyShift action_147
action_837 (360) = happyShift action_148
action_837 (44) = happyGoto action_122
action_837 (46) = happyGoto action_123
action_837 (55) = happyGoto action_887
action_837 (57) = happyGoto action_127
action_837 (58) = happyGoto action_128
action_837 (133) = happyGoto action_129
action_837 (143) = happyGoto action_617
action_837 (147) = happyGoto action_19
action_837 (149) = happyGoto action_21
action_837 (152) = happyGoto action_22
action_837 (153) = happyGoto action_23
action_837 (154) = happyGoto action_24
action_837 (161) = happyGoto action_25
action_837 (195) = happyGoto action_28
action_837 (198) = happyGoto action_29
action_837 (199) = happyGoto action_30
action_837 (201) = happyGoto action_31
action_837 (211) = happyGoto action_32
action_837 (212) = happyGoto action_33
action_837 (213) = happyGoto action_34
action_837 (214) = happyGoto action_35
action_837 (215) = happyGoto action_36
action_837 (216) = happyGoto action_37
action_837 (224) = happyGoto action_38
action_837 _ = happyReduce_37
action_838 (261) = happyShift action_621
action_838 _ = happyReduce_117
action_839 _ = happyReduce_94
action_840 (372) = happyShift action_886
action_840 _ = happyFail
action_841 (267) = happyShift action_885
action_841 _ = happyReduce_134
action_842 _ = happyReduce_136
action_843 _ = happyReduce_163
action_844 (372) = happyShift action_884
action_844 _ = happyFail
action_845 (270) = happyShift action_883
action_845 _ = happyFail
action_846 (234) = happyShift action_39
action_846 (255) = happyShift action_848
action_846 (313) = happyShift action_76
action_846 (314) = happyShift action_77
action_846 (315) = happyShift action_78
action_846 (316) = happyShift action_79
action_846 (318) = happyShift action_80
action_846 (319) = happyShift action_81
action_846 (320) = happyShift action_82
action_846 (321) = happyShift action_83
action_846 (322) = happyShift action_84
action_846 (323) = happyShift action_85
action_846 (325) = happyShift action_86
action_846 (334) = happyShift action_89
action_846 (335) = happyShift action_90
action_846 (337) = happyShift action_91
action_846 (356) = happyShift action_97
action_846 (70) = happyGoto action_882
action_846 (71) = happyGoto action_846
action_846 (212) = happyGoto action_33
action_846 (213) = happyGoto action_847
action_846 _ = happyReduce_166
action_847 _ = happyReduce_168
action_848 (234) = happyShift action_39
action_848 (313) = happyShift action_76
action_848 (314) = happyShift action_77
action_848 (315) = happyShift action_78
action_848 (316) = happyShift action_79
action_848 (318) = happyShift action_80
action_848 (319) = happyShift action_81
action_848 (320) = happyShift action_82
action_848 (321) = happyShift action_83
action_848 (322) = happyShift action_84
action_848 (323) = happyShift action_85
action_848 (325) = happyShift action_86
action_848 (334) = happyShift action_89
action_848 (335) = happyShift action_90
action_848 (337) = happyShift action_91
action_848 (356) = happyShift action_97
action_848 (212) = happyGoto action_33
action_848 (213) = happyGoto action_881
action_848 _ = happyFail
action_849 (274) = happyShift action_880
action_849 _ = happyFail
action_850 (372) = happyShift action_879
action_850 _ = happyFail
action_851 (372) = happyShift action_878
action_851 _ = happyFail
action_852 (355) = happyShift action_877
action_852 _ = happyFail
action_853 _ = happyReduce_39
action_854 (234) = happyShift action_39
action_854 (235) = happyShift action_40
action_854 (238) = happyShift action_43
action_854 (239) = happyShift action_44
action_854 (255) = happyShift action_330
action_854 (267) = happyShift action_875
action_854 (313) = happyShift action_76
action_854 (314) = happyShift action_77
action_854 (315) = happyShift action_78
action_854 (316) = happyShift action_79
action_854 (318) = happyShift action_80
action_854 (319) = happyShift action_81
action_854 (320) = happyShift action_82
action_854 (321) = happyShift action_83
action_854 (322) = happyShift action_84
action_854 (323) = happyShift action_85
action_854 (325) = happyShift action_86
action_854 (334) = happyShift action_89
action_854 (335) = happyShift action_90
action_854 (337) = happyShift action_91
action_854 (347) = happyShift action_876
action_854 (356) = happyShift action_97
action_854 (28) = happyGoto action_869
action_854 (29) = happyGoto action_870
action_854 (30) = happyGoto action_871
action_854 (198) = happyGoto action_872
action_854 (201) = happyGoto action_873
action_854 (211) = happyGoto action_32
action_854 (212) = happyGoto action_33
action_854 (213) = happyGoto action_34
action_854 (215) = happyGoto action_36
action_854 (216) = happyGoto action_37
action_854 (229) = happyGoto action_874
action_854 _ = happyReduce_44
action_855 _ = happyReduce_12
action_856 (307) = happyShift action_867
action_856 (308) = happyShift action_868
action_856 _ = happyFail
action_857 _ = happyReduce_31
action_858 (24) = happyGoto action_865
action_858 (25) = happyGoto action_866
action_858 _ = happyReduce_38
action_859 _ = happyReduce_54
action_860 _ = happyReduce_33
action_861 (361) = happyShift action_864
action_861 (33) = happyGoto action_863
action_861 _ = happyReduce_57
action_862 _ = happyReduce_30
action_863 (356) = happyShift action_1019
action_863 (34) = happyGoto action_1018
action_863 _ = happyReduce_59
action_864 (372) = happyShift action_1017
action_864 _ = happyFail
action_865 (234) = happyShift action_39
action_865 (235) = happyShift action_40
action_865 (236) = happyShift action_41
action_865 (237) = happyShift action_42
action_865 (238) = happyShift action_43
action_865 (239) = happyShift action_44
action_865 (245) = happyShift action_45
action_865 (246) = happyShift action_46
action_865 (247) = happyShift action_47
action_865 (248) = happyShift action_48
action_865 (249) = happyShift action_49
action_865 (250) = happyShift action_50
action_865 (251) = happyShift action_51
action_865 (252) = happyShift action_52
action_865 (253) = happyShift action_53
action_865 (254) = happyShift action_54
action_865 (255) = happyShift action_55
action_865 (257) = happyShift action_56
action_865 (265) = happyShift action_57
action_865 (268) = happyShift action_58
action_865 (275) = happyShift action_59
action_865 (280) = happyShift action_60
action_865 (282) = happyShift action_61
action_865 (283) = happyShift action_132
action_865 (289) = happyShift action_63
action_865 (292) = happyShift action_64
action_865 (293) = happyShift action_65
action_865 (294) = happyShift action_66
action_865 (295) = happyShift action_67
action_865 (296) = happyShift action_68
action_865 (297) = happyShift action_69
action_865 (299) = happyShift action_70
action_865 (300) = happyShift action_71
action_865 (301) = happyShift action_72
action_865 (303) = happyShift action_73
action_865 (305) = happyShift action_74
action_865 (306) = happyShift action_75
action_865 (312) = happyShift action_133
action_865 (313) = happyShift action_76
action_865 (314) = happyShift action_77
action_865 (315) = happyShift action_78
action_865 (316) = happyShift action_79
action_865 (318) = happyShift action_80
action_865 (319) = happyShift action_81
action_865 (320) = happyShift action_82
action_865 (321) = happyShift action_83
action_865 (322) = happyShift action_84
action_865 (323) = happyShift action_85
action_865 (325) = happyShift action_86
action_865 (327) = happyShift action_87
action_865 (328) = happyShift action_134
action_865 (329) = happyShift action_135
action_865 (330) = happyShift action_136
action_865 (331) = happyShift action_137
action_865 (332) = happyShift action_88
action_865 (334) = happyShift action_89
action_865 (335) = happyShift action_90
action_865 (337) = happyShift action_91
action_865 (338) = happyShift action_92
action_865 (339) = happyShift action_861
action_865 (341) = happyShift action_138
action_865 (342) = happyShift action_139
action_865 (343) = happyShift action_140
action_865 (344) = happyShift action_141
action_865 (345) = happyShift action_142
action_865 (346) = happyShift action_94
action_865 (348) = happyShift action_143
action_865 (350) = happyShift action_95
action_865 (353) = happyShift action_144
action_865 (356) = happyShift action_97
action_865 (357) = happyShift action_145
action_865 (358) = happyShift action_146
action_865 (359) = happyShift action_147
action_865 (360) = happyShift action_148
action_865 (362) = happyShift action_149
action_865 (363) = happyShift action_98
action_865 (364) = happyShift action_99
action_865 (365) = happyShift action_100
action_865 (366) = happyShift action_150
action_865 (367) = happyShift action_151
action_865 (371) = happyShift action_152
action_865 (32) = happyGoto action_1015
action_865 (44) = happyGoto action_122
action_865 (46) = happyGoto action_123
action_865 (48) = happyGoto action_1016
action_865 (49) = happyGoto action_457
action_865 (50) = happyGoto action_458
action_865 (51) = happyGoto action_125
action_865 (55) = happyGoto action_126
action_865 (57) = happyGoto action_127
action_865 (58) = happyGoto action_128
action_865 (133) = happyGoto action_129
action_865 (141) = happyGoto action_130
action_865 (142) = happyGoto action_16
action_865 (143) = happyGoto action_131
action_865 (144) = happyGoto action_18
action_865 (147) = happyGoto action_19
action_865 (148) = happyGoto action_20
action_865 (149) = happyGoto action_21
action_865 (152) = happyGoto action_22
action_865 (153) = happyGoto action_23
action_865 (154) = happyGoto action_24
action_865 (161) = happyGoto action_25
action_865 (195) = happyGoto action_28
action_865 (198) = happyGoto action_29
action_865 (199) = happyGoto action_30
action_865 (201) = happyGoto action_31
action_865 (211) = happyGoto action_32
action_865 (212) = happyGoto action_33
action_865 (213) = happyGoto action_34
action_865 (214) = happyGoto action_35
action_865 (215) = happyGoto action_36
action_865 (216) = happyGoto action_37
action_865 (224) = happyGoto action_38
action_865 _ = happyReduce_37
action_866 (261) = happyShift action_621
action_866 _ = happyReduce_34
action_867 (162) = happyGoto action_1014
action_867 _ = happyReduce_413
action_868 _ = happyReduce_15
action_869 (256) = happyShift action_1013
action_869 _ = happyFail
action_870 (267) = happyShift action_1012
action_870 (28) = happyGoto action_1011
action_870 _ = happyReduce_44
action_871 _ = happyReduce_46
action_872 _ = happyReduce_47
action_873 _ = happyReduce_621
action_874 (255) = happyShift action_1010
action_874 _ = happyReduce_48
action_875 _ = happyReduce_43
action_876 (238) = happyShift action_577
action_876 (239) = happyShift action_578
action_876 (227) = happyGoto action_1009
action_876 _ = happyFail
action_877 _ = happyReduce_25
action_878 _ = happyReduce_27
action_879 _ = happyReduce_28
action_880 (234) = happyShift action_39
action_880 (235) = happyShift action_40
action_880 (236) = happyShift action_41
action_880 (237) = happyShift action_42
action_880 (238) = happyShift action_43
action_880 (239) = happyShift action_44
action_880 (245) = happyShift action_45
action_880 (246) = happyShift action_46
action_880 (247) = happyShift action_47
action_880 (248) = happyShift action_48
action_880 (249) = happyShift action_49
action_880 (250) = happyShift action_50
action_880 (251) = happyShift action_51
action_880 (252) = happyShift action_52
action_880 (253) = happyShift action_53
action_880 (254) = happyShift action_54
action_880 (255) = happyShift action_55
action_880 (257) = happyShift action_56
action_880 (265) = happyShift action_57
action_880 (268) = happyShift action_58
action_880 (275) = happyShift action_59
action_880 (280) = happyShift action_60
action_880 (282) = happyShift action_61
action_880 (289) = happyShift action_63
action_880 (292) = happyShift action_64
action_880 (293) = happyShift action_65
action_880 (294) = happyShift action_66
action_880 (295) = happyShift action_67
action_880 (296) = happyShift action_68
action_880 (297) = happyShift action_69
action_880 (299) = happyShift action_70
action_880 (300) = happyShift action_71
action_880 (301) = happyShift action_72
action_880 (303) = happyShift action_73
action_880 (305) = happyShift action_74
action_880 (306) = happyShift action_75
action_880 (313) = happyShift action_76
action_880 (314) = happyShift action_77
action_880 (315) = happyShift action_78
action_880 (316) = happyShift action_79
action_880 (318) = happyShift action_80
action_880 (319) = happyShift action_81
action_880 (320) = happyShift action_82
action_880 (321) = happyShift action_83
action_880 (322) = happyShift action_84
action_880 (323) = happyShift action_85
action_880 (325) = happyShift action_86
action_880 (327) = happyShift action_87
action_880 (332) = happyShift action_88
action_880 (334) = happyShift action_89
action_880 (335) = happyShift action_90
action_880 (337) = happyShift action_91
action_880 (338) = happyShift action_92
action_880 (345) = happyShift action_142
action_880 (346) = happyShift action_94
action_880 (350) = happyShift action_95
action_880 (356) = happyShift action_97
action_880 (363) = happyShift action_98
action_880 (364) = happyShift action_99
action_880 (365) = happyShift action_100
action_880 (139) = happyGoto action_1008
action_880 (140) = happyGoto action_156
action_880 (141) = happyGoto action_15
action_880 (142) = happyGoto action_16
action_880 (143) = happyGoto action_17
action_880 (144) = happyGoto action_18
action_880 (147) = happyGoto action_19
action_880 (148) = happyGoto action_20
action_880 (149) = happyGoto action_21
action_880 (152) = happyGoto action_22
action_880 (153) = happyGoto action_23
action_880 (154) = happyGoto action_24
action_880 (161) = happyGoto action_25
action_880 (195) = happyGoto action_28
action_880 (198) = happyGoto action_29
action_880 (199) = happyGoto action_30
action_880 (201) = happyGoto action_31
action_880 (211) = happyGoto action_32
action_880 (212) = happyGoto action_33
action_880 (213) = happyGoto action_34
action_880 (214) = happyGoto action_35
action_880 (215) = happyGoto action_36
action_880 (216) = happyGoto action_37
action_880 (224) = happyGoto action_38
action_880 _ = happyFail
action_881 (273) = happyShift action_1007
action_881 _ = happyFail
action_882 _ = happyReduce_167
action_883 _ = happyReduce_165
action_884 _ = happyReduce_132
action_885 (234) = happyShift action_39
action_885 (236) = happyShift action_41
action_885 (237) = happyShift action_42
action_885 (238) = happyShift action_43
action_885 (239) = happyShift action_44
action_885 (255) = happyShift action_115
action_885 (257) = happyShift action_116
action_885 (265) = happyShift action_117
action_885 (313) = happyShift action_76
action_885 (314) = happyShift action_118
action_885 (315) = happyShift action_119
action_885 (316) = happyShift action_120
action_885 (318) = happyShift action_80
action_885 (319) = happyShift action_81
action_885 (320) = happyShift action_82
action_885 (321) = happyShift action_83
action_885 (322) = happyShift action_84
action_885 (323) = happyShift action_85
action_885 (325) = happyShift action_86
action_885 (335) = happyShift action_121
action_885 (337) = happyShift action_91
action_885 (356) = happyShift action_97
action_885 (59) = happyGoto action_1006
action_885 (60) = happyGoto action_841
action_885 (78) = happyGoto action_101
action_885 (80) = happyGoto action_102
action_885 (82) = happyGoto action_103
action_885 (84) = happyGoto action_104
action_885 (85) = happyGoto action_105
action_885 (86) = happyGoto action_106
action_885 (89) = happyGoto action_842
action_885 (90) = happyGoto action_109
action_885 (199) = happyGoto action_110
action_885 (212) = happyGoto action_111
action_885 (214) = happyGoto action_35
action_885 (215) = happyGoto action_112
action_885 (216) = happyGoto action_37
action_885 (230) = happyGoto action_113
action_885 (231) = happyGoto action_114
action_885 _ = happyFail
action_886 _ = happyReduce_131
action_887 _ = happyReduce_119
action_888 _ = happyReduce_526
action_889 (274) = happyShift action_833
action_889 _ = happyFail
action_890 _ = happyReduce_528
action_891 _ = happyReduce_296
action_892 _ = happyReduce_295
action_893 (234) = happyShift action_39
action_893 (236) = happyShift action_41
action_893 (237) = happyShift action_42
action_893 (238) = happyShift action_43
action_893 (239) = happyShift action_44
action_893 (255) = happyShift action_115
action_893 (257) = happyShift action_116
action_893 (265) = happyShift action_117
action_893 (313) = happyShift action_76
action_893 (314) = happyShift action_118
action_893 (315) = happyShift action_119
action_893 (316) = happyShift action_120
action_893 (318) = happyShift action_80
action_893 (319) = happyShift action_81
action_893 (320) = happyShift action_82
action_893 (321) = happyShift action_83
action_893 (322) = happyShift action_84
action_893 (323) = happyShift action_85
action_893 (325) = happyShift action_86
action_893 (335) = happyShift action_121
action_893 (337) = happyShift action_91
action_893 (356) = happyShift action_97
action_893 (78) = happyGoto action_101
action_893 (80) = happyGoto action_102
action_893 (82) = happyGoto action_103
action_893 (84) = happyGoto action_104
action_893 (85) = happyGoto action_105
action_893 (86) = happyGoto action_106
action_893 (88) = happyGoto action_1005
action_893 (89) = happyGoto action_108
action_893 (90) = happyGoto action_109
action_893 (199) = happyGoto action_110
action_893 (212) = happyGoto action_111
action_893 (214) = happyGoto action_35
action_893 (215) = happyGoto action_112
action_893 (216) = happyGoto action_37
action_893 (230) = happyGoto action_113
action_893 (231) = happyGoto action_114
action_893 _ = happyFail
action_894 _ = happyReduce_304
action_895 (24) = happyGoto action_1003
action_895 (25) = happyGoto action_1004
action_895 _ = happyReduce_38
action_896 _ = happyReduce_301
action_897 _ = happyReduce_303
action_898 _ = happyReduce_302
action_899 (241) = happyShift action_214
action_899 (242) = happyShift action_215
action_899 (243) = happyShift action_216
action_899 (244) = happyShift action_217
action_899 (269) = happyShift action_219
action_899 (270) = happyShift action_220
action_899 (272) = happyShift action_221
action_899 (273) = happyShift action_1002
action_899 (282) = happyShift action_223
action_899 (283) = happyShift action_224
action_899 (284) = happyShift action_225
action_899 (135) = happyGoto action_204
action_899 (203) = happyGoto action_205
action_899 (206) = happyGoto action_206
action_899 (208) = happyGoto action_836
action_899 (210) = happyGoto action_208
action_899 (217) = happyGoto action_209
action_899 (218) = happyGoto action_210
action_899 (219) = happyGoto action_211
action_899 (221) = happyGoto action_212
action_899 (223) = happyGoto action_213
action_899 _ = happyReduce_313
action_900 _ = happyReduce_112
action_901 (234) = happyShift action_39
action_901 (238) = happyShift action_43
action_901 (239) = happyShift action_44
action_901 (255) = happyShift action_115
action_901 (257) = happyShift action_116
action_901 (265) = happyShift action_117
action_901 (313) = happyShift action_76
action_901 (314) = happyShift action_118
action_901 (315) = happyShift action_119
action_901 (316) = happyShift action_120
action_901 (318) = happyShift action_80
action_901 (319) = happyShift action_81
action_901 (320) = happyShift action_82
action_901 (321) = happyShift action_83
action_901 (322) = happyShift action_84
action_901 (323) = happyShift action_85
action_901 (325) = happyShift action_86
action_901 (337) = happyShift action_91
action_901 (356) = happyShift action_97
action_901 (77) = happyGoto action_1001
action_901 (78) = happyGoto action_551
action_901 (82) = happyGoto action_189
action_901 (84) = happyGoto action_104
action_901 (85) = happyGoto action_105
action_901 (86) = happyGoto action_106
action_901 (212) = happyGoto action_111
action_901 (215) = happyGoto action_112
action_901 (216) = happyGoto action_37
action_901 (230) = happyGoto action_113
action_901 (231) = happyGoto action_114
action_901 _ = happyFail
action_902 (234) = happyShift action_39
action_902 (313) = happyShift action_76
action_902 (314) = happyShift action_118
action_902 (315) = happyShift action_119
action_902 (316) = happyShift action_120
action_902 (318) = happyShift action_80
action_902 (319) = happyShift action_81
action_902 (320) = happyShift action_82
action_902 (321) = happyShift action_83
action_902 (322) = happyShift action_84
action_902 (323) = happyShift action_85
action_902 (325) = happyShift action_86
action_902 (337) = happyShift action_91
action_902 (356) = happyShift action_97
action_902 (212) = happyGoto action_111
action_902 (230) = happyGoto action_1000
action_902 (231) = happyGoto action_114
action_902 _ = happyFail
action_903 _ = happyReduce_233
action_904 _ = happyReduce_231
action_905 (234) = happyShift action_39
action_905 (235) = happyShift action_40
action_905 (236) = happyShift action_41
action_905 (237) = happyShift action_42
action_905 (238) = happyShift action_43
action_905 (239) = happyShift action_44
action_905 (245) = happyShift action_45
action_905 (246) = happyShift action_46
action_905 (247) = happyShift action_47
action_905 (248) = happyShift action_48
action_905 (249) = happyShift action_49
action_905 (250) = happyShift action_50
action_905 (251) = happyShift action_51
action_905 (252) = happyShift action_52
action_905 (253) = happyShift action_53
action_905 (254) = happyShift action_54
action_905 (255) = happyShift action_55
action_905 (257) = happyShift action_56
action_905 (261) = happyShift action_621
action_905 (265) = happyShift action_57
action_905 (268) = happyShift action_58
action_905 (280) = happyShift action_60
action_905 (282) = happyShift action_61
action_905 (283) = happyShift action_132
action_905 (289) = happyShift action_63
action_905 (292) = happyShift action_64
action_905 (293) = happyShift action_65
action_905 (294) = happyShift action_66
action_905 (295) = happyShift action_67
action_905 (296) = happyShift action_68
action_905 (297) = happyShift action_69
action_905 (299) = happyShift action_70
action_905 (300) = happyShift action_71
action_905 (301) = happyShift action_72
action_905 (303) = happyShift action_73
action_905 (305) = happyShift action_74
action_905 (306) = happyShift action_75
action_905 (313) = happyShift action_76
action_905 (314) = happyShift action_77
action_905 (315) = happyShift action_78
action_905 (316) = happyShift action_79
action_905 (318) = happyShift action_80
action_905 (319) = happyShift action_81
action_905 (320) = happyShift action_82
action_905 (321) = happyShift action_83
action_905 (322) = happyShift action_84
action_905 (323) = happyShift action_85
action_905 (325) = happyShift action_86
action_905 (327) = happyShift action_87
action_905 (329) = happyShift action_998
action_905 (332) = happyShift action_88
action_905 (334) = happyShift action_89
action_905 (335) = happyShift action_90
action_905 (337) = happyShift action_91
action_905 (341) = happyShift action_138
action_905 (342) = happyShift action_139
action_905 (343) = happyShift action_140
action_905 (346) = happyShift action_94
action_905 (353) = happyShift action_999
action_905 (356) = happyShift action_97
action_905 (357) = happyShift action_145
action_905 (358) = happyShift action_146
action_905 (359) = happyShift action_147
action_905 (360) = happyShift action_148
action_905 (44) = happyGoto action_122
action_905 (46) = happyGoto action_123
action_905 (55) = happyGoto action_994
action_905 (57) = happyGoto action_127
action_905 (58) = happyGoto action_128
action_905 (125) = happyGoto action_995
action_905 (126) = happyGoto action_996
action_905 (127) = happyGoto action_997
action_905 (133) = happyGoto action_129
action_905 (143) = happyGoto action_617
action_905 (147) = happyGoto action_19
action_905 (149) = happyGoto action_21
action_905 (152) = happyGoto action_22
action_905 (153) = happyGoto action_23
action_905 (154) = happyGoto action_24
action_905 (161) = happyGoto action_25
action_905 (195) = happyGoto action_28
action_905 (198) = happyGoto action_29
action_905 (199) = happyGoto action_30
action_905 (201) = happyGoto action_31
action_905 (211) = happyGoto action_32
action_905 (212) = happyGoto action_33
action_905 (213) = happyGoto action_34
action_905 (214) = happyGoto action_35
action_905 (215) = happyGoto action_36
action_905 (216) = happyGoto action_37
action_905 (224) = happyGoto action_38
action_905 _ = happyReduce_287
action_906 (263) = happyShift action_993
action_906 _ = happyFail
action_907 (1) = happyShift action_403
action_907 (264) = happyShift action_404
action_907 (226) = happyGoto action_992
action_907 _ = happyFail
action_908 _ = happyReduce_155
action_909 (234) = happyShift action_39
action_909 (238) = happyShift action_43
action_909 (239) = happyShift action_44
action_909 (255) = happyShift action_115
action_909 (257) = happyShift action_116
action_909 (265) = happyShift action_117
action_909 (313) = happyShift action_76
action_909 (314) = happyShift action_118
action_909 (315) = happyShift action_119
action_909 (316) = happyShift action_120
action_909 (318) = happyShift action_80
action_909 (319) = happyShift action_81
action_909 (320) = happyShift action_82
action_909 (321) = happyShift action_83
action_909 (322) = happyShift action_84
action_909 (323) = happyShift action_85
action_909 (325) = happyShift action_86
action_909 (337) = happyShift action_91
action_909 (356) = happyShift action_97
action_909 (77) = happyGoto action_991
action_909 (78) = happyGoto action_551
action_909 (82) = happyGoto action_189
action_909 (84) = happyGoto action_104
action_909 (85) = happyGoto action_105
action_909 (86) = happyGoto action_106
action_909 (212) = happyGoto action_111
action_909 (215) = happyGoto action_112
action_909 (216) = happyGoto action_37
action_909 (230) = happyGoto action_113
action_909 (231) = happyGoto action_114
action_909 _ = happyFail
action_910 _ = happyReduce_538
action_911 _ = happyReduce_318
action_912 _ = happyReduce_493
action_913 _ = happyReduce_242
action_914 (283) = happyShift action_990
action_914 _ = happyFail
action_915 _ = happyReduce_261
action_916 _ = happyReduce_194
action_917 (256) = happyShift action_989
action_917 _ = happyFail
action_918 (234) = happyShift action_39
action_918 (235) = happyShift action_40
action_918 (255) = happyShift action_415
action_918 (263) = happyShift action_988
action_918 (313) = happyShift action_76
action_918 (314) = happyShift action_77
action_918 (315) = happyShift action_78
action_918 (316) = happyShift action_79
action_918 (318) = happyShift action_80
action_918 (319) = happyShift action_81
action_918 (320) = happyShift action_82
action_918 (321) = happyShift action_83
action_918 (322) = happyShift action_84
action_918 (323) = happyShift action_85
action_918 (325) = happyShift action_86
action_918 (334) = happyShift action_89
action_918 (335) = happyShift action_90
action_918 (337) = happyShift action_91
action_918 (356) = happyShift action_97
action_918 (62) = happyGoto action_985
action_918 (113) = happyGoto action_986
action_918 (114) = happyGoto action_987
action_918 (198) = happyGoto action_519
action_918 (211) = happyGoto action_32
action_918 (212) = happyGoto action_33
action_918 (213) = happyGoto action_34
action_918 _ = happyFail
action_919 (234) = happyShift action_39
action_919 (238) = happyShift action_43
action_919 (239) = happyShift action_44
action_919 (255) = happyShift action_115
action_919 (257) = happyShift action_116
action_919 (265) = happyShift action_117
action_919 (283) = happyShift action_811
action_919 (313) = happyShift action_76
action_919 (314) = happyShift action_118
action_919 (315) = happyShift action_119
action_919 (316) = happyShift action_120
action_919 (318) = happyShift action_80
action_919 (319) = happyShift action_81
action_919 (320) = happyShift action_82
action_919 (321) = happyShift action_83
action_919 (322) = happyShift action_84
action_919 (323) = happyShift action_85
action_919 (325) = happyShift action_86
action_919 (337) = happyShift action_91
action_919 (356) = happyShift action_97
action_919 (368) = happyShift action_812
action_919 (81) = happyGoto action_801
action_919 (82) = happyGoto action_983
action_919 (84) = happyGoto action_104
action_919 (85) = happyGoto action_105
action_919 (86) = happyGoto action_106
action_919 (112) = happyGoto action_984
action_919 (212) = happyGoto action_111
action_919 (215) = happyGoto action_112
action_919 (216) = happyGoto action_37
action_919 (230) = happyGoto action_113
action_919 (231) = happyGoto action_114
action_919 _ = happyFail
action_920 (238) = happyShift action_43
action_920 (216) = happyGoto action_671
action_920 _ = happyFail
action_921 _ = happyReduce_257
action_922 _ = happyReduce_256
action_923 (234) = happyShift action_39
action_923 (238) = happyShift action_43
action_923 (239) = happyShift action_44
action_923 (255) = happyShift action_115
action_923 (257) = happyShift action_116
action_923 (265) = happyShift action_117
action_923 (313) = happyShift action_76
action_923 (314) = happyShift action_118
action_923 (315) = happyShift action_119
action_923 (316) = happyShift action_120
action_923 (318) = happyShift action_80
action_923 (319) = happyShift action_81
action_923 (320) = happyShift action_82
action_923 (321) = happyShift action_83
action_923 (322) = happyShift action_84
action_923 (323) = happyShift action_85
action_923 (325) = happyShift action_86
action_923 (337) = happyShift action_91
action_923 (356) = happyShift action_97
action_923 (83) = happyGoto action_982
action_923 (84) = happyGoto action_916
action_923 (85) = happyGoto action_105
action_923 (86) = happyGoto action_106
action_923 (212) = happyGoto action_111
action_923 (215) = happyGoto action_112
action_923 (216) = happyGoto action_37
action_923 (230) = happyGoto action_113
action_923 (231) = happyGoto action_114
action_923 _ = happyFail
action_924 (372) = happyShift action_981
action_924 _ = happyFail
action_925 (234) = happyShift action_39
action_925 (238) = happyShift action_43
action_925 (239) = happyShift action_44
action_925 (242) = happyReduce_191
action_925 (255) = happyShift action_115
action_925 (257) = happyShift action_116
action_925 (265) = happyShift action_117
action_925 (269) = happyReduce_191
action_925 (283) = happyShift action_928
action_925 (313) = happyShift action_76
action_925 (314) = happyShift action_118
action_925 (315) = happyShift action_119
action_925 (316) = happyShift action_120
action_925 (318) = happyShift action_80
action_925 (319) = happyShift action_81
action_925 (320) = happyShift action_82
action_925 (321) = happyShift action_83
action_925 (322) = happyShift action_84
action_925 (323) = happyShift action_85
action_925 (325) = happyShift action_86
action_925 (337) = happyShift action_91
action_925 (356) = happyShift action_97
action_925 (368) = happyShift action_929
action_925 (84) = happyGoto action_248
action_925 (85) = happyGoto action_105
action_925 (86) = happyGoto action_106
action_925 (212) = happyGoto action_111
action_925 (215) = happyGoto action_112
action_925 (216) = happyGoto action_37
action_925 (230) = happyGoto action_113
action_925 (231) = happyGoto action_114
action_925 _ = happyReduce_252
action_926 _ = happyReduce_244
action_927 (234) = happyShift action_39
action_927 (238) = happyShift action_43
action_927 (239) = happyShift action_44
action_927 (255) = happyShift action_115
action_927 (257) = happyShift action_116
action_927 (265) = happyShift action_117
action_927 (313) = happyShift action_76
action_927 (314) = happyShift action_118
action_927 (315) = happyShift action_119
action_927 (316) = happyShift action_120
action_927 (318) = happyShift action_80
action_927 (319) = happyShift action_81
action_927 (320) = happyShift action_82
action_927 (321) = happyShift action_83
action_927 (322) = happyShift action_84
action_927 (323) = happyShift action_85
action_927 (325) = happyShift action_86
action_927 (337) = happyShift action_91
action_927 (356) = happyShift action_97
action_927 (82) = happyGoto action_980
action_927 (84) = happyGoto action_104
action_927 (85) = happyGoto action_105
action_927 (86) = happyGoto action_106
action_927 (212) = happyGoto action_111
action_927 (215) = happyGoto action_112
action_927 (216) = happyGoto action_37
action_927 (230) = happyGoto action_113
action_927 (231) = happyGoto action_114
action_927 _ = happyFail
action_928 (234) = happyShift action_39
action_928 (238) = happyShift action_43
action_928 (239) = happyShift action_44
action_928 (255) = happyShift action_115
action_928 (257) = happyShift action_116
action_928 (265) = happyShift action_117
action_928 (313) = happyShift action_76
action_928 (314) = happyShift action_118
action_928 (315) = happyShift action_119
action_928 (316) = happyShift action_120
action_928 (318) = happyShift action_80
action_928 (319) = happyShift action_81
action_928 (320) = happyShift action_82
action_928 (321) = happyShift action_83
action_928 (322) = happyShift action_84
action_928 (323) = happyShift action_85
action_928 (325) = happyShift action_86
action_928 (337) = happyShift action_91
action_928 (356) = happyShift action_97
action_928 (83) = happyGoto action_979
action_928 (84) = happyGoto action_916
action_928 (85) = happyGoto action_105
action_928 (86) = happyGoto action_106
action_928 (212) = happyGoto action_111
action_928 (215) = happyGoto action_112
action_928 (216) = happyGoto action_37
action_928 (230) = happyGoto action_113
action_928 (231) = happyGoto action_114
action_928 _ = happyFail
action_929 (372) = happyShift action_978
action_929 _ = happyFail
action_930 _ = happyReduce_246
action_931 _ = happyReduce_277
action_932 _ = happyReduce_280
action_933 (238) = happyShift action_43
action_933 (239) = happyShift action_44
action_933 (255) = happyShift action_977
action_933 (261) = happyShift action_621
action_933 (102) = happyGoto action_974
action_933 (103) = happyGoto action_975
action_933 (201) = happyGoto action_976
action_933 (215) = happyGoto action_36
action_933 (216) = happyGoto action_37
action_933 _ = happyFail
action_934 (263) = happyShift action_973
action_934 _ = happyFail
action_935 (1) = happyShift action_403
action_935 (264) = happyShift action_404
action_935 (226) = happyGoto action_972
action_935 _ = happyFail
action_936 (267) = happyShift action_498
action_936 _ = happyReduce_273
action_937 (256) = happyShift action_971
action_937 _ = happyFail
action_938 _ = happyReduce_271
action_939 _ = happyReduce_99
action_940 (256) = happyShift action_970
action_940 _ = happyFail
action_941 (245) = happyShift action_969
action_941 _ = happyFail
action_942 (333) = happyShift action_968
action_942 _ = happyFail
action_943 _ = happyReduce_497
action_944 _ = happyReduce_496
action_945 (24) = happyGoto action_966
action_945 (25) = happyGoto action_967
action_945 _ = happyReduce_38
action_946 _ = happyReduce_500
action_947 (276) = happyShift action_964
action_947 (278) = happyShift action_965
action_947 (182) = happyGoto action_961
action_947 (183) = happyGoto action_962
action_947 (184) = happyGoto action_963
action_947 _ = happyFail
action_948 _ = happyReduce_468
action_949 (261) = happyShift action_466
action_949 (302) = happyShift action_467
action_949 (303) = happyShift action_73
action_949 (305) = happyShift action_74
action_949 (306) = happyShift action_75
action_949 (310) = happyShift action_468
action_949 (146) = happyGoto action_960
action_949 (161) = happyGoto action_464
action_949 (163) = happyGoto action_465
action_949 _ = happyReduce_341
action_950 _ = happyReduce_491
action_951 (267) = happyShift action_768
action_951 _ = happyReduce_480
action_952 _ = happyReduce_482
action_953 (234) = happyShift action_39
action_953 (235) = happyShift action_40
action_953 (236) = happyShift action_41
action_953 (237) = happyShift action_42
action_953 (238) = happyShift action_43
action_953 (239) = happyShift action_44
action_953 (245) = happyShift action_45
action_953 (246) = happyShift action_46
action_953 (247) = happyShift action_47
action_953 (248) = happyShift action_48
action_953 (249) = happyShift action_49
action_953 (250) = happyShift action_50
action_953 (251) = happyShift action_51
action_953 (252) = happyShift action_52
action_953 (253) = happyShift action_53
action_953 (254) = happyShift action_54
action_953 (255) = happyShift action_55
action_953 (257) = happyShift action_56
action_953 (265) = happyShift action_57
action_953 (268) = happyShift action_58
action_953 (275) = happyShift action_59
action_953 (280) = happyShift action_60
action_953 (282) = happyShift action_61
action_953 (289) = happyShift action_63
action_953 (292) = happyShift action_64
action_953 (293) = happyShift action_65
action_953 (294) = happyShift action_66
action_953 (295) = happyShift action_67
action_953 (296) = happyShift action_68
action_953 (297) = happyShift action_69
action_953 (299) = happyShift action_70
action_953 (300) = happyShift action_71
action_953 (301) = happyShift action_72
action_953 (303) = happyShift action_73
action_953 (305) = happyShift action_74
action_953 (306) = happyShift action_75
action_953 (313) = happyShift action_76
action_953 (314) = happyShift action_77
action_953 (315) = happyShift action_78
action_953 (316) = happyShift action_79
action_953 (318) = happyShift action_80
action_953 (319) = happyShift action_81
action_953 (320) = happyShift action_82
action_953 (321) = happyShift action_83
action_953 (322) = happyShift action_84
action_953 (323) = happyShift action_85
action_953 (325) = happyShift action_86
action_953 (327) = happyShift action_87
action_953 (332) = happyShift action_88
action_953 (334) = happyShift action_89
action_953 (335) = happyShift action_90
action_953 (337) = happyShift action_91
action_953 (338) = happyShift action_92
action_953 (345) = happyShift action_142
action_953 (346) = happyShift action_94
action_953 (350) = happyShift action_95
action_953 (356) = happyShift action_97
action_953 (363) = happyShift action_98
action_953 (364) = happyShift action_99
action_953 (365) = happyShift action_100
action_953 (139) = happyGoto action_959
action_953 (140) = happyGoto action_156
action_953 (141) = happyGoto action_15
action_953 (142) = happyGoto action_16
action_953 (143) = happyGoto action_17
action_953 (144) = happyGoto action_18
action_953 (147) = happyGoto action_19
action_953 (148) = happyGoto action_20
action_953 (149) = happyGoto action_21
action_953 (152) = happyGoto action_22
action_953 (153) = happyGoto action_23
action_953 (154) = happyGoto action_24
action_953 (161) = happyGoto action_25
action_953 (195) = happyGoto action_28
action_953 (198) = happyGoto action_29
action_953 (199) = happyGoto action_30
action_953 (201) = happyGoto action_31
action_953 (211) = happyGoto action_32
action_953 (212) = happyGoto action_33
action_953 (213) = happyGoto action_34
action_953 (214) = happyGoto action_35
action_953 (215) = happyGoto action_36
action_953 (216) = happyGoto action_37
action_953 (224) = happyGoto action_38
action_953 _ = happyFail
action_954 (234) = happyShift action_39
action_954 (235) = happyShift action_40
action_954 (236) = happyShift action_41
action_954 (237) = happyShift action_42
action_954 (238) = happyShift action_43
action_954 (239) = happyShift action_44
action_954 (245) = happyShift action_45
action_954 (246) = happyShift action_46
action_954 (247) = happyShift action_47
action_954 (248) = happyShift action_48
action_954 (249) = happyShift action_49
action_954 (250) = happyShift action_50
action_954 (251) = happyShift action_51
action_954 (252) = happyShift action_52
action_954 (253) = happyShift action_53
action_954 (254) = happyShift action_54
action_954 (255) = happyShift action_55
action_954 (257) = happyShift action_56
action_954 (265) = happyShift action_57
action_954 (268) = happyShift action_58
action_954 (275) = happyShift action_59
action_954 (280) = happyShift action_60
action_954 (282) = happyShift action_61
action_954 (289) = happyShift action_63
action_954 (292) = happyShift action_64
action_954 (293) = happyShift action_65
action_954 (294) = happyShift action_66
action_954 (295) = happyShift action_67
action_954 (296) = happyShift action_68
action_954 (297) = happyShift action_69
action_954 (299) = happyShift action_70
action_954 (300) = happyShift action_71
action_954 (301) = happyShift action_72
action_954 (303) = happyShift action_73
action_954 (305) = happyShift action_74
action_954 (306) = happyShift action_75
action_954 (313) = happyShift action_76
action_954 (314) = happyShift action_77
action_954 (315) = happyShift action_78
action_954 (316) = happyShift action_79
action_954 (318) = happyShift action_80
action_954 (319) = happyShift action_81
action_954 (320) = happyShift action_82
action_954 (321) = happyShift action_83
action_954 (322) = happyShift action_84
action_954 (323) = happyShift action_85
action_954 (325) = happyShift action_86
action_954 (327) = happyShift action_87
action_954 (332) = happyShift action_88
action_954 (334) = happyShift action_89
action_954 (335) = happyShift action_90
action_954 (337) = happyShift action_91
action_954 (338) = happyShift action_92
action_954 (345) = happyShift action_142
action_954 (346) = happyShift action_94
action_954 (350) = happyShift action_95
action_954 (356) = happyShift action_97
action_954 (363) = happyShift action_98
action_954 (364) = happyShift action_99
action_954 (365) = happyShift action_100
action_954 (139) = happyGoto action_958
action_954 (140) = happyGoto action_156
action_954 (141) = happyGoto action_15
action_954 (142) = happyGoto action_16
action_954 (143) = happyGoto action_17
action_954 (144) = happyGoto action_18
action_954 (147) = happyGoto action_19
action_954 (148) = happyGoto action_20
action_954 (149) = happyGoto action_21
action_954 (152) = happyGoto action_22
action_954 (153) = happyGoto action_23
action_954 (154) = happyGoto action_24
action_954 (161) = happyGoto action_25
action_954 (195) = happyGoto action_28
action_954 (198) = happyGoto action_29
action_954 (199) = happyGoto action_30
action_954 (201) = happyGoto action_31
action_954 (211) = happyGoto action_32
action_954 (212) = happyGoto action_33
action_954 (213) = happyGoto action_34
action_954 (214) = happyGoto action_35
action_954 (215) = happyGoto action_36
action_954 (216) = happyGoto action_37
action_954 (224) = happyGoto action_38
action_954 _ = happyFail
action_955 (234) = happyShift action_39
action_955 (235) = happyShift action_40
action_955 (236) = happyShift action_41
action_955 (237) = happyShift action_42
action_955 (238) = happyShift action_43
action_955 (239) = happyShift action_44
action_955 (245) = happyShift action_45
action_955 (246) = happyShift action_46
action_955 (247) = happyShift action_47
action_955 (248) = happyShift action_48
action_955 (249) = happyShift action_49
action_955 (250) = happyShift action_50
action_955 (251) = happyShift action_51
action_955 (252) = happyShift action_52
action_955 (253) = happyShift action_53
action_955 (254) = happyShift action_54
action_955 (255) = happyShift action_55
action_955 (257) = happyShift action_56
action_955 (265) = happyShift action_57
action_955 (268) = happyShift action_58
action_955 (275) = happyShift action_59
action_955 (280) = happyShift action_60
action_955 (282) = happyShift action_61
action_955 (289) = happyShift action_63
action_955 (292) = happyShift action_64
action_955 (293) = happyShift action_65
action_955 (294) = happyShift action_66
action_955 (295) = happyShift action_67
action_955 (296) = happyShift action_68
action_955 (297) = happyShift action_69
action_955 (299) = happyShift action_70
action_955 (300) = happyShift action_71
action_955 (301) = happyShift action_72
action_955 (303) = happyShift action_73
action_955 (305) = happyShift action_74
action_955 (306) = happyShift action_75
action_955 (313) = happyShift action_76
action_955 (314) = happyShift action_77
action_955 (315) = happyShift action_78
action_955 (316) = happyShift action_79
action_955 (318) = happyShift action_80
action_955 (319) = happyShift action_81
action_955 (320) = happyShift action_82
action_955 (321) = happyShift action_83
action_955 (322) = happyShift action_84
action_955 (323) = happyShift action_85
action_955 (325) = happyShift action_86
action_955 (327) = happyShift action_87
action_955 (332) = happyShift action_88
action_955 (334) = happyShift action_89
action_955 (335) = happyShift action_90
action_955 (337) = happyShift action_91
action_955 (338) = happyShift action_92
action_955 (345) = happyShift action_142
action_955 (346) = happyShift action_94
action_955 (350) = happyShift action_95
action_955 (356) = happyShift action_97
action_955 (363) = happyShift action_98
action_955 (364) = happyShift action_99
action_955 (365) = happyShift action_100
action_955 (139) = happyGoto action_957
action_955 (140) = happyGoto action_156
action_955 (141) = happyGoto action_15
action_955 (142) = happyGoto action_16
action_955 (143) = happyGoto action_17
action_955 (144) = happyGoto action_18
action_955 (147) = happyGoto action_19
action_955 (148) = happyGoto action_20
action_955 (149) = happyGoto action_21
action_955 (152) = happyGoto action_22
action_955 (153) = happyGoto action_23
action_955 (154) = happyGoto action_24
action_955 (161) = happyGoto action_25
action_955 (195) = happyGoto action_28
action_955 (198) = happyGoto action_29
action_955 (199) = happyGoto action_30
action_955 (201) = happyGoto action_31
action_955 (211) = happyGoto action_32
action_955 (212) = happyGoto action_33
action_955 (213) = happyGoto action_34
action_955 (214) = happyGoto action_35
action_955 (215) = happyGoto action_36
action_955 (216) = happyGoto action_37
action_955 (224) = happyGoto action_38
action_955 _ = happyFail
action_956 _ = happyReduce_476
action_957 _ = happyReduce_487
action_958 _ = happyReduce_489
action_959 (354) = happyShift action_1060
action_959 _ = happyReduce_488
action_960 (304) = happyShift action_1059
action_960 _ = happyFail
action_961 (355) = happyShift action_642
action_961 (134) = happyGoto action_1058
action_961 _ = happyReduce_311
action_962 (276) = happyShift action_964
action_962 (184) = happyGoto action_1057
action_962 _ = happyReduce_503
action_963 _ = happyReduce_505
action_964 (234) = happyShift action_39
action_964 (235) = happyShift action_40
action_964 (236) = happyShift action_41
action_964 (237) = happyShift action_42
action_964 (238) = happyShift action_43
action_964 (239) = happyShift action_44
action_964 (245) = happyShift action_45
action_964 (246) = happyShift action_46
action_964 (247) = happyShift action_47
action_964 (248) = happyShift action_48
action_964 (249) = happyShift action_49
action_964 (250) = happyShift action_50
action_964 (251) = happyShift action_51
action_964 (252) = happyShift action_52
action_964 (253) = happyShift action_53
action_964 (254) = happyShift action_54
action_964 (255) = happyShift action_55
action_964 (257) = happyShift action_56
action_964 (265) = happyShift action_57
action_964 (268) = happyShift action_58
action_964 (275) = happyShift action_59
action_964 (280) = happyShift action_60
action_964 (282) = happyShift action_61
action_964 (283) = happyShift action_62
action_964 (289) = happyShift action_63
action_964 (292) = happyShift action_64
action_964 (293) = happyShift action_65
action_964 (294) = happyShift action_66
action_964 (295) = happyShift action_67
action_964 (296) = happyShift action_68
action_964 (297) = happyShift action_69
action_964 (299) = happyShift action_70
action_964 (300) = happyShift action_71
action_964 (301) = happyShift action_72
action_964 (303) = happyShift action_73
action_964 (305) = happyShift action_74
action_964 (306) = happyShift action_75
action_964 (313) = happyShift action_76
action_964 (314) = happyShift action_77
action_964 (315) = happyShift action_78
action_964 (316) = happyShift action_79
action_964 (318) = happyShift action_80
action_964 (319) = happyShift action_81
action_964 (320) = happyShift action_82
action_964 (321) = happyShift action_83
action_964 (322) = happyShift action_84
action_964 (323) = happyShift action_85
action_964 (325) = happyShift action_86
action_964 (327) = happyShift action_87
action_964 (332) = happyShift action_88
action_964 (334) = happyShift action_89
action_964 (335) = happyShift action_90
action_964 (337) = happyShift action_91
action_964 (338) = happyShift action_92
action_964 (345) = happyShift action_647
action_964 (346) = happyShift action_94
action_964 (350) = happyShift action_95
action_964 (356) = happyShift action_97
action_964 (363) = happyShift action_98
action_964 (364) = happyShift action_99
action_964 (365) = happyShift action_100
action_964 (139) = happyGoto action_643
action_964 (140) = happyGoto action_14
action_964 (141) = happyGoto action_15
action_964 (142) = happyGoto action_16
action_964 (143) = happyGoto action_17
action_964 (144) = happyGoto action_18
action_964 (147) = happyGoto action_19
action_964 (148) = happyGoto action_20
action_964 (149) = happyGoto action_21
action_964 (152) = happyGoto action_22
action_964 (153) = happyGoto action_23
action_964 (154) = happyGoto action_24
action_964 (161) = happyGoto action_25
action_964 (176) = happyGoto action_1056
action_964 (177) = happyGoto action_645
action_964 (185) = happyGoto action_646
action_964 (195) = happyGoto action_28
action_964 (198) = happyGoto action_29
action_964 (199) = happyGoto action_30
action_964 (201) = happyGoto action_31
action_964 (211) = happyGoto action_32
action_964 (212) = happyGoto action_33
action_964 (213) = happyGoto action_34
action_964 (214) = happyGoto action_35
action_964 (215) = happyGoto action_36
action_964 (216) = happyGoto action_37
action_964 (224) = happyGoto action_38
action_964 _ = happyFail
action_965 (234) = happyShift action_39
action_965 (235) = happyShift action_40
action_965 (236) = happyShift action_41
action_965 (237) = happyShift action_42
action_965 (238) = happyShift action_43
action_965 (239) = happyShift action_44
action_965 (245) = happyShift action_45
action_965 (246) = happyShift action_46
action_965 (247) = happyShift action_47
action_965 (248) = happyShift action_48
action_965 (249) = happyShift action_49
action_965 (250) = happyShift action_50
action_965 (251) = happyShift action_51
action_965 (252) = happyShift action_52
action_965 (253) = happyShift action_53
action_965 (254) = happyShift action_54
action_965 (255) = happyShift action_55
action_965 (257) = happyShift action_56
action_965 (265) = happyShift action_57
action_965 (268) = happyShift action_58
action_965 (275) = happyShift action_59
action_965 (280) = happyShift action_60
action_965 (282) = happyShift action_61
action_965 (289) = happyShift action_63
action_965 (292) = happyShift action_64
action_965 (293) = happyShift action_65
action_965 (294) = happyShift action_66
action_965 (295) = happyShift action_67
action_965 (296) = happyShift action_68
action_965 (297) = happyShift action_69
action_965 (299) = happyShift action_70
action_965 (300) = happyShift action_71
action_965 (301) = happyShift action_72
action_965 (303) = happyShift action_73
action_965 (305) = happyShift action_74
action_965 (306) = happyShift action_75
action_965 (313) = happyShift action_76
action_965 (314) = happyShift action_77
action_965 (315) = happyShift action_78
action_965 (316) = happyShift action_79
action_965 (318) = happyShift action_80
action_965 (319) = happyShift action_81
action_965 (320) = happyShift action_82
action_965 (321) = happyShift action_83
action_965 (322) = happyShift action_84
action_965 (323) = happyShift action_85
action_965 (325) = happyShift action_86
action_965 (327) = happyShift action_87
action_965 (332) = happyShift action_88
action_965 (334) = happyShift action_89
action_965 (335) = happyShift action_90
action_965 (337) = happyShift action_91
action_965 (338) = happyShift action_92
action_965 (345) = happyShift action_142
action_965 (346) = happyShift action_94
action_965 (350) = happyShift action_95
action_965 (356) = happyShift action_97
action_965 (363) = happyShift action_98
action_965 (364) = happyShift action_99
action_965 (365) = happyShift action_100
action_965 (139) = happyGoto action_1055
action_965 (140) = happyGoto action_156
action_965 (141) = happyGoto action_15
action_965 (142) = happyGoto action_16
action_965 (143) = happyGoto action_17
action_965 (144) = happyGoto action_18
action_965 (147) = happyGoto action_19
action_965 (148) = happyGoto action_20
action_965 (149) = happyGoto action_21
action_965 (152) = happyGoto action_22
action_965 (153) = happyGoto action_23
action_965 (154) = happyGoto action_24
action_965 (161) = happyGoto action_25
action_965 (195) = happyGoto action_28
action_965 (198) = happyGoto action_29
action_965 (199) = happyGoto action_30
action_965 (201) = happyGoto action_31
action_965 (211) = happyGoto action_32
action_965 (212) = happyGoto action_33
action_965 (213) = happyGoto action_34
action_965 (214) = happyGoto action_35
action_965 (215) = happyGoto action_36
action_965 (216) = happyGoto action_37
action_965 (224) = happyGoto action_38
action_965 _ = happyFail
action_966 (234) = happyShift action_39
action_966 (235) = happyShift action_40
action_966 (236) = happyShift action_41
action_966 (237) = happyShift action_42
action_966 (238) = happyShift action_43
action_966 (239) = happyShift action_44
action_966 (245) = happyShift action_45
action_966 (246) = happyShift action_46
action_966 (247) = happyShift action_47
action_966 (248) = happyShift action_48
action_966 (249) = happyShift action_49
action_966 (250) = happyShift action_50
action_966 (251) = happyShift action_51
action_966 (252) = happyShift action_52
action_966 (253) = happyShift action_53
action_966 (254) = happyShift action_54
action_966 (255) = happyShift action_55
action_966 (257) = happyShift action_56
action_966 (265) = happyShift action_57
action_966 (268) = happyShift action_58
action_966 (275) = happyShift action_59
action_966 (280) = happyShift action_60
action_966 (282) = happyShift action_61
action_966 (283) = happyShift action_62
action_966 (289) = happyShift action_63
action_966 (292) = happyShift action_64
action_966 (293) = happyShift action_65
action_966 (294) = happyShift action_66
action_966 (295) = happyShift action_67
action_966 (296) = happyShift action_68
action_966 (297) = happyShift action_69
action_966 (299) = happyShift action_70
action_966 (300) = happyShift action_71
action_966 (301) = happyShift action_72
action_966 (303) = happyShift action_73
action_966 (305) = happyShift action_74
action_966 (306) = happyShift action_75
action_966 (313) = happyShift action_76
action_966 (314) = happyShift action_77
action_966 (315) = happyShift action_78
action_966 (316) = happyShift action_79
action_966 (318) = happyShift action_80
action_966 (319) = happyShift action_81
action_966 (320) = happyShift action_82
action_966 (321) = happyShift action_83
action_966 (322) = happyShift action_84
action_966 (323) = happyShift action_85
action_966 (325) = happyShift action_86
action_966 (327) = happyShift action_87
action_966 (332) = happyShift action_88
action_966 (334) = happyShift action_89
action_966 (335) = happyShift action_90
action_966 (337) = happyShift action_91
action_966 (338) = happyShift action_92
action_966 (345) = happyShift action_142
action_966 (346) = happyShift action_94
action_966 (350) = happyShift action_95
action_966 (356) = happyShift action_97
action_966 (363) = happyShift action_98
action_966 (364) = happyShift action_99
action_966 (365) = happyShift action_100
action_966 (140) = happyGoto action_153
action_966 (141) = happyGoto action_15
action_966 (142) = happyGoto action_16
action_966 (143) = happyGoto action_17
action_966 (144) = happyGoto action_18
action_966 (147) = happyGoto action_19
action_966 (148) = happyGoto action_20
action_966 (149) = happyGoto action_21
action_966 (152) = happyGoto action_22
action_966 (153) = happyGoto action_23
action_966 (154) = happyGoto action_24
action_966 (161) = happyGoto action_25
action_966 (181) = happyGoto action_1054
action_966 (185) = happyGoto action_947
action_966 (195) = happyGoto action_28
action_966 (198) = happyGoto action_29
action_966 (199) = happyGoto action_30
action_966 (201) = happyGoto action_31
action_966 (211) = happyGoto action_32
action_966 (212) = happyGoto action_33
action_966 (213) = happyGoto action_34
action_966 (214) = happyGoto action_35
action_966 (215) = happyGoto action_36
action_966 (216) = happyGoto action_37
action_966 (224) = happyGoto action_38
action_966 _ = happyReduce_37
action_967 (261) = happyShift action_621
action_967 _ = happyReduce_498
action_968 (234) = happyShift action_39
action_968 (235) = happyShift action_40
action_968 (236) = happyShift action_41
action_968 (237) = happyShift action_42
action_968 (238) = happyShift action_43
action_968 (239) = happyShift action_44
action_968 (245) = happyShift action_45
action_968 (246) = happyShift action_46
action_968 (247) = happyShift action_47
action_968 (248) = happyShift action_48
action_968 (249) = happyShift action_49
action_968 (250) = happyShift action_50
action_968 (251) = happyShift action_51
action_968 (252) = happyShift action_52
action_968 (253) = happyShift action_53
action_968 (254) = happyShift action_54
action_968 (255) = happyShift action_55
action_968 (257) = happyShift action_56
action_968 (265) = happyShift action_57
action_968 (268) = happyShift action_58
action_968 (275) = happyShift action_59
action_968 (280) = happyShift action_60
action_968 (282) = happyShift action_61
action_968 (289) = happyShift action_63
action_968 (292) = happyShift action_64
action_968 (293) = happyShift action_65
action_968 (294) = happyShift action_66
action_968 (295) = happyShift action_67
action_968 (296) = happyShift action_68
action_968 (297) = happyShift action_69
action_968 (299) = happyShift action_70
action_968 (300) = happyShift action_71
action_968 (301) = happyShift action_72
action_968 (303) = happyShift action_73
action_968 (305) = happyShift action_74
action_968 (306) = happyShift action_75
action_968 (313) = happyShift action_76
action_968 (314) = happyShift action_77
action_968 (315) = happyShift action_78
action_968 (316) = happyShift action_79
action_968 (318) = happyShift action_80
action_968 (319) = happyShift action_81
action_968 (320) = happyShift action_82
action_968 (321) = happyShift action_83
action_968 (322) = happyShift action_84
action_968 (323) = happyShift action_85
action_968 (325) = happyShift action_86
action_968 (327) = happyShift action_87
action_968 (332) = happyShift action_88
action_968 (334) = happyShift action_89
action_968 (335) = happyShift action_90
action_968 (337) = happyShift action_91
action_968 (338) = happyShift action_92
action_968 (345) = happyShift action_142
action_968 (346) = happyShift action_94
action_968 (350) = happyShift action_95
action_968 (356) = happyShift action_97
action_968 (363) = happyShift action_98
action_968 (364) = happyShift action_99
action_968 (365) = happyShift action_100
action_968 (140) = happyGoto action_1053
action_968 (141) = happyGoto action_15
action_968 (142) = happyGoto action_16
action_968 (143) = happyGoto action_17
action_968 (144) = happyGoto action_18
action_968 (147) = happyGoto action_19
action_968 (148) = happyGoto action_20
action_968 (149) = happyGoto action_21
action_968 (152) = happyGoto action_22
action_968 (153) = happyGoto action_23
action_968 (154) = happyGoto action_24
action_968 (161) = happyGoto action_25
action_968 (195) = happyGoto action_28
action_968 (198) = happyGoto action_29
action_968 (199) = happyGoto action_30
action_968 (201) = happyGoto action_31
action_968 (211) = happyGoto action_32
action_968 (212) = happyGoto action_33
action_968 (213) = happyGoto action_34
action_968 (214) = happyGoto action_35
action_968 (215) = happyGoto action_36
action_968 (216) = happyGoto action_37
action_968 (224) = happyGoto action_38
action_968 _ = happyFail
action_969 (272) = happyShift action_1052
action_969 _ = happyFail
action_970 _ = happyReduce_225
action_971 _ = happyReduce_272
action_972 _ = happyReduce_235
action_973 _ = happyReduce_234
action_974 (24) = happyGoto action_1050
action_974 (25) = happyGoto action_1051
action_974 _ = happyReduce_38
action_975 _ = happyReduce_239
action_976 (273) = happyShift action_1049
action_976 _ = happyFail
action_977 (242) = happyShift action_215
action_977 (244) = happyShift action_217
action_977 (272) = happyShift action_221
action_977 (210) = happyGoto action_459
action_977 (217) = happyGoto action_209
action_977 (218) = happyGoto action_210
action_977 _ = happyFail
action_978 (283) = happyShift action_1048
action_978 _ = happyFail
action_979 _ = happyReduce_254
action_980 (234) = happyShift action_39
action_980 (238) = happyShift action_43
action_980 (239) = happyShift action_44
action_980 (255) = happyShift action_115
action_980 (257) = happyShift action_116
action_980 (265) = happyShift action_117
action_980 (281) = happyShift action_679
action_980 (313) = happyShift action_76
action_980 (314) = happyShift action_118
action_980 (315) = happyShift action_119
action_980 (316) = happyShift action_120
action_980 (318) = happyShift action_80
action_980 (319) = happyShift action_81
action_980 (320) = happyShift action_82
action_980 (321) = happyShift action_83
action_980 (322) = happyShift action_84
action_980 (323) = happyShift action_85
action_980 (325) = happyShift action_86
action_980 (337) = happyShift action_91
action_980 (356) = happyShift action_97
action_980 (84) = happyGoto action_248
action_980 (85) = happyGoto action_105
action_980 (86) = happyGoto action_106
action_980 (212) = happyGoto action_111
action_980 (215) = happyGoto action_112
action_980 (216) = happyGoto action_37
action_980 (230) = happyGoto action_113
action_980 (231) = happyGoto action_114
action_980 _ = happyFail
action_981 (283) = happyShift action_1047
action_981 _ = happyFail
action_982 _ = happyReduce_258
action_983 (234) = happyShift action_39
action_983 (238) = happyShift action_43
action_983 (239) = happyShift action_44
action_983 (255) = happyShift action_115
action_983 (257) = happyShift action_116
action_983 (265) = happyShift action_117
action_983 (313) = happyShift action_76
action_983 (314) = happyShift action_118
action_983 (315) = happyShift action_119
action_983 (316) = happyShift action_120
action_983 (318) = happyShift action_80
action_983 (319) = happyShift action_81
action_983 (320) = happyShift action_82
action_983 (321) = happyShift action_83
action_983 (322) = happyShift action_84
action_983 (323) = happyShift action_85
action_983 (325) = happyShift action_86
action_983 (337) = happyShift action_91
action_983 (356) = happyShift action_97
action_983 (84) = happyGoto action_248
action_983 (85) = happyGoto action_105
action_983 (86) = happyGoto action_106
action_983 (212) = happyGoto action_111
action_983 (215) = happyGoto action_112
action_983 (216) = happyGoto action_37
action_983 (230) = happyGoto action_113
action_983 (231) = happyGoto action_114
action_983 _ = happyReduce_191
action_984 _ = happyReduce_249
action_985 (267) = happyShift action_651
action_985 (273) = happyShift action_1046
action_985 _ = happyFail
action_986 (263) = happyShift action_1044
action_986 (267) = happyShift action_1045
action_986 _ = happyFail
action_987 _ = happyReduce_264
action_988 _ = happyReduce_250
action_989 (262) = happyReduce_545
action_989 _ = happyReduce_210
action_990 (234) = happyShift action_39
action_990 (238) = happyShift action_43
action_990 (239) = happyShift action_44
action_990 (255) = happyShift action_115
action_990 (257) = happyShift action_116
action_990 (265) = happyShift action_117
action_990 (313) = happyShift action_76
action_990 (314) = happyShift action_118
action_990 (315) = happyShift action_119
action_990 (316) = happyShift action_120
action_990 (318) = happyShift action_80
action_990 (319) = happyShift action_81
action_990 (320) = happyShift action_82
action_990 (321) = happyShift action_83
action_990 (322) = happyShift action_84
action_990 (323) = happyShift action_85
action_990 (325) = happyShift action_86
action_990 (337) = happyShift action_91
action_990 (356) = happyShift action_97
action_990 (83) = happyGoto action_1043
action_990 (84) = happyGoto action_916
action_990 (85) = happyGoto action_105
action_990 (86) = happyGoto action_106
action_990 (212) = happyGoto action_111
action_990 (215) = happyGoto action_112
action_990 (216) = happyGoto action_37
action_990 (230) = happyGoto action_113
action_990 (231) = happyGoto action_114
action_990 _ = happyFail
action_991 _ = happyReduce_154
action_992 _ = happyReduce_284
action_993 _ = happyReduce_283
action_994 _ = happyReduce_290
action_995 (24) = happyGoto action_1041
action_995 (25) = happyGoto action_1042
action_995 _ = happyReduce_38
action_996 _ = happyReduce_289
action_997 _ = happyReduce_291
action_998 (234) = happyShift action_39
action_998 (236) = happyShift action_41
action_998 (237) = happyShift action_42
action_998 (238) = happyShift action_43
action_998 (239) = happyShift action_44
action_998 (255) = happyShift action_115
action_998 (257) = happyShift action_116
action_998 (265) = happyShift action_117
action_998 (313) = happyShift action_76
action_998 (314) = happyShift action_118
action_998 (315) = happyShift action_119
action_998 (316) = happyShift action_120
action_998 (318) = happyShift action_80
action_998 (319) = happyShift action_81
action_998 (320) = happyShift action_82
action_998 (321) = happyShift action_83
action_998 (322) = happyShift action_84
action_998 (323) = happyShift action_85
action_998 (325) = happyShift action_86
action_998 (335) = happyShift action_121
action_998 (337) = happyShift action_91
action_998 (356) = happyShift action_97
action_998 (78) = happyGoto action_101
action_998 (80) = happyGoto action_102
action_998 (82) = happyGoto action_103
action_998 (84) = happyGoto action_104
action_998 (85) = happyGoto action_105
action_998 (86) = happyGoto action_106
action_998 (89) = happyGoto action_1040
action_998 (90) = happyGoto action_109
action_998 (199) = happyGoto action_110
action_998 (212) = happyGoto action_111
action_998 (214) = happyGoto action_35
action_998 (215) = happyGoto action_112
action_998 (216) = happyGoto action_37
action_998 (230) = happyGoto action_113
action_998 (231) = happyGoto action_114
action_998 _ = happyFail
action_999 (234) = happyShift action_39
action_999 (236) = happyShift action_41
action_999 (237) = happyShift action_42
action_999 (238) = happyShift action_43
action_999 (239) = happyShift action_44
action_999 (255) = happyShift action_115
action_999 (257) = happyShift action_116
action_999 (265) = happyShift action_117
action_999 (313) = happyShift action_76
action_999 (314) = happyShift action_118
action_999 (315) = happyShift action_119
action_999 (316) = happyShift action_120
action_999 (318) = happyShift action_80
action_999 (319) = happyShift action_81
action_999 (320) = happyShift action_82
action_999 (321) = happyShift action_83
action_999 (322) = happyShift action_84
action_999 (323) = happyShift action_85
action_999 (325) = happyShift action_86
action_999 (337) = happyShift action_91
action_999 (356) = happyShift action_97
action_999 (77) = happyGoto action_1037
action_999 (78) = happyGoto action_1038
action_999 (80) = happyGoto action_1039
action_999 (82) = happyGoto action_189
action_999 (84) = happyGoto action_104
action_999 (85) = happyGoto action_105
action_999 (86) = happyGoto action_106
action_999 (199) = happyGoto action_110
action_999 (212) = happyGoto action_111
action_999 (214) = happyGoto action_35
action_999 (215) = happyGoto action_112
action_999 (216) = happyGoto action_37
action_999 (230) = happyGoto action_113
action_999 (231) = happyGoto action_114
action_999 _ = happyFail
action_1000 (234) = happyReduce_226
action_1000 (313) = happyReduce_226
action_1000 (314) = happyReduce_226
action_1000 (315) = happyReduce_226
action_1000 (316) = happyReduce_226
action_1000 (318) = happyReduce_226
action_1000 (319) = happyReduce_226
action_1000 (320) = happyReduce_226
action_1000 (321) = happyReduce_226
action_1000 (322) = happyReduce_226
action_1000 (323) = happyReduce_226
action_1000 (325) = happyReduce_226
action_1000 (337) = happyReduce_226
action_1000 (356) = happyReduce_226
action_1000 _ = happyReduce_228
action_1001 (274) = happyShift action_1036
action_1001 _ = happyFail
action_1002 (234) = happyShift action_39
action_1002 (236) = happyShift action_41
action_1002 (237) = happyShift action_42
action_1002 (238) = happyShift action_43
action_1002 (239) = happyShift action_44
action_1002 (255) = happyShift action_115
action_1002 (257) = happyShift action_116
action_1002 (265) = happyShift action_117
action_1002 (313) = happyShift action_76
action_1002 (314) = happyShift action_118
action_1002 (315) = happyShift action_119
action_1002 (316) = happyShift action_120
action_1002 (318) = happyShift action_80
action_1002 (319) = happyShift action_81
action_1002 (320) = happyShift action_82
action_1002 (321) = happyShift action_83
action_1002 (322) = happyShift action_84
action_1002 (323) = happyShift action_85
action_1002 (325) = happyShift action_86
action_1002 (335) = happyShift action_121
action_1002 (337) = happyShift action_91
action_1002 (356) = happyShift action_97
action_1002 (78) = happyGoto action_101
action_1002 (80) = happyGoto action_102
action_1002 (82) = happyGoto action_103
action_1002 (84) = happyGoto action_104
action_1002 (85) = happyGoto action_105
action_1002 (86) = happyGoto action_106
action_1002 (88) = happyGoto action_1035
action_1002 (89) = happyGoto action_108
action_1002 (90) = happyGoto action_109
action_1002 (199) = happyGoto action_110
action_1002 (212) = happyGoto action_111
action_1002 (214) = happyGoto action_35
action_1002 (215) = happyGoto action_112
action_1002 (216) = happyGoto action_37
action_1002 (230) = happyGoto action_113
action_1002 (231) = happyGoto action_114
action_1002 _ = happyFail
action_1003 (234) = happyShift action_39
action_1003 (235) = happyShift action_40
action_1003 (236) = happyShift action_41
action_1003 (237) = happyShift action_42
action_1003 (238) = happyShift action_43
action_1003 (239) = happyShift action_44
action_1003 (245) = happyShift action_45
action_1003 (246) = happyShift action_46
action_1003 (247) = happyShift action_47
action_1003 (248) = happyShift action_48
action_1003 (249) = happyShift action_49
action_1003 (250) = happyShift action_50
action_1003 (251) = happyShift action_51
action_1003 (252) = happyShift action_52
action_1003 (253) = happyShift action_53
action_1003 (254) = happyShift action_54
action_1003 (255) = happyShift action_55
action_1003 (257) = happyShift action_56
action_1003 (265) = happyShift action_57
action_1003 (268) = happyShift action_58
action_1003 (280) = happyShift action_60
action_1003 (282) = happyShift action_61
action_1003 (283) = happyShift action_132
action_1003 (289) = happyShift action_63
action_1003 (292) = happyShift action_64
action_1003 (293) = happyShift action_65
action_1003 (294) = happyShift action_66
action_1003 (295) = happyShift action_67
action_1003 (296) = happyShift action_68
action_1003 (297) = happyShift action_69
action_1003 (299) = happyShift action_70
action_1003 (300) = happyShift action_71
action_1003 (301) = happyShift action_72
action_1003 (303) = happyShift action_73
action_1003 (305) = happyShift action_74
action_1003 (306) = happyShift action_75
action_1003 (313) = happyShift action_76
action_1003 (314) = happyShift action_77
action_1003 (315) = happyShift action_78
action_1003 (316) = happyShift action_79
action_1003 (318) = happyShift action_80
action_1003 (319) = happyShift action_81
action_1003 (320) = happyShift action_82
action_1003 (321) = happyShift action_83
action_1003 (322) = happyShift action_84
action_1003 (323) = happyShift action_85
action_1003 (325) = happyShift action_86
action_1003 (327) = happyShift action_87
action_1003 (329) = happyShift action_900
action_1003 (332) = happyShift action_88
action_1003 (334) = happyShift action_89
action_1003 (335) = happyShift action_90
action_1003 (337) = happyShift action_91
action_1003 (346) = happyShift action_94
action_1003 (348) = happyShift action_143
action_1003 (353) = happyShift action_901
action_1003 (356) = happyShift action_97
action_1003 (357) = happyShift action_145
action_1003 (358) = happyShift action_146
action_1003 (359) = happyShift action_147
action_1003 (360) = happyShift action_148
action_1003 (51) = happyGoto action_893
action_1003 (58) = happyGoto action_894
action_1003 (131) = happyGoto action_1034
action_1003 (132) = happyGoto action_897
action_1003 (133) = happyGoto action_898
action_1003 (143) = happyGoto action_899
action_1003 (147) = happyGoto action_19
action_1003 (149) = happyGoto action_21
action_1003 (152) = happyGoto action_22
action_1003 (153) = happyGoto action_23
action_1003 (154) = happyGoto action_24
action_1003 (161) = happyGoto action_25
action_1003 (195) = happyGoto action_28
action_1003 (198) = happyGoto action_29
action_1003 (199) = happyGoto action_30
action_1003 (201) = happyGoto action_31
action_1003 (211) = happyGoto action_32
action_1003 (212) = happyGoto action_33
action_1003 (213) = happyGoto action_34
action_1003 (214) = happyGoto action_35
action_1003 (215) = happyGoto action_36
action_1003 (216) = happyGoto action_37
action_1003 (224) = happyGoto action_38
action_1003 _ = happyReduce_37
action_1004 (261) = happyShift action_621
action_1004 _ = happyReduce_298
action_1005 (273) = happyShift action_514
action_1005 (274) = happyShift action_515
action_1005 (104) = happyGoto action_1032
action_1005 (122) = happyGoto action_1033
action_1005 _ = happyReduce_281
action_1006 _ = happyReduce_135
action_1007 (234) = happyShift action_39
action_1007 (236) = happyShift action_41
action_1007 (237) = happyShift action_42
action_1007 (238) = happyShift action_43
action_1007 (239) = happyShift action_44
action_1007 (255) = happyShift action_115
action_1007 (257) = happyShift action_116
action_1007 (265) = happyShift action_117
action_1007 (313) = happyShift action_76
action_1007 (314) = happyShift action_118
action_1007 (315) = happyShift action_119
action_1007 (316) = happyShift action_120
action_1007 (318) = happyShift action_80
action_1007 (319) = happyShift action_81
action_1007 (320) = happyShift action_82
action_1007 (321) = happyShift action_83
action_1007 (322) = happyShift action_84
action_1007 (323) = happyShift action_85
action_1007 (325) = happyShift action_86
action_1007 (335) = happyShift action_121
action_1007 (337) = happyShift action_91
action_1007 (356) = happyShift action_97
action_1007 (78) = happyGoto action_101
action_1007 (80) = happyGoto action_102
action_1007 (82) = happyGoto action_103
action_1007 (84) = happyGoto action_104
action_1007 (85) = happyGoto action_105
action_1007 (86) = happyGoto action_106
action_1007 (88) = happyGoto action_1031
action_1007 (89) = happyGoto action_108
action_1007 (90) = happyGoto action_109
action_1007 (199) = happyGoto action_110
action_1007 (212) = happyGoto action_111
action_1007 (214) = happyGoto action_35
action_1007 (215) = happyGoto action_112
action_1007 (216) = happyGoto action_37
action_1007 (230) = happyGoto action_113
action_1007 (231) = happyGoto action_114
action_1007 _ = happyFail
action_1008 _ = happyReduce_160
action_1009 _ = happyReduce_52
action_1010 (234) = happyShift action_39
action_1010 (238) = happyShift action_43
action_1010 (255) = happyShift action_171
action_1010 (256) = happyShift action_1029
action_1010 (271) = happyShift action_1030
action_1010 (313) = happyShift action_76
action_1010 (314) = happyShift action_77
action_1010 (315) = happyShift action_78
action_1010 (316) = happyShift action_79
action_1010 (318) = happyShift action_80
action_1010 (319) = happyShift action_81
action_1010 (320) = happyShift action_82
action_1010 (321) = happyShift action_83
action_1010 (322) = happyShift action_84
action_1010 (323) = happyShift action_85
action_1010 (325) = happyShift action_86
action_1010 (334) = happyShift action_89
action_1010 (335) = happyShift action_90
action_1010 (337) = happyShift action_91
action_1010 (356) = happyShift action_97
action_1010 (42) = happyGoto action_1025
action_1010 (43) = happyGoto action_1026
action_1010 (196) = happyGoto action_1027
action_1010 (200) = happyGoto action_1028
action_1010 (212) = happyGoto action_33
action_1010 (213) = happyGoto action_169
action_1010 (216) = happyGoto action_170
action_1010 _ = happyFail
action_1011 (256) = happyShift action_1024
action_1011 _ = happyFail
action_1012 (234) = happyShift action_39
action_1012 (235) = happyShift action_40
action_1012 (238) = happyShift action_43
action_1012 (239) = happyShift action_44
action_1012 (255) = happyShift action_330
action_1012 (313) = happyShift action_76
action_1012 (314) = happyShift action_77
action_1012 (315) = happyShift action_78
action_1012 (316) = happyShift action_79
action_1012 (318) = happyShift action_80
action_1012 (319) = happyShift action_81
action_1012 (320) = happyShift action_82
action_1012 (321) = happyShift action_83
action_1012 (322) = happyShift action_84
action_1012 (323) = happyShift action_85
action_1012 (325) = happyShift action_86
action_1012 (334) = happyShift action_89
action_1012 (335) = happyShift action_90
action_1012 (337) = happyShift action_91
action_1012 (347) = happyShift action_876
action_1012 (356) = happyShift action_97
action_1012 (30) = happyGoto action_1023
action_1012 (198) = happyGoto action_872
action_1012 (201) = happyGoto action_873
action_1012 (211) = happyGoto action_32
action_1012 (212) = happyGoto action_33
action_1012 (213) = happyGoto action_34
action_1012 (215) = happyGoto action_36
action_1012 (216) = happyGoto action_37
action_1012 (229) = happyGoto action_874
action_1012 _ = happyReduce_43
action_1013 _ = happyReduce_42
action_1014 (302) = happyShift action_467
action_1014 (303) = happyShift action_73
action_1014 (304) = happyShift action_1022
action_1014 (305) = happyShift action_74
action_1014 (306) = happyShift action_75
action_1014 (310) = happyShift action_468
action_1014 (161) = happyGoto action_464
action_1014 (163) = happyGoto action_465
action_1014 _ = happyFail
action_1015 _ = happyReduce_53
action_1016 _ = happyReduce_32
action_1017 _ = happyReduce_56
action_1018 (248) = happyShift action_1021
action_1018 (35) = happyGoto action_1020
action_1018 _ = happyReduce_61
action_1019 _ = happyReduce_58
action_1020 (238) = happyShift action_577
action_1020 (239) = happyShift action_578
action_1020 (227) = happyGoto action_1086
action_1020 _ = happyFail
action_1021 _ = happyReduce_60
action_1022 (234) = happyShift action_277
action_1022 (238) = happyShift action_278
action_1022 (240) = happyShift action_279
action_1022 (312) = happyShift action_280
action_1022 (313) = happyShift action_281
action_1022 (314) = happyShift action_282
action_1022 (315) = happyShift action_283
action_1022 (316) = happyShift action_284
action_1022 (318) = happyShift action_285
action_1022 (319) = happyShift action_286
action_1022 (320) = happyShift action_287
action_1022 (321) = happyShift action_288
action_1022 (322) = happyShift action_289
action_1022 (323) = happyShift action_290
action_1022 (325) = happyShift action_291
action_1022 (326) = happyShift action_292
action_1022 (327) = happyShift action_293
action_1022 (328) = happyShift action_294
action_1022 (329) = happyShift action_295
action_1022 (330) = happyShift action_296
action_1022 (331) = happyShift action_297
action_1022 (332) = happyShift action_298
action_1022 (333) = happyShift action_299
action_1022 (334) = happyShift action_300
action_1022 (335) = happyShift action_301
action_1022 (336) = happyShift action_302
action_1022 (337) = happyShift action_303
action_1022 (338) = happyShift action_304
action_1022 (339) = happyShift action_305
action_1022 (340) = happyShift action_306
action_1022 (341) = happyShift action_307
action_1022 (342) = happyShift action_308
action_1022 (343) = happyShift action_309
action_1022 (344) = happyShift action_310
action_1022 (345) = happyShift action_311
action_1022 (346) = happyShift action_312
action_1022 (347) = happyShift action_313
action_1022 (348) = happyShift action_314
action_1022 (349) = happyShift action_315
action_1022 (350) = happyShift action_316
action_1022 (351) = happyShift action_317
action_1022 (352) = happyShift action_318
action_1022 (353) = happyShift action_319
action_1022 (354) = happyShift action_320
action_1022 (355) = happyShift action_321
action_1022 (356) = happyShift action_322
action_1022 (164) = happyGoto action_1085
action_1022 (165) = happyGoto action_275
action_1022 (166) = happyGoto action_276
action_1022 _ = happyFail
action_1023 _ = happyReduce_45
action_1024 _ = happyReduce_41
action_1025 (256) = happyShift action_1083
action_1025 (267) = happyShift action_1084
action_1025 _ = happyFail
action_1026 _ = happyReduce_78
action_1027 _ = happyReduce_79
action_1028 _ = happyReduce_80
action_1029 _ = happyReduce_50
action_1030 (256) = happyShift action_1082
action_1030 _ = happyFail
action_1031 (256) = happyShift action_1081
action_1031 _ = happyFail
action_1032 (331) = happyShift action_667
action_1032 (116) = happyGoto action_1080
action_1032 _ = happyReduce_269
action_1033 (355) = happyShift action_665
action_1033 (100) = happyGoto action_1079
action_1033 _ = happyReduce_236
action_1034 _ = happyReduce_300
action_1035 _ = happyReduce_312
action_1036 (234) = happyShift action_39
action_1036 (236) = happyShift action_41
action_1036 (237) = happyShift action_42
action_1036 (238) = happyShift action_43
action_1036 (239) = happyShift action_44
action_1036 (255) = happyShift action_115
action_1036 (257) = happyShift action_116
action_1036 (265) = happyShift action_117
action_1036 (313) = happyShift action_76
action_1036 (314) = happyShift action_118
action_1036 (315) = happyShift action_119
action_1036 (316) = happyShift action_120
action_1036 (318) = happyShift action_80
action_1036 (319) = happyShift action_81
action_1036 (320) = happyShift action_82
action_1036 (321) = happyShift action_83
action_1036 (322) = happyShift action_84
action_1036 (323) = happyShift action_85
action_1036 (325) = happyShift action_86
action_1036 (335) = happyShift action_121
action_1036 (337) = happyShift action_91
action_1036 (356) = happyShift action_97
action_1036 (78) = happyGoto action_101
action_1036 (80) = happyGoto action_102
action_1036 (82) = happyGoto action_103
action_1036 (84) = happyGoto action_104
action_1036 (85) = happyGoto action_105
action_1036 (86) = happyGoto action_106
action_1036 (88) = happyGoto action_1078
action_1036 (89) = happyGoto action_108
action_1036 (90) = happyGoto action_109
action_1036 (199) = happyGoto action_110
action_1036 (212) = happyGoto action_111
action_1036 (214) = happyGoto action_35
action_1036 (215) = happyGoto action_112
action_1036 (216) = happyGoto action_37
action_1036 (230) = happyGoto action_113
action_1036 (231) = happyGoto action_114
action_1036 _ = happyFail
action_1037 (274) = happyShift action_1077
action_1037 _ = happyFail
action_1038 (274) = happyReduce_182
action_1038 _ = happyReduce_190
action_1039 (273) = happyShift action_514
action_1039 (122) = happyGoto action_1076
action_1039 _ = happyReduce_281
action_1040 (273) = happyShift action_514
action_1040 (122) = happyGoto action_1075
action_1040 _ = happyReduce_281
action_1041 (234) = happyShift action_39
action_1041 (235) = happyShift action_40
action_1041 (236) = happyShift action_41
action_1041 (237) = happyShift action_42
action_1041 (238) = happyShift action_43
action_1041 (239) = happyShift action_44
action_1041 (245) = happyShift action_45
action_1041 (246) = happyShift action_46
action_1041 (247) = happyShift action_47
action_1041 (248) = happyShift action_48
action_1041 (249) = happyShift action_49
action_1041 (250) = happyShift action_50
action_1041 (251) = happyShift action_51
action_1041 (252) = happyShift action_52
action_1041 (253) = happyShift action_53
action_1041 (254) = happyShift action_54
action_1041 (255) = happyShift action_55
action_1041 (257) = happyShift action_56
action_1041 (265) = happyShift action_57
action_1041 (268) = happyShift action_58
action_1041 (280) = happyShift action_60
action_1041 (282) = happyShift action_61
action_1041 (283) = happyShift action_132
action_1041 (289) = happyShift action_63
action_1041 (292) = happyShift action_64
action_1041 (293) = happyShift action_65
action_1041 (294) = happyShift action_66
action_1041 (295) = happyShift action_67
action_1041 (296) = happyShift action_68
action_1041 (297) = happyShift action_69
action_1041 (299) = happyShift action_70
action_1041 (300) = happyShift action_71
action_1041 (301) = happyShift action_72
action_1041 (303) = happyShift action_73
action_1041 (305) = happyShift action_74
action_1041 (306) = happyShift action_75
action_1041 (313) = happyShift action_76
action_1041 (314) = happyShift action_77
action_1041 (315) = happyShift action_78
action_1041 (316) = happyShift action_79
action_1041 (318) = happyShift action_80
action_1041 (319) = happyShift action_81
action_1041 (320) = happyShift action_82
action_1041 (321) = happyShift action_83
action_1041 (322) = happyShift action_84
action_1041 (323) = happyShift action_85
action_1041 (325) = happyShift action_86
action_1041 (327) = happyShift action_87
action_1041 (329) = happyShift action_998
action_1041 (332) = happyShift action_88
action_1041 (334) = happyShift action_89
action_1041 (335) = happyShift action_90
action_1041 (337) = happyShift action_91
action_1041 (341) = happyShift action_138
action_1041 (342) = happyShift action_139
action_1041 (343) = happyShift action_140
action_1041 (346) = happyShift action_94
action_1041 (353) = happyShift action_999
action_1041 (356) = happyShift action_97
action_1041 (357) = happyShift action_145
action_1041 (358) = happyShift action_146
action_1041 (359) = happyShift action_147
action_1041 (360) = happyShift action_148
action_1041 (44) = happyGoto action_122
action_1041 (46) = happyGoto action_123
action_1041 (55) = happyGoto action_994
action_1041 (57) = happyGoto action_127
action_1041 (58) = happyGoto action_128
action_1041 (126) = happyGoto action_1074
action_1041 (127) = happyGoto action_997
action_1041 (133) = happyGoto action_129
action_1041 (143) = happyGoto action_617
action_1041 (147) = happyGoto action_19
action_1041 (149) = happyGoto action_21
action_1041 (152) = happyGoto action_22
action_1041 (153) = happyGoto action_23
action_1041 (154) = happyGoto action_24
action_1041 (161) = happyGoto action_25
action_1041 (195) = happyGoto action_28
action_1041 (198) = happyGoto action_29
action_1041 (199) = happyGoto action_30
action_1041 (201) = happyGoto action_31
action_1041 (211) = happyGoto action_32
action_1041 (212) = happyGoto action_33
action_1041 (213) = happyGoto action_34
action_1041 (214) = happyGoto action_35
action_1041 (215) = happyGoto action_36
action_1041 (216) = happyGoto action_37
action_1041 (224) = happyGoto action_38
action_1041 _ = happyReduce_37
action_1042 (261) = happyShift action_621
action_1042 _ = happyReduce_286
action_1043 _ = happyReduce_262
action_1044 _ = happyReduce_251
action_1045 (234) = happyShift action_39
action_1045 (235) = happyShift action_40
action_1045 (255) = happyShift action_415
action_1045 (313) = happyShift action_76
action_1045 (314) = happyShift action_77
action_1045 (315) = happyShift action_78
action_1045 (316) = happyShift action_79
action_1045 (318) = happyShift action_80
action_1045 (319) = happyShift action_81
action_1045 (320) = happyShift action_82
action_1045 (321) = happyShift action_83
action_1045 (322) = happyShift action_84
action_1045 (323) = happyShift action_85
action_1045 (325) = happyShift action_86
action_1045 (334) = happyShift action_89
action_1045 (335) = happyShift action_90
action_1045 (337) = happyShift action_91
action_1045 (356) = happyShift action_97
action_1045 (62) = happyGoto action_985
action_1045 (114) = happyGoto action_1073
action_1045 (198) = happyGoto action_519
action_1045 (211) = happyGoto action_32
action_1045 (212) = happyGoto action_33
action_1045 (213) = happyGoto action_34
action_1045 _ = happyFail
action_1046 (234) = happyShift action_39
action_1046 (236) = happyShift action_41
action_1046 (237) = happyShift action_42
action_1046 (238) = happyShift action_43
action_1046 (239) = happyShift action_44
action_1046 (255) = happyShift action_115
action_1046 (257) = happyShift action_116
action_1046 (265) = happyShift action_117
action_1046 (283) = happyShift action_1071
action_1046 (313) = happyShift action_76
action_1046 (314) = happyShift action_118
action_1046 (315) = happyShift action_119
action_1046 (316) = happyShift action_120
action_1046 (318) = happyShift action_80
action_1046 (319) = happyShift action_81
action_1046 (320) = happyShift action_82
action_1046 (321) = happyShift action_83
action_1046 (322) = happyShift action_84
action_1046 (323) = happyShift action_85
action_1046 (325) = happyShift action_86
action_1046 (335) = happyShift action_121
action_1046 (337) = happyShift action_91
action_1046 (356) = happyShift action_97
action_1046 (368) = happyShift action_1072
action_1046 (78) = happyGoto action_101
action_1046 (80) = happyGoto action_102
action_1046 (82) = happyGoto action_103
action_1046 (84) = happyGoto action_104
action_1046 (85) = happyGoto action_105
action_1046 (86) = happyGoto action_106
action_1046 (88) = happyGoto action_1069
action_1046 (89) = happyGoto action_108
action_1046 (90) = happyGoto action_109
action_1046 (115) = happyGoto action_1070
action_1046 (199) = happyGoto action_110
action_1046 (212) = happyGoto action_111
action_1046 (214) = happyGoto action_35
action_1046 (215) = happyGoto action_112
action_1046 (216) = happyGoto action_37
action_1046 (230) = happyGoto action_113
action_1046 (231) = happyGoto action_114
action_1046 _ = happyFail
action_1047 (234) = happyShift action_39
action_1047 (238) = happyShift action_43
action_1047 (239) = happyShift action_44
action_1047 (255) = happyShift action_115
action_1047 (257) = happyShift action_116
action_1047 (265) = happyShift action_117
action_1047 (313) = happyShift action_76
action_1047 (314) = happyShift action_118
action_1047 (315) = happyShift action_119
action_1047 (316) = happyShift action_120
action_1047 (318) = happyShift action_80
action_1047 (319) = happyShift action_81
action_1047 (320) = happyShift action_82
action_1047 (321) = happyShift action_83
action_1047 (322) = happyShift action_84
action_1047 (323) = happyShift action_85
action_1047 (325) = happyShift action_86
action_1047 (337) = happyShift action_91
action_1047 (356) = happyShift action_97
action_1047 (83) = happyGoto action_1068
action_1047 (84) = happyGoto action_916
action_1047 (85) = happyGoto action_105
action_1047 (86) = happyGoto action_106
action_1047 (212) = happyGoto action_111
action_1047 (215) = happyGoto action_112
action_1047 (216) = happyGoto action_37
action_1047 (230) = happyGoto action_113
action_1047 (231) = happyGoto action_114
action_1047 _ = happyFail
action_1048 (234) = happyShift action_39
action_1048 (238) = happyShift action_43
action_1048 (239) = happyShift action_44
action_1048 (255) = happyShift action_115
action_1048 (257) = happyShift action_116
action_1048 (265) = happyShift action_117
action_1048 (313) = happyShift action_76
action_1048 (314) = happyShift action_118
action_1048 (315) = happyShift action_119
action_1048 (316) = happyShift action_120
action_1048 (318) = happyShift action_80
action_1048 (319) = happyShift action_81
action_1048 (320) = happyShift action_82
action_1048 (321) = happyShift action_83
action_1048 (322) = happyShift action_84
action_1048 (323) = happyShift action_85
action_1048 (325) = happyShift action_86
action_1048 (337) = happyShift action_91
action_1048 (356) = happyShift action_97
action_1048 (83) = happyGoto action_1067
action_1048 (84) = happyGoto action_916
action_1048 (85) = happyGoto action_105
action_1048 (86) = happyGoto action_106
action_1048 (212) = happyGoto action_111
action_1048 (215) = happyGoto action_112
action_1048 (216) = happyGoto action_37
action_1048 (230) = happyGoto action_113
action_1048 (231) = happyGoto action_114
action_1048 _ = happyFail
action_1049 (234) = happyShift action_39
action_1049 (236) = happyShift action_41
action_1049 (237) = happyShift action_42
action_1049 (238) = happyShift action_43
action_1049 (239) = happyShift action_44
action_1049 (255) = happyShift action_115
action_1049 (257) = happyShift action_116
action_1049 (265) = happyShift action_117
action_1049 (313) = happyShift action_76
action_1049 (314) = happyShift action_118
action_1049 (315) = happyShift action_119
action_1049 (316) = happyShift action_120
action_1049 (318) = happyShift action_80
action_1049 (319) = happyShift action_81
action_1049 (320) = happyShift action_82
action_1049 (321) = happyShift action_83
action_1049 (322) = happyShift action_84
action_1049 (323) = happyShift action_85
action_1049 (325) = happyShift action_86
action_1049 (335) = happyShift action_121
action_1049 (337) = happyShift action_91
action_1049 (356) = happyShift action_97
action_1049 (78) = happyGoto action_101
action_1049 (80) = happyGoto action_102
action_1049 (82) = happyGoto action_103
action_1049 (84) = happyGoto action_104
action_1049 (85) = happyGoto action_105
action_1049 (86) = happyGoto action_106
action_1049 (88) = happyGoto action_1066
action_1049 (89) = happyGoto action_108
action_1049 (90) = happyGoto action_109
action_1049 (199) = happyGoto action_110
action_1049 (212) = happyGoto action_111
action_1049 (214) = happyGoto action_35
action_1049 (215) = happyGoto action_112
action_1049 (216) = happyGoto action_37
action_1049 (230) = happyGoto action_113
action_1049 (231) = happyGoto action_114
action_1049 _ = happyFail
action_1050 (238) = happyShift action_43
action_1050 (239) = happyShift action_44
action_1050 (255) = happyShift action_977
action_1050 (103) = happyGoto action_1065
action_1050 (201) = happyGoto action_976
action_1050 (215) = happyGoto action_36
action_1050 (216) = happyGoto action_37
action_1050 _ = happyReduce_37
action_1051 (261) = happyShift action_621
action_1051 _ = happyReduce_237
action_1052 (245) = happyShift action_1064
action_1052 _ = happyFail
action_1053 _ = happyReduce_335
action_1054 _ = happyReduce_499
action_1055 _ = happyReduce_502
action_1056 (267) = happyShift action_770
action_1056 (278) = happyShift action_1063
action_1056 _ = happyFail
action_1057 _ = happyReduce_504
action_1058 _ = happyReduce_501
action_1059 (234) = happyShift action_277
action_1059 (238) = happyShift action_278
action_1059 (240) = happyShift action_279
action_1059 (312) = happyShift action_280
action_1059 (313) = happyShift action_281
action_1059 (314) = happyShift action_282
action_1059 (315) = happyShift action_283
action_1059 (316) = happyShift action_284
action_1059 (318) = happyShift action_285
action_1059 (319) = happyShift action_286
action_1059 (320) = happyShift action_287
action_1059 (321) = happyShift action_288
action_1059 (322) = happyShift action_289
action_1059 (323) = happyShift action_290
action_1059 (325) = happyShift action_291
action_1059 (326) = happyShift action_292
action_1059 (327) = happyShift action_293
action_1059 (328) = happyShift action_294
action_1059 (329) = happyShift action_295
action_1059 (330) = happyShift action_296
action_1059 (331) = happyShift action_297
action_1059 (332) = happyShift action_298
action_1059 (333) = happyShift action_299
action_1059 (334) = happyShift action_300
action_1059 (335) = happyShift action_301
action_1059 (336) = happyShift action_302
action_1059 (337) = happyShift action_303
action_1059 (338) = happyShift action_304
action_1059 (339) = happyShift action_305
action_1059 (340) = happyShift action_306
action_1059 (341) = happyShift action_307
action_1059 (342) = happyShift action_308
action_1059 (343) = happyShift action_309
action_1059 (344) = happyShift action_310
action_1059 (345) = happyShift action_311
action_1059 (346) = happyShift action_312
action_1059 (347) = happyShift action_313
action_1059 (348) = happyShift action_314
action_1059 (349) = happyShift action_315
action_1059 (350) = happyShift action_316
action_1059 (351) = happyShift action_317
action_1059 (352) = happyShift action_318
action_1059 (353) = happyShift action_319
action_1059 (354) = happyShift action_320
action_1059 (355) = happyShift action_321
action_1059 (356) = happyShift action_322
action_1059 (164) = happyGoto action_1062
action_1059 (165) = happyGoto action_275
action_1059 (166) = happyGoto action_276
action_1059 _ = happyFail
action_1060 (234) = happyShift action_39
action_1060 (235) = happyShift action_40
action_1060 (236) = happyShift action_41
action_1060 (237) = happyShift action_42
action_1060 (238) = happyShift action_43
action_1060 (239) = happyShift action_44
action_1060 (245) = happyShift action_45
action_1060 (246) = happyShift action_46
action_1060 (247) = happyShift action_47
action_1060 (248) = happyShift action_48
action_1060 (249) = happyShift action_49
action_1060 (250) = happyShift action_50
action_1060 (251) = happyShift action_51
action_1060 (252) = happyShift action_52
action_1060 (253) = happyShift action_53
action_1060 (254) = happyShift action_54
action_1060 (255) = happyShift action_55
action_1060 (257) = happyShift action_56
action_1060 (265) = happyShift action_57
action_1060 (268) = happyShift action_58
action_1060 (275) = happyShift action_59
action_1060 (280) = happyShift action_60
action_1060 (282) = happyShift action_61
action_1060 (289) = happyShift action_63
action_1060 (292) = happyShift action_64
action_1060 (293) = happyShift action_65
action_1060 (294) = happyShift action_66
action_1060 (295) = happyShift action_67
action_1060 (296) = happyShift action_68
action_1060 (297) = happyShift action_69
action_1060 (299) = happyShift action_70
action_1060 (300) = happyShift action_71
action_1060 (301) = happyShift action_72
action_1060 (303) = happyShift action_73
action_1060 (305) = happyShift action_74
action_1060 (306) = happyShift action_75
action_1060 (313) = happyShift action_76
action_1060 (314) = happyShift action_77
action_1060 (315) = happyShift action_78
action_1060 (316) = happyShift action_79
action_1060 (318) = happyShift action_80
action_1060 (319) = happyShift action_81
action_1060 (320) = happyShift action_82
action_1060 (321) = happyShift action_83
action_1060 (322) = happyShift action_84
action_1060 (323) = happyShift action_85
action_1060 (325) = happyShift action_86
action_1060 (327) = happyShift action_87
action_1060 (332) = happyShift action_88
action_1060 (334) = happyShift action_89
action_1060 (335) = happyShift action_90
action_1060 (337) = happyShift action_91
action_1060 (338) = happyShift action_92
action_1060 (345) = happyShift action_142
action_1060 (346) = happyShift action_94
action_1060 (350) = happyShift action_95
action_1060 (356) = happyShift action_97
action_1060 (363) = happyShift action_98
action_1060 (364) = happyShift action_99
action_1060 (365) = happyShift action_100
action_1060 (139) = happyGoto action_1061
action_1060 (140) = happyGoto action_156
action_1060 (141) = happyGoto action_15
action_1060 (142) = happyGoto action_16
action_1060 (143) = happyGoto action_17
action_1060 (144) = happyGoto action_18
action_1060 (147) = happyGoto action_19
action_1060 (148) = happyGoto action_20
action_1060 (149) = happyGoto action_21
action_1060 (152) = happyGoto action_22
action_1060 (153) = happyGoto action_23
action_1060 (154) = happyGoto action_24
action_1060 (161) = happyGoto action_25
action_1060 (195) = happyGoto action_28
action_1060 (198) = happyGoto action_29
action_1060 (199) = happyGoto action_30
action_1060 (201) = happyGoto action_31
action_1060 (211) = happyGoto action_32
action_1060 (212) = happyGoto action_33
action_1060 (213) = happyGoto action_34
action_1060 (214) = happyGoto action_35
action_1060 (215) = happyGoto action_36
action_1060 (216) = happyGoto action_37
action_1060 (224) = happyGoto action_38
action_1060 _ = happyFail
action_1061 _ = happyReduce_490
action_1062 (307) = happyShift action_1097
action_1062 _ = happyFail
action_1063 (234) = happyShift action_39
action_1063 (235) = happyShift action_40
action_1063 (236) = happyShift action_41
action_1063 (237) = happyShift action_42
action_1063 (238) = happyShift action_43
action_1063 (239) = happyShift action_44
action_1063 (245) = happyShift action_45
action_1063 (246) = happyShift action_46
action_1063 (247) = happyShift action_47
action_1063 (248) = happyShift action_48
action_1063 (249) = happyShift action_49
action_1063 (250) = happyShift action_50
action_1063 (251) = happyShift action_51
action_1063 (252) = happyShift action_52
action_1063 (253) = happyShift action_53
action_1063 (254) = happyShift action_54
action_1063 (255) = happyShift action_55
action_1063 (257) = happyShift action_56
action_1063 (265) = happyShift action_57
action_1063 (268) = happyShift action_58
action_1063 (275) = happyShift action_59
action_1063 (280) = happyShift action_60
action_1063 (282) = happyShift action_61
action_1063 (289) = happyShift action_63
action_1063 (292) = happyShift action_64
action_1063 (293) = happyShift action_65
action_1063 (294) = happyShift action_66
action_1063 (295) = happyShift action_67
action_1063 (296) = happyShift action_68
action_1063 (297) = happyShift action_69
action_1063 (299) = happyShift action_70
action_1063 (300) = happyShift action_71
action_1063 (301) = happyShift action_72
action_1063 (303) = happyShift action_73
action_1063 (305) = happyShift action_74
action_1063 (306) = happyShift action_75
action_1063 (313) = happyShift action_76
action_1063 (314) = happyShift action_77
action_1063 (315) = happyShift action_78
action_1063 (316) = happyShift action_79
action_1063 (318) = happyShift action_80
action_1063 (319) = happyShift action_81
action_1063 (320) = happyShift action_82
action_1063 (321) = happyShift action_83
action_1063 (322) = happyShift action_84
action_1063 (323) = happyShift action_85
action_1063 (325) = happyShift action_86
action_1063 (327) = happyShift action_87
action_1063 (332) = happyShift action_88
action_1063 (334) = happyShift action_89
action_1063 (335) = happyShift action_90
action_1063 (337) = happyShift action_91
action_1063 (338) = happyShift action_92
action_1063 (345) = happyShift action_142
action_1063 (346) = happyShift action_94
action_1063 (350) = happyShift action_95
action_1063 (356) = happyShift action_97
action_1063 (363) = happyShift action_98
action_1063 (364) = happyShift action_99
action_1063 (365) = happyShift action_100
action_1063 (139) = happyGoto action_1096
action_1063 (140) = happyGoto action_156
action_1063 (141) = happyGoto action_15
action_1063 (142) = happyGoto action_16
action_1063 (143) = happyGoto action_17
action_1063 (144) = happyGoto action_18
action_1063 (147) = happyGoto action_19
action_1063 (148) = happyGoto action_20
action_1063 (149) = happyGoto action_21
action_1063 (152) = happyGoto action_22
action_1063 (153) = happyGoto action_23
action_1063 (154) = happyGoto action_24
action_1063 (161) = happyGoto action_25
action_1063 (195) = happyGoto action_28
action_1063 (198) = happyGoto action_29
action_1063 (199) = happyGoto action_30
action_1063 (201) = happyGoto action_31
action_1063 (211) = happyGoto action_32
action_1063 (212) = happyGoto action_33
action_1063 (213) = happyGoto action_34
action_1063 (214) = happyGoto action_35
action_1063 (215) = happyGoto action_36
action_1063 (216) = happyGoto action_37
action_1063 (224) = happyGoto action_38
action_1063 _ = happyFail
action_1064 (372) = happyShift action_1095
action_1064 _ = happyFail
action_1065 _ = happyReduce_238
action_1066 _ = happyReduce_240
action_1067 _ = happyReduce_255
action_1068 _ = happyReduce_259
action_1069 _ = happyReduce_266
action_1070 _ = happyReduce_265
action_1071 (234) = happyShift action_39
action_1071 (238) = happyShift action_43
action_1071 (239) = happyShift action_44
action_1071 (255) = happyShift action_115
action_1071 (257) = happyShift action_116
action_1071 (265) = happyShift action_117
action_1071 (313) = happyShift action_76
action_1071 (314) = happyShift action_118
action_1071 (315) = happyShift action_119
action_1071 (316) = happyShift action_120
action_1071 (318) = happyShift action_80
action_1071 (319) = happyShift action_81
action_1071 (320) = happyShift action_82
action_1071 (321) = happyShift action_83
action_1071 (322) = happyShift action_84
action_1071 (323) = happyShift action_85
action_1071 (325) = happyShift action_86
action_1071 (337) = happyShift action_91
action_1071 (356) = happyShift action_97
action_1071 (83) = happyGoto action_1094
action_1071 (84) = happyGoto action_916
action_1071 (85) = happyGoto action_105
action_1071 (86) = happyGoto action_106
action_1071 (212) = happyGoto action_111
action_1071 (215) = happyGoto action_112
action_1071 (216) = happyGoto action_37
action_1071 (230) = happyGoto action_113
action_1071 (231) = happyGoto action_114
action_1071 _ = happyFail
action_1072 (372) = happyShift action_1093
action_1072 _ = happyFail
action_1073 _ = happyReduce_263
action_1074 _ = happyReduce_288
action_1075 _ = happyReduce_294
action_1076 _ = happyReduce_292
action_1077 (234) = happyShift action_39
action_1077 (236) = happyShift action_41
action_1077 (237) = happyShift action_42
action_1077 (238) = happyShift action_43
action_1077 (239) = happyShift action_44
action_1077 (255) = happyShift action_115
action_1077 (257) = happyShift action_116
action_1077 (265) = happyShift action_117
action_1077 (313) = happyShift action_76
action_1077 (314) = happyShift action_118
action_1077 (315) = happyShift action_119
action_1077 (316) = happyShift action_120
action_1077 (318) = happyShift action_80
action_1077 (319) = happyShift action_81
action_1077 (320) = happyShift action_82
action_1077 (321) = happyShift action_83
action_1077 (322) = happyShift action_84
action_1077 (323) = happyShift action_85
action_1077 (325) = happyShift action_86
action_1077 (335) = happyShift action_121
action_1077 (337) = happyShift action_91
action_1077 (356) = happyShift action_97
action_1077 (78) = happyGoto action_101
action_1077 (80) = happyGoto action_102
action_1077 (82) = happyGoto action_103
action_1077 (84) = happyGoto action_104
action_1077 (85) = happyGoto action_105
action_1077 (86) = happyGoto action_106
action_1077 (88) = happyGoto action_1092
action_1077 (89) = happyGoto action_108
action_1077 (90) = happyGoto action_109
action_1077 (199) = happyGoto action_110
action_1077 (212) = happyGoto action_111
action_1077 (214) = happyGoto action_35
action_1077 (215) = happyGoto action_112
action_1077 (216) = happyGoto action_37
action_1077 (230) = happyGoto action_113
action_1077 (231) = happyGoto action_114
action_1077 _ = happyFail
action_1078 _ = happyReduce_305
action_1079 (331) = happyShift action_667
action_1079 (116) = happyGoto action_1091
action_1079 _ = happyReduce_269
action_1080 _ = happyReduce_306
action_1081 _ = happyReduce_169
action_1082 _ = happyReduce_49
action_1083 _ = happyReduce_51
action_1084 (234) = happyShift action_39
action_1084 (238) = happyShift action_43
action_1084 (255) = happyShift action_171
action_1084 (313) = happyShift action_76
action_1084 (314) = happyShift action_77
action_1084 (315) = happyShift action_78
action_1084 (316) = happyShift action_79
action_1084 (318) = happyShift action_80
action_1084 (319) = happyShift action_81
action_1084 (320) = happyShift action_82
action_1084 (321) = happyShift action_83
action_1084 (322) = happyShift action_84
action_1084 (323) = happyShift action_85
action_1084 (325) = happyShift action_86
action_1084 (334) = happyShift action_89
action_1084 (335) = happyShift action_90
action_1084 (337) = happyShift action_91
action_1084 (356) = happyShift action_97
action_1084 (43) = happyGoto action_1090
action_1084 (196) = happyGoto action_1027
action_1084 (200) = happyGoto action_1028
action_1084 (212) = happyGoto action_33
action_1084 (213) = happyGoto action_169
action_1084 (216) = happyGoto action_170
action_1084 _ = happyFail
action_1085 (307) = happyShift action_1089
action_1085 _ = happyFail
action_1086 (325) = happyShift action_1088
action_1086 (36) = happyGoto action_1087
action_1086 _ = happyReduce_63
action_1087 (255) = happyReduce_69
action_1087 (337) = happyShift action_1104
action_1087 (37) = happyGoto action_1101
action_1087 (38) = happyGoto action_1102
action_1087 (39) = happyGoto action_1103
action_1087 _ = happyReduce_65
action_1088 (238) = happyShift action_577
action_1088 (239) = happyShift action_578
action_1088 (227) = happyGoto action_1100
action_1088 _ = happyFail
action_1089 _ = happyReduce_14
action_1090 _ = happyReduce_77
action_1091 _ = happyReduce_307
action_1092 _ = happyReduce_293
action_1093 (283) = happyShift action_1099
action_1093 _ = happyFail
action_1094 _ = happyReduce_267
action_1095 (234) = happyShift action_39
action_1095 (235) = happyShift action_40
action_1095 (236) = happyShift action_41
action_1095 (237) = happyShift action_42
action_1095 (238) = happyShift action_43
action_1095 (239) = happyShift action_44
action_1095 (245) = happyShift action_45
action_1095 (246) = happyShift action_46
action_1095 (247) = happyShift action_47
action_1095 (248) = happyShift action_48
action_1095 (249) = happyShift action_49
action_1095 (250) = happyShift action_50
action_1095 (251) = happyShift action_51
action_1095 (252) = happyShift action_52
action_1095 (253) = happyShift action_53
action_1095 (254) = happyShift action_54
action_1095 (255) = happyShift action_55
action_1095 (257) = happyShift action_56
action_1095 (265) = happyShift action_57
action_1095 (268) = happyShift action_58
action_1095 (275) = happyShift action_59
action_1095 (280) = happyShift action_60
action_1095 (282) = happyShift action_61
action_1095 (289) = happyShift action_63
action_1095 (292) = happyShift action_64
action_1095 (293) = happyShift action_65
action_1095 (294) = happyShift action_66
action_1095 (295) = happyShift action_67
action_1095 (296) = happyShift action_68
action_1095 (297) = happyShift action_69
action_1095 (299) = happyShift action_70
action_1095 (300) = happyShift action_71
action_1095 (301) = happyShift action_72
action_1095 (303) = happyShift action_73
action_1095 (305) = happyShift action_74
action_1095 (306) = happyShift action_75
action_1095 (313) = happyShift action_76
action_1095 (314) = happyShift action_77
action_1095 (315) = happyShift action_78
action_1095 (316) = happyShift action_79
action_1095 (318) = happyShift action_80
action_1095 (319) = happyShift action_81
action_1095 (320) = happyShift action_82
action_1095 (321) = happyShift action_83
action_1095 (322) = happyShift action_84
action_1095 (323) = happyShift action_85
action_1095 (325) = happyShift action_86
action_1095 (327) = happyShift action_87
action_1095 (332) = happyShift action_88
action_1095 (334) = happyShift action_89
action_1095 (335) = happyShift action_90
action_1095 (337) = happyShift action_91
action_1095 (338) = happyShift action_92
action_1095 (345) = happyShift action_142
action_1095 (346) = happyShift action_94
action_1095 (350) = happyShift action_95
action_1095 (356) = happyShift action_97
action_1095 (363) = happyShift action_98
action_1095 (364) = happyShift action_99
action_1095 (365) = happyShift action_100
action_1095 (140) = happyGoto action_1098
action_1095 (141) = happyGoto action_15
action_1095 (142) = happyGoto action_16
action_1095 (143) = happyGoto action_17
action_1095 (144) = happyGoto action_18
action_1095 (147) = happyGoto action_19
action_1095 (148) = happyGoto action_20
action_1095 (149) = happyGoto action_21
action_1095 (152) = happyGoto action_22
action_1095 (153) = happyGoto action_23
action_1095 (154) = happyGoto action_24
action_1095 (161) = happyGoto action_25
action_1095 (195) = happyGoto action_28
action_1095 (198) = happyGoto action_29
action_1095 (199) = happyGoto action_30
action_1095 (201) = happyGoto action_31
action_1095 (211) = happyGoto action_32
action_1095 (212) = happyGoto action_33
action_1095 (213) = happyGoto action_34
action_1095 (214) = happyGoto action_35
action_1095 (215) = happyGoto action_36
action_1095 (216) = happyGoto action_37
action_1095 (224) = happyGoto action_38
action_1095 _ = happyFail
action_1096 _ = happyReduce_506
action_1097 _ = happyReduce_408
action_1098 _ = happyReduce_349
action_1099 (234) = happyShift action_39
action_1099 (238) = happyShift action_43
action_1099 (239) = happyShift action_44
action_1099 (255) = happyShift action_115
action_1099 (257) = happyShift action_116
action_1099 (265) = happyShift action_117
action_1099 (313) = happyShift action_76
action_1099 (314) = happyShift action_118
action_1099 (315) = happyShift action_119
action_1099 (316) = happyShift action_120
action_1099 (318) = happyShift action_80
action_1099 (319) = happyShift action_81
action_1099 (320) = happyShift action_82
action_1099 (321) = happyShift action_83
action_1099 (322) = happyShift action_84
action_1099 (323) = happyShift action_85
action_1099 (325) = happyShift action_86
action_1099 (337) = happyShift action_91
action_1099 (356) = happyShift action_97
action_1099 (83) = happyGoto action_1106
action_1099 (84) = happyGoto action_916
action_1099 (85) = happyGoto action_105
action_1099 (86) = happyGoto action_106
action_1099 (212) = happyGoto action_111
action_1099 (215) = happyGoto action_112
action_1099 (216) = happyGoto action_37
action_1099 (230) = happyGoto action_113
action_1099 (231) = happyGoto action_114
action_1099 _ = happyFail
action_1100 _ = happyReduce_62
action_1101 _ = happyReduce_55
action_1102 _ = happyReduce_64
action_1103 (255) = happyShift action_1105
action_1103 _ = happyFail
action_1104 _ = happyReduce_68
action_1105 (234) = happyShift action_39
action_1105 (238) = happyShift action_43
action_1105 (255) = happyShift action_171
action_1105 (267) = happyShift action_875
action_1105 (313) = happyShift action_76
action_1105 (314) = happyShift action_77
action_1105 (315) = happyShift action_78
action_1105 (316) = happyShift action_79
action_1105 (318) = happyShift action_80
action_1105 (319) = happyShift action_81
action_1105 (320) = happyShift action_82
action_1105 (321) = happyShift action_83
action_1105 (322) = happyShift action_84
action_1105 (323) = happyShift action_85
action_1105 (325) = happyShift action_86
action_1105 (334) = happyShift action_89
action_1105 (335) = happyShift action_90
action_1105 (337) = happyShift action_91
action_1105 (356) = happyShift action_97
action_1105 (28) = happyGoto action_1107
action_1105 (40) = happyGoto action_1108
action_1105 (41) = happyGoto action_1109
action_1105 (196) = happyGoto action_1110
action_1105 (200) = happyGoto action_1111
action_1105 (212) = happyGoto action_33
action_1105 (213) = happyGoto action_169
action_1105 (216) = happyGoto action_170
action_1105 (228) = happyGoto action_1112
action_1105 _ = happyReduce_44
action_1106 _ = happyReduce_268
action_1107 (256) = happyShift action_1116
action_1107 _ = happyFail
action_1108 (267) = happyShift action_1115
action_1108 (28) = happyGoto action_1114
action_1108 _ = happyReduce_44
action_1109 _ = happyReduce_71
action_1110 _ = happyReduce_72
action_1111 _ = happyReduce_620
action_1112 (255) = happyShift action_1113
action_1112 _ = happyReduce_73
action_1113 (234) = happyShift action_39
action_1113 (238) = happyShift action_43
action_1113 (255) = happyShift action_171
action_1113 (256) = happyShift action_1120
action_1113 (271) = happyShift action_1121
action_1113 (313) = happyShift action_76
action_1113 (314) = happyShift action_77
action_1113 (315) = happyShift action_78
action_1113 (316) = happyShift action_79
action_1113 (318) = happyShift action_80
action_1113 (319) = happyShift action_81
action_1113 (320) = happyShift action_82
action_1113 (321) = happyShift action_83
action_1113 (322) = happyShift action_84
action_1113 (323) = happyShift action_85
action_1113 (325) = happyShift action_86
action_1113 (334) = happyShift action_89
action_1113 (335) = happyShift action_90
action_1113 (337) = happyShift action_91
action_1113 (356) = happyShift action_97
action_1113 (42) = happyGoto action_1119
action_1113 (43) = happyGoto action_1026
action_1113 (196) = happyGoto action_1027
action_1113 (200) = happyGoto action_1028
action_1113 (212) = happyGoto action_33
action_1113 (213) = happyGoto action_169
action_1113 (216) = happyGoto action_170
action_1113 _ = happyFail
action_1114 (256) = happyShift action_1118
action_1114 _ = happyFail
action_1115 (234) = happyShift action_39
action_1115 (238) = happyShift action_43
action_1115 (255) = happyShift action_171
action_1115 (313) = happyShift action_76
action_1115 (314) = happyShift action_77
action_1115 (315) = happyShift action_78
action_1115 (316) = happyShift action_79
action_1115 (318) = happyShift action_80
action_1115 (319) = happyShift action_81
action_1115 (320) = happyShift action_82
action_1115 (321) = happyShift action_83
action_1115 (322) = happyShift action_84
action_1115 (323) = happyShift action_85
action_1115 (325) = happyShift action_86
action_1115 (334) = happyShift action_89
action_1115 (335) = happyShift action_90
action_1115 (337) = happyShift action_91
action_1115 (356) = happyShift action_97
action_1115 (41) = happyGoto action_1117
action_1115 (196) = happyGoto action_1110
action_1115 (200) = happyGoto action_1111
action_1115 (212) = happyGoto action_33
action_1115 (213) = happyGoto action_169
action_1115 (216) = happyGoto action_170
action_1115 (228) = happyGoto action_1112
action_1115 _ = happyReduce_43
action_1116 _ = happyReduce_67
action_1117 _ = happyReduce_70
action_1118 _ = happyReduce_66
action_1119 (256) = happyShift action_1123
action_1119 (267) = happyShift action_1084
action_1119 _ = happyFail
action_1120 _ = happyReduce_75
action_1121 (256) = happyShift action_1122
action_1121 _ = happyFail
action_1122 _ = happyReduce_74
action_1123 _ = happyReduce_76
happyReduce_8 = happySpecReduce_2 11 happyReduction_8
happyReduction_8 (HappyAbsSyn12 happy_var_2)
(HappyAbsSyn15 happy_var_1)
= HappyAbsSyn11
(let (os,ss,l) = happy_var_1 in map (\x -> x os ss l) happy_var_2
)
happyReduction_8 _ _ = notHappyAtAll
happyReduce_9 = happySpecReduce_2 12 happyReduction_9
happyReduction_9 (HappyAbsSyn12 happy_var_2)
(HappyAbsSyn19 happy_var_1)
= HappyAbsSyn12
(happy_var_1 : happy_var_2
)
happyReduction_9 _ _ = notHappyAtAll
happyReduce_10 = happySpecReduce_1 12 happyReduction_10
happyReduction_10 (HappyAbsSyn19 happy_var_1)
= HappyAbsSyn12
([happy_var_1]
)
happyReduction_10 _ = notHappyAtAll
happyReduce_11 = happyMonadReduce 2 13 happyReduction_11
happyReduction_11 ((HappyAbsSyn14 happy_var_2) `HappyStk`
(HappyAbsSyn15 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkPageModule happy_var_2 happy_var_1)
) (\r -> happyReturn (HappyAbsSyn13 r))
happyReduce_12 = happyMonadReduce 5 13 happyReduction_12
happyReduction_12 ((HappyAbsSyn14 happy_var_5) `HappyStk`
(HappyTerminal (Loc happy_var_4 XCodeTagClose)) `HappyStk`
(HappyAbsSyn19 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 XCodeTagOpen)) `HappyStk`
(HappyAbsSyn15 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( let (os,ss,l) = happy_var_1 in checkHybridModule happy_var_5 (happy_var_3 os ss l) happy_var_2 happy_var_4)
) (\r -> happyReturn (HappyAbsSyn13 r))
happyReduce_13 = happySpecReduce_2 13 happyReduction_13
happyReduction_13 (HappyAbsSyn19 happy_var_2)
(HappyAbsSyn15 happy_var_1)
= HappyAbsSyn13
(let (os,ss,l) = happy_var_1 in happy_var_2 os ss l
)
happyReduction_13 _ _ = notHappyAtAll
happyReduce_14 = happyMonadReduce 9 14 happyReduction_14
happyReduction_14 ((HappyTerminal (Loc happy_var_9 XStdTagClose)) `HappyStk`
(HappyAbsSyn164 happy_var_8) `HappyStk`
(HappyTerminal (Loc happy_var_7 XCloseTagOpen)) `HappyStk`
(HappyAbsSyn162 happy_var_6) `HappyStk`
(HappyTerminal (Loc happy_var_5 XStdTagClose)) `HappyStk`
(HappyAbsSyn169 happy_var_4) `HappyStk`
(HappyAbsSyn167 happy_var_3) `HappyStk`
(HappyAbsSyn164 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 XStdTagOpen)) `HappyStk`
happyRest) tk
= happyThen (( do { n <- checkEqNames happy_var_2 happy_var_8;
let { cn = reverse happy_var_6;
as = reverse happy_var_3; };
return $ XTag (happy_var_1 <^^> happy_var_9 <** [happy_var_1,happy_var_5,happy_var_7,happy_var_9]) n as happy_var_4 cn })
) (\r -> happyReturn (HappyAbsSyn14 r))
happyReduce_15 = happyReduce 5 14 happyReduction_15
happyReduction_15 ((HappyTerminal (Loc happy_var_5 XEmptyTagClose)) `HappyStk`
(HappyAbsSyn169 happy_var_4) `HappyStk`
(HappyAbsSyn167 happy_var_3) `HappyStk`
(HappyAbsSyn164 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 XStdTagOpen)) `HappyStk`
happyRest)
= HappyAbsSyn14
(XETag (happy_var_1 <^^> happy_var_5 <** [happy_var_1,happy_var_5]) happy_var_2 (reverse happy_var_3) happy_var_4
) `HappyStk` happyRest
happyReduce_16 = happySpecReduce_3 15 happyReduction_16
happyReduction_16 (HappyAbsSyn225 happy_var_3)
(HappyAbsSyn16 happy_var_2)
(HappyAbsSyn225 happy_var_1)
= HappyAbsSyn15
(let (os,ss,ml) = happy_var_2 in (os,happy_var_1:ss++[happy_var_3],happy_var_1 <^^> happy_var_3)
)
happyReduction_16 _ _ _ = notHappyAtAll
happyReduce_17 = happySpecReduce_3 16 happyReduction_17
happyReduction_17 (HappyAbsSyn16 happy_var_3)
(HappyTerminal (Loc happy_var_2 SemiColon))
(HappyAbsSyn17 happy_var_1)
= HappyAbsSyn16
(let (os,ss,ml) = happy_var_3 in (happy_var_1 : os, happy_var_2 : ss, Just $ ann happy_var_1 <++> nIS happy_var_2 <+?> ml)
)
happyReduction_17 _ _ _ = notHappyAtAll
happyReduce_18 = happySpecReduce_0 16 happyReduction_18
happyReduction_18 = HappyAbsSyn16
(([],[],Nothing)
)
happyReduce_19 = happyReduce 4 17 happyReduction_19
happyReduction_19 ((HappyTerminal (Loc happy_var_4 PragmaEnd)) `HappyStk`
(HappyAbsSyn24 happy_var_3) `HappyStk`
(HappyAbsSyn18 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 LANGUAGE)) `HappyStk`
happyRest)
= HappyAbsSyn17
(LanguagePragma (happy_var_1 <^^> happy_var_4 <** (happy_var_1:snd happy_var_2 ++ reverse happy_var_3 ++ [happy_var_4])) (fst happy_var_2)
) `HappyStk` happyRest
happyReduce_20 = happySpecReduce_3 17 happyReduction_20
happyReduction_20 (HappyTerminal (Loc happy_var_3 PragmaEnd))
(HappyAbsSyn24 happy_var_2)
(HappyTerminal happy_var_1)
= HappyAbsSyn17
(let Loc l (OPTIONS (mc, s)) = happy_var_1
in OptionsPragma (l <^^> happy_var_3 <** (l:reverse happy_var_2 ++ [happy_var_3])) (readTool mc) s
)
happyReduction_20 _ _ _ = notHappyAtAll
happyReduce_21 = happySpecReduce_3 17 happyReduction_21
happyReduction_21 (HappyTerminal (Loc happy_var_3 PragmaEnd))
(HappyAbsSyn76 happy_var_2)
(HappyTerminal (Loc happy_var_1 ANN))
= HappyAbsSyn17
(AnnModulePragma (happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_3]) happy_var_2
)
happyReduction_21 _ _ _ = notHappyAtAll
happyReduce_22 = happySpecReduce_3 18 happyReduction_22
happyReduction_22 (HappyAbsSyn18 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn75 happy_var_1)
= HappyAbsSyn18
((happy_var_1 : fst happy_var_3, happy_var_2 : snd happy_var_3)
)
happyReduction_22 _ _ _ = notHappyAtAll
happyReduce_23 = happySpecReduce_1 18 happyReduction_23
happyReduction_23 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn18
(([happy_var_1],[])
)
happyReduction_23 _ = notHappyAtAll
happyReduce_24 = happySpecReduce_2 19 happyReduction_24
happyReduction_24 (HappyAbsSyn22 happy_var_2)
(HappyAbsSyn20 happy_var_1)
= HappyAbsSyn19
(let (is,ds,ss1,inf) = happy_var_2
in \os ss l -> Module (l <++> inf <** (ss ++ ss1)) happy_var_1 os is ds
)
happyReduction_24 _ _ = notHappyAtAll
happyReduce_25 = happyReduce 5 20 happyReduction_25
happyReduction_25 ((HappyTerminal (Loc happy_var_5 KW_Where)) `HappyStk`
(HappyAbsSyn26 happy_var_4) `HappyStk`
(HappyAbsSyn21 happy_var_3) `HappyStk`
(HappyAbsSyn227 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Module)) `HappyStk`
happyRest)
= HappyAbsSyn20
(Just $ ModuleHead (happy_var_1 <^^> happy_var_5 <** [happy_var_1,happy_var_5]) happy_var_2 happy_var_3 happy_var_4
) `HappyStk` happyRest
happyReduce_26 = happySpecReduce_0 20 happyReduction_26
happyReduction_26 = HappyAbsSyn20
(Nothing
)
happyReduce_27 = happySpecReduce_3 21 happyReduction_27
happyReduction_27 (HappyTerminal (Loc happy_var_3 PragmaEnd))
(HappyTerminal happy_var_2)
(HappyTerminal (Loc happy_var_1 DEPRECATED))
= HappyAbsSyn21
(let Loc l (StringTok (s,_)) = happy_var_2 in Just $ DeprText (happy_var_1 <^^> happy_var_3 <** [happy_var_1,l,happy_var_3]) s
)
happyReduction_27 _ _ _ = notHappyAtAll
happyReduce_28 = happySpecReduce_3 21 happyReduction_28
happyReduction_28 (HappyTerminal (Loc happy_var_3 PragmaEnd))
(HappyTerminal happy_var_2)
(HappyTerminal (Loc happy_var_1 WARNING))
= HappyAbsSyn21
(let Loc l (StringTok (s,_)) = happy_var_2 in Just $ WarnText (happy_var_1 <^^> happy_var_3 <** [happy_var_1,l,happy_var_3]) s
)
happyReduction_28 _ _ _ = notHappyAtAll
happyReduce_29 = happySpecReduce_0 21 happyReduction_29
happyReduction_29 = HappyAbsSyn21
(Nothing
)
happyReduce_30 = happySpecReduce_3 22 happyReduction_30
happyReduction_30 (HappyTerminal (Loc happy_var_3 RightCurly))
(HappyAbsSyn23 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftCurly))
= HappyAbsSyn22
(let (is,ds,ss) = happy_var_2 in (is,ds,happy_var_1:ss ++ [happy_var_3], happy_var_1 <^^> happy_var_3)
)
happyReduction_30 _ _ _ = notHappyAtAll
happyReduce_31 = happySpecReduce_3 22 happyReduction_31
happyReduction_31 (HappyAbsSyn225 happy_var_3)
(HappyAbsSyn23 happy_var_2)
(HappyAbsSyn225 happy_var_1)
= HappyAbsSyn22
(let (is,ds,ss) = happy_var_2 in (is,ds,happy_var_1:ss ++ [happy_var_3], happy_var_1 <^^> happy_var_3)
)
happyReduction_31 _ _ _ = notHappyAtAll
happyReduce_32 = happyReduce 4 23 happyReduction_32
happyReduction_32 ((HappyAbsSyn48 happy_var_4) `HappyStk`
(HappyAbsSyn24 happy_var_3) `HappyStk`
(HappyAbsSyn31 happy_var_2) `HappyStk`
(HappyAbsSyn24 happy_var_1) `HappyStk`
happyRest)
= HappyAbsSyn23
((reverse (fst happy_var_2), fst happy_var_4, reverse happy_var_1 ++ snd happy_var_2 ++ reverse happy_var_3 ++ snd happy_var_4)
) `HappyStk` happyRest
happyReduce_33 = happySpecReduce_2 23 happyReduction_33
happyReduction_33 (HappyAbsSyn48 happy_var_2)
(HappyAbsSyn24 happy_var_1)
= HappyAbsSyn23
(([], fst happy_var_2, reverse happy_var_1 ++ snd happy_var_2)
)
happyReduction_33 _ _ = notHappyAtAll
happyReduce_34 = happySpecReduce_3 23 happyReduction_34
happyReduction_34 (HappyAbsSyn24 happy_var_3)
(HappyAbsSyn31 happy_var_2)
(HappyAbsSyn24 happy_var_1)
= HappyAbsSyn23
((reverse (fst happy_var_2), [], reverse happy_var_1 ++ snd happy_var_2 ++ reverse happy_var_3)
)
happyReduction_34 _ _ _ = notHappyAtAll
happyReduce_35 = happySpecReduce_1 23 happyReduction_35
happyReduction_35 (HappyAbsSyn24 happy_var_1)
= HappyAbsSyn23
(([], [], reverse happy_var_1)
)
happyReduction_35 _ = notHappyAtAll
happyReduce_36 = happySpecReduce_2 24 happyReduction_36
happyReduction_36 (HappyTerminal (Loc happy_var_2 SemiColon))
(HappyAbsSyn24 happy_var_1)
= HappyAbsSyn24
(happy_var_2 : happy_var_1
)
happyReduction_36 _ _ = notHappyAtAll
happyReduce_37 = happySpecReduce_1 25 happyReduction_37
happyReduction_37 (HappyAbsSyn24 happy_var_1)
= HappyAbsSyn24
(happy_var_1
)
happyReduction_37 _ = notHappyAtAll
happyReduce_38 = happySpecReduce_0 25 happyReduction_38
happyReduction_38 = HappyAbsSyn24
([]
)
happyReduce_39 = happySpecReduce_1 26 happyReduction_39
happyReduction_39 (HappyAbsSyn27 happy_var_1)
= HappyAbsSyn26
(Just happy_var_1
)
happyReduction_39 _ = notHappyAtAll
happyReduce_40 = happySpecReduce_0 26 happyReduction_40
happyReduction_40 = HappyAbsSyn26
(Nothing
)
happyReduce_41 = happyReduce 4 27 happyReduction_41
happyReduction_41 ((HappyTerminal (Loc happy_var_4 RightParen)) `HappyStk`
(HappyAbsSyn24 happy_var_3) `HappyStk`
(HappyAbsSyn29 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 LeftParen)) `HappyStk`
happyRest)
= HappyAbsSyn27
(ExportSpecList (happy_var_1 <^^> happy_var_4 <** (happy_var_1:reverse (snd happy_var_2) ++ happy_var_3 ++ [happy_var_4])) (reverse (fst happy_var_2))
) `HappyStk` happyRest
happyReduce_42 = happySpecReduce_3 27 happyReduction_42
happyReduction_42 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn24 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn27
(ExportSpecList (happy_var_1 <^^> happy_var_3 <** (happy_var_1:happy_var_2++[happy_var_3])) []
)
happyReduction_42 _ _ _ = notHappyAtAll
happyReduce_43 = happySpecReduce_1 28 happyReduction_43
happyReduction_43 (HappyTerminal (Loc happy_var_1 Comma))
= HappyAbsSyn24
([happy_var_1]
)
happyReduction_43 _ = notHappyAtAll
happyReduce_44 = happySpecReduce_0 28 happyReduction_44
happyReduction_44 = HappyAbsSyn24
([ ]
)
happyReduce_45 = happySpecReduce_3 29 happyReduction_45
happyReduction_45 (HappyAbsSyn30 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn29 happy_var_1)
= HappyAbsSyn29
((happy_var_3 : fst happy_var_1, happy_var_2 : snd happy_var_1)
)
happyReduction_45 _ _ _ = notHappyAtAll
happyReduce_46 = happySpecReduce_1 29 happyReduction_46
happyReduction_46 (HappyAbsSyn30 happy_var_1)
= HappyAbsSyn29
(([happy_var_1],[])
)
happyReduction_46 _ = notHappyAtAll
happyReduce_47 = happySpecReduce_1 30 happyReduction_47
happyReduction_47 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn30
(EVar (ann happy_var_1) happy_var_1
)
happyReduction_47 _ = notHappyAtAll
happyReduce_48 = happySpecReduce_1 30 happyReduction_48
happyReduction_48 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn30
(EAbs (ann happy_var_1) happy_var_1
)
happyReduction_48 _ = notHappyAtAll
happyReduce_49 = happyReduce 4 30 happyReduction_49
happyReduction_49 ((HappyTerminal (Loc happy_var_4 RightParen)) `HappyStk`
(HappyTerminal (Loc happy_var_3 DotDot)) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftParen)) `HappyStk`
(HappyAbsSyn85 happy_var_1) `HappyStk`
happyRest)
= HappyAbsSyn30
(EThingAll (ann happy_var_1 <++> nIS happy_var_4 <** [happy_var_2,happy_var_3,happy_var_4]) happy_var_1
) `HappyStk` happyRest
happyReduce_50 = happySpecReduce_3 30 happyReduction_50
happyReduction_50 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyTerminal (Loc happy_var_2 LeftParen))
(HappyAbsSyn85 happy_var_1)
= HappyAbsSyn30
(EThingWith (ann happy_var_1 <++> nIS happy_var_3 <** [happy_var_2,happy_var_3]) happy_var_1 []
)
happyReduction_50 _ _ _ = notHappyAtAll
happyReduce_51 = happyReduce 4 30 happyReduction_51
happyReduction_51 ((HappyTerminal (Loc happy_var_4 RightParen)) `HappyStk`
(HappyAbsSyn42 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftParen)) `HappyStk`
(HappyAbsSyn85 happy_var_1) `HappyStk`
happyRest)
= HappyAbsSyn30
(EThingWith (ann happy_var_1 <++> nIS happy_var_4 <** (happy_var_2:reverse (snd happy_var_3) ++ [happy_var_4])) happy_var_1 (reverse (fst happy_var_3))
) `HappyStk` happyRest
happyReduce_52 = happySpecReduce_2 30 happyReduction_52
happyReduction_52 (HappyAbsSyn227 happy_var_2)
(HappyTerminal (Loc happy_var_1 KW_Module))
= HappyAbsSyn30
(EModuleContents (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2
)
happyReduction_52 _ _ = notHappyAtAll
happyReduce_53 = happySpecReduce_3 31 happyReduction_53
happyReduction_53 (HappyAbsSyn32 happy_var_3)
(HappyAbsSyn24 happy_var_2)
(HappyAbsSyn31 happy_var_1)
= HappyAbsSyn31
((happy_var_3 : fst happy_var_1, snd happy_var_1 ++ reverse happy_var_2)
)
happyReduction_53 _ _ _ = notHappyAtAll
happyReduce_54 = happySpecReduce_1 31 happyReduction_54
happyReduction_54 (HappyAbsSyn32 happy_var_1)
= HappyAbsSyn31
(([happy_var_1],[])
)
happyReduction_54 _ = notHappyAtAll
happyReduce_55 = happyReduce 7 32 happyReduction_55
happyReduction_55 ((HappyAbsSyn37 happy_var_7) `HappyStk`
(HappyAbsSyn36 happy_var_6) `HappyStk`
(HappyAbsSyn227 happy_var_5) `HappyStk`
(HappyAbsSyn35 happy_var_4) `HappyStk`
(HappyAbsSyn33 happy_var_3) `HappyStk`
(HappyAbsSyn33 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Import)) `HappyStk`
happyRest)
= HappyAbsSyn32
(let { (mmn,ss,ml) = happy_var_6 ;
l = nIS happy_var_1 <++> ann happy_var_5 <+?> ml <+?> (fmap ann) happy_var_7 <** (happy_var_1:snd happy_var_2 ++ snd happy_var_3 ++ snd happy_var_4 ++ ss)}
in ImportDecl l happy_var_5 (fst happy_var_3) (fst happy_var_2) (fst happy_var_4) mmn happy_var_7
) `HappyStk` happyRest
happyReduce_56 = happySpecReduce_2 33 happyReduction_56
happyReduction_56 (HappyTerminal (Loc happy_var_2 PragmaEnd))
(HappyTerminal (Loc happy_var_1 SOURCE))
= HappyAbsSyn33
((True,[happy_var_1,happy_var_2])
)
happyReduction_56 _ _ = notHappyAtAll
happyReduce_57 = happySpecReduce_0 33 happyReduction_57
happyReduction_57 = HappyAbsSyn33
((False,[])
)
happyReduce_58 = happySpecReduce_1 34 happyReduction_58
happyReduction_58 (HappyTerminal (Loc happy_var_1 KW_Qualified))
= HappyAbsSyn33
((True,[happy_var_1])
)
happyReduction_58 _ = notHappyAtAll
happyReduce_59 = happySpecReduce_0 34 happyReduction_59
happyReduction_59 = HappyAbsSyn33
((False, [])
)
happyReduce_60 = happyMonadReduce 1 35 happyReduction_60
happyReduction_60 ((HappyTerminal happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { checkEnabled PackageImports ;
let { Loc l (StringTok (s,_)) = happy_var_1 } ;
return $ (Just s,[l]) })
) (\r -> happyReturn (HappyAbsSyn35 r))
happyReduce_61 = happySpecReduce_0 35 happyReduction_61
happyReduction_61 = HappyAbsSyn35
((Nothing,[])
)
happyReduce_62 = happySpecReduce_2 36 happyReduction_62
happyReduction_62 (HappyAbsSyn227 happy_var_2)
(HappyTerminal (Loc happy_var_1 KW_As))
= HappyAbsSyn36
((Just happy_var_2,[happy_var_1],Just (nIS happy_var_1 <++> ann happy_var_2))
)
happyReduction_62 _ _ = notHappyAtAll
happyReduce_63 = happySpecReduce_0 36 happyReduction_63
happyReduction_63 = HappyAbsSyn36
((Nothing,[],Nothing)
)
happyReduce_64 = happySpecReduce_1 37 happyReduction_64
happyReduction_64 (HappyAbsSyn38 happy_var_1)
= HappyAbsSyn37
(Just happy_var_1
)
happyReduction_64 _ = notHappyAtAll
happyReduce_65 = happySpecReduce_0 37 happyReduction_65
happyReduction_65 = HappyAbsSyn37
(Nothing
)
happyReduce_66 = happyReduce 5 38 happyReduction_66
happyReduction_66 ((HappyTerminal (Loc happy_var_5 RightParen)) `HappyStk`
(HappyAbsSyn24 happy_var_4) `HappyStk`
(HappyAbsSyn40 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftParen)) `HappyStk`
(HappyAbsSyn39 happy_var_1) `HappyStk`
happyRest)
= HappyAbsSyn38
(let {(b,ml,s) = happy_var_1 ;
l = (ml <?+> (happy_var_2 <^^> happy_var_5)) <** (s ++ happy_var_2:reverse (snd happy_var_3) ++ happy_var_4 ++ [happy_var_5])}
in ImportSpecList l b (reverse (fst happy_var_3))
) `HappyStk` happyRest
happyReduce_67 = happyReduce 4 38 happyReduction_67
happyReduction_67 ((HappyTerminal (Loc happy_var_4 RightParen)) `HappyStk`
(HappyAbsSyn24 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftParen)) `HappyStk`
(HappyAbsSyn39 happy_var_1) `HappyStk`
happyRest)
= HappyAbsSyn38
(let {(b,ml,s) = happy_var_1 ; l = (ml <?+> (happy_var_2 <^^> happy_var_4)) <** (s ++ happy_var_2:happy_var_3 ++ [happy_var_4])}
in ImportSpecList l b []
) `HappyStk` happyRest
happyReduce_68 = happySpecReduce_1 39 happyReduction_68
happyReduction_68 (HappyTerminal (Loc happy_var_1 KW_Hiding))
= HappyAbsSyn39
((True,Just (nIS happy_var_1),[happy_var_1])
)
happyReduction_68 _ = notHappyAtAll
happyReduce_69 = happySpecReduce_0 39 happyReduction_69
happyReduction_69 = HappyAbsSyn39
((False,Nothing,[])
)
happyReduce_70 = happySpecReduce_3 40 happyReduction_70
happyReduction_70 (HappyAbsSyn41 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn40 happy_var_1)
= HappyAbsSyn40
((happy_var_3 : fst happy_var_1, happy_var_2 : snd happy_var_1)
)
happyReduction_70 _ _ _ = notHappyAtAll
happyReduce_71 = happySpecReduce_1 40 happyReduction_71
happyReduction_71 (HappyAbsSyn41 happy_var_1)
= HappyAbsSyn40
(([happy_var_1],[])
)
happyReduction_71 _ = notHappyAtAll
happyReduce_72 = happySpecReduce_1 41 happyReduction_72
happyReduction_72 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn41
(IVar (ann happy_var_1) happy_var_1
)
happyReduction_72 _ = notHappyAtAll
happyReduce_73 = happySpecReduce_1 41 happyReduction_73
happyReduction_73 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn41
(IAbs (ann happy_var_1) happy_var_1
)
happyReduction_73 _ = notHappyAtAll
happyReduce_74 = happyReduce 4 41 happyReduction_74
happyReduction_74 ((HappyTerminal (Loc happy_var_4 RightParen)) `HappyStk`
(HappyTerminal (Loc happy_var_3 DotDot)) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftParen)) `HappyStk`
(HappyAbsSyn75 happy_var_1) `HappyStk`
happyRest)
= HappyAbsSyn41
(IThingAll (ann happy_var_1 <++> nIS happy_var_4 <** [happy_var_2,happy_var_3,happy_var_4]) happy_var_1
) `HappyStk` happyRest
happyReduce_75 = happySpecReduce_3 41 happyReduction_75
happyReduction_75 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyTerminal (Loc happy_var_2 LeftParen))
(HappyAbsSyn75 happy_var_1)
= HappyAbsSyn41
(IThingWith (ann happy_var_1 <++> nIS happy_var_3 <** [happy_var_2,happy_var_3]) happy_var_1 []
)
happyReduction_75 _ _ _ = notHappyAtAll
happyReduce_76 = happyReduce 4 41 happyReduction_76
happyReduction_76 ((HappyTerminal (Loc happy_var_4 RightParen)) `HappyStk`
(HappyAbsSyn42 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftParen)) `HappyStk`
(HappyAbsSyn75 happy_var_1) `HappyStk`
happyRest)
= HappyAbsSyn41
(IThingWith (ann happy_var_1 <++> nIS happy_var_4 <** (happy_var_2:reverse (snd happy_var_3) ++ [happy_var_4])) happy_var_1 (reverse (fst happy_var_3))
) `HappyStk` happyRest
happyReduce_77 = happySpecReduce_3 42 happyReduction_77
happyReduction_77 (HappyAbsSyn43 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn42 happy_var_1)
= HappyAbsSyn42
((happy_var_3 : fst happy_var_1, happy_var_2 : snd happy_var_1)
)
happyReduction_77 _ _ _ = notHappyAtAll
happyReduce_78 = happySpecReduce_1 42 happyReduction_78
happyReduction_78 (HappyAbsSyn43 happy_var_1)
= HappyAbsSyn42
(([happy_var_1],[])
)
happyReduction_78 _ = notHappyAtAll
happyReduce_79 = happySpecReduce_1 43 happyReduction_79
happyReduction_79 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn43
(VarName (ann happy_var_1) happy_var_1
)
happyReduction_79 _ = notHappyAtAll
happyReduce_80 = happySpecReduce_1 43 happyReduction_80
happyReduction_80 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn43
(ConName (ann happy_var_1) happy_var_1
)
happyReduction_80 _ = notHappyAtAll
happyReduce_81 = happySpecReduce_3 44 happyReduction_81
happyReduction_81 (HappyAbsSyn47 happy_var_3)
(HappyAbsSyn45 happy_var_2)
(HappyAbsSyn46 happy_var_1)
= HappyAbsSyn44
(let (ops,ss,l) = happy_var_3
in InfixDecl (ann happy_var_1 <++> l <** (snd happy_var_2 ++ reverse ss)) happy_var_1 (fst happy_var_2) (reverse ops)
)
happyReduction_81 _ _ _ = notHappyAtAll
happyReduce_82 = happySpecReduce_0 45 happyReduction_82
happyReduction_82 = HappyAbsSyn45
((Nothing, [])
)
happyReduce_83 = happyMonadReduce 1 45 happyReduction_83
happyReduction_83 ((HappyTerminal happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( let Loc l (IntTok (i,_)) = happy_var_1 in checkPrec i >>= \i -> return (Just i, [l]))
) (\r -> happyReturn (HappyAbsSyn45 r))
happyReduce_84 = happySpecReduce_1 46 happyReduction_84
happyReduction_84 (HappyTerminal (Loc happy_var_1 KW_Infix))
= HappyAbsSyn46
(AssocNone $ nIS happy_var_1
)
happyReduction_84 _ = notHappyAtAll
happyReduce_85 = happySpecReduce_1 46 happyReduction_85
happyReduction_85 (HappyTerminal (Loc happy_var_1 KW_InfixL))
= HappyAbsSyn46
(AssocLeft $ nIS happy_var_1
)
happyReduction_85 _ = notHappyAtAll
happyReduce_86 = happySpecReduce_1 46 happyReduction_86
happyReduction_86 (HappyTerminal (Loc happy_var_1 KW_InfixR))
= HappyAbsSyn46
(AssocRight $ nIS happy_var_1
)
happyReduction_86 _ = notHappyAtAll
happyReduce_87 = happySpecReduce_3 47 happyReduction_87
happyReduction_87 (HappyAbsSyn207 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn47 happy_var_1)
= HappyAbsSyn47
(let (ops,ss,l) = happy_var_1 in (happy_var_3 : ops, happy_var_2 : ss, l <++> ann happy_var_3)
)
happyReduction_87 _ _ _ = notHappyAtAll
happyReduce_88 = happySpecReduce_1 47 happyReduction_88
happyReduction_88 (HappyAbsSyn207 happy_var_1)
= HappyAbsSyn47
(([happy_var_1],[],ann happy_var_1)
)
happyReduction_88 _ = notHappyAtAll
happyReduce_89 = happyMonadReduce 2 48 happyReduction_89
happyReduction_89 ((HappyAbsSyn24 happy_var_2) `HappyStk`
(HappyAbsSyn48 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkRevDecls (fst happy_var_1) >>= \ds -> return (ds, snd happy_var_1 ++ reverse happy_var_2))
) (\r -> happyReturn (HappyAbsSyn48 r))
happyReduce_90 = happySpecReduce_3 49 happyReduction_90
happyReduction_90 (HappyAbsSyn44 happy_var_3)
(HappyAbsSyn24 happy_var_2)
(HappyAbsSyn48 happy_var_1)
= HappyAbsSyn48
((happy_var_3 : fst happy_var_1, snd happy_var_1 ++ reverse happy_var_2)
)
happyReduction_90 _ _ _ = notHappyAtAll
happyReduce_91 = happySpecReduce_1 49 happyReduction_91
happyReduction_91 (HappyAbsSyn44 happy_var_1)
= HappyAbsSyn48
(([happy_var_1],[])
)
happyReduction_91 _ = notHappyAtAll
happyReduce_92 = happyMonadReduce 4 50 happyReduction_92
happyReduction_92 ((HappyAbsSyn60 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 Equals)) `HappyStk`
(HappyAbsSyn78 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Type)) `HappyStk`
happyRest) tk
= happyThen (( do { dh <- checkSimpleType happy_var_2;
let {l = nIS happy_var_1 <++> ann happy_var_4 <** [happy_var_1,happy_var_3]};
return (TypeDecl l dh happy_var_4) })
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_93 = happyMonadReduce 4 50 happyReduction_93
happyReduction_93 ((HappyAbsSyn122 happy_var_4) `HappyStk`
(HappyAbsSyn78 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 KW_Family)) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Type)) `HappyStk`
happyRest) tk
= happyThen (( do { dh <- checkSimpleType happy_var_3;
let {l = nIS happy_var_1 <++> ann happy_var_3 <+?> (fmap ann) (fst happy_var_4) <** (happy_var_1:happy_var_2:snd happy_var_4)};
return (TypeFamDecl l dh (fst happy_var_4)) })
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_94 = happyMonadReduce 5 50 happyReduction_94
happyReduction_94 ((HappyAbsSyn60 happy_var_5) `HappyStk`
(HappyTerminal (Loc happy_var_4 Equals)) `HappyStk`
(HappyAbsSyn60 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 KW_Instance)) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Type)) `HappyStk`
happyRest) tk
= happyThen (( do { -- no checkSimpleType happy_var_4 since dtype may contain type patterns
checkEnabled TypeFamilies ;
let {l = nIS happy_var_1 <++> ann happy_var_5 <** [happy_var_1,happy_var_2,happy_var_4]};
return (TypeInsDecl l happy_var_3 happy_var_5) })
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_95 = happyMonadReduce 4 50 happyReduction_95
happyReduction_95 ((HappyAbsSyn116 happy_var_4) `HappyStk`
(HappyAbsSyn104 happy_var_3) `HappyStk`
(HappyAbsSyn78 happy_var_2) `HappyStk`
(HappyAbsSyn51 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { (cs,dh) <- checkDataHeader happy_var_2;
let { (qds,ss,minf) = happy_var_3;
l = happy_var_1 <> happy_var_2 <+?> minf <+?> fmap ann happy_var_4 <** ss};
checkDataOrNew happy_var_1 qds;
return (DataDecl l happy_var_1 cs dh (reverse qds) happy_var_4) })
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_96 = happyMonadReduce 5 50 happyReduction_96
happyReduction_96 ((HappyAbsSyn116 happy_var_5) `HappyStk`
(HappyAbsSyn100 happy_var_4) `HappyStk`
(HappyAbsSyn122 happy_var_3) `HappyStk`
(HappyAbsSyn78 happy_var_2) `HappyStk`
(HappyAbsSyn51 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { (cs,dh) <- checkDataHeader happy_var_2;
let { (gs,ss,minf) = happy_var_4;
l = ann happy_var_1 <+?> minf <+?> fmap ann happy_var_5 <** (snd happy_var_3 ++ ss)};
checkDataOrNewG happy_var_1 gs;
case (gs, fst happy_var_3) of
([], Nothing) -> return (DataDecl l happy_var_1 cs dh [] happy_var_5)
_ -> checkEnabled GADTs >> return (GDataDecl l happy_var_1 cs dh (fst happy_var_3) (reverse gs) happy_var_5) })
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_97 = happyMonadReduce 4 50 happyReduction_97
happyReduction_97 ((HappyAbsSyn122 happy_var_4) `HappyStk`
(HappyAbsSyn78 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 KW_Family)) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Data)) `HappyStk`
happyRest) tk
= happyThen (( do { (cs,dh) <- checkDataHeader happy_var_3;
let {l = nIS happy_var_1 <++> ann happy_var_3 <+?> (fmap ann) (fst happy_var_4) <** (happy_var_1:happy_var_2:snd happy_var_4)};
return (DataFamDecl l cs dh (fst happy_var_4)) })
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_98 = happyMonadReduce 5 50 happyReduction_98
happyReduction_98 ((HappyAbsSyn116 happy_var_5) `HappyStk`
(HappyAbsSyn104 happy_var_4) `HappyStk`
(HappyAbsSyn60 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 KW_Instance)) `HappyStk`
(HappyAbsSyn51 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { -- (cs,c,t) <- checkDataHeader happy_var_4;
checkEnabled TypeFamilies ;
let { (qds,ss,minf) = happy_var_4 ;
l = happy_var_1 <> happy_var_3 <+?> minf <+?> fmap ann happy_var_5 <** happy_var_2:ss };
checkDataOrNew happy_var_1 qds;
return (DataInsDecl l happy_var_1 happy_var_3 (reverse qds) happy_var_5) })
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_99 = happyMonadReduce 6 50 happyReduction_99
happyReduction_99 ((HappyAbsSyn116 happy_var_6) `HappyStk`
(HappyAbsSyn100 happy_var_5) `HappyStk`
(HappyAbsSyn122 happy_var_4) `HappyStk`
(HappyAbsSyn60 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 KW_Instance)) `HappyStk`
(HappyAbsSyn51 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { -- (cs,c,t) <- checkDataHeader happy_var_4;
checkEnabled TypeFamilies ;
let {(gs,ss,minf) = happy_var_5;
l = ann happy_var_1 <+?> minf <+?> fmap ann happy_var_6 <** (happy_var_2:snd happy_var_4 ++ ss)};
checkDataOrNewG happy_var_1 gs;
return (GDataInsDecl l happy_var_1 happy_var_3 (fst happy_var_4) (reverse gs) happy_var_6) })
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_100 = happyMonadReduce 4 50 happyReduction_100
happyReduction_100 ((HappyAbsSyn123 happy_var_4) `HappyStk`
(HappyAbsSyn97 happy_var_3) `HappyStk`
(HappyAbsSyn78 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Class)) `HappyStk`
happyRest) tk
= happyThen (( do { (cs,dh) <- checkClassHeader happy_var_2;
let {(fds,ss1,minf1) = happy_var_3;(mcs,ss2,minf2) = happy_var_4} ;
let { l = nIS happy_var_1 <++> ann happy_var_2 <+?> minf1 <+?> minf2 <** (happy_var_1:ss1 ++ ss2)} ;
return (ClassDecl l cs dh fds mcs) })
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_101 = happyMonadReduce 3 50 happyReduction_101
happyReduction_101 ((HappyAbsSyn128 happy_var_3) `HappyStk`
(HappyAbsSyn78 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Instance)) `HappyStk`
happyRest) tk
= happyThen (( do { (cs,ih) <- checkInstHeader happy_var_2;
let {(mis,ss,minf) = happy_var_3};
return (InstDecl (nIS happy_var_1 <++> ann happy_var_2 <+?> minf <** (happy_var_1:ss)) cs ih mis) })
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_102 = happyMonadReduce 3 50 happyReduction_102
happyReduction_102 ((HappyAbsSyn78 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 KW_Instance)) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Deriving)) `HappyStk`
happyRest) tk
= happyThen (( do { checkEnabled StandaloneDeriving ;
(cs, ih) <- checkInstHeader happy_var_3;
let {l = nIS happy_var_1 <++> ann happy_var_3 <** [happy_var_1,happy_var_2]};
return (DerivDecl l cs ih) })
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_103 = happyReduce 4 50 happyReduction_103
happyReduction_103 ((HappyTerminal (Loc happy_var_4 RightParen)) `HappyStk`
(HappyAbsSyn52 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftParen)) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Default)) `HappyStk`
happyRest)
= HappyAbsSyn44
(DefaultDecl (happy_var_1 <^^> happy_var_4 <** (happy_var_1:happy_var_2 : snd happy_var_3 ++ [happy_var_4])) (fst happy_var_3)
) `HappyStk` happyRest
happyReduce_104 = happyMonadReduce 1 50 happyReduction_104
happyReduction_104 ((HappyAbsSyn14 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkEnabled TemplateHaskell >> checkExpr happy_var_1 >>= \e -> return (SpliceDecl (ann e) e))
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_105 = happyReduce 5 50 happyReduction_105
happyReduction_105 ((HappyAbsSyn65 happy_var_5) `HappyStk`
(HappyAbsSyn64 happy_var_4) `HappyStk`
(HappyAbsSyn63 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 KW_Import)) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Foreign)) `HappyStk`
happyRest)
= HappyAbsSyn44
(let (s,n,t,ss) = happy_var_5 in ForImp (nIS happy_var_1 <++> ann t <** (happy_var_1:happy_var_2:ss)) happy_var_3 happy_var_4 s n t
) `HappyStk` happyRest
happyReduce_106 = happyReduce 4 50 happyReduction_106
happyReduction_106 ((HappyAbsSyn65 happy_var_4) `HappyStk`
(HappyAbsSyn63 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 KW_Export)) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Foreign)) `HappyStk`
happyRest)
= HappyAbsSyn44
(let (s,n,t,ss) = happy_var_4 in ForExp (nIS happy_var_1 <++> ann t <** (happy_var_1:happy_var_2:ss)) happy_var_3 s n t
) `HappyStk` happyRest
happyReduce_107 = happySpecReduce_3 50 happyReduction_107
happyReduction_107 (HappyTerminal (Loc happy_var_3 PragmaEnd))
(HappyAbsSyn66 happy_var_2)
(HappyTerminal (Loc happy_var_1 RULES))
= HappyAbsSyn44
(RulePragmaDecl (happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_3]) $ reverse happy_var_2
)
happyReduction_107 _ _ _ = notHappyAtAll
happyReduce_108 = happySpecReduce_3 50 happyReduction_108
happyReduction_108 (HappyTerminal (Loc happy_var_3 PragmaEnd))
(HappyAbsSyn72 happy_var_2)
(HappyTerminal (Loc happy_var_1 DEPRECATED))
= HappyAbsSyn44
(DeprPragmaDecl (happy_var_1 <^^> happy_var_3 <** (happy_var_1:snd happy_var_2++[happy_var_3])) $ reverse (fst happy_var_2)
)
happyReduction_108 _ _ _ = notHappyAtAll
happyReduce_109 = happySpecReduce_3 50 happyReduction_109
happyReduction_109 (HappyTerminal (Loc happy_var_3 PragmaEnd))
(HappyAbsSyn72 happy_var_2)
(HappyTerminal (Loc happy_var_1 WARNING))
= HappyAbsSyn44
(WarnPragmaDecl (happy_var_1 <^^> happy_var_3 <** (happy_var_1:snd happy_var_2++[happy_var_3])) $ reverse (fst happy_var_2)
)
happyReduction_109 _ _ _ = notHappyAtAll
happyReduce_110 = happySpecReduce_3 50 happyReduction_110
happyReduction_110 (HappyTerminal (Loc happy_var_3 PragmaEnd))
(HappyAbsSyn76 happy_var_2)
(HappyTerminal (Loc happy_var_1 ANN))
= HappyAbsSyn44
(AnnPragma (happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_3]) happy_var_2
)
happyReduction_110 _ _ _ = notHappyAtAll
happyReduce_111 = happySpecReduce_1 50 happyReduction_111
happyReduction_111 (HappyAbsSyn44 happy_var_1)
= HappyAbsSyn44
(happy_var_1
)
happyReduction_111 _ = notHappyAtAll
happyReduce_112 = happySpecReduce_1 51 happyReduction_112
happyReduction_112 (HappyTerminal (Loc happy_var_1 KW_Data))
= HappyAbsSyn51
(DataType $ nIS happy_var_1
)
happyReduction_112 _ = notHappyAtAll
happyReduce_113 = happySpecReduce_1 51 happyReduction_113
happyReduction_113 (HappyTerminal (Loc happy_var_1 KW_NewType))
= HappyAbsSyn51
(NewType $ nIS happy_var_1
)
happyReduction_113 _ = notHappyAtAll
happyReduce_114 = happyMonadReduce 1 52 happyReduction_114
happyReduction_114 ((HappyAbsSyn91 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { ts <- mapM checkType (fst happy_var_1);
return $ (reverse ts, reverse (snd happy_var_1)) })
) (\r -> happyReturn (HappyAbsSyn52 r))
happyReduce_115 = happySpecReduce_1 52 happyReduction_115
happyReduction_115 (HappyAbsSyn60 happy_var_1)
= HappyAbsSyn52
(([happy_var_1],[])
)
happyReduction_115 _ = notHappyAtAll
happyReduce_116 = happySpecReduce_0 52 happyReduction_116
happyReduction_116 = HappyAbsSyn52
(([],[])
)
happyReduce_117 = happyMonadReduce 3 53 happyReduction_117
happyReduction_117 ((HappyAbsSyn24 happy_var_3) `HappyStk`
(HappyAbsSyn48 happy_var_2) `HappyStk`
(HappyAbsSyn24 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkRevDecls (fst happy_var_2) >>= \ds -> return (ds, reverse happy_var_1 ++ snd happy_var_2 ++ reverse happy_var_3))
) (\r -> happyReturn (HappyAbsSyn48 r))
happyReduce_118 = happySpecReduce_1 53 happyReduction_118
happyReduction_118 (HappyAbsSyn24 happy_var_1)
= HappyAbsSyn48
(([],reverse happy_var_1)
)
happyReduction_118 _ = notHappyAtAll
happyReduce_119 = happySpecReduce_3 54 happyReduction_119
happyReduction_119 (HappyAbsSyn44 happy_var_3)
(HappyAbsSyn24 happy_var_2)
(HappyAbsSyn48 happy_var_1)
= HappyAbsSyn48
((happy_var_3 : fst happy_var_1, snd happy_var_1 ++ reverse happy_var_2)
)
happyReduction_119 _ _ _ = notHappyAtAll
happyReduce_120 = happySpecReduce_1 54 happyReduction_120
happyReduction_120 (HappyAbsSyn44 happy_var_1)
= HappyAbsSyn48
(([happy_var_1],[])
)
happyReduction_120 _ = notHappyAtAll
happyReduce_121 = happySpecReduce_1 55 happyReduction_121
happyReduction_121 (HappyAbsSyn44 happy_var_1)
= HappyAbsSyn44
(happy_var_1
)
happyReduction_121 _ = notHappyAtAll
happyReduce_122 = happySpecReduce_1 55 happyReduction_122
happyReduction_122 (HappyAbsSyn44 happy_var_1)
= HappyAbsSyn44
(happy_var_1
)
happyReduction_122 _ = notHappyAtAll
happyReduce_123 = happySpecReduce_1 55 happyReduction_123
happyReduction_123 (HappyAbsSyn44 happy_var_1)
= HappyAbsSyn44
(happy_var_1
)
happyReduction_123 _ = notHappyAtAll
happyReduce_124 = happySpecReduce_3 56 happyReduction_124
happyReduction_124 (HappyTerminal (Loc happy_var_3 RightCurly))
(HappyAbsSyn48 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftCurly))
= HappyAbsSyn56
(BDecls (happy_var_1 <^^> happy_var_3 <** (happy_var_1:snd happy_var_2++[happy_var_3])) (fst happy_var_2)
)
happyReduction_124 _ _ _ = notHappyAtAll
happyReduce_125 = happySpecReduce_3 56 happyReduction_125
happyReduction_125 (HappyAbsSyn225 happy_var_3)
(HappyAbsSyn48 happy_var_2)
(HappyAbsSyn225 happy_var_1)
= HappyAbsSyn56
(BDecls (happy_var_1 <^^> happy_var_3 <** (happy_var_1:snd happy_var_2++[happy_var_3])) (fst happy_var_2)
)
happyReduction_125 _ _ _ = notHappyAtAll
happyReduce_126 = happyMonadReduce 3 57 happyReduction_126
happyReduction_126 ((HappyAbsSyn60 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 DoubleColon)) `HappyStk`
(HappyAbsSyn14 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { v <- checkSigVar happy_var_1;
return $ TypeSig (happy_var_1 <> happy_var_3 <** [happy_var_2]) [v] happy_var_3 })
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_127 = happyMonadReduce 5 57 happyReduction_127
happyReduction_127 ((HappyAbsSyn60 happy_var_5) `HappyStk`
(HappyTerminal (Loc happy_var_4 DoubleColon)) `HappyStk`
(HappyAbsSyn62 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 Comma)) `HappyStk`
(HappyAbsSyn14 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { v <- checkSigVar happy_var_1;
let {(vs,ss,_) = happy_var_3 ; l = happy_var_1 <> happy_var_5 <** (happy_var_2 : reverse ss ++ [happy_var_4]) } ;
return $ TypeSig l (v : reverse vs) happy_var_5 })
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_128 = happySpecReduce_1 57 happyReduction_128
happyReduction_128 (HappyAbsSyn44 happy_var_1)
= HappyAbsSyn44
(happy_var_1
)
happyReduction_128 _ = notHappyAtAll
happyReduce_129 = happyReduce 4 58 happyReduction_129
happyReduction_129 ((HappyTerminal (Loc happy_var_4 PragmaEnd)) `HappyStk`
(HappyAbsSyn85 happy_var_3) `HappyStk`
(HappyAbsSyn68 happy_var_2) `HappyStk`
(HappyTerminal happy_var_1) `HappyStk`
happyRest)
= HappyAbsSyn44
(let Loc l (INLINE s) = happy_var_1 in InlineSig (l <^^> happy_var_4 <** [l,happy_var_4]) s happy_var_2 happy_var_3
) `HappyStk` happyRest
happyReduce_130 = happyReduce 4 58 happyReduction_130
happyReduction_130 ((HappyTerminal (Loc happy_var_4 PragmaEnd)) `HappyStk`
(HappyAbsSyn85 happy_var_3) `HappyStk`
(HappyAbsSyn68 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 INLINE_CONLIKE)) `HappyStk`
happyRest)
= HappyAbsSyn44
(InlineConlikeSig (happy_var_1 <^^> happy_var_4 <** [happy_var_1,happy_var_4]) happy_var_2 happy_var_3
) `HappyStk` happyRest
happyReduce_131 = happyReduce 6 58 happyReduction_131
happyReduction_131 ((HappyTerminal (Loc happy_var_6 PragmaEnd)) `HappyStk`
(HappyAbsSyn52 happy_var_5) `HappyStk`
(HappyTerminal (Loc happy_var_4 DoubleColon)) `HappyStk`
(HappyAbsSyn85 happy_var_3) `HappyStk`
(HappyAbsSyn68 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 SPECIALISE)) `HappyStk`
happyRest)
= HappyAbsSyn44
(SpecSig (happy_var_1 <^^> happy_var_6 <** (happy_var_1: happy_var_4 : snd happy_var_5 ++ [happy_var_6])) happy_var_2 happy_var_3 (fst happy_var_5)
) `HappyStk` happyRest
happyReduce_132 = happyReduce 6 58 happyReduction_132
happyReduction_132 ((HappyTerminal (Loc happy_var_6 PragmaEnd)) `HappyStk`
(HappyAbsSyn52 happy_var_5) `HappyStk`
(HappyTerminal (Loc happy_var_4 DoubleColon)) `HappyStk`
(HappyAbsSyn85 happy_var_3) `HappyStk`
(HappyAbsSyn68 happy_var_2) `HappyStk`
(HappyTerminal happy_var_1) `HappyStk`
happyRest)
= HappyAbsSyn44
(let Loc l (SPECIALISE_INLINE s) = happy_var_1
in SpecInlineSig (l <^^> happy_var_6 <** (l:happy_var_4:snd happy_var_5++[happy_var_6])) s happy_var_2 happy_var_3 (fst happy_var_5)
) `HappyStk` happyRest
happyReduce_133 = happyMonadReduce 4 58 happyReduction_133
happyReduction_133 ((HappyTerminal (Loc happy_var_4 PragmaEnd)) `HappyStk`
(HappyAbsSyn78 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 KW_Instance)) `HappyStk`
(HappyTerminal (Loc happy_var_1 SPECIALISE)) `HappyStk`
happyRest) tk
= happyThen (( do { (cs,ih) <- checkInstHeader happy_var_3;
let {l = happy_var_1 <^^> happy_var_4 <** [happy_var_1,happy_var_2,happy_var_4]};
return $ InstSig l cs ih })
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_134 = happySpecReduce_1 59 happyReduction_134
happyReduction_134 (HappyAbsSyn60 happy_var_1)
= HappyAbsSyn52
(([happy_var_1],[])
)
happyReduction_134 _ = notHappyAtAll
happyReduce_135 = happySpecReduce_3 59 happyReduction_135
happyReduction_135 (HappyAbsSyn52 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn60 happy_var_1)
= HappyAbsSyn52
((happy_var_1 : fst happy_var_3, happy_var_2 : snd happy_var_3)
)
happyReduction_135 _ _ _ = notHappyAtAll
happyReduce_136 = happyMonadReduce 1 60 happyReduction_136
happyReduction_136 ((HappyAbsSyn78 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkType $ mkTyForall (ann happy_var_1) Nothing Nothing happy_var_1)
) (\r -> happyReturn (HappyAbsSyn60 r))
happyReduce_137 = happySpecReduce_1 61 happyReduction_137
happyReduction_137 (HappyAbsSyn56 happy_var_1)
= HappyAbsSyn56
(happy_var_1
)
happyReduction_137 _ = notHappyAtAll
happyReduce_138 = happySpecReduce_3 61 happyReduction_138
happyReduction_138 (HappyTerminal (Loc happy_var_3 RightCurly))
(HappyAbsSyn192 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftCurly))
= HappyAbsSyn56
(IPBinds (happy_var_1 <^^> happy_var_3 <** snd happy_var_2) (fst happy_var_2)
)
happyReduction_138 _ _ _ = notHappyAtAll
happyReduce_139 = happySpecReduce_3 61 happyReduction_139
happyReduction_139 (HappyAbsSyn225 happy_var_3)
(HappyAbsSyn192 happy_var_2)
(HappyAbsSyn225 happy_var_1)
= HappyAbsSyn56
(IPBinds (happy_var_1 <^^> happy_var_3 <** snd happy_var_2) (fst happy_var_2)
)
happyReduction_139 _ _ _ = notHappyAtAll
happyReduce_140 = happySpecReduce_3 62 happyReduction_140
happyReduction_140 (HappyAbsSyn75 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn62 happy_var_1)
= HappyAbsSyn62
(let (ns,ss,l) = happy_var_1 in (happy_var_3 : ns, happy_var_2 : ss, l <++> ann happy_var_3)
)
happyReduction_140 _ _ _ = notHappyAtAll
happyReduce_141 = happyMonadReduce 1 62 happyReduction_141
happyReduction_141 ((HappyAbsSyn85 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { n <- checkUnQual happy_var_1;
return ([n],[],ann n) })
) (\r -> happyReturn (HappyAbsSyn62 r))
happyReduce_142 = happySpecReduce_1 63 happyReduction_142
happyReduction_142 (HappyTerminal (Loc happy_var_1 KW_StdCall))
= HappyAbsSyn63
(StdCall (nIS happy_var_1)
)
happyReduction_142 _ = notHappyAtAll
happyReduce_143 = happySpecReduce_1 63 happyReduction_143
happyReduction_143 (HappyTerminal (Loc happy_var_1 KW_CCall))
= HappyAbsSyn63
(CCall (nIS happy_var_1)
)
happyReduction_143 _ = notHappyAtAll
happyReduce_144 = happySpecReduce_1 63 happyReduction_144
happyReduction_144 (HappyTerminal (Loc happy_var_1 KW_CPlusPlus))
= HappyAbsSyn63
(CPlusPlus (nIS happy_var_1)
)
happyReduction_144 _ = notHappyAtAll
happyReduce_145 = happySpecReduce_1 63 happyReduction_145
happyReduction_145 (HappyTerminal (Loc happy_var_1 KW_DotNet))
= HappyAbsSyn63
(DotNet (nIS happy_var_1)
)
happyReduction_145 _ = notHappyAtAll
happyReduce_146 = happySpecReduce_1 63 happyReduction_146
happyReduction_146 (HappyTerminal (Loc happy_var_1 KW_Jvm))
= HappyAbsSyn63
(Jvm (nIS happy_var_1)
)
happyReduction_146 _ = notHappyAtAll
happyReduce_147 = happySpecReduce_1 63 happyReduction_147
happyReduction_147 (HappyTerminal (Loc happy_var_1 KW_Js))
= HappyAbsSyn63
(Js (nIS happy_var_1)
)
happyReduction_147 _ = notHappyAtAll
happyReduce_148 = happySpecReduce_1 63 happyReduction_148
happyReduction_148 (HappyTerminal (Loc happy_var_1 KW_CApi))
= HappyAbsSyn63
(CApi (nIS happy_var_1)
)
happyReduction_148 _ = notHappyAtAll
happyReduce_149 = happySpecReduce_1 64 happyReduction_149
happyReduction_149 (HappyTerminal (Loc happy_var_1 KW_Safe))
= HappyAbsSyn64
(Just $ PlaySafe (nIS happy_var_1) False
)
happyReduction_149 _ = notHappyAtAll
happyReduce_150 = happySpecReduce_1 64 happyReduction_150
happyReduction_150 (HappyTerminal (Loc happy_var_1 KW_Unsafe))
= HappyAbsSyn64
(Just $ PlayRisky (nIS happy_var_1)
)
happyReduction_150 _ = notHappyAtAll
happyReduce_151 = happySpecReduce_1 64 happyReduction_151
happyReduction_151 (HappyTerminal (Loc happy_var_1 KW_Threadsafe))
= HappyAbsSyn64
(Just $ PlaySafe (nIS happy_var_1) True
)
happyReduction_151 _ = notHappyAtAll
happyReduce_152 = happySpecReduce_1 64 happyReduction_152
happyReduction_152 (HappyTerminal (Loc happy_var_1 KW_Interruptible))
= HappyAbsSyn64
(Just $ PlayInterruptible (nIS happy_var_1)
)
happyReduction_152 _ = notHappyAtAll
happyReduce_153 = happySpecReduce_0 64 happyReduction_153
happyReduction_153 = HappyAbsSyn64
(Nothing
)
happyReduce_154 = happyReduce 4 65 happyReduction_154
happyReduction_154 ((HappyAbsSyn60 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 DoubleColon)) `HappyStk`
(HappyAbsSyn75 happy_var_2) `HappyStk`
(HappyTerminal happy_var_1) `HappyStk`
happyRest)
= HappyAbsSyn65
(let Loc l (StringTok (s,_)) = happy_var_1 in (Just s, happy_var_2, happy_var_4, [l,happy_var_3])
) `HappyStk` happyRest
happyReduce_155 = happySpecReduce_3 65 happyReduction_155
happyReduction_155 (HappyAbsSyn60 happy_var_3)
(HappyTerminal (Loc happy_var_2 DoubleColon))
(HappyAbsSyn75 happy_var_1)
= HappyAbsSyn65
((Nothing, happy_var_1, happy_var_3, [happy_var_2])
)
happyReduction_155 _ _ _ = notHappyAtAll
happyReduce_156 = happySpecReduce_3 66 happyReduction_156
happyReduction_156 (HappyAbsSyn67 happy_var_3)
_
(HappyAbsSyn66 happy_var_1)
= HappyAbsSyn66
(happy_var_3 : happy_var_1
)
happyReduction_156 _ _ _ = notHappyAtAll
happyReduce_157 = happySpecReduce_2 66 happyReduction_157
happyReduction_157 _
(HappyAbsSyn66 happy_var_1)
= HappyAbsSyn66
(happy_var_1
)
happyReduction_157 _ _ = notHappyAtAll
happyReduce_158 = happySpecReduce_1 66 happyReduction_158
happyReduction_158 (HappyAbsSyn67 happy_var_1)
= HappyAbsSyn66
([happy_var_1]
)
happyReduction_158 _ = notHappyAtAll
happyReduce_159 = happySpecReduce_0 66 happyReduction_159
happyReduction_159 = HappyAbsSyn66
([]
)
happyReduce_160 = happyMonadReduce 6 67 happyReduction_160
happyReduction_160 ((HappyAbsSyn139 happy_var_6) `HappyStk`
(HappyTerminal (Loc happy_var_5 Equals)) `HappyStk`
(HappyAbsSyn14 happy_var_4) `HappyStk`
(HappyAbsSyn69 happy_var_3) `HappyStk`
(HappyAbsSyn68 happy_var_2) `HappyStk`
(HappyTerminal happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { let {Loc l (StringTok (s,_)) = happy_var_1};
e <- checkRuleExpr happy_var_4;
return $ Rule (nIS l <++> ann happy_var_6 <** l:snd happy_var_3 ++ [happy_var_5]) s happy_var_2 (fst happy_var_3) e happy_var_6 })
) (\r -> happyReturn (HappyAbsSyn67 r))
happyReduce_161 = happySpecReduce_0 68 happyReduction_161
happyReduction_161 = HappyAbsSyn68
(Nothing
)
happyReduce_162 = happySpecReduce_3 68 happyReduction_162
happyReduction_162 (HappyTerminal (Loc happy_var_3 RightSquare))
(HappyTerminal happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftSquare))
= HappyAbsSyn68
(let Loc l (IntTok (i,_)) = happy_var_2 in Just $ ActiveFrom (happy_var_1 <^^> happy_var_3 <** [happy_var_1,l,happy_var_3]) (fromInteger i)
)
happyReduction_162 _ _ _ = notHappyAtAll
happyReduce_163 = happyReduce 4 68 happyReduction_163
happyReduction_163 ((HappyTerminal (Loc happy_var_4 RightSquare)) `HappyStk`
(HappyTerminal happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 Tilde)) `HappyStk`
(HappyTerminal (Loc happy_var_1 LeftSquare)) `HappyStk`
happyRest)
= HappyAbsSyn68
(let Loc l (IntTok (i,_)) = happy_var_3 in Just $ ActiveUntil (happy_var_1 <^^> happy_var_4 <** [happy_var_1,happy_var_2,l,happy_var_4]) (fromInteger i)
) `HappyStk` happyRest
happyReduce_164 = happySpecReduce_0 69 happyReduction_164
happyReduction_164 = HappyAbsSyn69
((Nothing,[])
)
happyReduce_165 = happySpecReduce_3 69 happyReduction_165
happyReduction_165 (HappyTerminal (Loc happy_var_3 Dot))
(HappyAbsSyn70 happy_var_2)
(HappyTerminal (Loc happy_var_1 KW_Forall))
= HappyAbsSyn69
((Just happy_var_2,[happy_var_1,happy_var_3])
)
happyReduction_165 _ _ _ = notHappyAtAll
happyReduce_166 = happySpecReduce_1 70 happyReduction_166
happyReduction_166 (HappyAbsSyn71 happy_var_1)
= HappyAbsSyn70
([happy_var_1]
)
happyReduction_166 _ = notHappyAtAll
happyReduce_167 = happySpecReduce_2 70 happyReduction_167
happyReduction_167 (HappyAbsSyn70 happy_var_2)
(HappyAbsSyn71 happy_var_1)
= HappyAbsSyn70
(happy_var_1 : happy_var_2
)
happyReduction_167 _ _ = notHappyAtAll
happyReduce_168 = happySpecReduce_1 71 happyReduction_168
happyReduction_168 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn71
(RuleVar (ann happy_var_1) happy_var_1
)
happyReduction_168 _ = notHappyAtAll
happyReduce_169 = happyReduce 5 71 happyReduction_169
happyReduction_169 ((HappyTerminal (Loc happy_var_5 RightParen)) `HappyStk`
(HappyAbsSyn60 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 DoubleColon)) `HappyStk`
(HappyAbsSyn75 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 LeftParen)) `HappyStk`
happyRest)
= HappyAbsSyn71
(TypedRuleVar (happy_var_1 <^^> happy_var_5 <** [happy_var_1,happy_var_3,happy_var_5]) happy_var_2 happy_var_4
) `HappyStk` happyRest
happyReduce_170 = happySpecReduce_3 72 happyReduction_170
happyReduction_170 (HappyAbsSyn73 happy_var_3)
(HappyTerminal (Loc happy_var_2 SemiColon))
(HappyAbsSyn72 happy_var_1)
= HappyAbsSyn72
((fst happy_var_3 : fst happy_var_1, snd happy_var_1 ++ (happy_var_2:snd happy_var_3))
)
happyReduction_170 _ _ _ = notHappyAtAll
happyReduce_171 = happySpecReduce_2 72 happyReduction_171
happyReduction_171 (HappyTerminal (Loc happy_var_2 SemiColon))
(HappyAbsSyn72 happy_var_1)
= HappyAbsSyn72
((fst happy_var_1, snd happy_var_1 ++ [happy_var_2])
)
happyReduction_171 _ _ = notHappyAtAll
happyReduce_172 = happySpecReduce_1 72 happyReduction_172
happyReduction_172 (HappyAbsSyn73 happy_var_1)
= HappyAbsSyn72
(([fst happy_var_1],snd happy_var_1)
)
happyReduction_172 _ = notHappyAtAll
happyReduce_173 = happySpecReduce_0 72 happyReduction_173
happyReduction_173 = HappyAbsSyn72
(([],[])
)
happyReduce_174 = happySpecReduce_2 73 happyReduction_174
happyReduction_174 (HappyTerminal happy_var_2)
(HappyAbsSyn18 happy_var_1)
= HappyAbsSyn73
(let Loc l (StringTok (s,_)) = happy_var_2 in ((fst happy_var_1,s),snd happy_var_1 ++ [l])
)
happyReduction_174 _ _ = notHappyAtAll
happyReduce_175 = happySpecReduce_1 74 happyReduction_175
happyReduction_175 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn18
(([happy_var_1],[])
)
happyReduction_175 _ = notHappyAtAll
happyReduce_176 = happySpecReduce_3 74 happyReduction_176
happyReduction_176 (HappyAbsSyn18 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn75 happy_var_1)
= HappyAbsSyn18
((happy_var_1 : fst happy_var_3, happy_var_2 : snd happy_var_3)
)
happyReduction_176 _ _ _ = notHappyAtAll
happyReduce_177 = happySpecReduce_1 75 happyReduction_177
happyReduction_177 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn75
(happy_var_1
)
happyReduction_177 _ = notHappyAtAll
happyReduce_178 = happySpecReduce_1 75 happyReduction_178
happyReduction_178 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn75
(happy_var_1
)
happyReduction_178 _ = notHappyAtAll
happyReduce_179 = happyMonadReduce 3 76 happyReduction_179
happyReduction_179 ((HappyAbsSyn14 happy_var_3) `HappyStk`
(HappyAbsSyn75 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Type)) `HappyStk`
happyRest) tk
= happyThen (( checkExpr happy_var_3 >>= \e -> return (TypeAnn (nIS happy_var_1 <++> ann e <** [happy_var_1]) happy_var_2 e))
) (\r -> happyReturn (HappyAbsSyn76 r))
happyReduce_180 = happyMonadReduce 2 76 happyReduction_180
happyReduction_180 ((HappyAbsSyn14 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Module)) `HappyStk`
happyRest) tk
= happyThen (( checkExpr happy_var_2 >>= \e -> return (ModuleAnn (nIS happy_var_1 <++> ann e <** [happy_var_1]) e))
) (\r -> happyReturn (HappyAbsSyn76 r))
happyReduce_181 = happyMonadReduce 2 76 happyReduction_181
happyReduction_181 ((HappyAbsSyn14 happy_var_2) `HappyStk`
(HappyAbsSyn75 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkExpr happy_var_2 >>= \e -> return (Ann (happy_var_1 <> e) happy_var_1 e))
) (\r -> happyReturn (HappyAbsSyn76 r))
happyReduce_182 = happyMonadReduce 1 77 happyReduction_182
happyReduction_182 ((HappyAbsSyn78 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkType happy_var_1)
) (\r -> happyReturn (HappyAbsSyn60 r))
happyReduce_183 = happySpecReduce_1 78 happyReduction_183
happyReduction_183 (HappyAbsSyn78 happy_var_1)
= HappyAbsSyn78
(happy_var_1
)
happyReduction_183 _ = notHappyAtAll
happyReduce_184 = happySpecReduce_3 78 happyReduction_184
happyReduction_184 (HappyAbsSyn78 happy_var_3)
(HappyAbsSyn85 happy_var_2)
(HappyAbsSyn78 happy_var_1)
= HappyAbsSyn78
(TyInfix (happy_var_1 <> happy_var_3) happy_var_1 happy_var_2 happy_var_3
)
happyReduction_184 _ _ _ = notHappyAtAll
happyReduce_185 = happySpecReduce_3 78 happyReduction_185
happyReduction_185 (HappyAbsSyn78 happy_var_3)
(HappyAbsSyn85 happy_var_2)
(HappyAbsSyn78 happy_var_1)
= HappyAbsSyn78
(TyInfix (happy_var_1 <> happy_var_3) happy_var_1 happy_var_2 happy_var_3
)
happyReduction_185 _ _ _ = notHappyAtAll
happyReduce_186 = happySpecReduce_3 78 happyReduction_186
happyReduction_186 (HappyAbsSyn78 happy_var_3)
(HappyTerminal (Loc happy_var_2 RightArrow))
(HappyAbsSyn78 happy_var_1)
= HappyAbsSyn78
(TyFun (happy_var_1 <> happy_var_3 <** [happy_var_2]) happy_var_1 happy_var_3
)
happyReduction_186 _ _ _ = notHappyAtAll
happyReduce_187 = happyMonadReduce 3 78 happyReduction_187
happyReduction_187 ((HappyAbsSyn78 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 Tilde)) `HappyStk`
(HappyAbsSyn78 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { checkEnabled TypeFamilies ;
let {l = happy_var_1 <> happy_var_3 <** [happy_var_2]};
return $ TyPred l $ EqualP l happy_var_1 happy_var_3 })
) (\r -> happyReturn (HappyAbsSyn78 r))
happyReduce_188 = happyMonadReduce 1 79 happyReduction_188
happyReduction_188 ((HappyAbsSyn78 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkType happy_var_1)
) (\r -> happyReturn (HappyAbsSyn60 r))
happyReduce_189 = happySpecReduce_3 80 happyReduction_189
happyReduction_189 (HappyAbsSyn78 happy_var_3)
(HappyTerminal (Loc happy_var_2 DoubleColon))
(HappyAbsSyn199 happy_var_1)
= HappyAbsSyn78
(let l = (happy_var_1 <> happy_var_3 <** [happy_var_2]) in TyPred l $ IParam l happy_var_1 happy_var_3
)
happyReduction_189 _ _ _ = notHappyAtAll
happyReduce_190 = happySpecReduce_1 80 happyReduction_190
happyReduction_190 (HappyAbsSyn78 happy_var_1)
= HappyAbsSyn78
(happy_var_1
)
happyReduction_190 _ = notHappyAtAll
happyReduce_191 = happyMonadReduce 1 81 happyReduction_191
happyReduction_191 ((HappyAbsSyn78 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkType happy_var_1)
) (\r -> happyReturn (HappyAbsSyn60 r))
happyReduce_192 = happySpecReduce_2 82 happyReduction_192
happyReduction_192 (HappyAbsSyn78 happy_var_2)
(HappyAbsSyn78 happy_var_1)
= HappyAbsSyn78
(TyApp (happy_var_1 <> happy_var_2) happy_var_1 happy_var_2
)
happyReduction_192 _ _ = notHappyAtAll
happyReduce_193 = happySpecReduce_1 82 happyReduction_193
happyReduction_193 (HappyAbsSyn78 happy_var_1)
= HappyAbsSyn78
(happy_var_1
)
happyReduction_193 _ = notHappyAtAll
happyReduce_194 = happyMonadReduce 1 83 happyReduction_194
happyReduction_194 ((HappyAbsSyn78 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkType happy_var_1)
) (\r -> happyReturn (HappyAbsSyn60 r))
happyReduce_195 = happySpecReduce_1 84 happyReduction_195
happyReduction_195 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn78
(TyCon (ann happy_var_1) happy_var_1
)
happyReduction_195 _ = notHappyAtAll
happyReduce_196 = happySpecReduce_1 84 happyReduction_196
happyReduction_196 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn78
(TyVar (ann happy_var_1) happy_var_1
)
happyReduction_196 _ = notHappyAtAll
happyReduce_197 = happySpecReduce_3 84 happyReduction_197
happyReduction_197 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn91 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn78
(TyTuple (happy_var_1 <^^> happy_var_3 <** (happy_var_1:reverse (happy_var_3:snd happy_var_2))) Boxed (reverse (fst happy_var_2))
)
happyReduction_197 _ _ _ = notHappyAtAll
happyReduce_198 = happySpecReduce_3 84 happyReduction_198
happyReduction_198 (HappyTerminal (Loc happy_var_3 RightHashParen))
(HappyAbsSyn91 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftHashParen))
= HappyAbsSyn78
(TyTuple (happy_var_1 <^^> happy_var_3 <** (happy_var_1:reverse (happy_var_3:snd happy_var_2))) Unboxed (reverse (fst happy_var_2))
)
happyReduction_198 _ _ _ = notHappyAtAll
happyReduce_199 = happySpecReduce_3 84 happyReduction_199
happyReduction_199 (HappyTerminal (Loc happy_var_3 RightSquare))
(HappyAbsSyn78 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftSquare))
= HappyAbsSyn78
(TyList (happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_3]) happy_var_2
)
happyReduction_199 _ _ _ = notHappyAtAll
happyReduce_200 = happySpecReduce_3 84 happyReduction_200
happyReduction_200 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn78 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn78
(TyParen (happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_3]) happy_var_2
)
happyReduction_200 _ _ _ = notHappyAtAll
happyReduce_201 = happyReduce 5 84 happyReduction_201
happyReduction_201 ((HappyTerminal (Loc happy_var_5 RightParen)) `HappyStk`
(HappyAbsSyn119 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 DoubleColon)) `HappyStk`
(HappyAbsSyn78 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 LeftParen)) `HappyStk`
happyRest)
= HappyAbsSyn78
(TyKind (happy_var_1 <^^> happy_var_5 <** [happy_var_1,happy_var_3,happy_var_5]) happy_var_2 happy_var_4
) `HappyStk` happyRest
happyReduce_202 = happySpecReduce_1 85 happyReduction_202
happyReduction_202 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn85
(happy_var_1
)
happyReduction_202 _ = notHappyAtAll
happyReduce_203 = happySpecReduce_2 85 happyReduction_203
happyReduction_203 (HappyTerminal (Loc happy_var_2 RightParen))
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn85
(unit_tycon_name (happy_var_1 <^^> happy_var_2 <** [happy_var_1,happy_var_2])
)
happyReduction_203 _ _ = notHappyAtAll
happyReduce_204 = happySpecReduce_3 85 happyReduction_204
happyReduction_204 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyTerminal (Loc happy_var_2 RightArrow))
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn85
(fun_tycon_name (happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_2,happy_var_3])
)
happyReduction_204 _ _ _ = notHappyAtAll
happyReduce_205 = happySpecReduce_2 85 happyReduction_205
happyReduction_205 (HappyTerminal (Loc happy_var_2 RightSquare))
(HappyTerminal (Loc happy_var_1 LeftSquare))
= HappyAbsSyn85
(list_tycon_name (happy_var_1 <^^> happy_var_2 <** [happy_var_1,happy_var_2])
)
happyReduction_205 _ _ = notHappyAtAll
happyReduce_206 = happySpecReduce_3 85 happyReduction_206
happyReduction_206 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn24 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn85
(tuple_tycon_name (happy_var_1 <^^> happy_var_3 <** (happy_var_1:reverse happy_var_2 ++ [happy_var_3])) Boxed (length happy_var_2)
)
happyReduction_206 _ _ _ = notHappyAtAll
happyReduce_207 = happySpecReduce_2 85 happyReduction_207
happyReduction_207 (HappyTerminal (Loc happy_var_2 RightHashParen))
(HappyTerminal (Loc happy_var_1 LeftHashParen))
= HappyAbsSyn85
(unboxed_singleton_tycon_name (happy_var_1 <^^> happy_var_2 <** [happy_var_1,happy_var_2])
)
happyReduction_207 _ _ = notHappyAtAll
happyReduce_208 = happySpecReduce_3 85 happyReduction_208
happyReduction_208 (HappyTerminal (Loc happy_var_3 RightHashParen))
(HappyAbsSyn24 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftHashParen))
= HappyAbsSyn85
(tuple_tycon_name (happy_var_1 <^^> happy_var_3 <** (happy_var_1:reverse happy_var_2 ++ [happy_var_3])) Unboxed (length happy_var_2)
)
happyReduction_208 _ _ _ = notHappyAtAll
happyReduce_209 = happySpecReduce_1 86 happyReduction_209
happyReduction_209 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn85
(happy_var_1
)
happyReduction_209 _ = notHappyAtAll
happyReduce_210 = happySpecReduce_3 86 happyReduction_210
happyReduction_210 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn85 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn85
(fmap (const (happy_var_1 <^^> happy_var_3 <** [happy_var_1, srcInfoSpan (ann happy_var_2), happy_var_3])) happy_var_2
)
happyReduction_210 _ _ _ = notHappyAtAll
happyReduce_211 = happySpecReduce_3 86 happyReduction_211
happyReduction_211 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn85 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn85
(fmap (const (happy_var_1 <^^> happy_var_3 <** [happy_var_1, srcInfoSpan (ann happy_var_2), happy_var_3])) happy_var_2
)
happyReduction_211 _ _ _ = notHappyAtAll
happyReduce_212 = happySpecReduce_1 87 happyReduction_212
happyReduction_212 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn85
(happy_var_1
)
happyReduction_212 _ = notHappyAtAll
happyReduce_213 = happyMonadReduce 1 88 happyReduction_213
happyReduction_213 ((HappyAbsSyn78 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkType happy_var_1)
) (\r -> happyReturn (HappyAbsSyn60 r))
happyReduce_214 = happyReduce 4 89 happyReduction_214
happyReduction_214 ((HappyAbsSyn78 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 Dot)) `HappyStk`
(HappyAbsSyn93 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Forall)) `HappyStk`
happyRest)
= HappyAbsSyn78
(TyForall (nIS happy_var_1 <++> ann happy_var_4 <** [happy_var_1,happy_var_3]) (Just (reverse (fst happy_var_2))) Nothing happy_var_4
) `HappyStk` happyRest
happyReduce_215 = happySpecReduce_2 89 happyReduction_215
happyReduction_215 (HappyAbsSyn78 happy_var_2)
(HappyAbsSyn90 happy_var_1)
= HappyAbsSyn78
(TyForall (happy_var_1 <> happy_var_2) Nothing (Just happy_var_1) happy_var_2
)
happyReduction_215 _ _ = notHappyAtAll
happyReduce_216 = happySpecReduce_1 89 happyReduction_216
happyReduction_216 (HappyAbsSyn78 happy_var_1)
= HappyAbsSyn78
(happy_var_1
)
happyReduction_216 _ = notHappyAtAll
happyReduce_217 = happyMonadReduce 2 90 happyReduction_217
happyReduction_217 ((HappyTerminal (Loc happy_var_2 DoubleArrow)) `HappyStk`
(HappyAbsSyn78 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkPContext $ (amap (\l -> l <++> nIS happy_var_2 <** (srcInfoPoints l ++ [happy_var_2]))) happy_var_1)
) (\r -> happyReturn (HappyAbsSyn90 r))
happyReduce_218 = happyMonadReduce 4 90 happyReduction_218
happyReduction_218 ((HappyTerminal (Loc happy_var_4 DoubleArrow)) `HappyStk`
(HappyAbsSyn78 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 Tilde)) `HappyStk`
(HappyAbsSyn78 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { checkEnabled TypeFamilies;
let {l = happy_var_1 <> happy_var_3 <** [happy_var_2,happy_var_4]};
checkPContext (TyPred l $ EqualP l happy_var_1 happy_var_3) })
) (\r -> happyReturn (HappyAbsSyn90 r))
happyReduce_219 = happySpecReduce_3 91 happyReduction_219
happyReduction_219 (HappyAbsSyn78 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn91 happy_var_1)
= HappyAbsSyn91
((happy_var_3 : fst happy_var_1, happy_var_2 : snd happy_var_1)
)
happyReduction_219 _ _ _ = notHappyAtAll
happyReduce_220 = happySpecReduce_1 92 happyReduction_220
happyReduction_220 (HappyAbsSyn78 happy_var_1)
= HappyAbsSyn91
(([happy_var_1],[])
)
happyReduction_220 _ = notHappyAtAll
happyReduce_221 = happySpecReduce_3 92 happyReduction_221
happyReduction_221 (HappyAbsSyn78 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn91 happy_var_1)
= HappyAbsSyn91
((happy_var_3 : fst happy_var_1, happy_var_2 : snd happy_var_1)
)
happyReduction_221 _ _ _ = notHappyAtAll
happyReduce_222 = happySpecReduce_2 93 happyReduction_222
happyReduction_222 (HappyAbsSyn94 happy_var_2)
(HappyAbsSyn93 happy_var_1)
= HappyAbsSyn93
((happy_var_2 : fst happy_var_1, Just (snd happy_var_1 <?+> ann happy_var_2))
)
happyReduction_222 _ _ = notHappyAtAll
happyReduce_223 = happySpecReduce_0 93 happyReduction_223
happyReduction_223 = HappyAbsSyn93
(([],Nothing)
)
happyReduce_224 = happySpecReduce_1 94 happyReduction_224
happyReduction_224 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn94
(UnkindedVar (ann happy_var_1) happy_var_1
)
happyReduction_224 _ = notHappyAtAll
happyReduce_225 = happyReduce 5 94 happyReduction_225
happyReduction_225 ((HappyTerminal (Loc happy_var_5 RightParen)) `HappyStk`
(HappyAbsSyn119 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 DoubleColon)) `HappyStk`
(HappyAbsSyn75 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 LeftParen)) `HappyStk`
happyRest)
= HappyAbsSyn94
(KindedVar (happy_var_1 <^^> happy_var_5 <** [happy_var_1,happy_var_3,happy_var_5]) happy_var_2 happy_var_4
) `HappyStk` happyRest
happyReduce_226 = happySpecReduce_2 95 happyReduction_226
happyReduction_226 (HappyAbsSyn75 happy_var_2)
(HappyAbsSyn95 happy_var_1)
= HappyAbsSyn95
((happy_var_2 : fst happy_var_1, Just (snd happy_var_1 <?+> ann happy_var_2))
)
happyReduction_226 _ _ = notHappyAtAll
happyReduce_227 = happySpecReduce_0 95 happyReduction_227
happyReduction_227 = HappyAbsSyn95
(([], Nothing)
)
happyReduce_228 = happySpecReduce_2 96 happyReduction_228
happyReduction_228 (HappyAbsSyn75 happy_var_2)
(HappyAbsSyn95 happy_var_1)
= HappyAbsSyn96
((happy_var_2 : fst happy_var_1, snd happy_var_1 <?+> ann happy_var_2)
)
happyReduction_228 _ _ = notHappyAtAll
happyReduce_229 = happySpecReduce_0 97 happyReduction_229
happyReduction_229 = HappyAbsSyn97
(([],[], Nothing)
)
happyReduce_230 = happyMonadReduce 2 97 happyReduction_230
happyReduction_230 ((HappyAbsSyn98 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 Bar)) `HappyStk`
happyRest) tk
= happyThen (( do { checkEnabled FunctionalDependencies ;
let {(fds,ss,l) = happy_var_2} ;
return (reverse fds, happy_var_1 : reverse ss, Just (nIS happy_var_1 <++> l)) })
) (\r -> happyReturn (HappyAbsSyn97 r))
happyReduce_231 = happySpecReduce_3 98 happyReduction_231
happyReduction_231 (HappyAbsSyn99 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn98 happy_var_1)
= HappyAbsSyn98
(let (fds,ss,l) = happy_var_1 in (happy_var_3 : fds, happy_var_2 : ss, l <++> ann happy_var_3)
)
happyReduction_231 _ _ _ = notHappyAtAll
happyReduce_232 = happySpecReduce_1 98 happyReduction_232
happyReduction_232 (HappyAbsSyn99 happy_var_1)
= HappyAbsSyn98
(([happy_var_1],[],ann happy_var_1)
)
happyReduction_232 _ = notHappyAtAll
happyReduce_233 = happySpecReduce_3 99 happyReduction_233
happyReduction_233 (HappyAbsSyn96 happy_var_3)
(HappyTerminal (Loc happy_var_2 RightArrow))
(HappyAbsSyn95 happy_var_1)
= HappyAbsSyn99
(FunDep (snd happy_var_1 <?+> nIS happy_var_2 <++> snd happy_var_3 <** [happy_var_2]) (reverse (fst happy_var_1)) (reverse (fst happy_var_3))
)
happyReduction_233 _ _ _ = notHappyAtAll
happyReduce_234 = happyMonadReduce 4 100 happyReduction_234
happyReduction_234 ((HappyTerminal (Loc happy_var_4 RightCurly)) `HappyStk`
(HappyAbsSyn101 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftCurly)) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Where)) `HappyStk`
happyRest) tk
= happyThen (( return (fst happy_var_3, happy_var_1 : happy_var_2 : snd happy_var_3 ++ [happy_var_4], Just $ happy_var_1 <^^> happy_var_4))
) (\r -> happyReturn (HappyAbsSyn100 r))
happyReduce_235 = happyMonadReduce 4 100 happyReduction_235
happyReduction_235 ((HappyAbsSyn225 happy_var_4) `HappyStk`
(HappyAbsSyn101 happy_var_3) `HappyStk`
(HappyAbsSyn225 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Where)) `HappyStk`
happyRest) tk
= happyThen (( return (fst happy_var_3, happy_var_1 : happy_var_2 : snd happy_var_3 ++ [happy_var_4], Just $ happy_var_1 <^^> happy_var_4))
) (\r -> happyReturn (HappyAbsSyn100 r))
happyReduce_236 = happyMonadReduce 0 100 happyReduction_236
happyReduction_236 (happyRest) tk
= happyThen (( checkEnabled EmptyDataDecls >> return ([],[],Nothing))
) (\r -> happyReturn (HappyAbsSyn100 r))
happyReduce_237 = happySpecReduce_3 101 happyReduction_237
happyReduction_237 (HappyAbsSyn24 happy_var_3)
(HappyAbsSyn101 happy_var_2)
(HappyAbsSyn24 happy_var_1)
= HappyAbsSyn101
((fst happy_var_2, reverse happy_var_1 ++ snd happy_var_2 ++ reverse happy_var_3)
)
happyReduction_237 _ _ _ = notHappyAtAll
happyReduce_238 = happySpecReduce_3 102 happyReduction_238
happyReduction_238 (HappyAbsSyn103 happy_var_3)
(HappyAbsSyn24 happy_var_2)
(HappyAbsSyn101 happy_var_1)
= HappyAbsSyn101
((happy_var_3 : fst happy_var_1, snd happy_var_1 ++ reverse happy_var_2)
)
happyReduction_238 _ _ _ = notHappyAtAll
happyReduce_239 = happySpecReduce_1 102 happyReduction_239
happyReduction_239 (HappyAbsSyn103 happy_var_1)
= HappyAbsSyn101
(([happy_var_1],[])
)
happyReduction_239 _ = notHappyAtAll
happyReduce_240 = happyMonadReduce 3 103 happyReduction_240
happyReduction_240 ((HappyAbsSyn60 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 DoubleColon)) `HappyStk`
(HappyAbsSyn85 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { c <- checkUnQual happy_var_1;
return $ GadtDecl (happy_var_1 <> happy_var_3 <** [happy_var_2]) c happy_var_3 })
) (\r -> happyReturn (HappyAbsSyn103 r))
happyReduce_241 = happySpecReduce_2 104 happyReduction_241
happyReduction_241 (HappyAbsSyn105 happy_var_2)
(HappyTerminal (Loc happy_var_1 Equals))
= HappyAbsSyn104
(let (ds,ss,l) = happy_var_2 in (ds, happy_var_1 : reverse ss, Just $ nIS happy_var_1 <++> l)
)
happyReduction_241 _ _ = notHappyAtAll
happyReduce_242 = happySpecReduce_3 105 happyReduction_242
happyReduction_242 (HappyAbsSyn106 happy_var_3)
(HappyTerminal (Loc happy_var_2 Bar))
(HappyAbsSyn105 happy_var_1)
= HappyAbsSyn105
(let (ds,ss,l) = happy_var_1 in (happy_var_3 : ds, happy_var_2 : ss, l <++> ann happy_var_3)
)
happyReduction_242 _ _ _ = notHappyAtAll
happyReduce_243 = happySpecReduce_1 105 happyReduction_243
happyReduction_243 (HappyAbsSyn106 happy_var_1)
= HappyAbsSyn105
(([happy_var_1],[],ann happy_var_1)
)
happyReduction_243 _ = notHappyAtAll
happyReduce_244 = happyMonadReduce 3 106 happyReduction_244
happyReduction_244 ((HappyAbsSyn108 happy_var_3) `HappyStk`
(HappyAbsSyn90 happy_var_2) `HappyStk`
(HappyAbsSyn107 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { checkEnabled ExistentialQuantification ;
ctxt <- checkContext (Just happy_var_2) ;
let {(mtvs,ss,ml) = happy_var_1} ;
return $ QualConDecl (ml <?+> ann happy_var_3 <** ss) mtvs ctxt happy_var_3 })
) (\r -> happyReturn (HappyAbsSyn106 r))
happyReduce_245 = happySpecReduce_2 106 happyReduction_245
happyReduction_245 (HappyAbsSyn108 happy_var_2)
(HappyAbsSyn107 happy_var_1)
= HappyAbsSyn106
(let (mtvs, ss, ml) = happy_var_1 in QualConDecl (ml <?+> ann happy_var_2 <** ss) mtvs Nothing happy_var_2
)
happyReduction_245 _ _ = notHappyAtAll
happyReduce_246 = happyMonadReduce 3 107 happyReduction_246
happyReduction_246 ((HappyTerminal (Loc happy_var_3 Dot)) `HappyStk`
(HappyAbsSyn93 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Forall)) `HappyStk`
happyRest) tk
= happyThen (( checkEnabled ExistentialQuantification >> return (Just (fst happy_var_2), [happy_var_1,happy_var_3], Just $ happy_var_1 <^^> happy_var_3))
) (\r -> happyReturn (HappyAbsSyn107 r))
happyReduce_247 = happySpecReduce_0 107 happyReduction_247
happyReduction_247 = HappyAbsSyn107
((Nothing, [], Nothing)
)
happyReduce_248 = happySpecReduce_1 108 happyReduction_248
happyReduction_248 (HappyAbsSyn109 happy_var_1)
= HappyAbsSyn108
(let (n,ts,l) = happy_var_1 in ConDecl l n ts
)
happyReduction_248 _ = notHappyAtAll
happyReduce_249 = happySpecReduce_3 108 happyReduction_249
happyReduction_249 (HappyAbsSyn111 happy_var_3)
(HappyAbsSyn75 happy_var_2)
(HappyAbsSyn111 happy_var_1)
= HappyAbsSyn108
(InfixConDecl (happy_var_1 <> happy_var_3) happy_var_1 happy_var_2 happy_var_3
)
happyReduction_249 _ _ _ = notHappyAtAll
happyReduce_250 = happyMonadReduce 3 108 happyReduction_250
happyReduction_250 ((HappyTerminal (Loc happy_var_3 RightCurly)) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftCurly)) `HappyStk`
(HappyAbsSyn85 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { c <- checkUnQual happy_var_1; return $ RecDecl (ann happy_var_1 <++> nIS happy_var_3 <** [happy_var_2,happy_var_3]) c [] })
) (\r -> happyReturn (HappyAbsSyn108 r))
happyReduce_251 = happyMonadReduce 4 108 happyReduction_251
happyReduction_251 ((HappyTerminal (Loc happy_var_4 RightCurly)) `HappyStk`
(HappyAbsSyn113 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftCurly)) `HappyStk`
(HappyAbsSyn85 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { c <- checkUnQual happy_var_1;
return $ RecDecl (ann happy_var_1 <++> nIS happy_var_4 <** (happy_var_2:reverse (snd happy_var_3) ++ [happy_var_4])) c (reverse (fst happy_var_3)) })
) (\r -> happyReturn (HappyAbsSyn108 r))
happyReduce_252 = happyMonadReduce 1 109 happyReduction_252
happyReduction_252 ((HappyAbsSyn78 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { (c,ts) <- splitTyConApp happy_var_1;
return (c,map (\t -> UnBangedTy (ann t) t) ts,ann happy_var_1) })
) (\r -> happyReturn (HappyAbsSyn109 r))
happyReduce_253 = happySpecReduce_1 109 happyReduction_253
happyReduction_253 (HappyAbsSyn110 happy_var_1)
= HappyAbsSyn109
(happy_var_1
)
happyReduction_253 _ = notHappyAtAll
happyReduce_254 = happyMonadReduce 3 110 happyReduction_254
happyReduction_254 ((HappyAbsSyn60 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 Exclamation)) `HappyStk`
(HappyAbsSyn78 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { (c,ts) <- splitTyConApp happy_var_1;
return (c,map (\t -> UnBangedTy (ann t) t) ts++
[BangedTy (nIS happy_var_2 <++> ann happy_var_3 <** [happy_var_2]) happy_var_3], happy_var_1 <> happy_var_3) })
) (\r -> happyReturn (HappyAbsSyn110 r))
happyReduce_255 = happyMonadReduce 5 110 happyReduction_255
happyReduction_255 ((HappyAbsSyn60 happy_var_5) `HappyStk`
(HappyTerminal (Loc happy_var_4 Exclamation)) `HappyStk`
(HappyTerminal (Loc happy_var_3 PragmaEnd)) `HappyStk`
(HappyTerminal (Loc happy_var_2 UNPACK)) `HappyStk`
(HappyAbsSyn78 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { (c,ts) <- splitTyConApp happy_var_1;
return (c,map (\t -> UnBangedTy (ann t) t) ts++
[UnpackedTy (nIS happy_var_2 <++> ann happy_var_5 <** [happy_var_2,happy_var_3,happy_var_4]) happy_var_5], happy_var_1 <> happy_var_5) })
) (\r -> happyReturn (HappyAbsSyn110 r))
happyReduce_256 = happySpecReduce_2 110 happyReduction_256
happyReduction_256 (HappyAbsSyn111 happy_var_2)
(HappyAbsSyn110 happy_var_1)
= HappyAbsSyn110
(let (n,ts,l) = happy_var_1 in (n, ts ++ [happy_var_2],l <++> ann happy_var_2)
)
happyReduction_256 _ _ = notHappyAtAll
happyReduce_257 = happySpecReduce_1 111 happyReduction_257
happyReduction_257 (HappyAbsSyn60 happy_var_1)
= HappyAbsSyn111
(UnBangedTy (ann happy_var_1) happy_var_1
)
happyReduction_257 _ = notHappyAtAll
happyReduce_258 = happySpecReduce_2 111 happyReduction_258
happyReduction_258 (HappyAbsSyn60 happy_var_2)
(HappyTerminal (Loc happy_var_1 Exclamation))
= HappyAbsSyn111
(BangedTy (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2
)
happyReduction_258 _ _ = notHappyAtAll
happyReduce_259 = happyReduce 4 111 happyReduction_259
happyReduction_259 ((HappyAbsSyn60 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 Exclamation)) `HappyStk`
(HappyTerminal (Loc happy_var_2 PragmaEnd)) `HappyStk`
(HappyTerminal (Loc happy_var_1 UNPACK)) `HappyStk`
happyRest)
= HappyAbsSyn111
(UnpackedTy (nIS happy_var_1 <++> ann happy_var_4 <** [happy_var_1,happy_var_2,happy_var_3]) happy_var_4
) `HappyStk` happyRest
happyReduce_260 = happySpecReduce_1 112 happyReduction_260
happyReduction_260 (HappyAbsSyn60 happy_var_1)
= HappyAbsSyn111
(UnBangedTy (ann happy_var_1) happy_var_1
)
happyReduction_260 _ = notHappyAtAll
happyReduce_261 = happySpecReduce_2 112 happyReduction_261
happyReduction_261 (HappyAbsSyn60 happy_var_2)
(HappyTerminal (Loc happy_var_1 Exclamation))
= HappyAbsSyn111
(BangedTy (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2
)
happyReduction_261 _ _ = notHappyAtAll
happyReduce_262 = happyReduce 4 112 happyReduction_262
happyReduction_262 ((HappyAbsSyn60 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 Exclamation)) `HappyStk`
(HappyTerminal (Loc happy_var_2 PragmaEnd)) `HappyStk`
(HappyTerminal (Loc happy_var_1 UNPACK)) `HappyStk`
happyRest)
= HappyAbsSyn111
(UnpackedTy (nIS happy_var_1 <++> ann happy_var_4 <** [happy_var_1,happy_var_2,happy_var_3]) happy_var_4
) `HappyStk` happyRest
happyReduce_263 = happySpecReduce_3 113 happyReduction_263
happyReduction_263 (HappyAbsSyn114 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn113 happy_var_1)
= HappyAbsSyn113
((happy_var_3 : fst happy_var_1, happy_var_2 : snd happy_var_1)
)
happyReduction_263 _ _ _ = notHappyAtAll
happyReduce_264 = happySpecReduce_1 113 happyReduction_264
happyReduction_264 (HappyAbsSyn114 happy_var_1)
= HappyAbsSyn113
(([happy_var_1],[])
)
happyReduction_264 _ = notHappyAtAll
happyReduce_265 = happySpecReduce_3 114 happyReduction_265
happyReduction_265 (HappyAbsSyn111 happy_var_3)
(HappyTerminal (Loc happy_var_2 DoubleColon))
(HappyAbsSyn62 happy_var_1)
= HappyAbsSyn114
(let (ns,ss,l) = happy_var_1 in FieldDecl (l <++> ann happy_var_3 <** (reverse ss ++ [happy_var_2])) (reverse ns) happy_var_3
)
happyReduction_265 _ _ _ = notHappyAtAll
happyReduce_266 = happySpecReduce_1 115 happyReduction_266
happyReduction_266 (HappyAbsSyn60 happy_var_1)
= HappyAbsSyn111
(UnBangedTy (ann happy_var_1) happy_var_1
)
happyReduction_266 _ = notHappyAtAll
happyReduce_267 = happySpecReduce_2 115 happyReduction_267
happyReduction_267 (HappyAbsSyn60 happy_var_2)
(HappyTerminal (Loc happy_var_1 Exclamation))
= HappyAbsSyn111
(BangedTy (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2
)
happyReduction_267 _ _ = notHappyAtAll
happyReduce_268 = happyReduce 4 115 happyReduction_268
happyReduction_268 ((HappyAbsSyn60 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 Exclamation)) `HappyStk`
(HappyTerminal (Loc happy_var_2 PragmaEnd)) `HappyStk`
(HappyTerminal (Loc happy_var_1 UNPACK)) `HappyStk`
happyRest)
= HappyAbsSyn111
(UnpackedTy (nIS happy_var_1 <++> ann happy_var_4 <** [happy_var_1,happy_var_2,happy_var_3]) happy_var_4
) `HappyStk` happyRest
happyReduce_269 = happySpecReduce_0 116 happyReduction_269
happyReduction_269 = HappyAbsSyn116
(Nothing
)
happyReduce_270 = happySpecReduce_2 116 happyReduction_270
happyReduction_270 (HappyAbsSyn85 happy_var_2)
(HappyTerminal (Loc happy_var_1 KW_Deriving))
= HappyAbsSyn116
(let l = nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1] in Just $ Deriving l [IHead (ann happy_var_2) happy_var_2 []]
)
happyReduction_270 _ _ = notHappyAtAll
happyReduce_271 = happySpecReduce_3 116 happyReduction_271
happyReduction_271 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyTerminal (Loc happy_var_2 LeftParen))
(HappyTerminal (Loc happy_var_1 KW_Deriving))
= HappyAbsSyn116
(Just $ Deriving (happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_2,happy_var_3]) []
)
happyReduction_271 _ _ _ = notHappyAtAll
happyReduce_272 = happyReduce 4 116 happyReduction_272
happyReduction_272 ((HappyTerminal (Loc happy_var_4 RightParen)) `HappyStk`
(HappyAbsSyn117 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftParen)) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Deriving)) `HappyStk`
happyRest)
= HappyAbsSyn116
(Just $ Deriving (happy_var_1 <^^> happy_var_4 <** happy_var_1:happy_var_2: reverse (snd happy_var_3) ++ [happy_var_4]) (reverse (fst happy_var_3))
) `HappyStk` happyRest
happyReduce_273 = happyMonadReduce 1 117 happyReduction_273
happyReduction_273 ((HappyAbsSyn91 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkDeriving (fst happy_var_1) >>= \ds -> return (ds, snd happy_var_1))
) (\r -> happyReturn (HappyAbsSyn117 r))
happyReduce_274 = happySpecReduce_1 118 happyReduction_274
happyReduction_274 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn85
(happy_var_1
)
happyReduction_274 _ = notHappyAtAll
happyReduce_275 = happyMonadReduce 1 119 happyReduction_275
happyReduction_275 ((HappyAbsSyn119 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkEnabled KindSignatures >> return happy_var_1)
) (\r -> happyReturn (HappyAbsSyn119 r))
happyReduce_276 = happySpecReduce_1 120 happyReduction_276
happyReduction_276 (HappyAbsSyn119 happy_var_1)
= HappyAbsSyn119
(happy_var_1
)
happyReduction_276 _ = notHappyAtAll
happyReduce_277 = happySpecReduce_3 120 happyReduction_277
happyReduction_277 (HappyAbsSyn119 happy_var_3)
(HappyTerminal (Loc happy_var_2 RightArrow))
(HappyAbsSyn119 happy_var_1)
= HappyAbsSyn119
(KindFn (happy_var_1 <> happy_var_3 <** [happy_var_2]) happy_var_1 happy_var_3
)
happyReduction_277 _ _ _ = notHappyAtAll
happyReduce_278 = happySpecReduce_1 121 happyReduction_278
happyReduction_278 (HappyTerminal (Loc happy_var_1 Star))
= HappyAbsSyn119
(KindStar (nIS happy_var_1)
)
happyReduction_278 _ = notHappyAtAll
happyReduce_279 = happySpecReduce_1 121 happyReduction_279
happyReduction_279 (HappyTerminal (Loc happy_var_1 Exclamation))
= HappyAbsSyn119
(KindBang (nIS happy_var_1)
)
happyReduction_279 _ = notHappyAtAll
happyReduce_280 = happySpecReduce_3 121 happyReduction_280
happyReduction_280 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn119 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn119
(KindParen (happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_3]) happy_var_2
)
happyReduction_280 _ _ _ = notHappyAtAll
happyReduce_281 = happySpecReduce_0 122 happyReduction_281
happyReduction_281 = HappyAbsSyn122
((Nothing,[])
)
happyReduce_282 = happySpecReduce_2 122 happyReduction_282
happyReduction_282 (HappyAbsSyn119 happy_var_2)
(HappyTerminal (Loc happy_var_1 DoubleColon))
= HappyAbsSyn122
((Just happy_var_2,[happy_var_1])
)
happyReduction_282 _ _ = notHappyAtAll
happyReduce_283 = happyMonadReduce 4 123 happyReduction_283
happyReduction_283 ((HappyTerminal (Loc happy_var_4 RightCurly)) `HappyStk`
(HappyAbsSyn124 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftCurly)) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Where)) `HappyStk`
happyRest) tk
= happyThen (( checkClassBody (fst happy_var_3) >>= \vs -> return (Just vs, happy_var_1:happy_var_2: snd happy_var_3 ++ [happy_var_4], Just (happy_var_1 <^^> happy_var_4)))
) (\r -> happyReturn (HappyAbsSyn123 r))
happyReduce_284 = happyMonadReduce 4 123 happyReduction_284
happyReduction_284 ((HappyAbsSyn225 happy_var_4) `HappyStk`
(HappyAbsSyn124 happy_var_3) `HappyStk`
(HappyAbsSyn225 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Where)) `HappyStk`
happyRest) tk
= happyThen (( checkClassBody (fst happy_var_3) >>= \vs -> return (Just vs, happy_var_1:happy_var_2: snd happy_var_3 ++ [happy_var_4], Just (happy_var_1 <^^> happy_var_4)))
) (\r -> happyReturn (HappyAbsSyn123 r))
happyReduce_285 = happySpecReduce_0 123 happyReduction_285
happyReduction_285 = HappyAbsSyn123
((Nothing,[],Nothing)
)
happyReduce_286 = happyMonadReduce 3 124 happyReduction_286
happyReduction_286 ((HappyAbsSyn24 happy_var_3) `HappyStk`
(HappyAbsSyn124 happy_var_2) `HappyStk`
(HappyAbsSyn24 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkRevClsDecls (fst happy_var_2) >>= \cs -> return (cs, reverse happy_var_1 ++ snd happy_var_2 ++ reverse happy_var_3))
) (\r -> happyReturn (HappyAbsSyn124 r))
happyReduce_287 = happySpecReduce_1 124 happyReduction_287
happyReduction_287 (HappyAbsSyn24 happy_var_1)
= HappyAbsSyn124
(([],reverse happy_var_1)
)
happyReduction_287 _ = notHappyAtAll
happyReduce_288 = happySpecReduce_3 125 happyReduction_288
happyReduction_288 (HappyAbsSyn126 happy_var_3)
(HappyAbsSyn24 happy_var_2)
(HappyAbsSyn124 happy_var_1)
= HappyAbsSyn124
((happy_var_3 : fst happy_var_1, snd happy_var_1 ++ reverse happy_var_2)
)
happyReduction_288 _ _ _ = notHappyAtAll
happyReduce_289 = happySpecReduce_1 125 happyReduction_289
happyReduction_289 (HappyAbsSyn126 happy_var_1)
= HappyAbsSyn124
(([happy_var_1],[])
)
happyReduction_289 _ = notHappyAtAll
happyReduce_290 = happySpecReduce_1 126 happyReduction_290
happyReduction_290 (HappyAbsSyn44 happy_var_1)
= HappyAbsSyn126
(ClsDecl (ann happy_var_1) happy_var_1
)
happyReduction_290 _ = notHappyAtAll
happyReduce_291 = happyMonadReduce 1 126 happyReduction_291
happyReduction_291 ((HappyAbsSyn126 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkEnabled TypeFamilies >> return happy_var_1)
) (\r -> happyReturn (HappyAbsSyn126 r))
happyReduce_292 = happyMonadReduce 3 127 happyReduction_292
happyReduction_292 ((HappyAbsSyn122 happy_var_3) `HappyStk`
(HappyAbsSyn78 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Type)) `HappyStk`
happyRest) tk
= happyThen (( do { dh <- checkSimpleType happy_var_2;
return (ClsTyFam (nIS happy_var_1 <++> ann happy_var_2 <+?> (fmap ann) (fst happy_var_3) <** happy_var_1:snd happy_var_3) dh (fst happy_var_3)) })
) (\r -> happyReturn (HappyAbsSyn126 r))
happyReduce_293 = happyReduce 4 127 happyReduction_293
happyReduction_293 ((HappyAbsSyn60 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 Equals)) `HappyStk`
(HappyAbsSyn60 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Type)) `HappyStk`
happyRest)
= HappyAbsSyn126
(ClsTyDef (nIS happy_var_1 <++> ann happy_var_4 <** [happy_var_1,happy_var_3]) happy_var_2 happy_var_4
) `HappyStk` happyRest
happyReduce_294 = happyMonadReduce 3 127 happyReduction_294
happyReduction_294 ((HappyAbsSyn122 happy_var_3) `HappyStk`
(HappyAbsSyn78 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Data)) `HappyStk`
happyRest) tk
= happyThen (( do { (cs,dh) <- checkDataHeader happy_var_2;
return (ClsDataFam (nIS happy_var_1 <++> ann happy_var_2 <+?> (fmap ann) (fst happy_var_3) <** happy_var_1:snd happy_var_3) cs dh (fst happy_var_3)) })
) (\r -> happyReturn (HappyAbsSyn126 r))
happyReduce_295 = happyMonadReduce 4 128 happyReduction_295
happyReduction_295 ((HappyTerminal (Loc happy_var_4 RightCurly)) `HappyStk`
(HappyAbsSyn129 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftCurly)) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Where)) `HappyStk`
happyRest) tk
= happyThen (( checkInstBody (fst happy_var_3) >>= \vs -> return (Just vs, happy_var_1:happy_var_2: snd happy_var_3 ++ [happy_var_4], Just (happy_var_1 <^^> happy_var_4)))
) (\r -> happyReturn (HappyAbsSyn128 r))
happyReduce_296 = happyMonadReduce 4 128 happyReduction_296
happyReduction_296 ((HappyAbsSyn225 happy_var_4) `HappyStk`
(HappyAbsSyn129 happy_var_3) `HappyStk`
(HappyAbsSyn225 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Where)) `HappyStk`
happyRest) tk
= happyThen (( checkInstBody (fst happy_var_3) >>= \vs -> return (Just vs, happy_var_1:happy_var_2: snd happy_var_3 ++ [happy_var_4], Just (happy_var_1 <^^> happy_var_4)))
) (\r -> happyReturn (HappyAbsSyn128 r))
happyReduce_297 = happySpecReduce_0 128 happyReduction_297
happyReduction_297 = HappyAbsSyn128
((Nothing, [], Nothing)
)
happyReduce_298 = happyMonadReduce 3 129 happyReduction_298
happyReduction_298 ((HappyAbsSyn24 happy_var_3) `HappyStk`
(HappyAbsSyn129 happy_var_2) `HappyStk`
(HappyAbsSyn24 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkRevInstDecls (fst happy_var_2) >>= \is -> return (is, reverse happy_var_1 ++ snd happy_var_2 ++ reverse happy_var_3))
) (\r -> happyReturn (HappyAbsSyn129 r))
happyReduce_299 = happySpecReduce_1 129 happyReduction_299
happyReduction_299 (HappyAbsSyn24 happy_var_1)
= HappyAbsSyn129
(([],reverse happy_var_1)
)
happyReduction_299 _ = notHappyAtAll
happyReduce_300 = happySpecReduce_3 130 happyReduction_300
happyReduction_300 (HappyAbsSyn131 happy_var_3)
(HappyAbsSyn24 happy_var_2)
(HappyAbsSyn129 happy_var_1)
= HappyAbsSyn129
((happy_var_3 : fst happy_var_1, snd happy_var_1 ++ reverse happy_var_2)
)
happyReduction_300 _ _ _ = notHappyAtAll
happyReduce_301 = happySpecReduce_1 130 happyReduction_301
happyReduction_301 (HappyAbsSyn131 happy_var_1)
= HappyAbsSyn129
(([happy_var_1],[])
)
happyReduction_301 _ = notHappyAtAll
happyReduce_302 = happySpecReduce_1 131 happyReduction_302
happyReduction_302 (HappyAbsSyn44 happy_var_1)
= HappyAbsSyn131
(InsDecl (ann happy_var_1) happy_var_1
)
happyReduction_302 _ = notHappyAtAll
happyReduce_303 = happyMonadReduce 1 131 happyReduction_303
happyReduction_303 ((HappyAbsSyn131 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkEnabled TypeFamilies >> return happy_var_1)
) (\r -> happyReturn (HappyAbsSyn131 r))
happyReduce_304 = happySpecReduce_1 131 happyReduction_304
happyReduction_304 (HappyAbsSyn44 happy_var_1)
= HappyAbsSyn131
(InsDecl (ann happy_var_1) happy_var_1
)
happyReduction_304 _ = notHappyAtAll
happyReduce_305 = happyMonadReduce 4 132 happyReduction_305
happyReduction_305 ((HappyAbsSyn60 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 Equals)) `HappyStk`
(HappyAbsSyn60 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Type)) `HappyStk`
happyRest) tk
= happyThen (( do { -- no checkSimpleType happy_var_4 since dtype may contain type patterns
return (InsType (nIS happy_var_1 <++> ann happy_var_4 <** [happy_var_1,happy_var_3]) happy_var_2 happy_var_4) })
) (\r -> happyReturn (HappyAbsSyn131 r))
happyReduce_306 = happyMonadReduce 4 132 happyReduction_306
happyReduction_306 ((HappyAbsSyn116 happy_var_4) `HappyStk`
(HappyAbsSyn104 happy_var_3) `HappyStk`
(HappyAbsSyn60 happy_var_2) `HappyStk`
(HappyAbsSyn51 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { -- (cs,c,t) <- checkDataHeader happy_var_4;
let {(ds,ss,minf) = happy_var_3};
checkDataOrNew happy_var_1 ds;
return (InsData (happy_var_1 <> happy_var_2 <+?> minf <+?> fmap ann happy_var_4 <** ss ) happy_var_1 happy_var_2 (reverse ds) happy_var_4) })
) (\r -> happyReturn (HappyAbsSyn131 r))
happyReduce_307 = happyMonadReduce 5 132 happyReduction_307
happyReduction_307 ((HappyAbsSyn116 happy_var_5) `HappyStk`
(HappyAbsSyn100 happy_var_4) `HappyStk`
(HappyAbsSyn122 happy_var_3) `HappyStk`
(HappyAbsSyn60 happy_var_2) `HappyStk`
(HappyAbsSyn51 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { -- (cs,c,t) <- checkDataHeader happy_var_4;
let { (gs,ss,minf) = happy_var_4 } ;
checkDataOrNewG happy_var_1 gs;
return $ InsGData (ann happy_var_1 <+?> minf <+?> fmap ann happy_var_5 <** (snd happy_var_3 ++ ss)) happy_var_1 happy_var_2 (fst happy_var_3) (reverse gs) happy_var_5 })
) (\r -> happyReturn (HappyAbsSyn131 r))
happyReduce_308 = happyMonadReduce 4 133 happyReduction_308
happyReduction_308 ((HappyAbsSyn134 happy_var_4) `HappyStk`
(HappyAbsSyn136 happy_var_3) `HappyStk`
(HappyAbsSyn135 happy_var_2) `HappyStk`
(HappyAbsSyn14 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkValDef ((happy_var_1 <> happy_var_3 <+?> (fmap ann) (fst happy_var_4)) <** (snd happy_var_2 ++ snd happy_var_4)) happy_var_1 (fst happy_var_2) happy_var_3 (fst happy_var_4))
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_309 = happyMonadReduce 4 133 happyReduction_309
happyReduction_309 ((HappyAbsSyn134 happy_var_4) `HappyStk`
(HappyAbsSyn136 happy_var_3) `HappyStk`
(HappyAbsSyn14 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 Exclamation)) `HappyStk`
happyRest) tk
= happyThen (( do { checkEnabled BangPatterns ;
let { l = nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1] };
p <- checkPattern (BangPat l happy_var_2);
return $ PatBind (p <> happy_var_3 <+?> (fmap ann) (fst happy_var_4) <** snd happy_var_4)
p Nothing happy_var_3 (fst happy_var_4) })
) (\r -> happyReturn (HappyAbsSyn44 r))
happyReduce_310 = happySpecReduce_2 134 happyReduction_310
happyReduction_310 (HappyAbsSyn56 happy_var_2)
(HappyTerminal (Loc happy_var_1 KW_Where))
= HappyAbsSyn134
((Just happy_var_2, [happy_var_1])
)
happyReduction_310 _ _ = notHappyAtAll
happyReduce_311 = happySpecReduce_0 134 happyReduction_311
happyReduction_311 = HappyAbsSyn134
((Nothing, [])
)
happyReduce_312 = happyMonadReduce 2 135 happyReduction_312
happyReduction_312 ((HappyAbsSyn60 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 DoubleColon)) `HappyStk`
happyRest) tk
= happyThen (( checkEnabled ScopedTypeVariables >> return (Just happy_var_2, [happy_var_1]))
) (\r -> happyReturn (HappyAbsSyn135 r))
happyReduce_313 = happySpecReduce_0 135 happyReduction_313
happyReduction_313 = HappyAbsSyn135
((Nothing,[])
)
happyReduce_314 = happySpecReduce_2 136 happyReduction_314
happyReduction_314 (HappyAbsSyn139 happy_var_2)
(HappyTerminal (Loc happy_var_1 Equals))
= HappyAbsSyn136
(UnGuardedRhs (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2
)
happyReduction_314 _ _ = notHappyAtAll
happyReduce_315 = happySpecReduce_1 136 happyReduction_315
happyReduction_315 (HappyAbsSyn137 happy_var_1)
= HappyAbsSyn136
(GuardedRhss (snd happy_var_1) (reverse $ fst happy_var_1)
)
happyReduction_315 _ = notHappyAtAll
happyReduce_316 = happySpecReduce_2 137 happyReduction_316
happyReduction_316 (HappyAbsSyn138 happy_var_2)
(HappyAbsSyn137 happy_var_1)
= HappyAbsSyn137
((happy_var_2 : fst happy_var_1, snd happy_var_1 <++> ann happy_var_2)
)
happyReduction_316 _ _ = notHappyAtAll
happyReduce_317 = happySpecReduce_1 137 happyReduction_317
happyReduction_317 (HappyAbsSyn138 happy_var_1)
= HappyAbsSyn137
(([happy_var_1],ann happy_var_1)
)
happyReduction_317 _ = notHappyAtAll
happyReduce_318 = happyMonadReduce 4 138 happyReduction_318
happyReduction_318 ((HappyAbsSyn139 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 Equals)) `HappyStk`
(HappyAbsSyn176 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 Bar)) `HappyStk`
happyRest) tk
= happyThen (( do { checkPatternGuards (fst happy_var_2);
return $ GuardedRhs (nIS happy_var_1 <++> ann happy_var_4 <** (happy_var_1:snd happy_var_2 ++ [happy_var_3])) (reverse (fst happy_var_2)) happy_var_4 })
) (\r -> happyReturn (HappyAbsSyn138 r))
happyReduce_319 = happyMonadReduce 1 139 happyReduction_319
happyReduction_319 ((HappyAbsSyn14 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkExpr happy_var_1)
) (\r -> happyReturn (HappyAbsSyn139 r))
happyReduce_320 = happySpecReduce_3 140 happyReduction_320
happyReduction_320 (HappyAbsSyn60 happy_var_3)
(HappyTerminal (Loc happy_var_2 DoubleColon))
(HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(ExpTypeSig (happy_var_1 <> happy_var_3 <** [happy_var_2]) happy_var_1 happy_var_3
)
happyReduction_320 _ _ _ = notHappyAtAll
happyReduce_321 = happySpecReduce_1 140 happyReduction_321
happyReduction_321 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(happy_var_1
)
happyReduction_321 _ = notHappyAtAll
happyReduce_322 = happySpecReduce_2 140 happyReduction_322
happyReduction_322 (HappyAbsSyn208 happy_var_2)
(HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(PostOp (happy_var_1 <> happy_var_2) happy_var_1 happy_var_2
)
happyReduction_322 _ _ = notHappyAtAll
happyReduce_323 = happySpecReduce_3 140 happyReduction_323
happyReduction_323 (HappyAbsSyn14 happy_var_3)
(HappyTerminal (Loc happy_var_2 LeftArrowTail))
(HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(LeftArrApp (happy_var_1 <> happy_var_3 <** [happy_var_2]) happy_var_1 happy_var_3
)
happyReduction_323 _ _ _ = notHappyAtAll
happyReduce_324 = happySpecReduce_3 140 happyReduction_324
happyReduction_324 (HappyAbsSyn14 happy_var_3)
(HappyTerminal (Loc happy_var_2 RightArrowTail))
(HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(RightArrApp (happy_var_1 <> happy_var_3 <** [happy_var_2]) happy_var_1 happy_var_3
)
happyReduction_324 _ _ _ = notHappyAtAll
happyReduce_325 = happySpecReduce_3 140 happyReduction_325
happyReduction_325 (HappyAbsSyn14 happy_var_3)
(HappyTerminal (Loc happy_var_2 LeftDblArrowTail))
(HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(LeftArrHighApp (happy_var_1 <> happy_var_3 <** [happy_var_2]) happy_var_1 happy_var_3
)
happyReduction_325 _ _ _ = notHappyAtAll
happyReduce_326 = happySpecReduce_3 140 happyReduction_326
happyReduction_326 (HappyAbsSyn14 happy_var_3)
(HappyTerminal (Loc happy_var_2 RightDblArrowTail))
(HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(RightArrHighApp (happy_var_1 <> happy_var_3 <** [happy_var_2]) happy_var_1 happy_var_3
)
happyReduction_326 _ _ _ = notHappyAtAll
happyReduce_327 = happySpecReduce_1 141 happyReduction_327
happyReduction_327 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(happy_var_1
)
happyReduction_327 _ = notHappyAtAll
happyReduce_328 = happySpecReduce_1 141 happyReduction_328
happyReduction_328 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(happy_var_1
)
happyReduction_328 _ = notHappyAtAll
happyReduce_329 = happySpecReduce_3 142 happyReduction_329
happyReduction_329 (HappyAbsSyn14 happy_var_3)
(HappyAbsSyn208 happy_var_2)
(HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(InfixApp (happy_var_1 <> happy_var_3) happy_var_1 happy_var_2 happy_var_3
)
happyReduction_329 _ _ _ = notHappyAtAll
happyReduce_330 = happySpecReduce_1 142 happyReduction_330
happyReduction_330 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(happy_var_1
)
happyReduction_330 _ = notHappyAtAll
happyReduce_331 = happySpecReduce_3 143 happyReduction_331
happyReduction_331 (HappyAbsSyn14 happy_var_3)
(HappyAbsSyn208 happy_var_2)
(HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(InfixApp (happy_var_1 <> happy_var_3) happy_var_1 happy_var_2 happy_var_3
)
happyReduction_331 _ _ _ = notHappyAtAll
happyReduce_332 = happySpecReduce_1 143 happyReduction_332
happyReduction_332 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(happy_var_1
)
happyReduction_332 _ = notHappyAtAll
happyReduce_333 = happyReduce 4 144 happyReduction_333
happyReduction_333 ((HappyAbsSyn14 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 RightArrow)) `HappyStk`
(HappyAbsSyn150 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 Backslash)) `HappyStk`
happyRest)
= HappyAbsSyn14
(Lambda (nIS happy_var_1 <++> ann happy_var_4 <** [happy_var_1,happy_var_3]) (reverse happy_var_2) happy_var_4
) `HappyStk` happyRest
happyReduce_334 = happyReduce 4 144 happyReduction_334
happyReduction_334 ((HappyAbsSyn14 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 KW_In)) `HappyStk`
(HappyAbsSyn56 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Let)) `HappyStk`
happyRest)
= HappyAbsSyn14
(Let (nIS happy_var_1 <++> ann happy_var_4 <** [happy_var_1,happy_var_3]) happy_var_2 happy_var_4
) `HappyStk` happyRest
happyReduce_335 = happyReduce 8 144 happyReduction_335
happyReduction_335 ((HappyAbsSyn14 happy_var_8) `HappyStk`
(HappyTerminal (Loc happy_var_7 KW_Else)) `HappyStk`
(HappyAbsSyn24 happy_var_6) `HappyStk`
(HappyAbsSyn14 happy_var_5) `HappyStk`
(HappyTerminal (Loc happy_var_4 KW_Then)) `HappyStk`
(HappyAbsSyn24 happy_var_3) `HappyStk`
(HappyAbsSyn14 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_If)) `HappyStk`
happyRest)
= HappyAbsSyn14
(If (nIS happy_var_1 <++> ann happy_var_8 <** (happy_var_1:happy_var_3 ++ happy_var_4:happy_var_6 ++ [happy_var_7])) happy_var_2 happy_var_5 happy_var_8
) `HappyStk` happyRest
happyReduce_336 = happyReduce 4 144 happyReduction_336
happyReduction_336 ((HappyAbsSyn14 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 RightArrow)) `HappyStk`
(HappyAbsSyn151 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Proc)) `HappyStk`
happyRest)
= HappyAbsSyn14
(Proc (nIS happy_var_1 <++> ann happy_var_4 <** [happy_var_1,happy_var_3]) happy_var_2 happy_var_4
) `HappyStk` happyRest
happyReduce_337 = happySpecReduce_1 144 happyReduction_337
happyReduction_337 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(happy_var_1
)
happyReduction_337 _ = notHappyAtAll
happyReduce_338 = happyMonadReduce 1 145 happyReduction_338
happyReduction_338 ((HappyTerminal (Loc happy_var_1 SemiColon)) `HappyStk`
happyRest) tk
= happyThen (( checkEnabled DoAndIfThenElse >> return [happy_var_1])
) (\r -> happyReturn (HappyAbsSyn24 r))
happyReduce_339 = happySpecReduce_0 145 happyReduction_339
happyReduction_339 = HappyAbsSyn24
([]
)
happyReduce_340 = happySpecReduce_1 146 happyReduction_340
happyReduction_340 (HappyTerminal (Loc happy_var_1 SemiColon))
= HappyAbsSyn24
([happy_var_1]
)
happyReduction_340 _ = notHappyAtAll
happyReduce_341 = happySpecReduce_0 146 happyReduction_341
happyReduction_341 = HappyAbsSyn24
([]
)
happyReduce_342 = happyReduce 4 147 happyReduction_342
happyReduction_342 ((HappyAbsSyn178 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 KW_Of)) `HappyStk`
(HappyAbsSyn14 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Case)) `HappyStk`
happyRest)
= HappyAbsSyn14
(let (als, inf, ss) = happy_var_4 in Case (nIS happy_var_1 <++> inf <** (happy_var_1:happy_var_3:ss)) happy_var_2 als
) `HappyStk` happyRest
happyReduce_343 = happySpecReduce_2 147 happyReduction_343
happyReduction_343 (HappyAbsSyn14 happy_var_2)
(HappyTerminal (Loc happy_var_1 Minus))
= HappyAbsSyn14
(NegApp (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2
)
happyReduction_343 _ _ = notHappyAtAll
happyReduce_344 = happySpecReduce_2 147 happyReduction_344
happyReduction_344 (HappyAbsSyn186 happy_var_2)
(HappyTerminal (Loc happy_var_1 KW_Do))
= HappyAbsSyn14
(let (sts, inf, ss) = happy_var_2 in Do (nIS happy_var_1 <++> inf <** happy_var_1:ss) sts
)
happyReduction_344 _ _ = notHappyAtAll
happyReduce_345 = happySpecReduce_2 147 happyReduction_345
happyReduction_345 (HappyAbsSyn186 happy_var_2)
(HappyTerminal (Loc happy_var_1 KW_MDo))
= HappyAbsSyn14
(let (sts, inf, ss) = happy_var_2 in MDo (nIS happy_var_1 <++> inf <** happy_var_1:ss) sts
)
happyReduction_345 _ _ = notHappyAtAll
happyReduce_346 = happySpecReduce_1 147 happyReduction_346
happyReduction_346 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(happy_var_1
)
happyReduction_346 _ = notHappyAtAll
happyReduce_347 = happyReduce 4 148 happyReduction_347
happyReduction_347 ((HappyAbsSyn14 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 PragmaEnd)) `HappyStk`
(HappyTerminal happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 CORE)) `HappyStk`
happyRest)
= HappyAbsSyn14
(let Loc l (StringTok (s,_)) = happy_var_2 in CorePragma (nIS happy_var_1 <++> ann happy_var_4 <** [l,happy_var_3]) s happy_var_4
) `HappyStk` happyRest
happyReduce_348 = happyReduce 4 148 happyReduction_348
happyReduction_348 ((HappyAbsSyn14 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 PragmaEnd)) `HappyStk`
(HappyTerminal happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 SCC)) `HappyStk`
happyRest)
= HappyAbsSyn14
(let Loc l (StringTok (s,_)) = happy_var_2 in SCCPragma (nIS happy_var_1 <++> ann happy_var_4 <** [l,happy_var_3]) s happy_var_4
) `HappyStk` happyRest
happyReduce_349 = happyReduce 11 148 happyReduction_349
happyReduction_349 ((HappyAbsSyn14 happy_var_11) `HappyStk`
(HappyTerminal (Loc happy_var_10 PragmaEnd)) `HappyStk`
(HappyTerminal happy_var_9) `HappyStk`
(HappyTerminal (Loc happy_var_8 Colon)) `HappyStk`
(HappyTerminal happy_var_7) `HappyStk`
(HappyTerminal (Loc happy_var_6 Minus)) `HappyStk`
(HappyTerminal happy_var_5) `HappyStk`
(HappyTerminal (Loc happy_var_4 Colon)) `HappyStk`
(HappyTerminal happy_var_3) `HappyStk`
(HappyTerminal happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 GENERATED)) `HappyStk`
happyRest)
= HappyAbsSyn14
(let { Loc l0 (StringTok (s,_)) = happy_var_2;
Loc l1 (IntTok (i1,_)) = happy_var_3;
Loc l2 (IntTok (i2,_)) = happy_var_5;
Loc l3 (IntTok (i3,_)) = happy_var_7;
Loc l4 (IntTok (i4,_)) = happy_var_9}
in GenPragma (nIS happy_var_1 <++> ann happy_var_11 <** [happy_var_1,l0,l1,happy_var_4,l2,happy_var_6,l3,happy_var_8,l4,happy_var_10])
s (fromInteger i1, fromInteger i2)
(fromInteger i3, fromInteger i4) happy_var_11
) `HappyStk` happyRest
happyReduce_350 = happySpecReduce_2 149 happyReduction_350
happyReduction_350 (HappyAbsSyn14 happy_var_2)
(HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(App (happy_var_1 <> happy_var_2) happy_var_1 happy_var_2
)
happyReduction_350 _ _ = notHappyAtAll
happyReduce_351 = happySpecReduce_1 149 happyReduction_351
happyReduction_351 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(happy_var_1
)
happyReduction_351 _ = notHappyAtAll
happyReduce_352 = happySpecReduce_2 150 happyReduction_352
happyReduction_352 (HappyAbsSyn151 happy_var_2)
(HappyAbsSyn150 happy_var_1)
= HappyAbsSyn150
(happy_var_2 : happy_var_1
)
happyReduction_352 _ _ = notHappyAtAll
happyReduce_353 = happySpecReduce_1 150 happyReduction_353
happyReduction_353 (HappyAbsSyn151 happy_var_1)
= HappyAbsSyn150
([happy_var_1]
)
happyReduction_353 _ = notHappyAtAll
happyReduce_354 = happyMonadReduce 1 151 happyReduction_354
happyReduction_354 ((HappyAbsSyn14 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkPattern happy_var_1)
) (\r -> happyReturn (HappyAbsSyn151 r))
happyReduce_355 = happyMonadReduce 2 151 happyReduction_355
happyReduction_355 ((HappyAbsSyn14 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 Exclamation)) `HappyStk`
happyRest) tk
= happyThen (( checkPattern (BangPat (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2))
) (\r -> happyReturn (HappyAbsSyn151 r))
happyReduce_356 = happyMonadReduce 3 152 happyReduction_356
happyReduction_356 ((HappyAbsSyn14 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 At)) `HappyStk`
(HappyAbsSyn85 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { n <- checkUnQual happy_var_1;
return (AsPat (happy_var_1 <> happy_var_3 <** [happy_var_2]) n happy_var_3) })
) (\r -> happyReturn (HappyAbsSyn14 r))
happyReduce_357 = happyMonadReduce 3 152 happyReduction_357
happyReduction_357 ((HappyAbsSyn14 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 RPCAt)) `HappyStk`
(HappyAbsSyn85 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do { n <- checkUnQual happy_var_1;
return (CAsRP (happy_var_1 <> happy_var_3 <** [happy_var_2]) n happy_var_3) })
) (\r -> happyReturn (HappyAbsSyn14 r))
happyReduce_358 = happySpecReduce_2 152 happyReduction_358
happyReduction_358 (HappyAbsSyn14 happy_var_2)
(HappyTerminal (Loc happy_var_1 Tilde))
= HappyAbsSyn14
(IrrPat (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2
)
happyReduction_358 _ _ = notHappyAtAll
happyReduce_359 = happySpecReduce_1 152 happyReduction_359
happyReduction_359 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(happy_var_1
)
happyReduction_359 _ = notHappyAtAll
happyReduce_360 = happyMonadReduce 3 153 happyReduction_360
happyReduction_360 ((HappyTerminal (Loc happy_var_3 RightCurly)) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftCurly)) `HappyStk`
(HappyAbsSyn14 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( liftM (amap (const (ann happy_var_1 <++> nIS happy_var_3 <** [happy_var_2,happy_var_3]))) $ mkRecConstrOrUpdate happy_var_1 [])
) (\r -> happyReturn (HappyAbsSyn14 r))
happyReduce_361 = happyMonadReduce 4 153 happyReduction_361
happyReduction_361 ((HappyTerminal (Loc happy_var_4 RightCurly)) `HappyStk`
(HappyAbsSyn190 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftCurly)) `HappyStk`
(HappyAbsSyn14 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( liftM (amap (const (ann happy_var_1 <++> nIS happy_var_4 <** (happy_var_2:reverse (snd happy_var_3) ++ [happy_var_4]))))
$ mkRecConstrOrUpdate happy_var_1 (reverse (fst happy_var_3)))
) (\r -> happyReturn (HappyAbsSyn14 r))
happyReduce_362 = happyReduce 4 153 happyReduction_362
happyReduction_362 ((HappyTerminal (Loc happy_var_4 RightCurlyBar)) `HappyStk`
(HappyAbsSyn60 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 LeftCurlyBar)) `HappyStk`
(HappyAbsSyn85 happy_var_1) `HappyStk`
happyRest)
= HappyAbsSyn14
(ExplTypeArg (ann happy_var_1 <++> nIS happy_var_4 <** [happy_var_2,happy_var_4]) happy_var_1 happy_var_3
) `HappyStk` happyRest
happyReduce_363 = happySpecReduce_1 153 happyReduction_363
happyReduction_363 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(happy_var_1
)
happyReduction_363 _ = notHappyAtAll
happyReduce_364 = happySpecReduce_1 154 happyReduction_364
happyReduction_364 (HappyAbsSyn199 happy_var_1)
= HappyAbsSyn14
(IPVar (ann happy_var_1) happy_var_1
)
happyReduction_364 _ = notHappyAtAll
happyReduce_365 = happySpecReduce_1 154 happyReduction_365
happyReduction_365 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn14
(Var (ann happy_var_1) happy_var_1
)
happyReduction_365 _ = notHappyAtAll
happyReduce_366 = happySpecReduce_1 154 happyReduction_366
happyReduction_366 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(happy_var_1
)
happyReduction_366 _ = notHappyAtAll
happyReduce_367 = happySpecReduce_1 154 happyReduction_367
happyReduction_367 (HappyAbsSyn224 happy_var_1)
= HappyAbsSyn14
(Lit (ann happy_var_1) happy_var_1
)
happyReduction_367 _ = notHappyAtAll
happyReduce_368 = happySpecReduce_3 154 happyReduction_368
happyReduction_368 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn14 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn14
(Paren (happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_3]) happy_var_2
)
happyReduction_368 _ _ _ = notHappyAtAll
happyReduce_369 = happySpecReduce_3 154 happyReduction_369
happyReduction_369 (HappyAbsSyn157 happy_var_3)
(HappyAbsSyn14 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn14
(TupleSection (happy_var_1 <^^> head (snd happy_var_3) <** happy_var_1:reverse (snd happy_var_3)) Boxed (Just happy_var_2 : fst happy_var_3)
)
happyReduction_369 _ _ _ = notHappyAtAll
happyReduce_370 = happyReduce 4 154 happyReduction_370
happyReduction_370 ((HappyTerminal (Loc happy_var_4 RightParen)) `HappyStk`
(HappyAbsSyn14 happy_var_3) `HappyStk`
(HappyAbsSyn24 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 LeftParen)) `HappyStk`
happyRest)
= HappyAbsSyn14
(TupleSection (happy_var_1 <^^> happy_var_4 <** happy_var_1:reverse (happy_var_4:happy_var_2)) Boxed
(replicate (length happy_var_2) Nothing ++ [Just happy_var_3])
) `HappyStk` happyRest
happyReduce_371 = happyReduce 4 154 happyReduction_371
happyReduction_371 ((HappyAbsSyn157 happy_var_4) `HappyStk`
(HappyAbsSyn14 happy_var_3) `HappyStk`
(HappyAbsSyn24 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 LeftParen)) `HappyStk`
happyRest)
= HappyAbsSyn14
(TupleSection (happy_var_1 <^^> head (snd happy_var_4) <** happy_var_1:reverse (snd happy_var_4 ++ happy_var_2)) Boxed
(replicate (length happy_var_2) Nothing ++ Just happy_var_3 : fst happy_var_4)
) `HappyStk` happyRest
happyReduce_372 = happySpecReduce_3 154 happyReduction_372
happyReduction_372 (HappyAbsSyn157 happy_var_3)
(HappyAbsSyn14 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftHashParen))
= HappyAbsSyn14
(TupleSection (happy_var_1 <^^> head (snd happy_var_3) <** happy_var_1:reverse (snd happy_var_3)) Unboxed (Just happy_var_2 : fst happy_var_3)
)
happyReduction_372 _ _ _ = notHappyAtAll
happyReduce_373 = happySpecReduce_3 154 happyReduction_373
happyReduction_373 (HappyTerminal (Loc happy_var_3 RightHashParen))
(HappyAbsSyn14 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftHashParen))
= HappyAbsSyn14
(TupleSection (happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_3]) Unboxed [Just happy_var_2]
)
happyReduction_373 _ _ _ = notHappyAtAll
happyReduce_374 = happyReduce 4 154 happyReduction_374
happyReduction_374 ((HappyTerminal (Loc happy_var_4 RightHashParen)) `HappyStk`
(HappyAbsSyn14 happy_var_3) `HappyStk`
(HappyAbsSyn24 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 LeftHashParen)) `HappyStk`
happyRest)
= HappyAbsSyn14
(TupleSection (happy_var_1 <^^> happy_var_4 <** happy_var_1:reverse (happy_var_4:happy_var_2)) Unboxed
(replicate (length happy_var_2) Nothing ++ [Just happy_var_3])
) `HappyStk` happyRest
happyReduce_375 = happyReduce 4 154 happyReduction_375
happyReduction_375 ((HappyAbsSyn157 happy_var_4) `HappyStk`
(HappyAbsSyn14 happy_var_3) `HappyStk`
(HappyAbsSyn24 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 LeftHashParen)) `HappyStk`
happyRest)
= HappyAbsSyn14
(TupleSection (happy_var_1 <^^> head (snd happy_var_4) <** happy_var_1:reverse (snd happy_var_4 ++ happy_var_2)) Unboxed
(replicate (length happy_var_2) Nothing ++ Just happy_var_3 : fst happy_var_4)
) `HappyStk` happyRest
happyReduce_376 = happySpecReduce_3 154 happyReduction_376
happyReduction_376 (HappyTerminal (Loc happy_var_3 RightSquare))
(HappyAbsSyn170 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftSquare))
= HappyAbsSyn14
(amap (\l -> l <** [happy_var_3]) $ happy_var_2 (happy_var_1 <^^> happy_var_3 <** [happy_var_1])
)
happyReduction_376 _ _ _ = notHappyAtAll
happyReduce_377 = happySpecReduce_1 154 happyReduction_377
happyReduction_377 (HappyTerminal (Loc happy_var_1 Underscore))
= HappyAbsSyn14
(WildCard (nIS happy_var_1)
)
happyReduction_377 _ = notHappyAtAll
happyReduce_378 = happyMonadReduce 3 154 happyReduction_378
happyReduction_378 ((HappyTerminal (Loc happy_var_3 RightParen)) `HappyStk`
(HappyAbsSyn14 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 LeftParen)) `HappyStk`
happyRest) tk
= happyThen (( checkEnabled RegularPatterns >> return (Paren (happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_3]) happy_var_2))
) (\r -> happyReturn (HappyAbsSyn14 r))
happyReduce_379 = happySpecReduce_3 154 happyReduction_379
happyReduction_379 (HappyTerminal (Loc happy_var_3 RPGuardClose))
(HappyAbsSyn159 happy_var_2)
(HappyTerminal (Loc happy_var_1 RPGuardOpen))
= HappyAbsSyn14
(SeqRP (happy_var_1 <^^> happy_var_3 <** (happy_var_1:reverse (snd happy_var_2) ++ [happy_var_3])) $ reverse (fst happy_var_2)
)
happyReduction_379 _ _ _ = notHappyAtAll
happyReduce_380 = happyReduce 5 154 happyReduction_380
happyReduction_380 ((HappyTerminal (Loc happy_var_5 RPGuardClose)) `HappyStk`
(HappyAbsSyn176 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 Bar)) `HappyStk`
(HappyAbsSyn14 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 RPGuardOpen)) `HappyStk`
happyRest)
= HappyAbsSyn14
(GuardRP (happy_var_1 <^^> happy_var_5 <** (happy_var_1:happy_var_3 : snd happy_var_4 ++ [happy_var_5])) happy_var_2 $ (reverse $ fst happy_var_4)
) `HappyStk` happyRest
happyReduce_381 = happySpecReduce_1 154 happyReduction_381
happyReduction_381 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(happy_var_1
)
happyReduction_381 _ = notHappyAtAll
happyReduce_382 = happySpecReduce_1 154 happyReduction_382
happyReduction_382 (HappyTerminal happy_var_1)
= HappyAbsSyn14
(let Loc l (THIdEscape s) = happy_var_1 in SpliceExp (nIS l) $ IdSplice (nIS l) s
)
happyReduction_382 _ = notHappyAtAll
happyReduce_383 = happySpecReduce_3 154 happyReduction_383
happyReduction_383 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn139 happy_var_2)
(HappyTerminal (Loc happy_var_1 THParenEscape))
= HappyAbsSyn14
(SpliceExp (happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_3]) $ ParenSplice (ann happy_var_2) happy_var_2
)
happyReduction_383 _ _ _ = notHappyAtAll
happyReduce_384 = happySpecReduce_3 154 happyReduction_384
happyReduction_384 (HappyTerminal (Loc happy_var_3 THCloseQuote))
(HappyAbsSyn139 happy_var_2)
(HappyTerminal (Loc happy_var_1 THExpQuote))
= HappyAbsSyn14
(BracketExp (happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_3]) $ ExpBracket (ann happy_var_2) happy_var_2
)
happyReduction_384 _ _ _ = notHappyAtAll
happyReduce_385 = happyMonadReduce 3 154 happyReduction_385
happyReduction_385 ((HappyTerminal (Loc happy_var_3 THCloseQuote)) `HappyStk`
(HappyAbsSyn14 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 THPatQuote)) `HappyStk`
happyRest) tk
= happyThen (( do { p <- checkPattern happy_var_2;
return $ BracketExp (happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_3]) $ PatBracket (ann p) p })
) (\r -> happyReturn (HappyAbsSyn14 r))
happyReduce_386 = happySpecReduce_3 154 happyReduction_386
happyReduction_386 (HappyTerminal (Loc happy_var_3 THCloseQuote))
(HappyAbsSyn60 happy_var_2)
(HappyTerminal (Loc happy_var_1 THTypQuote))
= HappyAbsSyn14
(let l = happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_3] in BracketExp l $ TypeBracket l happy_var_2
)
happyReduction_386 _ _ _ = notHappyAtAll
happyReduce_387 = happyReduce 5 154 happyReduction_387
happyReduction_387 ((HappyTerminal (Loc happy_var_5 THCloseQuote)) `HappyStk`
_ `HappyStk`
(HappyAbsSyn48 happy_var_3) `HappyStk`
_ `HappyStk`
(HappyTerminal (Loc happy_var_1 THDecQuote)) `HappyStk`
happyRest)
= HappyAbsSyn14
(let l = happy_var_1 <^^> happy_var_5 <** (happy_var_1:snd happy_var_3 ++ [happy_var_5]) in BracketExp l $ DeclBracket l (fst happy_var_3)
) `HappyStk` happyRest
happyReduce_388 = happySpecReduce_2 154 happyReduction_388
happyReduction_388 (HappyAbsSyn85 happy_var_2)
(HappyTerminal (Loc happy_var_1 THVarQuote))
= HappyAbsSyn14
(VarQuote (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2
)
happyReduction_388 _ _ = notHappyAtAll
happyReduce_389 = happySpecReduce_2 154 happyReduction_389
happyReduction_389 (HappyAbsSyn85 happy_var_2)
(HappyTerminal (Loc happy_var_1 THVarQuote))
= HappyAbsSyn14
(VarQuote (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2
)
happyReduction_389 _ _ = notHappyAtAll
happyReduce_390 = happySpecReduce_2 154 happyReduction_390
happyReduction_390 (HappyAbsSyn75 happy_var_2)
(HappyTerminal (Loc happy_var_1 THTyQuote))
= HappyAbsSyn14
(TypQuote (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) (UnQual (ann happy_var_2) happy_var_2)
)
happyReduction_390 _ _ = notHappyAtAll
happyReduce_391 = happySpecReduce_2 154 happyReduction_391
happyReduction_391 (HappyAbsSyn85 happy_var_2)
(HappyTerminal (Loc happy_var_1 THTyQuote))
= HappyAbsSyn14
(TypQuote (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2
)
happyReduction_391 _ _ = notHappyAtAll
happyReduce_392 = happySpecReduce_1 154 happyReduction_392
happyReduction_392 (HappyTerminal happy_var_1)
= HappyAbsSyn14
(let Loc l (THQuasiQuote (n,q)) = happy_var_1 in QuasiQuote (nIS l) n q
)
happyReduction_392 _ = notHappyAtAll
happyReduce_393 = happySpecReduce_2 155 happyReduction_393
happyReduction_393 (HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn24 happy_var_1)
= HappyAbsSyn24
(happy_var_2 : happy_var_1
)
happyReduction_393 _ _ = notHappyAtAll
happyReduce_394 = happySpecReduce_1 155 happyReduction_394
happyReduction_394 (HappyTerminal (Loc happy_var_1 Comma))
= HappyAbsSyn24
([happy_var_1]
)
happyReduction_394 _ = notHappyAtAll
happyReduce_395 = happySpecReduce_1 156 happyReduction_395
happyReduction_395 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(happy_var_1
)
happyReduction_395 _ = notHappyAtAll
happyReduce_396 = happySpecReduce_2 156 happyReduction_396
happyReduction_396 (HappyAbsSyn14 happy_var_2)
(HappyAbsSyn208 happy_var_1)
= HappyAbsSyn14
(PreOp (happy_var_1 <> happy_var_2) happy_var_1 happy_var_2
)
happyReduction_396 _ _ = notHappyAtAll
happyReduce_397 = happyMonadReduce 3 156 happyReduction_397
happyReduction_397 ((HappyAbsSyn14 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 RightArrow)) `HappyStk`
(HappyAbsSyn14 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( do {checkEnabled ViewPatterns;
return $ ViewPat (happy_var_1 <> happy_var_3 <** [happy_var_2]) happy_var_1 happy_var_3})
) (\r -> happyReturn (HappyAbsSyn14 r))
happyReduce_398 = happySpecReduce_3 157 happyReduction_398
happyReduction_398 (HappyAbsSyn157 happy_var_3)
(HappyAbsSyn14 happy_var_2)
(HappyAbsSyn24 happy_var_1)
= HappyAbsSyn157
(let (mes, ss) = happy_var_3 in (replicate (length happy_var_1 - 1) Nothing ++ Just happy_var_2 : mes, ss ++ happy_var_1)
)
happyReduction_398 _ _ _ = notHappyAtAll
happyReduce_399 = happySpecReduce_3 157 happyReduction_399
happyReduction_399 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn14 happy_var_2)
(HappyAbsSyn24 happy_var_1)
= HappyAbsSyn157
((replicate (length happy_var_1 - 1) Nothing ++ [Just happy_var_2], happy_var_3 : happy_var_1)
)
happyReduction_399 _ _ _ = notHappyAtAll
happyReduce_400 = happySpecReduce_2 157 happyReduction_400
happyReduction_400 (HappyTerminal (Loc happy_var_2 RightParen))
(HappyAbsSyn24 happy_var_1)
= HappyAbsSyn157
((replicate (length happy_var_1) Nothing, happy_var_2 : happy_var_1)
)
happyReduction_400 _ _ = notHappyAtAll
happyReduce_401 = happySpecReduce_3 158 happyReduction_401
happyReduction_401 (HappyAbsSyn157 happy_var_3)
(HappyAbsSyn14 happy_var_2)
(HappyAbsSyn24 happy_var_1)
= HappyAbsSyn157
(let (mes, ss) = happy_var_3 in (replicate (length happy_var_1 - 1) Nothing ++ Just happy_var_2 : mes, ss ++ happy_var_1)
)
happyReduction_401 _ _ _ = notHappyAtAll
happyReduce_402 = happySpecReduce_3 158 happyReduction_402
happyReduction_402 (HappyTerminal (Loc happy_var_3 RightHashParen))
(HappyAbsSyn14 happy_var_2)
(HappyAbsSyn24 happy_var_1)
= HappyAbsSyn157
((replicate (length happy_var_1 - 1) Nothing ++ [Just happy_var_2], happy_var_3 : happy_var_1)
)
happyReduction_402 _ _ _ = notHappyAtAll
happyReduce_403 = happySpecReduce_2 158 happyReduction_403
happyReduction_403 (HappyTerminal (Loc happy_var_2 RightHashParen))
(HappyAbsSyn24 happy_var_1)
= HappyAbsSyn157
((replicate (length happy_var_1) Nothing, happy_var_2 : happy_var_1)
)
happyReduction_403 _ _ = notHappyAtAll
happyReduce_404 = happySpecReduce_3 159 happyReduction_404
happyReduction_404 (HappyAbsSyn14 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn159 happy_var_1)
= HappyAbsSyn159
((happy_var_3 : fst happy_var_1, happy_var_2 : snd happy_var_1)
)
happyReduction_404 _ _ _ = notHappyAtAll
happyReduce_405 = happySpecReduce_1 159 happyReduction_405
happyReduction_405 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn159
(([happy_var_1],[])
)
happyReduction_405 _ = notHappyAtAll
happyReduce_406 = happySpecReduce_3 160 happyReduction_406
happyReduction_406 (HappyAbsSyn14 happy_var_3)
(HappyTerminal (Loc happy_var_2 Bar))
(HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(EitherRP (happy_var_1 <> happy_var_3 <** [happy_var_2]) happy_var_1 happy_var_3
)
happyReduction_406 _ _ _ = notHappyAtAll
happyReduce_407 = happySpecReduce_3 160 happyReduction_407
happyReduction_407 (HappyAbsSyn14 happy_var_3)
(HappyTerminal (Loc happy_var_2 Bar))
(HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(EitherRP (happy_var_1 <> happy_var_3 <** [happy_var_2]) happy_var_1 happy_var_3
)
happyReduction_407 _ _ _ = notHappyAtAll
happyReduce_408 = happyMonadReduce 10 161 happyReduction_408
happyReduction_408 ((HappyTerminal (Loc happy_var_10 XStdTagClose)) `HappyStk`
(HappyAbsSyn164 happy_var_9) `HappyStk`
(HappyTerminal (Loc happy_var_8 XCloseTagOpen)) `HappyStk`
(HappyAbsSyn24 happy_var_7) `HappyStk`
(HappyAbsSyn162 happy_var_6) `HappyStk`
(HappyTerminal (Loc happy_var_5 XStdTagClose)) `HappyStk`
(HappyAbsSyn169 happy_var_4) `HappyStk`
(HappyAbsSyn167 happy_var_3) `HappyStk`
(HappyAbsSyn164 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 XStdTagOpen)) `HappyStk`
happyRest) tk
= happyThen (( do { n <- checkEqNames happy_var_2 happy_var_9;
let { cn = reverse happy_var_6;
as = reverse happy_var_3;
l = happy_var_1 <^^> happy_var_10 <** [happy_var_1,happy_var_5] ++ happy_var_7 ++ [happy_var_8,srcInfoSpan (ann happy_var_9),happy_var_10] };
return $ XTag l n as happy_var_4 cn })
) (\r -> happyReturn (HappyAbsSyn14 r))
happyReduce_409 = happyReduce 5 161 happyReduction_409
happyReduction_409 ((HappyTerminal (Loc happy_var_5 XEmptyTagClose)) `HappyStk`
(HappyAbsSyn169 happy_var_4) `HappyStk`
(HappyAbsSyn167 happy_var_3) `HappyStk`
(HappyAbsSyn164 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 XStdTagOpen)) `HappyStk`
happyRest)
= HappyAbsSyn14
(XETag (happy_var_1 <^^> happy_var_5 <** [happy_var_1,happy_var_5]) happy_var_2 (reverse happy_var_3) happy_var_4
) `HappyStk` happyRest
happyReduce_410 = happySpecReduce_3 161 happyReduction_410
happyReduction_410 (HappyTerminal (Loc happy_var_3 XCodeTagClose))
(HappyAbsSyn14 happy_var_2)
(HappyTerminal (Loc happy_var_1 XCodeTagOpen))
= HappyAbsSyn14
(XExpTag (happy_var_1 <^^> happy_var_3 <** [happy_var_1,happy_var_3]) happy_var_2
)
happyReduction_410 _ _ _ = notHappyAtAll
happyReduce_411 = happyReduce 5 161 happyReduction_411
happyReduction_411 ((HappyTerminal (Loc happy_var_5 XCodeTagClose)) `HappyStk`
(HappyTerminal (Loc happy_var_4 XCloseTagOpen)) `HappyStk`
(HappyAbsSyn24 happy_var_3) `HappyStk`
(HappyAbsSyn162 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 XChildTagOpen)) `HappyStk`
happyRest)
= HappyAbsSyn14
(XChildTag (happy_var_1 <^^> happy_var_5 <** (happy_var_1:happy_var_3++[happy_var_4,happy_var_5])) (reverse happy_var_2)
) `HappyStk` happyRest
happyReduce_412 = happySpecReduce_2 162 happyReduction_412
happyReduction_412 (HappyAbsSyn14 happy_var_2)
(HappyAbsSyn162 happy_var_1)
= HappyAbsSyn162
(happy_var_2 : happy_var_1
)
happyReduction_412 _ _ = notHappyAtAll
happyReduce_413 = happySpecReduce_0 162 happyReduction_413
happyReduction_413 = HappyAbsSyn162
([]
)
happyReduce_414 = happySpecReduce_1 163 happyReduction_414
happyReduction_414 (HappyTerminal happy_var_1)
= HappyAbsSyn14
(let Loc l (XPCDATA pcd) = happy_var_1 in XPcdata (nIS l) pcd
)
happyReduction_414 _ = notHappyAtAll
happyReduce_415 = happySpecReduce_3 163 happyReduction_415
happyReduction_415 (HappyTerminal (Loc happy_var_3 XRPatClose))
(HappyAbsSyn159 happy_var_2)
(HappyTerminal (Loc happy_var_1 XRPatOpen))
= HappyAbsSyn14
(XRPats (happy_var_1 <^^> happy_var_3 <** (snd happy_var_2 ++ [happy_var_1,happy_var_3])) $ reverse (fst happy_var_2)
)
happyReduction_415 _ _ _ = notHappyAtAll
happyReduce_416 = happySpecReduce_1 163 happyReduction_416
happyReduction_416 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn14
(happy_var_1
)
happyReduction_416 _ = notHappyAtAll
happyReduce_417 = happySpecReduce_3 164 happyReduction_417
happyReduction_417 (HappyAbsSyn165 happy_var_3)
(HappyTerminal (Loc happy_var_2 Colon))
(HappyAbsSyn165 happy_var_1)
= HappyAbsSyn164
(let {Loc l1 s1 = happy_var_1; Loc l2 s2 = happy_var_3}
in XDomName (nIS l1 <++> nIS l2 <** [l1,happy_var_2,l2]) s1 s2
)
happyReduction_417 _ _ _ = notHappyAtAll
happyReduce_418 = happySpecReduce_1 164 happyReduction_418
happyReduction_418 (HappyAbsSyn165 happy_var_1)
= HappyAbsSyn164
(let Loc l str = happy_var_1 in XName (nIS l) str
)
happyReduction_418 _ = notHappyAtAll
happyReduce_419 = happySpecReduce_1 165 happyReduction_419
happyReduction_419 (HappyTerminal happy_var_1)
= HappyAbsSyn165
(let Loc l (VarId s) = happy_var_1 in Loc l s
)
happyReduction_419 _ = notHappyAtAll
happyReduce_420 = happySpecReduce_1 165 happyReduction_420
happyReduction_420 (HappyTerminal happy_var_1)
= HappyAbsSyn165
(let Loc l (ConId s) = happy_var_1 in Loc l s
)
happyReduction_420 _ = notHappyAtAll
happyReduce_421 = happySpecReduce_1 165 happyReduction_421
happyReduction_421 (HappyTerminal happy_var_1)
= HappyAbsSyn165
(let Loc l (DVarId s) = happy_var_1 in Loc l $ mkDVar s
)
happyReduction_421 _ = notHappyAtAll
happyReduce_422 = happySpecReduce_1 165 happyReduction_422
happyReduction_422 (HappyAbsSyn165 happy_var_1)
= HappyAbsSyn165
(happy_var_1
)
happyReduction_422 _ = notHappyAtAll
happyReduce_423 = happySpecReduce_1 166 happyReduction_423
happyReduction_423 (HappyTerminal (Loc happy_var_1 KW_Type))
= HappyAbsSyn165
(Loc happy_var_1 "type"
)
happyReduction_423 _ = notHappyAtAll
happyReduce_424 = happySpecReduce_1 166 happyReduction_424
happyReduction_424 (HappyTerminal (Loc happy_var_1 KW_Class))
= HappyAbsSyn165
(Loc happy_var_1 "class"
)
happyReduction_424 _ = notHappyAtAll
happyReduce_425 = happySpecReduce_1 166 happyReduction_425
happyReduction_425 (HappyTerminal (Loc happy_var_1 KW_Data))
= HappyAbsSyn165
(Loc happy_var_1 "data"
)
happyReduction_425 _ = notHappyAtAll
happyReduce_426 = happySpecReduce_1 166 happyReduction_426
happyReduction_426 (HappyTerminal (Loc happy_var_1 KW_Foreign))
= HappyAbsSyn165
(Loc happy_var_1 "foreign"
)
happyReduction_426 _ = notHappyAtAll
happyReduce_427 = happySpecReduce_1 166 happyReduction_427
happyReduction_427 (HappyTerminal (Loc happy_var_1 KW_Export))
= HappyAbsSyn165
(Loc happy_var_1 "export"
)
happyReduction_427 _ = notHappyAtAll
happyReduce_428 = happySpecReduce_1 166 happyReduction_428
happyReduction_428 (HappyTerminal (Loc happy_var_1 KW_Safe))
= HappyAbsSyn165
(Loc happy_var_1 "safe"
)
happyReduction_428 _ = notHappyAtAll
happyReduce_429 = happySpecReduce_1 166 happyReduction_429
happyReduction_429 (HappyTerminal (Loc happy_var_1 KW_Unsafe))
= HappyAbsSyn165
(Loc happy_var_1 "unsafe"
)
happyReduction_429 _ = notHappyAtAll
happyReduce_430 = happySpecReduce_1 166 happyReduction_430
happyReduction_430 (HappyTerminal (Loc happy_var_1 KW_Threadsafe))
= HappyAbsSyn165
(Loc happy_var_1 "threadsafe"
)
happyReduction_430 _ = notHappyAtAll
happyReduce_431 = happySpecReduce_1 166 happyReduction_431
happyReduction_431 (HappyTerminal (Loc happy_var_1 KW_StdCall))
= HappyAbsSyn165
(Loc happy_var_1 "stdcall"
)
happyReduction_431 _ = notHappyAtAll
happyReduce_432 = happySpecReduce_1 166 happyReduction_432
happyReduction_432 (HappyTerminal (Loc happy_var_1 KW_CCall))
= HappyAbsSyn165
(Loc happy_var_1 "ccall"
)
happyReduction_432 _ = notHappyAtAll
happyReduce_433 = happySpecReduce_1 166 happyReduction_433
happyReduction_433 (HappyTerminal (Loc happy_var_1 KW_CPlusPlus))
= HappyAbsSyn165
(Loc happy_var_1 "cplusplus"
)
happyReduction_433 _ = notHappyAtAll
happyReduce_434 = happySpecReduce_1 166 happyReduction_434
happyReduction_434 (HappyTerminal (Loc happy_var_1 KW_DotNet))
= HappyAbsSyn165
(Loc happy_var_1 "dotnet"
)
happyReduction_434 _ = notHappyAtAll
happyReduce_435 = happySpecReduce_1 166 happyReduction_435
happyReduction_435 (HappyTerminal (Loc happy_var_1 KW_Jvm))
= HappyAbsSyn165
(Loc happy_var_1 "jvm"
)
happyReduction_435 _ = notHappyAtAll
happyReduce_436 = happySpecReduce_1 166 happyReduction_436
happyReduction_436 (HappyTerminal (Loc happy_var_1 KW_Js))
= HappyAbsSyn165
(Loc happy_var_1 "js"
)
happyReduction_436 _ = notHappyAtAll
happyReduce_437 = happySpecReduce_1 166 happyReduction_437
happyReduction_437 (HappyTerminal (Loc happy_var_1 KW_As))
= HappyAbsSyn165
(Loc happy_var_1 "as"
)
happyReduction_437 _ = notHappyAtAll
happyReduce_438 = happySpecReduce_1 166 happyReduction_438
happyReduction_438 (HappyTerminal (Loc happy_var_1 KW_By))
= HappyAbsSyn165
(Loc happy_var_1 "by"
)
happyReduction_438 _ = notHappyAtAll
happyReduce_439 = happySpecReduce_1 166 happyReduction_439
happyReduction_439 (HappyTerminal (Loc happy_var_1 KW_Case))
= HappyAbsSyn165
(Loc happy_var_1 "case"
)
happyReduction_439 _ = notHappyAtAll
happyReduce_440 = happySpecReduce_1 166 happyReduction_440
happyReduction_440 (HappyTerminal (Loc happy_var_1 KW_Default))
= HappyAbsSyn165
(Loc happy_var_1 "default"
)
happyReduction_440 _ = notHappyAtAll
happyReduce_441 = happySpecReduce_1 166 happyReduction_441
happyReduction_441 (HappyTerminal (Loc happy_var_1 KW_Deriving))
= HappyAbsSyn165
(Loc happy_var_1 "deriving"
)
happyReduction_441 _ = notHappyAtAll
happyReduce_442 = happySpecReduce_1 166 happyReduction_442
happyReduction_442 (HappyTerminal (Loc happy_var_1 KW_Do))
= HappyAbsSyn165
(Loc happy_var_1 "do"
)
happyReduction_442 _ = notHappyAtAll
happyReduce_443 = happySpecReduce_1 166 happyReduction_443
happyReduction_443 (HappyTerminal (Loc happy_var_1 KW_Else))
= HappyAbsSyn165
(Loc happy_var_1 "else"
)
happyReduction_443 _ = notHappyAtAll
happyReduce_444 = happySpecReduce_1 166 happyReduction_444
happyReduction_444 (HappyTerminal (Loc happy_var_1 KW_Family))
= HappyAbsSyn165
(Loc happy_var_1 "family"
)
happyReduction_444 _ = notHappyAtAll
happyReduce_445 = happySpecReduce_1 166 happyReduction_445
happyReduction_445 (HappyTerminal (Loc happy_var_1 KW_Forall))
= HappyAbsSyn165
(Loc happy_var_1 "forall"
)
happyReduction_445 _ = notHappyAtAll
happyReduce_446 = happySpecReduce_1 166 happyReduction_446
happyReduction_446 (HappyTerminal (Loc happy_var_1 KW_Group))
= HappyAbsSyn165
(Loc happy_var_1 "group"
)
happyReduction_446 _ = notHappyAtAll
happyReduce_447 = happySpecReduce_1 166 happyReduction_447
happyReduction_447 (HappyTerminal (Loc happy_var_1 KW_Hiding))
= HappyAbsSyn165
(Loc happy_var_1 "hiding"
)
happyReduction_447 _ = notHappyAtAll
happyReduce_448 = happySpecReduce_1 166 happyReduction_448
happyReduction_448 (HappyTerminal (Loc happy_var_1 KW_If))
= HappyAbsSyn165
(Loc happy_var_1 "if"
)
happyReduction_448 _ = notHappyAtAll
happyReduce_449 = happySpecReduce_1 166 happyReduction_449
happyReduction_449 (HappyTerminal (Loc happy_var_1 KW_Import))
= HappyAbsSyn165
(Loc happy_var_1 "import"
)
happyReduction_449 _ = notHappyAtAll
happyReduce_450 = happySpecReduce_1 166 happyReduction_450
happyReduction_450 (HappyTerminal (Loc happy_var_1 KW_In))
= HappyAbsSyn165
(Loc happy_var_1 "in"
)
happyReduction_450 _ = notHappyAtAll
happyReduce_451 = happySpecReduce_1 166 happyReduction_451
happyReduction_451 (HappyTerminal (Loc happy_var_1 KW_Infix))
= HappyAbsSyn165
(Loc happy_var_1 "infix"
)
happyReduction_451 _ = notHappyAtAll
happyReduce_452 = happySpecReduce_1 166 happyReduction_452
happyReduction_452 (HappyTerminal (Loc happy_var_1 KW_InfixL))
= HappyAbsSyn165
(Loc happy_var_1 "infixl"
)
happyReduction_452 _ = notHappyAtAll
happyReduce_453 = happySpecReduce_1 166 happyReduction_453
happyReduction_453 (HappyTerminal (Loc happy_var_1 KW_InfixR))
= HappyAbsSyn165
(Loc happy_var_1 "infixr"
)
happyReduction_453 _ = notHappyAtAll
happyReduce_454 = happySpecReduce_1 166 happyReduction_454
happyReduction_454 (HappyTerminal (Loc happy_var_1 KW_Instance))
= HappyAbsSyn165
(Loc happy_var_1 "instance"
)
happyReduction_454 _ = notHappyAtAll
happyReduce_455 = happySpecReduce_1 166 happyReduction_455
happyReduction_455 (HappyTerminal (Loc happy_var_1 KW_Let))
= HappyAbsSyn165
(Loc happy_var_1 "let"
)
happyReduction_455 _ = notHappyAtAll
happyReduce_456 = happySpecReduce_1 166 happyReduction_456
happyReduction_456 (HappyTerminal (Loc happy_var_1 KW_MDo))
= HappyAbsSyn165
(Loc happy_var_1 "mdo"
)
happyReduction_456 _ = notHappyAtAll
happyReduce_457 = happySpecReduce_1 166 happyReduction_457
happyReduction_457 (HappyTerminal (Loc happy_var_1 KW_Module))
= HappyAbsSyn165
(Loc happy_var_1 "module"
)
happyReduction_457 _ = notHappyAtAll
happyReduce_458 = happySpecReduce_1 166 happyReduction_458
happyReduction_458 (HappyTerminal (Loc happy_var_1 KW_NewType))
= HappyAbsSyn165
(Loc happy_var_1 "newtype"
)
happyReduction_458 _ = notHappyAtAll
happyReduce_459 = happySpecReduce_1 166 happyReduction_459
happyReduction_459 (HappyTerminal (Loc happy_var_1 KW_Of))
= HappyAbsSyn165
(Loc happy_var_1 "of"
)
happyReduction_459 _ = notHappyAtAll
happyReduce_460 = happySpecReduce_1 166 happyReduction_460
happyReduction_460 (HappyTerminal (Loc happy_var_1 KW_Proc))
= HappyAbsSyn165
(Loc happy_var_1 "proc"
)
happyReduction_460 _ = notHappyAtAll
happyReduce_461 = happySpecReduce_1 166 happyReduction_461
happyReduction_461 (HappyTerminal (Loc happy_var_1 KW_Rec))
= HappyAbsSyn165
(Loc happy_var_1 "rec"
)
happyReduction_461 _ = notHappyAtAll
happyReduce_462 = happySpecReduce_1 166 happyReduction_462
happyReduction_462 (HappyTerminal (Loc happy_var_1 KW_Then))
= HappyAbsSyn165
(Loc happy_var_1 "then"
)
happyReduction_462 _ = notHappyAtAll
happyReduce_463 = happySpecReduce_1 166 happyReduction_463
happyReduction_463 (HappyTerminal (Loc happy_var_1 KW_Using))
= HappyAbsSyn165
(Loc happy_var_1 "using"
)
happyReduction_463 _ = notHappyAtAll
happyReduce_464 = happySpecReduce_1 166 happyReduction_464
happyReduction_464 (HappyTerminal (Loc happy_var_1 KW_Where))
= HappyAbsSyn165
(Loc happy_var_1 "where"
)
happyReduction_464 _ = notHappyAtAll
happyReduce_465 = happySpecReduce_1 166 happyReduction_465
happyReduction_465 (HappyTerminal (Loc happy_var_1 KW_Qualified))
= HappyAbsSyn165
(Loc happy_var_1 "qualified"
)
happyReduction_465 _ = notHappyAtAll
happyReduce_466 = happySpecReduce_2 167 happyReduction_466
happyReduction_466 (HappyAbsSyn168 happy_var_2)
(HappyAbsSyn167 happy_var_1)
= HappyAbsSyn167
(happy_var_2 : happy_var_1
)
happyReduction_466 _ _ = notHappyAtAll
happyReduce_467 = happySpecReduce_0 167 happyReduction_467
happyReduction_467 = HappyAbsSyn167
([]
)
happyReduce_468 = happySpecReduce_3 168 happyReduction_468
happyReduction_468 (HappyAbsSyn14 happy_var_3)
(HappyTerminal (Loc happy_var_2 Equals))
(HappyAbsSyn164 happy_var_1)
= HappyAbsSyn168
(XAttr (happy_var_1 <> happy_var_3 <** [happy_var_2]) happy_var_1 happy_var_3
)
happyReduction_468 _ _ _ = notHappyAtAll
happyReduce_469 = happySpecReduce_1 169 happyReduction_469
happyReduction_469 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn169
(Just happy_var_1
)
happyReduction_469 _ = notHappyAtAll
happyReduce_470 = happySpecReduce_0 169 happyReduction_470
happyReduction_470 = HappyAbsSyn169
(Nothing
)
happyReduce_471 = happySpecReduce_1 170 happyReduction_471
happyReduction_471 (HappyAbsSyn14 happy_var_1)
= HappyAbsSyn170
(\l -> List l [happy_var_1]
)
happyReduction_471 _ = notHappyAtAll
happyReduce_472 = happySpecReduce_1 170 happyReduction_472
happyReduction_472 (HappyAbsSyn159 happy_var_1)
= HappyAbsSyn170
(\l -> let (ps,ss) = happy_var_1 in List (l <** reverse ss) (reverse ps)
)
happyReduction_472 _ = notHappyAtAll
happyReduce_473 = happySpecReduce_2 170 happyReduction_473
happyReduction_473 (HappyTerminal (Loc happy_var_2 DotDot))
(HappyAbsSyn14 happy_var_1)
= HappyAbsSyn170
(\l -> EnumFrom (l <** [happy_var_2]) happy_var_1
)
happyReduction_473 _ _ = notHappyAtAll
happyReduce_474 = happyReduce 4 170 happyReduction_474
happyReduction_474 ((HappyTerminal (Loc happy_var_4 DotDot)) `HappyStk`
(HappyAbsSyn14 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 Comma)) `HappyStk`
(HappyAbsSyn14 happy_var_1) `HappyStk`
happyRest)
= HappyAbsSyn170
(\l -> EnumFromThen (l <** [happy_var_2,happy_var_4]) happy_var_1 happy_var_3
) `HappyStk` happyRest
happyReduce_475 = happySpecReduce_3 170 happyReduction_475
happyReduction_475 (HappyAbsSyn14 happy_var_3)
(HappyTerminal (Loc happy_var_2 DotDot))
(HappyAbsSyn14 happy_var_1)
= HappyAbsSyn170
(\l -> EnumFromTo (l <** [happy_var_2]) happy_var_1 happy_var_3
)
happyReduction_475 _ _ _ = notHappyAtAll
happyReduce_476 = happyReduce 5 170 happyReduction_476
happyReduction_476 ((HappyAbsSyn14 happy_var_5) `HappyStk`
(HappyTerminal (Loc happy_var_4 DotDot)) `HappyStk`
(HappyAbsSyn14 happy_var_3) `HappyStk`
(HappyTerminal (Loc happy_var_2 Comma)) `HappyStk`
(HappyAbsSyn14 happy_var_1) `HappyStk`
happyRest)
= HappyAbsSyn170
(\l -> EnumFromThenTo (l <** [happy_var_2,happy_var_4]) happy_var_1 happy_var_3 happy_var_5
) `HappyStk` happyRest
happyReduce_477 = happySpecReduce_3 170 happyReduction_477
happyReduction_477 (HappyAbsSyn172 happy_var_3)
(HappyTerminal (Loc happy_var_2 Bar))
(HappyAbsSyn14 happy_var_1)
= HappyAbsSyn170
(\l -> let (stss, ss) = happy_var_3 in ParComp (l <** (happy_var_2:ss)) happy_var_1 (reverse stss)
)
happyReduction_477 _ _ _ = notHappyAtAll
happyReduce_478 = happySpecReduce_3 171 happyReduction_478
happyReduction_478 (HappyAbsSyn14 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn159 happy_var_1)
= HappyAbsSyn159
(let (es, ss) = happy_var_1 in (happy_var_3 : es, happy_var_2 : ss)
)
happyReduction_478 _ _ _ = notHappyAtAll
happyReduce_479 = happySpecReduce_3 171 happyReduction_479
happyReduction_479 (HappyAbsSyn14 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn14 happy_var_1)
= HappyAbsSyn159
(([happy_var_3,happy_var_1], [happy_var_2])
)
happyReduction_479 _ _ _ = notHappyAtAll
happyReduce_480 = happySpecReduce_3 172 happyReduction_480
happyReduction_480 (HappyAbsSyn173 happy_var_3)
(HappyTerminal (Loc happy_var_2 Bar))
(HappyAbsSyn172 happy_var_1)
= HappyAbsSyn172
(let { (stss, ss1) = happy_var_1;
(sts, ss2) = happy_var_3 }
in (reverse sts : stss, ss1 ++ [happy_var_2] ++ reverse ss2)
)
happyReduction_480 _ _ _ = notHappyAtAll
happyReduce_481 = happySpecReduce_1 172 happyReduction_481
happyReduction_481 (HappyAbsSyn173 happy_var_1)
= HappyAbsSyn172
(let (sts, ss) = happy_var_1 in ([reverse sts], reverse ss)
)
happyReduction_481 _ = notHappyAtAll
happyReduce_482 = happySpecReduce_3 173 happyReduction_482
happyReduction_482 (HappyAbsSyn174 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn173 happy_var_1)
= HappyAbsSyn173
(let (sts, ss) = happy_var_1 in (happy_var_3 : sts, happy_var_2 : ss)
)
happyReduction_482 _ _ _ = notHappyAtAll
happyReduce_483 = happySpecReduce_1 173 happyReduction_483
happyReduction_483 (HappyAbsSyn174 happy_var_1)
= HappyAbsSyn173
(([happy_var_1],[])
)
happyReduction_483 _ = notHappyAtAll
happyReduce_484 = happySpecReduce_1 174 happyReduction_484
happyReduction_484 (HappyAbsSyn174 happy_var_1)
= HappyAbsSyn174
(happy_var_1
)
happyReduction_484 _ = notHappyAtAll
happyReduce_485 = happySpecReduce_1 174 happyReduction_485
happyReduction_485 (HappyAbsSyn177 happy_var_1)
= HappyAbsSyn174
(QualStmt (ann happy_var_1) happy_var_1
)
happyReduction_485 _ = notHappyAtAll
happyReduce_486 = happySpecReduce_2 175 happyReduction_486
happyReduction_486 (HappyAbsSyn139 happy_var_2)
(HappyTerminal (Loc happy_var_1 KW_Then))
= HappyAbsSyn174
(ThenTrans (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2
)
happyReduction_486 _ _ = notHappyAtAll
happyReduce_487 = happyReduce 4 175 happyReduction_487
happyReduction_487 ((HappyAbsSyn139 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 KW_By)) `HappyStk`
(HappyAbsSyn139 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Then)) `HappyStk`
happyRest)
= HappyAbsSyn174
(ThenBy (nIS happy_var_1 <++> ann happy_var_4 <** [happy_var_1,happy_var_3]) happy_var_2 happy_var_4
) `HappyStk` happyRest
happyReduce_488 = happyReduce 4 175 happyReduction_488
happyReduction_488 ((HappyAbsSyn139 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 KW_By)) `HappyStk`
(HappyTerminal (Loc happy_var_2 KW_Group)) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Then)) `HappyStk`
happyRest)
= HappyAbsSyn174
(GroupBy (nIS happy_var_1 <++> ann happy_var_4 <** [happy_var_1,happy_var_2,happy_var_3]) happy_var_4
) `HappyStk` happyRest
happyReduce_489 = happyReduce 4 175 happyReduction_489
happyReduction_489 ((HappyAbsSyn139 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 KW_Using)) `HappyStk`
(HappyTerminal (Loc happy_var_2 KW_Group)) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Then)) `HappyStk`
happyRest)
= HappyAbsSyn174
(GroupUsing (nIS happy_var_1 <++> ann happy_var_4 <** [happy_var_1,happy_var_2,happy_var_3]) happy_var_4
) `HappyStk` happyRest
happyReduce_490 = happyReduce 6 175 happyReduction_490
happyReduction_490 ((HappyAbsSyn139 happy_var_6) `HappyStk`
(HappyTerminal (Loc happy_var_5 KW_Using)) `HappyStk`
(HappyAbsSyn139 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 KW_By)) `HappyStk`
(HappyTerminal (Loc happy_var_2 KW_Group)) `HappyStk`
(HappyTerminal (Loc happy_var_1 KW_Then)) `HappyStk`
happyRest)
= HappyAbsSyn174
(GroupByUsing (nIS happy_var_1 <++> ann happy_var_6 <** [happy_var_1,happy_var_2,happy_var_3,happy_var_5]) happy_var_4 happy_var_6
) `HappyStk` happyRest
happyReduce_491 = happySpecReduce_3 176 happyReduction_491
happyReduction_491 (HappyAbsSyn177 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn176 happy_var_1)
= HappyAbsSyn176
(let (sts, ss) = happy_var_1 in (happy_var_3 : sts, happy_var_2 : ss)
)
happyReduction_491 _ _ _ = notHappyAtAll
happyReduce_492 = happySpecReduce_1 176 happyReduction_492
happyReduction_492 (HappyAbsSyn177 happy_var_1)
= HappyAbsSyn176
(([happy_var_1],[])
)
happyReduction_492 _ = notHappyAtAll
happyReduce_493 = happySpecReduce_3 177 happyReduction_493
happyReduction_493 (HappyAbsSyn139 happy_var_3)
(HappyTerminal (Loc happy_var_2 LeftArrow))
(HappyAbsSyn151 happy_var_1)
= HappyAbsSyn177
(Generator (happy_var_1 <> happy_var_3 <** [happy_var_2]) happy_var_1 happy_var_3
)
happyReduction_493 _ _ _ = notHappyAtAll
happyReduce_494 = happySpecReduce_1 177 happyReduction_494
happyReduction_494 (HappyAbsSyn139 happy_var_1)
= HappyAbsSyn177
(Qualifier (ann happy_var_1) happy_var_1
)
happyReduction_494 _ = notHappyAtAll
happyReduce_495 = happySpecReduce_2 177 happyReduction_495
happyReduction_495 (HappyAbsSyn56 happy_var_2)
(HappyTerminal (Loc happy_var_1 KW_Let))
= HappyAbsSyn177
(LetStmt (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2
)
happyReduction_495 _ _ = notHappyAtAll
happyReduce_496 = happySpecReduce_3 178 happyReduction_496
happyReduction_496 (HappyTerminal (Loc happy_var_3 RightCurly))
(HappyAbsSyn179 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftCurly))
= HappyAbsSyn178
((fst happy_var_2, happy_var_1 <^^> happy_var_3, happy_var_1:snd happy_var_2 ++ [happy_var_3])
)
happyReduction_496 _ _ _ = notHappyAtAll
happyReduce_497 = happySpecReduce_3 178 happyReduction_497
happyReduction_497 (HappyAbsSyn225 happy_var_3)
(HappyAbsSyn179 happy_var_2)
(HappyAbsSyn225 happy_var_1)
= HappyAbsSyn178
((fst happy_var_2, happy_var_1 <^^> happy_var_3, happy_var_1:snd happy_var_2 ++ [happy_var_3])
)
happyReduction_497 _ _ _ = notHappyAtAll
happyReduce_498 = happySpecReduce_3 179 happyReduction_498
happyReduction_498 (HappyAbsSyn24 happy_var_3)
(HappyAbsSyn179 happy_var_2)
(HappyAbsSyn24 happy_var_1)
= HappyAbsSyn179
((reverse $ fst happy_var_2, happy_var_1 ++ snd happy_var_2 ++ happy_var_3)
)
happyReduction_498 _ _ _ = notHappyAtAll
happyReduce_499 = happySpecReduce_3 180 happyReduction_499
happyReduction_499 (HappyAbsSyn181 happy_var_3)
(HappyAbsSyn24 happy_var_2)
(HappyAbsSyn179 happy_var_1)
= HappyAbsSyn179
((happy_var_3 : fst happy_var_1, snd happy_var_1 ++ happy_var_2)
)
happyReduction_499 _ _ _ = notHappyAtAll
happyReduce_500 = happySpecReduce_1 180 happyReduction_500
happyReduction_500 (HappyAbsSyn181 happy_var_1)
= HappyAbsSyn179
(([happy_var_1],[])
)
happyReduction_500 _ = notHappyAtAll
happyReduce_501 = happySpecReduce_3 181 happyReduction_501
happyReduction_501 (HappyAbsSyn134 happy_var_3)
(HappyAbsSyn182 happy_var_2)
(HappyAbsSyn151 happy_var_1)
= HappyAbsSyn181
(Alt (happy_var_1 <> happy_var_2 <+?> (fmap ann) (fst happy_var_3) <** snd happy_var_3) happy_var_1 happy_var_2 (fst happy_var_3)
)
happyReduction_501 _ _ _ = notHappyAtAll
happyReduce_502 = happySpecReduce_2 182 happyReduction_502
happyReduction_502 (HappyAbsSyn139 happy_var_2)
(HappyTerminal (Loc happy_var_1 RightArrow))
= HappyAbsSyn182
(UnGuardedAlt (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2
)
happyReduction_502 _ _ = notHappyAtAll
happyReduce_503 = happySpecReduce_1 182 happyReduction_503
happyReduction_503 (HappyAbsSyn183 happy_var_1)
= HappyAbsSyn182
(GuardedAlts (snd happy_var_1) (reverse $ fst happy_var_1)
)
happyReduction_503 _ = notHappyAtAll
happyReduce_504 = happySpecReduce_2 183 happyReduction_504
happyReduction_504 (HappyAbsSyn184 happy_var_2)
(HappyAbsSyn183 happy_var_1)
= HappyAbsSyn183
((happy_var_2 : fst happy_var_1, snd happy_var_1 <++> ann happy_var_2)
)
happyReduction_504 _ _ = notHappyAtAll
happyReduce_505 = happySpecReduce_1 183 happyReduction_505
happyReduction_505 (HappyAbsSyn184 happy_var_1)
= HappyAbsSyn183
(([happy_var_1], ann happy_var_1)
)
happyReduction_505 _ = notHappyAtAll
happyReduce_506 = happyMonadReduce 4 184 happyReduction_506
happyReduction_506 ((HappyAbsSyn139 happy_var_4) `HappyStk`
(HappyTerminal (Loc happy_var_3 RightArrow)) `HappyStk`
(HappyAbsSyn176 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 Bar)) `HappyStk`
happyRest) tk
= happyThen (( do { checkPatternGuards (fst happy_var_2);
let {l = nIS happy_var_1 <++> ann happy_var_4 <** (happy_var_1:snd happy_var_2 ++ [happy_var_3])};
return (GuardedAlt l (reverse (fst happy_var_2)) happy_var_4) })
) (\r -> happyReturn (HappyAbsSyn184 r))
happyReduce_507 = happyMonadReduce 1 185 happyReduction_507
happyReduction_507 ((HappyAbsSyn14 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkPattern happy_var_1)
) (\r -> happyReturn (HappyAbsSyn151 r))
happyReduce_508 = happyMonadReduce 2 185 happyReduction_508
happyReduction_508 ((HappyAbsSyn14 happy_var_2) `HappyStk`
(HappyTerminal (Loc happy_var_1 Exclamation)) `HappyStk`
happyRest) tk
= happyThen (( checkPattern (BangPat (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2))
) (\r -> happyReturn (HappyAbsSyn151 r))
happyReduce_509 = happySpecReduce_3 186 happyReduction_509
happyReduction_509 (HappyTerminal (Loc happy_var_3 RightCurly))
(HappyAbsSyn176 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftCurly))
= HappyAbsSyn186
((fst happy_var_2, happy_var_1 <^^> happy_var_3, happy_var_1:snd happy_var_2 ++ [happy_var_3])
)
happyReduction_509 _ _ _ = notHappyAtAll
happyReduce_510 = happySpecReduce_3 186 happyReduction_510
happyReduction_510 (HappyAbsSyn225 happy_var_3)
(HappyAbsSyn176 happy_var_2)
(HappyAbsSyn225 happy_var_1)
= HappyAbsSyn186
((fst happy_var_2, happy_var_1 <^^> happy_var_3, happy_var_1:snd happy_var_2 ++ [happy_var_3])
)
happyReduction_510 _ _ _ = notHappyAtAll
happyReduce_511 = happySpecReduce_2 187 happyReduction_511
happyReduction_511 (HappyAbsSyn176 happy_var_2)
(HappyAbsSyn177 happy_var_1)
= HappyAbsSyn176
((happy_var_1 : fst happy_var_2, snd happy_var_2)
)
happyReduction_511 _ _ = notHappyAtAll
happyReduce_512 = happySpecReduce_2 187 happyReduction_512
happyReduction_512 (HappyAbsSyn176 happy_var_2)
(HappyTerminal (Loc happy_var_1 SemiColon))
= HappyAbsSyn176
((fst happy_var_2, happy_var_1 : snd happy_var_2)
)
happyReduction_512 _ _ = notHappyAtAll
happyReduce_513 = happySpecReduce_0 187 happyReduction_513
happyReduction_513 = HappyAbsSyn176
(([],[])
)
happyReduce_514 = happySpecReduce_2 188 happyReduction_514
happyReduction_514 (HappyAbsSyn176 happy_var_2)
(HappyTerminal (Loc happy_var_1 SemiColon))
= HappyAbsSyn176
((fst happy_var_2, happy_var_1 : snd happy_var_2)
)
happyReduction_514 _ _ = notHappyAtAll
happyReduce_515 = happySpecReduce_0 188 happyReduction_515
happyReduction_515 = HappyAbsSyn176
(([],[])
)
happyReduce_516 = happySpecReduce_2 189 happyReduction_516
happyReduction_516 (HappyAbsSyn56 happy_var_2)
(HappyTerminal (Loc happy_var_1 KW_Let))
= HappyAbsSyn177
(LetStmt (nIS happy_var_1 <++> ann happy_var_2 <** [happy_var_1]) happy_var_2
)
happyReduction_516 _ _ = notHappyAtAll
happyReduce_517 = happySpecReduce_3 189 happyReduction_517
happyReduction_517 (HappyAbsSyn139 happy_var_3)
(HappyTerminal (Loc happy_var_2 LeftArrow))
(HappyAbsSyn151 happy_var_1)
= HappyAbsSyn177
(Generator (happy_var_1 <> happy_var_3 <** [happy_var_2]) happy_var_1 happy_var_3
)
happyReduction_517 _ _ _ = notHappyAtAll
happyReduce_518 = happySpecReduce_1 189 happyReduction_518
happyReduction_518 (HappyAbsSyn139 happy_var_1)
= HappyAbsSyn177
(Qualifier (ann happy_var_1) happy_var_1
)
happyReduction_518 _ = notHappyAtAll
happyReduce_519 = happySpecReduce_2 189 happyReduction_519
happyReduction_519 (HappyAbsSyn186 happy_var_2)
(HappyTerminal (Loc happy_var_1 KW_Rec))
= HappyAbsSyn177
(let (stms,inf,ss) = happy_var_2 in RecStmt (nIS happy_var_1 <++> inf <** happy_var_1:ss) stms
)
happyReduction_519 _ _ = notHappyAtAll
happyReduce_520 = happySpecReduce_3 190 happyReduction_520
happyReduction_520 (HappyAbsSyn191 happy_var_3)
(HappyTerminal (Loc happy_var_2 Comma))
(HappyAbsSyn190 happy_var_1)
= HappyAbsSyn190
(let (fbs, ss) = happy_var_1 in (happy_var_3 : fbs, happy_var_2 : ss)
)
happyReduction_520 _ _ _ = notHappyAtAll
happyReduce_521 = happySpecReduce_1 190 happyReduction_521
happyReduction_521 (HappyAbsSyn191 happy_var_1)
= HappyAbsSyn190
(([happy_var_1],[])
)
happyReduction_521 _ = notHappyAtAll
happyReduce_522 = happySpecReduce_3 191 happyReduction_522
happyReduction_522 (HappyAbsSyn14 happy_var_3)
(HappyTerminal (Loc happy_var_2 Equals))
(HappyAbsSyn85 happy_var_1)
= HappyAbsSyn191
(FieldUpdate (happy_var_1 <>happy_var_3 <** [happy_var_2]) happy_var_1 happy_var_3
)
happyReduction_522 _ _ _ = notHappyAtAll
happyReduce_523 = happyMonadReduce 1 191 happyReduction_523
happyReduction_523 ((HappyAbsSyn85 happy_var_1) `HappyStk`
happyRest) tk
= happyThen (( checkEnabled NamedFieldPuns >> checkUnQual happy_var_1 >>= return . FieldPun (ann happy_var_1))
) (\r -> happyReturn (HappyAbsSyn191 r))
happyReduce_524 = happyMonadReduce 1 191 happyReduction_524
happyReduction_524 ((HappyTerminal (Loc happy_var_1 DotDot)) `HappyStk`
happyRest) tk
= happyThen (( checkEnabled RecordWildCards >> return (FieldWildcard (nIS happy_var_1)))
) (\r -> happyReturn (HappyAbsSyn191 r))
happyReduce_525 = happySpecReduce_3 192 happyReduction_525
happyReduction_525 (HappyAbsSyn24 happy_var_3)
(HappyAbsSyn192 happy_var_2)
(HappyAbsSyn24 happy_var_1)
= HappyAbsSyn192
((reverse (fst happy_var_2), reverse happy_var_1 ++ snd happy_var_2 ++ reverse happy_var_3)
)
happyReduction_525 _ _ _ = notHappyAtAll
happyReduce_526 = happySpecReduce_3 193 happyReduction_526
happyReduction_526 (HappyAbsSyn194 happy_var_3)
(HappyAbsSyn24 happy_var_2)
(HappyAbsSyn192 happy_var_1)
= HappyAbsSyn192
((happy_var_3 : fst happy_var_1, snd happy_var_1 ++ reverse happy_var_2)
)
happyReduction_526 _ _ _ = notHappyAtAll
happyReduce_527 = happySpecReduce_1 193 happyReduction_527
happyReduction_527 (HappyAbsSyn194 happy_var_1)
= HappyAbsSyn192
(([happy_var_1],[])
)
happyReduction_527 _ = notHappyAtAll
happyReduce_528 = happySpecReduce_3 194 happyReduction_528
happyReduction_528 (HappyAbsSyn139 happy_var_3)
(HappyTerminal (Loc happy_var_2 Equals))
(HappyAbsSyn199 happy_var_1)
= HappyAbsSyn194
(IPBind (happy_var_1 <> happy_var_3 <** [happy_var_2]) happy_var_1 happy_var_3
)
happyReduction_528 _ _ _ = notHappyAtAll
happyReduce_529 = happySpecReduce_2 195 happyReduction_529
happyReduction_529 (HappyTerminal (Loc happy_var_2 RightParen))
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn14
(p_unit_con (happy_var_1 <^^> happy_var_2 <** [happy_var_1,happy_var_2])
)
happyReduction_529 _ _ = notHappyAtAll
happyReduce_530 = happySpecReduce_2 195 happyReduction_530
happyReduction_530 (HappyTerminal (Loc happy_var_2 RightSquare))
(HappyTerminal (Loc happy_var_1 LeftSquare))
= HappyAbsSyn14
(List (happy_var_1 <^^> happy_var_2 <** [happy_var_1,happy_var_2]) []
)
happyReduction_530 _ _ = notHappyAtAll
happyReduce_531 = happySpecReduce_3 195 happyReduction_531
happyReduction_531 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn24 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn14
(p_tuple_con (happy_var_1 <^^> happy_var_3 <** happy_var_1:reverse (happy_var_3:happy_var_2)) Boxed (length happy_var_2)
)
happyReduction_531 _ _ _ = notHappyAtAll
happyReduce_532 = happySpecReduce_2 195 happyReduction_532
happyReduction_532 (HappyTerminal (Loc happy_var_2 RightHashParen))
(HappyTerminal (Loc happy_var_1 LeftHashParen))
= HappyAbsSyn14
(p_unboxed_singleton_con (happy_var_1 <^^> happy_var_2 <** [happy_var_1,happy_var_2])
)
happyReduction_532 _ _ = notHappyAtAll
happyReduce_533 = happySpecReduce_3 195 happyReduction_533
happyReduction_533 (HappyTerminal (Loc happy_var_3 RightHashParen))
(HappyAbsSyn24 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftHashParen))
= HappyAbsSyn14
(p_tuple_con (happy_var_1 <^^> happy_var_3 <** happy_var_1:reverse (happy_var_3:happy_var_2)) Unboxed (length happy_var_2)
)
happyReduction_533 _ _ _ = notHappyAtAll
happyReduce_534 = happySpecReduce_1 195 happyReduction_534
happyReduction_534 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn14
(Con (ann happy_var_1) happy_var_1
)
happyReduction_534 _ = notHappyAtAll
happyReduce_535 = happySpecReduce_1 196 happyReduction_535
happyReduction_535 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn75
(happy_var_1
)
happyReduction_535 _ = notHappyAtAll
happyReduce_536 = happySpecReduce_3 196 happyReduction_536
happyReduction_536 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn75 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn75
(fmap (const (happy_var_1 <^^> happy_var_3 <** [happy_var_1, srcInfoSpan (ann happy_var_2), happy_var_3])) happy_var_2
)
happyReduction_536 _ _ _ = notHappyAtAll
happyReduce_537 = happySpecReduce_1 197 happyReduction_537
happyReduction_537 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn75
(happy_var_1
)
happyReduction_537 _ = notHappyAtAll
happyReduce_538 = happySpecReduce_3 197 happyReduction_538
happyReduction_538 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn75 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn75
(fmap (const (happy_var_1 <^^> happy_var_3 <** [happy_var_1, srcInfoSpan (ann happy_var_2), happy_var_3])) happy_var_2
)
happyReduction_538 _ _ _ = notHappyAtAll
happyReduce_539 = happySpecReduce_1 198 happyReduction_539
happyReduction_539 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn85
(happy_var_1
)
happyReduction_539 _ = notHappyAtAll
happyReduce_540 = happySpecReduce_3 198 happyReduction_540
happyReduction_540 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn85 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn85
(fmap (const (happy_var_1 <^^> happy_var_3 <** [happy_var_1, srcInfoSpan (ann happy_var_2), happy_var_3])) happy_var_2
)
happyReduction_540 _ _ _ = notHappyAtAll
happyReduce_541 = happySpecReduce_1 199 happyReduction_541
happyReduction_541 (HappyAbsSyn199 happy_var_1)
= HappyAbsSyn199
(happy_var_1
)
happyReduction_541 _ = notHappyAtAll
happyReduce_542 = happySpecReduce_1 200 happyReduction_542
happyReduction_542 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn75
(happy_var_1
)
happyReduction_542 _ = notHappyAtAll
happyReduce_543 = happySpecReduce_3 200 happyReduction_543
happyReduction_543 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn75 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn75
(fmap (const (happy_var_1 <^^> happy_var_3 <** [happy_var_1, srcInfoSpan (ann happy_var_2), happy_var_3])) happy_var_2
)
happyReduction_543 _ _ _ = notHappyAtAll
happyReduce_544 = happySpecReduce_1 201 happyReduction_544
happyReduction_544 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn85
(happy_var_1
)
happyReduction_544 _ = notHappyAtAll
happyReduce_545 = happySpecReduce_3 201 happyReduction_545
happyReduction_545 (HappyTerminal (Loc happy_var_3 RightParen))
(HappyAbsSyn85 happy_var_2)
(HappyTerminal (Loc happy_var_1 LeftParen))
= HappyAbsSyn85
(fmap (const (happy_var_1 <^^> happy_var_3 <** [happy_var_1, srcInfoSpan (ann happy_var_2), happy_var_3])) happy_var_2
)
happyReduction_545 _ _ _ = notHappyAtAll
happyReduce_546 = happySpecReduce_1 202 happyReduction_546
happyReduction_546 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn75
(happy_var_1
)
happyReduction_546 _ = notHappyAtAll
happyReduce_547 = happySpecReduce_3 202 happyReduction_547
happyReduction_547 (HappyTerminal (Loc happy_var_3 BackQuote))
(HappyAbsSyn75 happy_var_2)
(HappyTerminal (Loc happy_var_1 BackQuote))
= HappyAbsSyn75
(fmap (const (happy_var_1 <^^> happy_var_3 <** [happy_var_1, srcInfoSpan (ann happy_var_2), happy_var_3])) happy_var_2
)
happyReduction_547 _ _ _ = notHappyAtAll
happyReduce_548 = happySpecReduce_1 203 happyReduction_548
happyReduction_548 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn85
(happy_var_1
)
happyReduction_548 _ = notHappyAtAll
happyReduce_549 = happySpecReduce_3 203 happyReduction_549
happyReduction_549 (HappyTerminal (Loc happy_var_3 BackQuote))
(HappyAbsSyn85 happy_var_2)
(HappyTerminal (Loc happy_var_1 BackQuote))
= HappyAbsSyn85
(fmap (const (happy_var_1 <^^> happy_var_3 <** [happy_var_1, srcInfoSpan (ann happy_var_2), happy_var_3])) happy_var_2
)
happyReduction_549 _ _ _ = notHappyAtAll
happyReduce_550 = happySpecReduce_1 204 happyReduction_550
happyReduction_550 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn85
(happy_var_1
)
happyReduction_550 _ = notHappyAtAll
happyReduce_551 = happySpecReduce_3 204 happyReduction_551
happyReduction_551 (HappyTerminal (Loc happy_var_3 BackQuote))
(HappyAbsSyn85 happy_var_2)
(HappyTerminal (Loc happy_var_1 BackQuote))
= HappyAbsSyn85
(fmap (const (happy_var_1 <^^> happy_var_3 <** [happy_var_1, srcInfoSpan (ann happy_var_2), happy_var_3])) happy_var_2
)
happyReduction_551 _ _ _ = notHappyAtAll
happyReduce_552 = happySpecReduce_1 205 happyReduction_552
happyReduction_552 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn75
(happy_var_1
)
happyReduction_552 _ = notHappyAtAll
happyReduce_553 = happySpecReduce_3 205 happyReduction_553
happyReduction_553 (HappyTerminal (Loc happy_var_3 BackQuote))
(HappyAbsSyn75 happy_var_2)
(HappyTerminal (Loc happy_var_1 BackQuote))
= HappyAbsSyn75
(fmap (const (happy_var_1 <^^> happy_var_3 <** [happy_var_1, srcInfoSpan (ann happy_var_2), happy_var_3])) happy_var_2
)
happyReduction_553 _ _ _ = notHappyAtAll
happyReduce_554 = happySpecReduce_1 206 happyReduction_554
happyReduction_554 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn85
(happy_var_1
)
happyReduction_554 _ = notHappyAtAll
happyReduce_555 = happySpecReduce_3 206 happyReduction_555
happyReduction_555 (HappyTerminal (Loc happy_var_3 BackQuote))
(HappyAbsSyn85 happy_var_2)
(HappyTerminal (Loc happy_var_1 BackQuote))
= HappyAbsSyn85
(fmap (const (happy_var_1 <^^> happy_var_3 <** [happy_var_1, srcInfoSpan (ann happy_var_2), happy_var_3])) happy_var_2
)
happyReduction_555 _ _ _ = notHappyAtAll
happyReduce_556 = happySpecReduce_1 207 happyReduction_556
happyReduction_556 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn207
(VarOp (ann happy_var_1) happy_var_1
)
happyReduction_556 _ = notHappyAtAll
happyReduce_557 = happySpecReduce_1 207 happyReduction_557
happyReduction_557 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn207
(ConOp (ann happy_var_1) happy_var_1
)
happyReduction_557 _ = notHappyAtAll
happyReduce_558 = happySpecReduce_1 208 happyReduction_558
happyReduction_558 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn208
(QVarOp (ann happy_var_1) happy_var_1
)
happyReduction_558 _ = notHappyAtAll
happyReduce_559 = happySpecReduce_1 208 happyReduction_559
happyReduction_559 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn208
(QConOp (ann happy_var_1) happy_var_1
)
happyReduction_559 _ = notHappyAtAll
happyReduce_560 = happySpecReduce_1 209 happyReduction_560
happyReduction_560 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn208
(QVarOp (ann happy_var_1) happy_var_1
)
happyReduction_560 _ = notHappyAtAll
happyReduce_561 = happySpecReduce_1 209 happyReduction_561
happyReduction_561 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn208
(QConOp (ann happy_var_1) happy_var_1
)
happyReduction_561 _ = notHappyAtAll
happyReduce_562 = happySpecReduce_1 210 happyReduction_562
happyReduction_562 (HappyTerminal (Loc happy_var_1 Colon))
= HappyAbsSyn85
(list_cons_name (nIS happy_var_1)
)
happyReduction_562 _ = notHappyAtAll
happyReduce_563 = happySpecReduce_1 210 happyReduction_563
happyReduction_563 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn85
(happy_var_1
)
happyReduction_563 _ = notHappyAtAll
happyReduce_564 = happySpecReduce_1 211 happyReduction_564
happyReduction_564 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn85
(UnQual (ann happy_var_1) happy_var_1
)
happyReduction_564 _ = notHappyAtAll
happyReduce_565 = happySpecReduce_1 211 happyReduction_565
happyReduction_565 (HappyTerminal happy_var_1)
= HappyAbsSyn85
(let {Loc l (QVarId q) = happy_var_1; nis = nIS l}
in Qual nis (ModuleName nis (fst q)) (Ident nis (snd q))
)
happyReduction_565 _ = notHappyAtAll
happyReduce_566 = happySpecReduce_1 212 happyReduction_566
happyReduction_566 (HappyTerminal happy_var_1)
= HappyAbsSyn75
(let Loc l (VarId v) = happy_var_1 in Ident (nIS l) v
)
happyReduction_566 _ = notHappyAtAll
happyReduce_567 = happySpecReduce_1 212 happyReduction_567
happyReduction_567 (HappyTerminal (Loc happy_var_1 KW_As))
= HappyAbsSyn75
(as_name (nIS happy_var_1)
)
happyReduction_567 _ = notHappyAtAll
happyReduce_568 = happySpecReduce_1 212 happyReduction_568
happyReduction_568 (HappyTerminal (Loc happy_var_1 KW_Qualified))
= HappyAbsSyn75
(qualified_name (nIS happy_var_1)
)
happyReduction_568 _ = notHappyAtAll
happyReduce_569 = happySpecReduce_1 212 happyReduction_569
happyReduction_569 (HappyTerminal (Loc happy_var_1 KW_Hiding))
= HappyAbsSyn75
(hiding_name (nIS happy_var_1)
)
happyReduction_569 _ = notHappyAtAll
happyReduce_570 = happySpecReduce_1 212 happyReduction_570
happyReduction_570 (HappyTerminal (Loc happy_var_1 KW_Export))
= HappyAbsSyn75
(export_name (nIS happy_var_1)
)
happyReduction_570 _ = notHappyAtAll
happyReduce_571 = happySpecReduce_1 212 happyReduction_571
happyReduction_571 (HappyTerminal (Loc happy_var_1 KW_StdCall))
= HappyAbsSyn75
(stdcall_name (nIS happy_var_1)
)
happyReduction_571 _ = notHappyAtAll
happyReduce_572 = happySpecReduce_1 212 happyReduction_572
happyReduction_572 (HappyTerminal (Loc happy_var_1 KW_CCall))
= HappyAbsSyn75
(ccall_name (nIS happy_var_1)
)
happyReduction_572 _ = notHappyAtAll
happyReduce_573 = happySpecReduce_1 212 happyReduction_573
happyReduction_573 (HappyTerminal (Loc happy_var_1 KW_CPlusPlus))
= HappyAbsSyn75
(cplusplus_name (nIS happy_var_1)
)
happyReduction_573 _ = notHappyAtAll
happyReduce_574 = happySpecReduce_1 212 happyReduction_574
happyReduction_574 (HappyTerminal (Loc happy_var_1 KW_DotNet))
= HappyAbsSyn75
(dotnet_name (nIS happy_var_1)
)
happyReduction_574 _ = notHappyAtAll
happyReduce_575 = happySpecReduce_1 212 happyReduction_575
happyReduction_575 (HappyTerminal (Loc happy_var_1 KW_Jvm))
= HappyAbsSyn75
(jvm_name (nIS happy_var_1)
)
happyReduction_575 _ = notHappyAtAll
happyReduce_576 = happySpecReduce_1 212 happyReduction_576
happyReduction_576 (HappyTerminal (Loc happy_var_1 KW_Js))
= HappyAbsSyn75
(js_name (nIS happy_var_1)
)
happyReduction_576 _ = notHappyAtAll
happyReduce_577 = happySpecReduce_1 213 happyReduction_577
happyReduction_577 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn75
(happy_var_1
)
happyReduction_577 _ = notHappyAtAll
happyReduce_578 = happySpecReduce_1 213 happyReduction_578
happyReduction_578 (HappyTerminal (Loc happy_var_1 KW_Safe))
= HappyAbsSyn75
(safe_name (nIS happy_var_1)
)
happyReduction_578 _ = notHappyAtAll
happyReduce_579 = happySpecReduce_1 213 happyReduction_579
happyReduction_579 (HappyTerminal (Loc happy_var_1 KW_Unsafe))
= HappyAbsSyn75
(unsafe_name (nIS happy_var_1)
)
happyReduction_579 _ = notHappyAtAll
happyReduce_580 = happySpecReduce_1 213 happyReduction_580
happyReduction_580 (HappyTerminal (Loc happy_var_1 KW_Threadsafe))
= HappyAbsSyn75
(threadsafe_name (nIS happy_var_1)
)
happyReduction_580 _ = notHappyAtAll
happyReduce_581 = happySpecReduce_1 213 happyReduction_581
happyReduction_581 (HappyTerminal (Loc happy_var_1 KW_Forall))
= HappyAbsSyn75
(forall_name (nIS happy_var_1)
)
happyReduction_581 _ = notHappyAtAll
happyReduce_582 = happySpecReduce_1 213 happyReduction_582
happyReduction_582 (HappyTerminal (Loc happy_var_1 KW_Family))
= HappyAbsSyn75
(family_name (nIS happy_var_1)
)
happyReduction_582 _ = notHappyAtAll
happyReduce_583 = happySpecReduce_1 214 happyReduction_583
happyReduction_583 (HappyTerminal happy_var_1)
= HappyAbsSyn199
(let Loc l (IDupVarId i) = happy_var_1 in IPDup (nIS l) i
)
happyReduction_583 _ = notHappyAtAll
happyReduce_584 = happySpecReduce_1 214 happyReduction_584
happyReduction_584 (HappyTerminal happy_var_1)
= HappyAbsSyn199
(let Loc l (ILinVarId i) = happy_var_1 in IPLin (nIS l) i
)
happyReduction_584 _ = notHappyAtAll
happyReduce_585 = happySpecReduce_1 215 happyReduction_585
happyReduction_585 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn85
(UnQual (ann happy_var_1) happy_var_1
)
happyReduction_585 _ = notHappyAtAll
happyReduce_586 = happySpecReduce_1 215 happyReduction_586
happyReduction_586 (HappyTerminal happy_var_1)
= HappyAbsSyn85
(let {Loc l (QConId q) = happy_var_1; nis = nIS l} in Qual nis (ModuleName nis (fst q)) (Ident nis (snd q))
)
happyReduction_586 _ = notHappyAtAll
happyReduce_587 = happySpecReduce_1 216 happyReduction_587
happyReduction_587 (HappyTerminal happy_var_1)
= HappyAbsSyn75
(let Loc l (ConId c) = happy_var_1 in Ident (nIS l) c
)
happyReduction_587 _ = notHappyAtAll
happyReduce_588 = happySpecReduce_1 217 happyReduction_588
happyReduction_588 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn85
(UnQual (ann happy_var_1) happy_var_1
)
happyReduction_588 _ = notHappyAtAll
happyReduce_589 = happySpecReduce_1 217 happyReduction_589
happyReduction_589 (HappyTerminal happy_var_1)
= HappyAbsSyn85
(let {Loc l (QConSym q) = happy_var_1; nis = nIS l} in Qual nis (ModuleName nis (fst q)) (Symbol nis (snd q))
)
happyReduction_589 _ = notHappyAtAll
happyReduce_590 = happySpecReduce_1 218 happyReduction_590
happyReduction_590 (HappyTerminal happy_var_1)
= HappyAbsSyn75
(let Loc l (ConSym c) = happy_var_1 in Symbol (nIS l) c
)
happyReduction_590 _ = notHappyAtAll
happyReduce_591 = happySpecReduce_1 219 happyReduction_591
happyReduction_591 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn85
(UnQual (ann happy_var_1) happy_var_1
)
happyReduction_591 _ = notHappyAtAll
happyReduce_592 = happySpecReduce_1 219 happyReduction_592
happyReduction_592 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn85
(happy_var_1
)
happyReduction_592 _ = notHappyAtAll
happyReduce_593 = happySpecReduce_1 220 happyReduction_593
happyReduction_593 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn85
(UnQual (ann happy_var_1) happy_var_1
)
happyReduction_593 _ = notHappyAtAll
happyReduce_594 = happySpecReduce_1 220 happyReduction_594
happyReduction_594 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn85
(happy_var_1
)
happyReduction_594 _ = notHappyAtAll
happyReduce_595 = happySpecReduce_1 221 happyReduction_595
happyReduction_595 (HappyTerminal happy_var_1)
= HappyAbsSyn75
(let Loc l (VarSym v) = happy_var_1 in Symbol (nIS l) v
)
happyReduction_595 _ = notHappyAtAll
happyReduce_596 = happySpecReduce_1 221 happyReduction_596
happyReduction_596 (HappyTerminal (Loc happy_var_1 Minus))
= HappyAbsSyn75
(minus_name (nIS happy_var_1)
)
happyReduction_596 _ = notHappyAtAll
happyReduce_597 = happySpecReduce_1 221 happyReduction_597
happyReduction_597 (HappyTerminal (Loc happy_var_1 Exclamation))
= HappyAbsSyn75
(bang_name (nIS happy_var_1)
)
happyReduction_597 _ = notHappyAtAll
happyReduce_598 = happySpecReduce_1 221 happyReduction_598
happyReduction_598 (HappyTerminal (Loc happy_var_1 Dot))
= HappyAbsSyn75
(dot_name (nIS happy_var_1)
)
happyReduction_598 _ = notHappyAtAll
happyReduce_599 = happySpecReduce_1 221 happyReduction_599
happyReduction_599 (HappyTerminal (Loc happy_var_1 Star))
= HappyAbsSyn75
(star_name (nIS happy_var_1)
)
happyReduction_599 _ = notHappyAtAll
happyReduce_600 = happySpecReduce_1 222 happyReduction_600
happyReduction_600 (HappyTerminal happy_var_1)
= HappyAbsSyn75
(let Loc l (VarSym v) = happy_var_1 in Symbol (nIS l) v
)
happyReduction_600 _ = notHappyAtAll
happyReduce_601 = happySpecReduce_1 222 happyReduction_601
happyReduction_601 (HappyTerminal (Loc happy_var_1 Exclamation))
= HappyAbsSyn75
(bang_name (nIS happy_var_1)
)
happyReduction_601 _ = notHappyAtAll
happyReduce_602 = happySpecReduce_1 222 happyReduction_602
happyReduction_602 (HappyTerminal (Loc happy_var_1 Dot))
= HappyAbsSyn75
(dot_name (nIS happy_var_1)
)
happyReduction_602 _ = notHappyAtAll
happyReduce_603 = happySpecReduce_1 222 happyReduction_603
happyReduction_603 (HappyTerminal (Loc happy_var_1 Star))
= HappyAbsSyn75
(star_name (nIS happy_var_1)
)
happyReduction_603 _ = notHappyAtAll
happyReduce_604 = happySpecReduce_1 223 happyReduction_604
happyReduction_604 (HappyTerminal happy_var_1)
= HappyAbsSyn85
(let {Loc l (QVarSym q) = happy_var_1; nis = nIS l} in Qual nis (ModuleName nis (fst q)) (Symbol nis (snd q))
)
happyReduction_604 _ = notHappyAtAll
happyReduce_605 = happySpecReduce_1 224 happyReduction_605
happyReduction_605 (HappyTerminal happy_var_1)
= HappyAbsSyn224
(let Loc l (IntTok (i,raw)) = happy_var_1 in Int (nIS l) i raw
)
happyReduction_605 _ = notHappyAtAll
happyReduce_606 = happySpecReduce_1 224 happyReduction_606
happyReduction_606 (HappyTerminal happy_var_1)
= HappyAbsSyn224
(let Loc l (Character (c,raw)) = happy_var_1 in Char (nIS l) c raw
)
happyReduction_606 _ = notHappyAtAll
happyReduce_607 = happySpecReduce_1 224 happyReduction_607
happyReduction_607 (HappyTerminal happy_var_1)
= HappyAbsSyn224
(let Loc l (FloatTok (r,raw)) = happy_var_1 in Frac (nIS l) r raw
)
happyReduction_607 _ = notHappyAtAll
happyReduce_608 = happySpecReduce_1 224 happyReduction_608
happyReduction_608 (HappyTerminal happy_var_1)
= HappyAbsSyn224
(let Loc l (StringTok (s,raw)) = happy_var_1 in String (nIS l) s raw
)
happyReduction_608 _ = notHappyAtAll
happyReduce_609 = happySpecReduce_1 224 happyReduction_609
happyReduction_609 (HappyTerminal happy_var_1)
= HappyAbsSyn224
(let Loc l (IntTokHash (i,raw)) = happy_var_1 in PrimInt (nIS l) i raw
)
happyReduction_609 _ = notHappyAtAll
happyReduce_610 = happySpecReduce_1 224 happyReduction_610
happyReduction_610 (HappyTerminal happy_var_1)
= HappyAbsSyn224
(let Loc l (WordTokHash (w,raw)) = happy_var_1 in PrimWord (nIS l) w raw
)
happyReduction_610 _ = notHappyAtAll
happyReduce_611 = happySpecReduce_1 224 happyReduction_611
happyReduction_611 (HappyTerminal happy_var_1)
= HappyAbsSyn224
(let Loc l (FloatTokHash (f,raw)) = happy_var_1 in PrimFloat (nIS l) f raw
)
happyReduction_611 _ = notHappyAtAll
happyReduce_612 = happySpecReduce_1 224 happyReduction_612
happyReduction_612 (HappyTerminal happy_var_1)
= HappyAbsSyn224
(let Loc l (DoubleTokHash (d,raw)) = happy_var_1 in PrimDouble (nIS l) d raw
)
happyReduction_612 _ = notHappyAtAll
happyReduce_613 = happySpecReduce_1 224 happyReduction_613
happyReduction_613 (HappyTerminal happy_var_1)
= HappyAbsSyn224
(let Loc l (CharacterHash (c,raw)) = happy_var_1 in PrimChar (nIS l) c raw
)
happyReduction_613 _ = notHappyAtAll
happyReduce_614 = happySpecReduce_1 224 happyReduction_614
happyReduction_614 (HappyTerminal happy_var_1)
= HappyAbsSyn224
(let Loc l (StringHash (s,raw)) = happy_var_1 in PrimString (nIS l) s raw
)
happyReduction_614 _ = notHappyAtAll
happyReduce_615 = happyMonadReduce 0 225 happyReduction_615
happyReduction_615 (happyRest) tk
= happyThen (( pushCurrentContext >> getSrcLoc >>= \s -> return $ mkSrcSpan s s {- >>= \x -> trace (show x) (return x) -})
) (\r -> happyReturn (HappyAbsSyn225 r))
happyReduce_616 = happySpecReduce_1 226 happyReduction_616
happyReduction_616 (HappyTerminal (Loc happy_var_1 VRightCurly))
= HappyAbsSyn225
(happy_var_1 {- >>= \x -> trace (show x ++ show x ++ show x) (return x) -}
)
happyReduction_616 _ = notHappyAtAll
happyReduce_617 = happyMonadReduce 1 226 happyReduction_617
happyReduction_617 (_ `HappyStk`
happyRest) tk
= happyThen (( popContext >> getSrcLoc >>= \s -> return $ mkSrcSpan s s {- >>= \x -> trace (show x ++ show x) (return x) -})
) (\r -> happyReturn (HappyAbsSyn225 r))
happyReduce_618 = happySpecReduce_1 227 happyReduction_618
happyReduction_618 (HappyTerminal happy_var_1)
= HappyAbsSyn227
(let Loc l (ConId n) = happy_var_1 in ModuleName (nIS l) n
)
happyReduction_618 _ = notHappyAtAll
happyReduce_619 = happySpecReduce_1 227 happyReduction_619
happyReduction_619 (HappyTerminal happy_var_1)
= HappyAbsSyn227
(let Loc l (QConId n) = happy_var_1 in ModuleName (nIS l) (fst n ++ '.':snd n)
)
happyReduction_619 _ = notHappyAtAll
happyReduce_620 = happySpecReduce_1 228 happyReduction_620
happyReduction_620 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn75
(happy_var_1
)
happyReduction_620 _ = notHappyAtAll
happyReduce_621 = happySpecReduce_1 229 happyReduction_621
happyReduction_621 (HappyAbsSyn85 happy_var_1)
= HappyAbsSyn85
(happy_var_1
)
happyReduction_621 _ = notHappyAtAll
happyReduce_622 = happySpecReduce_1 230 happyReduction_622
happyReduction_622 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn75
(happy_var_1
)
happyReduction_622 _ = notHappyAtAll
happyReduce_623 = happySpecReduce_1 231 happyReduction_623
happyReduction_623 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn75
(happy_var_1
)
happyReduction_623 _ = notHappyAtAll
happyReduce_624 = happySpecReduce_1 231 happyReduction_624
happyReduction_624 (HappyTerminal (Loc happy_var_1 KW_Safe))
= HappyAbsSyn75
(safe_name (nIS happy_var_1)
)
happyReduction_624 _ = notHappyAtAll
happyReduce_625 = happySpecReduce_1 231 happyReduction_625
happyReduction_625 (HappyTerminal (Loc happy_var_1 KW_Unsafe))
= HappyAbsSyn75
(unsafe_name (nIS happy_var_1)
)
happyReduction_625 _ = notHappyAtAll
happyReduce_626 = happySpecReduce_1 231 happyReduction_626
happyReduction_626 (HappyTerminal (Loc happy_var_1 KW_Threadsafe))
= HappyAbsSyn75
(threadsafe_name (nIS happy_var_1)
)
happyReduction_626 _ = notHappyAtAll
happyReduce_627 = happySpecReduce_3 232 happyReduction_627
happyReduction_627 (HappyTerminal (Loc happy_var_3 BackQuote))
(HappyAbsSyn75 happy_var_2)
(HappyTerminal (Loc happy_var_1 BackQuote))
= HappyAbsSyn85
(UnQual (happy_var_1 <^^> happy_var_3 <** [happy_var_1, srcInfoSpan (ann happy_var_2), happy_var_3]) happy_var_2
)
happyReduction_627 _ _ _ = notHappyAtAll
happyReduce_628 = happySpecReduce_1 232 happyReduction_628
happyReduction_628 (HappyAbsSyn75 happy_var_1)
= HappyAbsSyn85
(UnQual (ann happy_var_1) happy_var_1
)
happyReduction_628 _ = notHappyAtAll
happyReduce_629 = happySpecReduce_1 233 happyReduction_629
happyReduction_629 (HappyTerminal happy_var_1)
= HappyAbsSyn75
(let Loc l (VarSym x) = happy_var_1 in Symbol (nIS l) x
)
happyReduction_629 _ = notHappyAtAll
happyNewToken action sts stk
= lexer(\tk ->
let cont i = action i i tk (HappyState action) sts stk in
case tk of {
Loc _ EOF -> action 373 373 tk (HappyState action) sts stk;
Loc _ (VarId _) -> cont 234;
Loc _ (QVarId _) -> cont 235;
Loc _ (IDupVarId _) -> cont 236;
Loc _ (ILinVarId _) -> cont 237;
Loc _ (ConId _) -> cont 238;
Loc _ (QConId _) -> cont 239;
Loc _ (DVarId _) -> cont 240;
Loc _ (VarSym _) -> cont 241;
Loc _ (ConSym _) -> cont 242;
Loc _ (QVarSym _) -> cont 243;
Loc _ (QConSym _) -> cont 244;
Loc _ (IntTok _) -> cont 245;
Loc _ (FloatTok _) -> cont 246;
Loc _ (Character _) -> cont 247;
Loc _ (StringTok _) -> cont 248;
Loc _ (IntTokHash _) -> cont 249;
Loc _ (WordTokHash _) -> cont 250;
Loc _ (FloatTokHash _) -> cont 251;
Loc _ (DoubleTokHash _) -> cont 252;
Loc _ (CharacterHash _) -> cont 253;
Loc _ (StringHash _) -> cont 254;
Loc happy_dollar_dollar LeftParen -> cont 255;
Loc happy_dollar_dollar RightParen -> cont 256;
Loc happy_dollar_dollar LeftHashParen -> cont 257;
Loc happy_dollar_dollar RightHashParen -> cont 258;
Loc happy_dollar_dollar LeftCurlyBar -> cont 259;
Loc happy_dollar_dollar RightCurlyBar -> cont 260;
Loc happy_dollar_dollar SemiColon -> cont 261;
Loc happy_dollar_dollar LeftCurly -> cont 262;
Loc happy_dollar_dollar RightCurly -> cont 263;
Loc happy_dollar_dollar VRightCurly -> cont 264;
Loc happy_dollar_dollar LeftSquare -> cont 265;
Loc happy_dollar_dollar RightSquare -> cont 266;
Loc happy_dollar_dollar Comma -> cont 267;
Loc happy_dollar_dollar Underscore -> cont 268;
Loc happy_dollar_dollar BackQuote -> cont 269;
Loc happy_dollar_dollar Dot -> cont 270;
Loc happy_dollar_dollar DotDot -> cont 271;
Loc happy_dollar_dollar Colon -> cont 272;
Loc happy_dollar_dollar DoubleColon -> cont 273;
Loc happy_dollar_dollar Equals -> cont 274;
Loc happy_dollar_dollar Backslash -> cont 275;
Loc happy_dollar_dollar Bar -> cont 276;
Loc happy_dollar_dollar LeftArrow -> cont 277;
Loc happy_dollar_dollar RightArrow -> cont 278;
Loc happy_dollar_dollar At -> cont 279;
Loc happy_dollar_dollar Tilde -> cont 280;
Loc happy_dollar_dollar DoubleArrow -> cont 281;
Loc happy_dollar_dollar Minus -> cont 282;
Loc happy_dollar_dollar Exclamation -> cont 283;
Loc happy_dollar_dollar Star -> cont 284;
Loc happy_dollar_dollar LeftArrowTail -> cont 285;
Loc happy_dollar_dollar RightArrowTail -> cont 286;
Loc happy_dollar_dollar LeftDblArrowTail -> cont 287;
Loc happy_dollar_dollar RightDblArrowTail -> cont 288;
Loc happy_dollar_dollar RPGuardOpen -> cont 289;
Loc happy_dollar_dollar RPGuardClose -> cont 290;
Loc happy_dollar_dollar RPCAt -> cont 291;
Loc _ (THIdEscape _) -> cont 292;
Loc happy_dollar_dollar THParenEscape -> cont 293;
Loc happy_dollar_dollar THExpQuote -> cont 294;
Loc happy_dollar_dollar THPatQuote -> cont 295;
Loc happy_dollar_dollar THTypQuote -> cont 296;
Loc happy_dollar_dollar THDecQuote -> cont 297;
Loc happy_dollar_dollar THCloseQuote -> cont 298;
Loc happy_dollar_dollar THVarQuote -> cont 299;
Loc happy_dollar_dollar THTyQuote -> cont 300;
Loc _ (THQuasiQuote _) -> cont 301;
Loc _ (XPCDATA _) -> cont 302;
Loc happy_dollar_dollar XStdTagOpen -> cont 303;
Loc happy_dollar_dollar XCloseTagOpen -> cont 304;
Loc happy_dollar_dollar XCodeTagOpen -> cont 305;
Loc happy_dollar_dollar XChildTagOpen -> cont 306;
Loc happy_dollar_dollar XStdTagClose -> cont 307;
Loc happy_dollar_dollar XEmptyTagClose -> cont 308;
Loc happy_dollar_dollar XCodeTagClose -> cont 309;
Loc happy_dollar_dollar XRPatOpen -> cont 310;
Loc happy_dollar_dollar XRPatClose -> cont 311;
Loc happy_dollar_dollar KW_Foreign -> cont 312;
Loc happy_dollar_dollar KW_Export -> cont 313;
Loc happy_dollar_dollar KW_Safe -> cont 314;
Loc happy_dollar_dollar KW_Unsafe -> cont 315;
Loc happy_dollar_dollar KW_Threadsafe -> cont 316;
Loc happy_dollar_dollar KW_Interruptible -> cont 317;
Loc happy_dollar_dollar KW_StdCall -> cont 318;
Loc happy_dollar_dollar KW_CCall -> cont 319;
Loc happy_dollar_dollar KW_CPlusPlus -> cont 320;
Loc happy_dollar_dollar KW_DotNet -> cont 321;
Loc happy_dollar_dollar KW_Jvm -> cont 322;
Loc happy_dollar_dollar KW_Js -> cont 323;
Loc happy_dollar_dollar KW_CApi -> cont 324;
Loc happy_dollar_dollar KW_As -> cont 325;
Loc happy_dollar_dollar KW_By -> cont 326;
Loc happy_dollar_dollar KW_Case -> cont 327;
Loc happy_dollar_dollar KW_Class -> cont 328;
Loc happy_dollar_dollar KW_Data -> cont 329;
Loc happy_dollar_dollar KW_Default -> cont 330;
Loc happy_dollar_dollar KW_Deriving -> cont 331;
Loc happy_dollar_dollar KW_Do -> cont 332;
Loc happy_dollar_dollar KW_Else -> cont 333;
Loc happy_dollar_dollar KW_Family -> cont 334;
Loc happy_dollar_dollar KW_Forall -> cont 335;
Loc happy_dollar_dollar KW_Group -> cont 336;
Loc happy_dollar_dollar KW_Hiding -> cont 337;
Loc happy_dollar_dollar KW_If -> cont 338;
Loc happy_dollar_dollar KW_Import -> cont 339;
Loc happy_dollar_dollar KW_In -> cont 340;
Loc happy_dollar_dollar KW_Infix -> cont 341;
Loc happy_dollar_dollar KW_InfixL -> cont 342;
Loc happy_dollar_dollar KW_InfixR -> cont 343;
Loc happy_dollar_dollar KW_Instance -> cont 344;
Loc happy_dollar_dollar KW_Let -> cont 345;
Loc happy_dollar_dollar KW_MDo -> cont 346;
Loc happy_dollar_dollar KW_Module -> cont 347;
Loc happy_dollar_dollar KW_NewType -> cont 348;
Loc happy_dollar_dollar KW_Of -> cont 349;
Loc happy_dollar_dollar KW_Proc -> cont 350;
Loc happy_dollar_dollar KW_Rec -> cont 351;
Loc happy_dollar_dollar KW_Then -> cont 352;
Loc happy_dollar_dollar KW_Type -> cont 353;
Loc happy_dollar_dollar KW_Using -> cont 354;
Loc happy_dollar_dollar KW_Where -> cont 355;
Loc happy_dollar_dollar KW_Qualified -> cont 356;
Loc _ (INLINE _) -> cont 357;
Loc happy_dollar_dollar INLINE_CONLIKE -> cont 358;
Loc happy_dollar_dollar SPECIALISE -> cont 359;
Loc _ (SPECIALISE_INLINE _) -> cont 360;
Loc happy_dollar_dollar SOURCE -> cont 361;
Loc happy_dollar_dollar RULES -> cont 362;
Loc happy_dollar_dollar CORE -> cont 363;
Loc happy_dollar_dollar SCC -> cont 364;
Loc happy_dollar_dollar GENERATED -> cont 365;
Loc happy_dollar_dollar DEPRECATED -> cont 366;
Loc happy_dollar_dollar WARNING -> cont 367;
Loc happy_dollar_dollar UNPACK -> cont 368;
Loc _ (OPTIONS _) -> cont 369;
Loc happy_dollar_dollar LANGUAGE -> cont 370;
Loc happy_dollar_dollar ANN -> cont 371;
Loc happy_dollar_dollar PragmaEnd -> cont 372;
_ -> happyError' tk
})
happyError_ 373 tk = happyError' tk
happyError_ _ tk = happyError' tk
happyThen :: () => P a -> (a -> P b) -> P b
happyThen = (>>=)
happyReturn :: () => a -> P a
happyReturn = (return)
happyThen1 = happyThen
happyReturn1 :: () => a -> P a
happyReturn1 = happyReturn
happyError' :: () => (Loc Token) -> P a
happyError' tk = parseError tk
mparseModule = happySomeParser where
happySomeParser = happyThen (happyParse action_0) (\x -> case x of {HappyAbsSyn13 z -> happyReturn z; _other -> notHappyAtAll })
mparseExp = happySomeParser where
happySomeParser = happyThen (happyParse action_1) (\x -> case x of {HappyAbsSyn139 z -> happyReturn z; _other -> notHappyAtAll })
mparsePat = happySomeParser where
happySomeParser = happyThen (happyParse action_2) (\x -> case x of {HappyAbsSyn151 z -> happyReturn z; _other -> notHappyAtAll })
mparseDecl = happySomeParser where
happySomeParser = happyThen (happyParse action_3) (\x -> case x of {HappyAbsSyn44 z -> happyReturn z; _other -> notHappyAtAll })
mparseType = happySomeParser where
happySomeParser = happyThen (happyParse action_4) (\x -> case x of {HappyAbsSyn60 z -> happyReturn z; _other -> notHappyAtAll })
mparseStmt = happySomeParser where
happySomeParser = happyThen (happyParse action_5) (\x -> case x of {HappyAbsSyn177 z -> happyReturn z; _other -> notHappyAtAll })
mparseModules = happySomeParser where
happySomeParser = happyThen (happyParse action_6) (\x -> case x of {HappyAbsSyn11 z -> happyReturn z; _other -> notHappyAtAll })
mfindOptPragmas = happySomeParser where
happySomeParser = happyThen (happyParse action_7) (\x -> case x of {HappyAbsSyn15 z -> happyReturn z; _other -> notHappyAtAll })
happySeq = happyDontSeq
type L = SrcSpanInfo -- just for convenience
type S = SrcSpan
parseError :: Loc Token -> P a
parseError t = fail $ "Parse error: " ++ showToken (unLoc t)
(<>) :: (Annotated a, Annotated b) => a SrcSpanInfo -> b SrcSpanInfo -> SrcSpanInfo
a <> b = ann a <++> ann b
infixl 6 <>
nIS = noInfoSpan
iS = infoSpan
-- | Parse of a string, which should contain a complete Haskell module.
parseModule :: String -> ParseResult (Module SrcSpanInfo)
parseModule = simpleParse mparseModule
-- | Parse of a string containing a complete Haskell module, using an explicit mode.
parseModuleWithMode :: ParseMode -> String -> ParseResult (Module SrcSpanInfo)
parseModuleWithMode = modeParse mparseModule
-- | Parse of a string containing a complete Haskell module, using an explicit mode, retaining comments.
parseModuleWithComments :: ParseMode -> String -> ParseResult (Module SrcSpanInfo, [Comment])
parseModuleWithComments = commentParse mparseModule
-- | Parse of a string containing a Haskell expression.
parseExp :: String -> ParseResult (Exp SrcSpanInfo)
parseExp = simpleParse mparseExp
-- | Parse of a string containing a Haskell expression, using an explicit mode.
parseExpWithMode :: ParseMode -> String -> ParseResult (Exp SrcSpanInfo)
parseExpWithMode = modeParse mparseExp
-- | Parse of a string containing a complete Haskell module, using an explicit mode, retaining comments.
parseExpWithComments :: ParseMode -> String -> ParseResult (Exp SrcSpanInfo, [Comment])
parseExpWithComments = commentParse mparseExp
-- | Parse of a string containing a Haskell pattern.
parsePat :: String -> ParseResult (Pat SrcSpanInfo)
parsePat = simpleParse mparsePat
-- | Parse of a string containing a Haskell pattern, using an explicit mode.
parsePatWithMode :: ParseMode -> String -> ParseResult (Pat SrcSpanInfo)
parsePatWithMode = modeParse mparsePat
-- | Parse of a string containing a complete Haskell module, using an explicit mode, retaining comments.
parsePatWithComments :: ParseMode -> String -> ParseResult (Pat SrcSpanInfo, [Comment])
parsePatWithComments = commentParse mparsePat
-- | Parse of a string containing a Haskell top-level declaration.
parseDecl :: String -> ParseResult (Decl SrcSpanInfo)
parseDecl = simpleParse mparseDecl
-- | Parse of a string containing a Haskell top-level declaration, using an explicit mode.
parseDeclWithMode :: ParseMode -> String -> ParseResult (Decl SrcSpanInfo)
parseDeclWithMode = modeParse mparseDecl
-- | Parse of a string containing a complete Haskell module, using an explicit mode, retaining comments.
parseDeclWithComments :: ParseMode -> String -> ParseResult (Decl SrcSpanInfo, [Comment])
parseDeclWithComments = commentParse mparseDecl
-- | Parse of a string containing a Haskell type.
parseType :: String -> ParseResult (Type SrcSpanInfo)
parseType = runParser mparseType
-- | Parse of a string containing a Haskell type, using an explicit mode.
parseTypeWithMode :: ParseMode -> String -> ParseResult (Type SrcSpanInfo)
parseTypeWithMode mode = runParserWithMode mode mparseType
-- | Parse of a string containing a complete Haskell module, using an explicit mode, retaining comments.
parseTypeWithComments :: ParseMode -> String -> ParseResult (Type SrcSpanInfo, [Comment])
parseTypeWithComments mode str = runParserWithModeComments mode mparseType str
-- | Parse of a string containing a Haskell statement.
parseStmt :: String -> ParseResult (Stmt SrcSpanInfo)
parseStmt = runParser mparseStmt
-- | Parse of a string containing a Haskell type, using an explicit mode.
parseStmtWithMode :: ParseMode -> String -> ParseResult (Stmt SrcSpanInfo)
parseStmtWithMode mode = runParserWithMode mode mparseStmt
-- | Parse of a string containing a complete Haskell module, using an explicit mode, retaining comments.
parseStmtWithComments :: ParseMode -> String -> ParseResult (Stmt SrcSpanInfo, [Comment])
parseStmtWithComments mode str = runParserWithModeComments mode mparseStmt str
simpleParse :: AppFixity a => P (a L) -> String -> ParseResult (a L)
simpleParse p = applyFixities preludeFixities <=< runParser p
modeParse :: AppFixity a => P (a L) -> ParseMode -> String -> ParseResult (a L)
modeParse p mode = applyFixities' (fixities mode) <=< runParserWithMode mode p
commentParse :: AppFixity a => P (a L) -> ParseMode -> String -> ParseResult (a L, [Comment])
commentParse p mode str = do (ast, cs) <- runParserWithModeComments mode p str
ast' <- applyFixities' (fixities mode) ast
return (ast', cs)
-- | Partial parse of a string starting with a series of top-level option pragmas.
getTopPragmas :: String -> ParseResult [ModulePragma SrcSpanInfo]
getTopPragmas = runParser (mfindOptPragmas >>= \(ps,_,_) -> return ps)
-- | Parse of a string, which should contain a complete Haskell module.
parseModules :: String -> ParseResult [Module SrcSpanInfo]
parseModules = mapM (applyFixities preludeFixities) <=< runParser mparseModules
-- | Parse of a string containing a complete Haskell module, using an explicit mode.
parseModulesWithMode :: ParseMode -> String -> ParseResult [Module SrcSpanInfo]
parseModulesWithMode mode = mapM (applyFixities' (fixities mode)) <=< runParserWithMode mode mparseModules
-- | Parse of a string containing a complete Haskell module, using an explicit mode, retaining comments.
parseModulesWithComments :: ParseMode -> String -> ParseResult ([Module SrcSpanInfo], [Comment])
parseModulesWithComments mode str = do (ast,cs) <- runParserWithModeComments mode mparseModules str
ast' <- mapM (applyFixities' (fixities mode)) ast
return (ast', cs)
applyFixities' :: (AppFixity a) => Maybe [Fixity] -> a L -> ParseResult (a L)
applyFixities' Nothing ast = return ast
applyFixities' (Just fixs) ast = applyFixities fixs ast
{-# LINE 1 "templates/GenericTemplate.hs" #-}
{-# LINE 1 "templates/GenericTemplate.hs" #-}
{-# LINE 1 "<built-in>" #-}
{-# LINE 1 "templates/GenericTemplate.hs" #-}
-- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp
{-# LINE 13 "templates/GenericTemplate.hs" #-}
{-# LINE 46 "templates/GenericTemplate.hs" #-}
{-# LINE 67 "templates/GenericTemplate.hs" #-}
{-# LINE 77 "templates/GenericTemplate.hs" #-}
infixr 9 `HappyStk`
data HappyStk a = HappyStk a (HappyStk a)
-----------------------------------------------------------------------------
-- starting the parse
happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll
-----------------------------------------------------------------------------
-- Accepting the parse
-- If the current token is (1), it means we've just accepted a partial
-- parse (a %partial parser). We must ignore the saved token on the top of
-- the stack in this case.
happyAccept (1) tk st sts (_ `HappyStk` ans `HappyStk` _) =
happyReturn1 ans
happyAccept j tk st sts (HappyStk ans _) =
(happyReturn1 ans)
-----------------------------------------------------------------------------
-- Arrays only: do the next action
{-# LINE 155 "templates/GenericTemplate.hs" #-}
-----------------------------------------------------------------------------
-- HappyState data type (not arrays)
newtype HappyState b c = HappyState
(Int -> -- token number
Int -> -- token number (yes, again)
b -> -- token semantic value
HappyState b c -> -- current state
[HappyState b c] -> -- state stack
c)
-----------------------------------------------------------------------------
-- Shifting a token
happyShift new_state (1) tk st sts stk@(x `HappyStk` _) =
let i = (case x of { HappyErrorToken (i) -> i }) in
-- trace "shifting the error token" $
new_state i i tk (HappyState (new_state)) ((st):(sts)) (stk)
happyShift new_state i tk st sts stk =
happyNewToken new_state ((st):(sts)) ((HappyTerminal (tk))`HappyStk`stk)
-- happyReduce is specialised for the common cases.
happySpecReduce_0 i fn (1) tk st sts stk
= happyFail (1) tk st sts stk
happySpecReduce_0 nt fn j tk st@((HappyState (action))) sts stk
= action nt j tk st ((st):(sts)) (fn `HappyStk` stk)
happySpecReduce_1 i fn (1) tk st sts stk
= happyFail (1) tk st sts stk
happySpecReduce_1 nt fn j tk _ sts@(((st@(HappyState (action))):(_))) (v1`HappyStk`stk')
= let r = fn v1 in
happySeq r (action nt j tk st sts (r `HappyStk` stk'))
happySpecReduce_2 i fn (1) tk st sts stk
= happyFail (1) tk st sts stk
happySpecReduce_2 nt fn j tk _ ((_):(sts@(((st@(HappyState (action))):(_))))) (v1`HappyStk`v2`HappyStk`stk')
= let r = fn v1 v2 in
happySeq r (action nt j tk st sts (r `HappyStk` stk'))
happySpecReduce_3 i fn (1) tk st sts stk
= happyFail (1) tk st sts stk
happySpecReduce_3 nt fn j tk _ ((_):(((_):(sts@(((st@(HappyState (action))):(_))))))) (v1`HappyStk`v2`HappyStk`v3`HappyStk`stk')
= let r = fn v1 v2 v3 in
happySeq r (action nt j tk st sts (r `HappyStk` stk'))
happyReduce k i fn (1) tk st sts stk
= happyFail (1) tk st sts stk
happyReduce k nt fn j tk st sts stk
= case happyDrop (k - ((1) :: Int)) sts of
sts1@(((st1@(HappyState (action))):(_))) ->
let r = fn stk in -- it doesn't hurt to always seq here...
happyDoSeq r (action nt j tk st1 sts1 r)
happyMonadReduce k nt fn (1) tk st sts stk
= happyFail (1) tk st sts stk
happyMonadReduce k nt fn j tk st sts stk =
case happyDrop k ((st):(sts)) of
sts1@(((st1@(HappyState (action))):(_))) ->
let drop_stk = happyDropStk k stk in
happyThen1 (fn stk tk) (\r -> action nt j tk st1 sts1 (r `HappyStk` drop_stk))
happyMonad2Reduce k nt fn (1) tk st sts stk
= happyFail (1) tk st sts stk
happyMonad2Reduce k nt fn j tk st sts stk =
case happyDrop k ((st):(sts)) of
sts1@(((st1@(HappyState (action))):(_))) ->
let drop_stk = happyDropStk k stk
new_state = action
in
happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))
happyDrop (0) l = l
happyDrop n ((_):(t)) = happyDrop (n - ((1) :: Int)) t
happyDropStk (0) l = l
happyDropStk n (x `HappyStk` xs) = happyDropStk (n - ((1)::Int)) xs
-----------------------------------------------------------------------------
-- Moving to a new state after a reduction
happyGoto action j tk st = action j j tk (HappyState action)
-----------------------------------------------------------------------------
-- Error recovery ((1) is the error token)
-- parse error if we are in recovery and we fail again
happyFail (1) tk old_st _ stk@(x `HappyStk` _) =
let i = (case x of { HappyErrorToken (i) -> i }) in
-- trace "failing" $
happyError_ i tk
{- We don't need state discarding for our restricted implementation of
"error". In fact, it can cause some bogus parses, so I've disabled it
for now --SDM
-- discard a state
happyFail (1) tk old_st (((HappyState (action))):(sts))
(saved_tok `HappyStk` _ `HappyStk` stk) =
-- trace ("discarding state, depth " ++ show (length stk)) $
action (1) (1) tk (HappyState (action)) sts ((saved_tok`HappyStk`stk))
-}
-- Enter error recovery: generate an error token,
-- save the old token and carry on.
happyFail i tk (HappyState (action)) sts stk =
-- trace "entering error recovery" $
action (1) (1) tk (HappyState (action)) sts ( (HappyErrorToken (i)) `HappyStk` stk)
-- Internal happy errors:
notHappyAtAll :: a
notHappyAtAll = error "Internal Happy error\n"
-----------------------------------------------------------------------------
-- Hack to get the typechecker to accept our action functions
-----------------------------------------------------------------------------
-- Seq-ing. If the --strict flag is given, then Happy emits
-- happySeq = happyDoSeq
-- otherwise it emits
-- happySeq = happyDontSeq
happyDoSeq, happyDontSeq :: a -> b -> b
happyDoSeq a b = a `seq` b
happyDontSeq a b = b
-----------------------------------------------------------------------------
-- Don't inline any functions from the template. GHC has a nasty habit
-- of deciding to inline happyGoto everywhere, which increases the size of
-- the generated parser quite a bit.
{-# NOINLINE happyShift #-}
{-# NOINLINE happySpecReduce_0 #-}
{-# NOINLINE happySpecReduce_1 #-}
{-# NOINLINE happySpecReduce_2 #-}
{-# NOINLINE happySpecReduce_3 #-}
{-# NOINLINE happyReduce #-}
{-# NOINLINE happyMonadReduce #-}
{-# NOINLINE happyGoto #-}
{-# NOINLINE happyFail #-}
-- end of Happy Template.
| rodrigogribeiro/mptc | src/Language/Haskell/Exts/InternalParser.hs | bsd-3-clause | 791,349 | 21,360 | 20 | 109,632 | 232,865 | 128,521 | 104,344 | 20,184 | 141 |
-- | BitTorrent metainfo files
--
-- <http://www.bittorrent.org/beps/bep_0003.html>
{-# LANGUAGE DeriveDataTypeable #-}
module Data.Torrent
( Torrent(..)
, TorrentInfo(..)
, TorrentFile(..)
, readTorrent
, serializeTorrent
, torrentSize
, showTorrent
) where
import Data.BEncode
import Data.BEncode.Parser
import Data.Binary
import Data.Generics
import qualified Data.ByteString.Lazy as BS
import Data.ByteString.Lazy (ByteString)
import qualified Data.Map as Map
data Torrent
= Torrent
{ tAnnounce :: ByteString
, tAnnounceList :: [ByteString]
, tComment :: ByteString
, tCreatedBy :: Maybe ByteString
, tInfo :: TorrentInfo
}
deriving (Show, Read, Typeable, Data)
data TorrentInfo
= SingleFile
{ tLength :: Integer
, tName :: ByteString
, tPieceLength :: Integer
, tPieces :: ByteString }
| MultiFile
{ tFiles :: [TorrentFile]
, tName :: ByteString
, tPieceLength :: Integer
, tPieces :: ByteString
}
deriving (Show, Read, Typeable, Data)
data TorrentFile
= TorrentFile
{ fileLength :: Integer
, filePath :: [ByteString]
}
deriving (Show, Read, Typeable, Data)
instance Binary Torrent where
put = put . serializeTorrent
get = do
e <- get
case readTorrent e of
Left err -> fail $ "Failed to parse torrent: " ++ err
Right t -> return t
-- | Size of the files in the torrent.
torrentSize :: Torrent -> Integer
torrentSize torrent = case tInfo torrent of
s@SingleFile{} -> tLength s
MultiFile{tFiles=files} -> sum (map fileLength files)
readTorrent :: ByteString -> Either String Torrent
readTorrent inp = case bRead inp of
Nothing -> Left "Not BEncoded"
Just be -> runParser parseTorrent be
parseTorrent :: BParser Torrent
parseTorrent = do
announce <- bbytestring $ dict "announce"
creator <- optional $ bbytestring $ dict "created by"
info <- dict "info"
setInput info
name <- bbytestring $ dict "name"
pLen <- bint $ dict "piece length"
pieces <- bbytestring $ dict "pieces"
torrentInfo <- parseTorrentInfo name pLen pieces
return $ Torrent announce [] BS.empty creator torrentInfo
parseTorrentInfo :: ByteString -> Integer -> ByteString -> BParser TorrentInfo
parseTorrentInfo name pLen pieces = single <|> multi
where
single = do
len <- bint $ dict "length"
return $ SingleFile len name pLen pieces
multi = do
files <- list "files" $ do
len <- bint $ dict "length"
filePaths <- list "path" $ bbytestring token
return $ TorrentFile len filePaths
return $ MultiFile files name pLen pieces
serializeTorrent :: Torrent -> BEncode
serializeTorrent torrent = BDict $ Map.fromList
[ ("announce", BString $ tAnnounce torrent)
, ("comment", BString $ tComment torrent)
, ("info", info)
]
where
info = BDict $ Map.fromList $
[ ("name", BString $ tName (tInfo torrent))
, ("pieces", BString $ tPieces (tInfo torrent))
, ("piece length", BInt $ tPieceLength (tInfo torrent))
] ++ case tInfo torrent of
SingleFile len _ _ _ ->
[ ("length", BInt len) ]
MultiFile files _ _ _ ->
[ ("files", BList $ map serfile files) ]
serfile file = BDict $ Map.fromList
[ ("length", BInt (fileLength file))
, ("path", BList (map BString $ filePath file))
]
-- | generates a torrent file
--
-- Due to lexographical ordering requirements of BEncoded data, this
-- should generate the same ByteString that readTorrent read to generate
-- the Torrent. However, torrent files may contain extensions and
-- nonstandard fields that prevent that from holding for all torrent files.
showTorrent :: Torrent -> ByteString
showTorrent = bPack . serializeTorrent
| matthewleon/haskell-torrent | src/Data/Torrent.hs | bsd-3-clause | 3,632 | 46 | 15 | 741 | 1,113 | 588 | 525 | 97 | 2 |
{-# language CPP #-}
-- No documentation found for Chapter "FramebufferCreateFlagBits"
module Vulkan.Core10.Enums.FramebufferCreateFlagBits ( FramebufferCreateFlags
, FramebufferCreateFlagBits( FRAMEBUFFER_CREATE_IMAGELESS_BIT
, ..
)
) where
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showString)
import Numeric (showHex)
import Vulkan.Zero (Zero)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Foreign.Storable (Storable)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Vulkan.Core10.FundamentalTypes (Flags)
type FramebufferCreateFlags = FramebufferCreateFlagBits
-- | VkFramebufferCreateFlagBits - Bitmask specifying framebuffer properties
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'FramebufferCreateFlags'
newtype FramebufferCreateFlagBits = FramebufferCreateFlagBits Flags
deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits)
-- | 'FRAMEBUFFER_CREATE_IMAGELESS_BIT' specifies that image views are not
-- specified, and only attachment compatibility information will be
-- provided via a
-- 'Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentImageInfo'
-- structure.
pattern FRAMEBUFFER_CREATE_IMAGELESS_BIT = FramebufferCreateFlagBits 0x00000001
conNameFramebufferCreateFlagBits :: String
conNameFramebufferCreateFlagBits = "FramebufferCreateFlagBits"
enumPrefixFramebufferCreateFlagBits :: String
enumPrefixFramebufferCreateFlagBits = "FRAMEBUFFER_CREATE_IMAGELESS_BIT"
showTableFramebufferCreateFlagBits :: [(FramebufferCreateFlagBits, String)]
showTableFramebufferCreateFlagBits = [(FRAMEBUFFER_CREATE_IMAGELESS_BIT, "")]
instance Show FramebufferCreateFlagBits where
showsPrec = enumShowsPrec enumPrefixFramebufferCreateFlagBits
showTableFramebufferCreateFlagBits
conNameFramebufferCreateFlagBits
(\(FramebufferCreateFlagBits x) -> x)
(\x -> showString "0x" . showHex x)
instance Read FramebufferCreateFlagBits where
readPrec = enumReadPrec enumPrefixFramebufferCreateFlagBits
showTableFramebufferCreateFlagBits
conNameFramebufferCreateFlagBits
FramebufferCreateFlagBits
| expipiplus1/vulkan | src/Vulkan/Core10/Enums/FramebufferCreateFlagBits.hs | bsd-3-clause | 2,690 | 1 | 10 | 651 | 335 | 202 | 133 | -1 | -1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module UnitTests.GenesSpec (spec, DnaString, Allele) where
import Test.Hspec
import Test.QuickCheck
import Data.Random
import System.Random
import Data.List
import Genes
import ListUtils
import Phenotype
import UnitTests.PhenotypeSpec()
instance Arbitrary Allele where
arbitrary = Allele <$> arbitrary <*> arbitrary
instance Arbitrary DnaString where
arbitrary = DnaString <$> vector 8
newtype PointInString = PointInString Int deriving Show
instance Arbitrary PointInString where
arbitrary = PointInString <$> elements [0..8]
newtype IndexInString = IndexInString Int deriving Show
instance Arbitrary IndexInString where
arbitrary = IndexInString <$> elements [0..7]
spec :: Spec
spec = parallel $ do
describe "Allelas" $ do
it "alella equals itself" $
property (
\a -> (a:: Allele) == a
)
it "alellas are ordered" $
property (
\e de1 de2 ->
Allele e de1 `compare` Allele e de2
`shouldBe`
de1 `compare` de2
)
it "alellas are ordered" $
property (
\e1 e2 de ->
Allele e1 de `compare` Allele e2 de
`shouldBe`
e1 `compare` e2
)
describe "Genes" $ do
it "show DNA string looks like '[12213]'" $
show ( DnaString [ Allele (Phenotype [ 1.1, 1.2]) (Phenotype [-1.2, 0.3]),
Allele (Phenotype [-1.2, 0.3]) (Phenotype [-0.2, 0.3])
]
) `shouldBe` "[{(1.1,1.2)|(-1.2,0.3)}, {(-1.2,0.3)|(-0.2,0.3)}]"
it "show DNA strings are lexicographicaly ordered" $
DnaString [ Allele (Phenotype [ 1.1, 1.2]) (Phenotype [-1.2, 0.3]),
Allele (Phenotype [-1.2, 0.3]) (Phenotype [-0.2, 0.3])
]
`compare`
DnaString [ Allele (Phenotype [ 1.1, 1.2]) (Phenotype [-1.2, 0.3]),
Allele (Phenotype [-1.2, 5.5]) (Phenotype [-0.2, 0.3])
]
`shouldBe`
LT
it "dna equals itself" $
property ( \(DnaString dna) ->
DnaString dna == DnaString dna
`shouldBe`
True
)
it "length of crosovered dna is the same as the mother dnas" $
property ( \(DnaString dna1) (DnaString dna2) ->
length dna1
==
length (genes $ crossover 4 (DnaString dna1) (DnaString dna2))
)
it "beginning of crosovered DNA is from the first mother string" $
property ( \(PointInString n) (DnaString dna1) (DnaString dna2) ->
take n dna1
==
take n (genes $ crossover n (DnaString dna1) (DnaString dna2))
)
it "end of crosovered DNA is from the second mother string" $
property ( \(PointInString n) (DnaString dna1) (DnaString dna2) ->
drop n dna2
==
drop n (genes $ crossover n (DnaString dna1) (DnaString dna2))
)
it "crosovered DNA is of the same length as mother dnas" $
property ( \(PointInString n) (DnaString dna1) (DnaString dna2) ->
length dna1
==
length (genes $ crossover n (DnaString dna1) (DnaString dna2))
)
it "mutated dna has same length as dna before mutation" $
property ( \(IndexInString n) b (DnaString dna) ->
length dna
==
length (genes $ mutate n b (DnaString dna))
)
it "mutated dna has new Allele at point of mutation" $
property ( \(IndexInString n) b (DnaString dna ) ->
b == genes (mutate n b (DnaString dna)) !! n
)
it "mutated dna doesn't differ from original one with exception of point of mutation" $
property ( \(IndexInString n) b (DnaString dna ) ->
1 >= length (elemIndices True $ zipWithCheck (/=) dna (genes $ mutate n b (DnaString dna)) )
)
describe "Random Dominant Effect" $ do
it "there is no effect if it's probability is 0.0" $
property ( \(Phenotype p) seed ->
fst (sampleState (randomDominantEffect (Phenotype p) 0.0) (mkStdGen seed))
`shouldBe`
Phenotype p
)
it "result is oposite direction than input if probability is 1.0" $
property ( \(Phenotype p) seed ->
fst (sampleState (randomDominantEffect (Phenotype p) 1.0) (mkStdGen seed))
`shouldSatisfy`
( \(Phenotype p') ->
all (== 0) (zipWith (+) (map signum p) (map signum p'))
)
)
describe "Random alele" $ do
it "there is no pleiotropy if it's probability is 0.0" $
property ( \ seed ->
fst (sampleState (randomAllele 0.4 0.0) (mkStdGen seed))
`shouldSatisfy`
(\a ->
1 >= length (filter (/= 0.0) $ phenotypeToVector $ effect a)
)
)
it "there is some pleiotropy if it's probability is 1.0" $
property ( \ seed ->
fst (sampleState (randomAllele 0.4 1.0) (mkStdGen seed))
`shouldSatisfy`
(\a ->
1 < length (filter (/= 0.0) $ phenotypeToVector $ effect a)
)
)
it "there is the no dominant effect as the effect if dominance probability is 0.0" $
property ( \ seed ->
fst (sampleState (randomAllele 0.0 1.0) (mkStdGen seed))
`shouldSatisfy`
(\a ->
dominantEffect a == effect a
)
)
it "there is the same dominant effect as the effect if dominance probability is 1.0" $
property ( \ seed ->
fst (sampleState (randomAllele 1.0 1.0) (mkStdGen seed))
`shouldSatisfy`
(\a ->
dominantEffect a /= effect a
)
)
| satai/FrozenBeagle | Simulation/Lib/testsuite/UnitTests/GenesSpec.hs | bsd-3-clause | 6,469 | 0 | 24 | 2,652 | 1,702 | 870 | 832 | 125 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
{-|
Module : Pipes.CryptoHash
Description : Utilities to calculate hash digests of 'BS.ByteString' streams
Copyright : (c) Nicolas Trangez, 2014
License : BSD3
Maintainer : [email protected]
Stability : experimental
This module provides several helpers to calculate hashes of byte-streams using
the "Crypto.Hash" interface, where the streams are 'Pipe's of 'BS.ByteString's
or lazy 'LBS.ByteString's.
There are 2 interfaces: one wraps 'Producer's, creating a new 'Producer' to
which all elements from the original 'Producer' are passed along, whilst a hash
is calculated on-the-go and returned when the stream ends, tupled with the
result of the original stream.
The second interface provides regular 'Pipe's which can be put inside a
pipeline, and requires a 'MonadState' layer in the underlying monad stack to
store & return the hashing 'Context'.
-}
module Pipes.CryptoHash (
-- * Wrappers for 'Producer's
-- ** Strict 'BS.ByteString' 'Producer's
hash
, hashAlg
, hashContext
-- ** Lazy 'LBS.ByteString' 'Producer's
, hashLazy
, hashLazyAlg
, hashLazyContext
-- * 'Pipe' interface
-- ** Strict 'BS.ByteString' streams
, hashPipe
, hashPipeAlg
-- ** Lazy 'LBS.ByteString' streams
, hashPipeLazy
, hashPipeLazyAlg
) where
import Pipes
import qualified Pipes.Prelude as PP
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
import Control.Monad.State.Class (MonadState, get, put)
import Control.Foldl (purely)
import Crypto.Hash (Context, Digest, HashAlgorithm, hashUpdate)
import qualified Crypto.Hash.Fold as F
catWithFold :: Monad m
=> (x -> a -> x)
-> x
-> (x -> b)
-> Producer a m r
-> Producer a m (r, b)
catWithFold f a0 m = loop a0
where
-- Note: it's really important to be strict in @ctx@, otherwise a huge
-- thunk is accumulated. If you don't believe me, run the demo twice on
-- a big file with "+RTS -s", once with the bang and once without, and
-- compare `maximum residency` and `total memory in use`.
loop !a p =
lift (next p) >>=
either
(\r -> return (r, m a))
(\(b, p') -> yield b >> loop (f a b) p')
{-# INLINE catWithFold #-}
-- | Like 'hash', but allows to pass in an existing 'Context', and retrieve
-- it afterwards.
--
-- This can be useful when the hash of a concatenation of multiple streams
-- needs to be calculated, without being able to actually combine the streams
-- into a single 'Producer' for some reason.
hashContext :: (HashAlgorithm a, Monad m)
=> Context a -- ^ Initial 'Context'
-> Producer BS.ByteString m r -- ^ Source 'Producer'
-> Producer BS.ByteString m (r, Context a)
hashContext = purely catWithFold . F.hashContext
{-# INLINE hashContext #-}
-- | Create a 'BS.ByteString' 'Producer' wrapping a 'BS.ByteString' 'Producer'
-- which calculates a 'Digest' on the go. This 'Digest' will be tupled with
-- the result of the original 'Producer' when the stream ends.
hash :: (HashAlgorithm a, Monad m)
=> Producer BS.ByteString m r -- ^ Source 'Producer'
-> Producer BS.ByteString m (r, Digest a)
hash = purely catWithFold F.hash
{-# INLINEABLE hash #-}
-- | Like 'hash', but takes a specific 'HashAlgorithm'
--
-- This allows for passing a value instead of adding explicit
-- type-signatures to select a hash method.
hashAlg :: (HashAlgorithm a, Monad m)
=> a -- ^ Algorithm to use
-> Producer BS.ByteString m r -- ^ Source 'Producer'
-> Producer BS.ByteString m (r, Digest a)
hashAlg = purely catWithFold . F.hashAlg
{-# INLINEABLE hashAlg #-}
-- | Like 'hashContext', but for lazy 'LBS.ByteString's
hashLazyContext :: (HashAlgorithm a, Monad m)
=> Context a -- ^ Initial 'Context'
-> Producer LBS.ByteString m r -- ^ Source 'Producer'
-> Producer LBS.ByteString m (r, Context a)
hashLazyContext = purely catWithFold . F.hashLazyContext
{-# INLINEABLE hashLazyContext #-}
-- | Like 'hash', but for lazy 'LBS.ByteString's
hashLazy :: (HashAlgorithm a, Monad m)
=> Producer LBS.ByteString m r -- ^ Source 'Producer'
-> Producer LBS.ByteString m (r, Digest a)
hashLazy = purely catWithFold F.hashLazy
{-# INLINEABLE hashLazy #-}
-- | Like 'hashAlg', but for lazy 'LBS.ByteString's
hashLazyAlg :: (HashAlgorithm a, Monad m)
=> a -- ^ Algorithm to use
-> Producer LBS.ByteString m r -- ^ Source 'Producer'
-> Producer LBS.ByteString m (r, Digest a)
hashLazyAlg = purely catWithFold . F.hashLazyAlg
{-# INLINEABLE hashLazyAlg #-}
hashPipeInternal :: MonadState s m
=> (s -> a -> s)
-> Pipe a a m r
hashPipeInternal f = PP.chain (modify' . flip f)
where
-- See strictness note in 'catWithFold'
modify' f' = get >>= (put $!) . f'
{-# INLINE hashPipeInternal #-}
-- | Update a 'Context' stored in an underlying 'MonadState' with every
-- 'BS.ByteString' passing by.
hashPipe :: (HashAlgorithm a, MonadState (Context a) m)
=> Pipe BS.ByteString BS.ByteString m r
hashPipe = hashPipeInternal hashUpdate
{-# INLINEABLE hashPipe #-}
-- | Like 'hashPipe', but takes a specific 'HashAlgorithm'
--
-- This allows for passing a value instead of adding explicit
-- type-signatures to select a hash method.
hashPipeAlg :: (HashAlgorithm a, MonadState (Context a) m)
=> a -- ^ Algorithm to use
-> Pipe BS.ByteString BS.ByteString m r
hashPipeAlg _ = hashPipe
{-# INLINEABLE hashPipeAlg #-}
-- | Like 'hashPipe', but for lazy 'LBS.ByteString's
hashPipeLazy :: (HashAlgorithm a, MonadState (Context a) m)
=> Pipe LBS.ByteString LBS.ByteString m r
hashPipeLazy = hashPipeInternal (LBS.foldlChunks hashUpdate)
{-# INLINEABLE hashPipeLazy #-}
-- | Like 'hashPipeAlg', but for lazy 'LBS.ByteString's
hashPipeLazyAlg :: (HashAlgorithm a, MonadState (Context a) m)
=> a -- ^ Algorithm to use
-> Pipe LBS.ByteString LBS.ByteString m r
hashPipeLazyAlg _ = hashPipeLazy
{-# INLINEABLE hashPipeLazyAlg #-}
| NicolasT/pipes-cryptohash | src/Pipes/CryptoHash.hs | bsd-3-clause | 6,254 | 0 | 14 | 1,444 | 1,053 | 585 | 468 | 83 | 1 |
module Commi.Matrix where
import Prelude hiding (id, div)
import Haste.HPlay.View hiding (head)
import Control.Monad
import Commi.Task
import Commi.Util
matrixWidget :: Input -> Widget Input
matrixWidget input = do
raw <- rawMatrix
return $ input {
inputCityMatrix = raw
}
where
n = inputCityN input
mtx = inputCityMatrix input
field :: Int -> Int -> Widget [[Int]]
field i j = do
let height = length mtx
let width = if height == 0 then 0 else length (mtx !! 0)
let oldVal = if i < height && j < width then mtx !! i !! j else 0
v <- inputInt (Just oldVal) `fire` OnChange <! [atr "size" "5"]
let newRow = listSet (if i < height then mtx !! i else []) j 0 v
return $ listSet mtx i (replicate n 0) newRow
fieldRow :: Int -> Widget [[Int]]
fieldRow i = merge $ field i <$> [0 .. n-1]
rawMatrix = (merge $ (\i -> div ! atr "class" "row" <<< fieldRow i) <$> [0 .. n-1])
-- <** (div ! atr "class" "row" <<< submitButton "Обновить")
merge :: [Widget a] -> Widget a
merge [] = noWidget
merge (w:ws) = foldl (<|>) w ws | Teaspot-Studio/bmstu-commi-genetics-haste | Commi/Matrix.hs | bsd-3-clause | 1,088 | 0 | 15 | 269 | 464 | 244 | 220 | 27 | 4 |
module Language.ContextSemantics.LinearLambda where
import Language.ContextSemantics.Expressions
import Language.ContextSemantics.Output
import Data.Maybe
--
-- Context semantics
--
data Token = White | Black
instance Show Token where
show White = "⚪"
show Black = "⚫"
showList = showCompactList
type Port = [Token] -> Either String (Output [Token])
app :: Port -> Port -> Port -> (Port, Port, Port)
app princp_out cont_out arg_out = (princp_in, cont_in, arg_in)
where
princp_in (White:ts) = cont_out ts
princp_in (Black:ts) = arg_out ts
princp_in [] = Left "app: empty incoming context at principal port"
cont_in ts = princp_out (White:ts)
arg_in ts = princp_out (Black:ts)
lam :: Port -> Port -> Port -> (Port, Port, Port)
lam princp_out body_out param_out = (princp_in, body_in, param_in)
where
princp_in (White:ts) = body_out ts
princp_in (Black:ts) = param_out ts
princp_in [] = Left "lam: empty incoming context at principal port"
body_in ts = princp_out (White:ts)
param_in ts = princp_out (Black:ts)
fv :: String -> Port
fv = (Right .) . Output
--
-- Translation from traditional linear lambda calculus
--
exprSemantics :: Expr -> (Port, [(String, Port)])
exprSemantics e = exprSemantics' (fv "Input") [(v, fv v) | v <- freeVars e] e
exprSemantics' :: Port -> [(String, Port)] -> Expr -> (Port, [(String, Port)])
exprSemantics' out_port env (V v)
| Just p <- lookup v env = (p, [(v, out_port)])
| otherwise = error $ "No binding for " ++ v
exprSemantics' out_port env (e1 :@ e2) = (c, usg1 ++ usg2)
where (e1_port, usg1) = exprSemantics' r env e1
(e2_port, usg2) = exprSemantics' a env e2
(r, c, a) = app e1_port out_port e2_port
exprSemantics' out_port env (Lam v e) = (r, filter ((/= v) . fst) usg)
where (e_port, usg) = exprSemantics' b ((v, p) : env) e
v_port = (error $ "Missing usage of " ++ v) `fromMaybe` lookup v usg
(r, b, p) = lam out_port e_port v_port
--
-- Examples
--
examples :: IO ()
examples = do
printUTF8 $ identity []
printUTF8 $ normal [White, White]
printUTF8 $ normal_expr [White, White]
printUTF8 $ normal_expr_th [White, White]
-- (\x.x) @ y
-- Port wired to the input of the application
identity :: Port
identity = cont_app
where
inp = fv "Input"
y_out = fv "y"
(princp_app, cont_app, _y_in) = app princp_id inp y_out
(princp_id, body_id, param_id) = lam princp_app param_id body_id
-- (\x.\y.(y @ z) @ x)
-- Port wired to the input of the lambda term
normal :: Port
normal = r1
where
inp = fv "Input"
z = fv "z"
(r1, b1, p1) = lam inp r2 a3
(r2, b2, p2) = lam b1 c3 r4
(r3, c3, a3) = app c4 b2 p1
(r4, c4, _a4) = app p2 r3 z
normal_expr :: Port
normal_expr = fst $ exprSemantics $ Lam "x" (Lam "y" (V "y" :@ V "z" :@ V "x"))
normal_expr_th :: Port
normal_expr_th = fst $ exprSemantics $ $(expr [| \x -> \y -> y $(fvTH "z") x |]) | batterseapower/context-semantics | Language/ContextSemantics/LinearLambda.hs | bsd-3-clause | 3,001 | 0 | 12 | 718 | 1,128 | 612 | 516 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.NV.ShaderBufferStore
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <[email protected]>
-- Stability : stable
-- Portability : portable
--
-- The <https://www.opengl.org/registry/specs/NV/shader_buffer_store.txt NV_shader_buffer_store> extension.
--
--------------------------------------------------------------------------------
module Graphics.Rendering.OpenGL.Raw.NV.ShaderBufferStore (
-- * Enums
gl_READ_WRITE,
gl_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV,
gl_WRITE_ONLY
) where
import Graphics.Rendering.OpenGL.Raw.Tokens
| phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/NV/ShaderBufferStore.hs | bsd-3-clause | 719 | 0 | 4 | 84 | 43 | 35 | 8 | 5 | 0 |
{-# LANGUAGE ViewPatterns, GADTs, FlexibleInstances, UndecidableInstances,
CPP #-}
#if __GLASGOW_HASKELL__ <= 708
{-# LANGUAGE OverlappingInstances #-}
{-# OPTIONS_GHC -fno-warn-unrecognised-pragmas #-}
#endif
{-# OPTIONS_GHC -fno-warn-orphans #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.Glambda.Pretty
-- Copyright : (C) 2015 Richard Eisenberg
-- License : BSD-style (see LICENSE)
-- Maintainer : Richard Eisenberg ([email protected])
-- Stability : experimental
--
-- Pretty-printing expressions. This allows reduction of code duplication
-- between unchecked and checked expressions.
--
----------------------------------------------------------------------------
module Language.Glambda.Pretty (
PrettyExp(..), defaultPretty,
Coloring, defaultColoring,
prettyVar, prettyLam, prettyApp, prettyArith, prettyIf, prettyFix
) where
import Language.Glambda.Token
import Language.Glambda.Type
import Language.Glambda.Util
import Text.PrettyPrint.ANSI.Leijen
lamPrec, appPrec, appLeftPrec, appRightPrec, ifPrec :: Prec
lamPrec = 1
appPrec = 9
appLeftPrec = 8.9
appRightPrec = 9
ifPrec = 1
opPrec, opLeftPrec, opRightPrec :: ArithOp ty -> Prec
opPrec (precInfo -> (x, _, _)) = x
opLeftPrec (precInfo -> (_, x, _)) = x
opRightPrec (precInfo -> (_, _, x)) = x
-- | Returns (overall, left, right) precedences for an 'ArithOp'
precInfo :: ArithOp ty -> (Prec, Prec, Prec)
precInfo Plus = (5, 4.9, 5)
precInfo Minus = (5, 4.9, 5)
precInfo Times = (6, 5.9, 6)
precInfo Divide = (6, 5.9, 6)
precInfo Mod = (6, 5.9, 6)
precInfo Less = (4, 4, 4)
precInfo LessE = (4, 4, 4)
precInfo Greater = (4, 4, 4)
precInfo GreaterE = (4, 4, 4)
precInfo Equals = (4, 4, 4)
-- | A function that changes a 'Doc's color
type ApplyColor = Doc -> Doc
-- | Information about coloring in de Bruijn indexes and binders
data Coloring = Coloring [ApplyColor]
[ApplyColor] -- ^ a stream of remaining colors to use,
-- and the colors used for bound variables
-- | A 'Coloring' for an empty context
defaultColoring :: Coloring
defaultColoring = Coloring all_colors []
where
all_colors = red : green : yellow : blue :
magenta : cyan : all_colors
-- | A class for expressions that can be pretty-printed
class Pretty exp => PrettyExp exp where
prettyExp :: Coloring -> Prec -> exp -> Doc
-- | Convenient implementation of 'pretty'
defaultPretty :: PrettyExp exp => exp -> Doc
defaultPretty = nest 2 . prettyExp defaultColoring topPrec
-- | Print a variable
prettyVar :: Coloring -> Int -> Doc
prettyVar (Coloring _ bound) n = nthDefault id n bound (char '#' <> int n)
-- | Print a lambda expression
prettyLam :: PrettyExp exp => Coloring -> Prec -> Maybe Ty -> exp -> Doc
prettyLam (Coloring (next : supply) existing) prec m_ty body
= maybeParens (prec >= lamPrec) $
fillSep [ char 'λ' <> next (char '#') <>
maybe empty (\ty -> text ":" <> pretty ty) m_ty <> char '.'
, prettyExp (Coloring supply (next : existing)) topPrec body ]
prettyLam _ _ _ _ = error "Infinite supply of colors ran out"
-- | Print an application
prettyApp :: (PrettyExp exp1, PrettyExp exp2)
=> Coloring -> Prec -> exp1 -> exp2 -> Doc
prettyApp coloring prec e1 e2
= maybeParens (prec >= appPrec) $
fillSep [ prettyExp coloring appLeftPrec e1
, prettyExp coloring appRightPrec e2 ]
-- | Print an arithemtic expression
prettyArith :: (PrettyExp exp1, PrettyExp exp2)
=> Coloring -> Prec -> exp1 -> ArithOp ty -> exp2 -> Doc
prettyArith coloring prec e1 op e2
= maybeParens (prec >= opPrec op) $
fillSep [ prettyExp coloring (opLeftPrec op) e1 <+> pretty op
, prettyExp coloring (opRightPrec op) e2 ]
-- | Print a conditional
prettyIf :: (PrettyExp exp1, PrettyExp exp2, PrettyExp exp3)
=> Coloring -> Prec -> exp1 -> exp2 -> exp3 -> Doc
prettyIf coloring prec e1 e2 e3
= maybeParens (prec >= ifPrec) $
fillSep [ text "if" <+> prettyExp coloring topPrec e1
, text "then" <+> prettyExp coloring topPrec e2
, text "else" <+> prettyExp coloring topPrec e3 ]
-- | Print a @fix@
prettyFix :: PrettyExp exp => Coloring -> Prec -> exp -> Doc
prettyFix coloring prec e
= maybeParens (prec >= appPrec) $
text "fix" <+> prettyExp coloring topPrec e
| goldfirere/glambda | src/Language/Glambda/Pretty.hs | bsd-3-clause | 4,454 | 0 | 14 | 981 | 1,184 | 649 | 535 | 77 | 1 |
--(*) Find the last element of a list.
lastElmLst:: [a] -> a
lastElmLst lst = head $ reverse $ lst
myLast :: [a] -> a
myLast [] = error "Empty list"
myLast [x] = x
myLast (x:xs) = myLast $ xs
| michael-j-clark/hjs99 | src/1to10/One.hs | bsd-3-clause | 196 | 0 | 7 | 44 | 85 | 45 | 40 | 6 | 1 |
module Kreg.Options.Auth (auth) where
import Kreg.UI.UserInput (askLogins)
import qualified Registry.Client as C
import Kreg.TokenFileManager (save)
auth :: IO ()
auth = do
ids <- askLogins
case ids of
Nothing -> return ()
Just (login, password) -> do
res <- C.auth login password
case res of
Nothing -> putStrLn "Authentication failed"
Just dt -> do
save dt
putStrLn "Authentication succeeded"
| manuelleduc/kreg-haskell | app/Kreg/Options/Auth.hs | bsd-3-clause | 537 | 0 | 17 | 201 | 147 | 75 | 72 | 16 | 3 |
{-# LANGUAGE TypeFamilies, PatternGuards #-}
-----------------------------------------------------------------------------
-- |
-- Module : Statistics.Order
-- Copyright : (C) 2012 Edward Kmett,
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : Edward Kmett <[email protected]>
-- Stability : provisional
-- Portability : Haskell 2011 + TypeFamilies
--
----------------------------------------------------------------------------
module Statistics.Order
(
-- * L-Estimator
L(..)
-- ** Applying an L-estimator
, (@@), (@!)
-- ** Analyzing an L-estimator
, (@#)
, breakdown
-- ** Robust L-Estimators
, trimean -- Tukey's trimean
, midhinge -- average of q1 and q3
, iqr -- interquartile range
, iqm -- interquartile mean
, lscale -- second L-moment
-- ** L-Estimator Combinators
, trimmed
, winsorized, winsorised
, jackknifed
-- ** Trivial L-Estimators
, mean
, total
, lmin, lmax
, midrange
-- ** Sample-size-dependent L-Estimators
, nthSmallest
, nthLargest
-- ** Quantiles
-- *** Common quantiles
, quantile
, median
, tercile, t1, t2
, quartile, q1, q2, q3
, quintile, qu1, qu2, qu3, qu4
, percentile
, permille
-- *** Harrell-Davis Quantile Estimator
, hdquantile
-- *** Compute a quantile using a specified quantile estimation strategy
, quantileBy
-- * Sample Quantile Estimators
, Estimator
, Estimate(..)
, r1,r2,r3,r4,r5,r6,r7,r8,r9,r10
) where
import Data.Ratio
import Data.List (sort)
import Data.IntMap (IntMap)
import qualified Data.IntMap as IM
import Data.Vector (Vector, (!))
import qualified Data.Vector as V
import Data.VectorSpace
import Statistics.Distribution.Beta
import qualified Statistics.Distribution as D
-- | L-estimators are linear combinations of order statistics used by 'robust' statistics.
newtype L r = L { runL :: Int -> IntMap r }
-- TODO: Write code to test if the result of a given L-estimator will be always than or equal
-- to the result of another L-estimator at a given sample size.
-- | Calculate the result of applying an L-estimator after sorting list into order statistics
(@@) :: (Num r, Ord r) => L r -> [r] -> r
l @@ xs = l @! V.fromList (sort xs)
-- | Calculate the result of applying an L-estimator to a *pre-sorted* vector of order statistics
(@!) :: Num r => L r -> Vector r -> r
L f @! v = IM.foldrWithKey (\k x y -> (v ! k) * x + y) 0 $ f (V.length v)
-- | get a vector of the coefficients of an L estimator when applied to an input of a given length
(@#) :: Num r => L r -> Int -> [r]
L f @# n = map (\k -> IM.findWithDefault 0 k fn) [0..n-1] where fn = f n
-- | calculate the breakdown % of an L-estimator
breakdown :: (Num r, Eq r) => L r -> Int
breakdown (L f)
| IM.null m = 50
| otherwise = fst (IM.findMin m) `min` (100 - fst (IM.findMax m))
where m = IM.filter (/= 0) $ f 101
instance Num r => AdditiveGroup (L r) where
zeroV = L $ \_ -> IM.empty
L fa ^+^ L fb = L $ \n -> IM.unionWith (+) (fa n) (fb n)
negateV (L fa) = L $ fmap negate . fa
instance Num r => VectorSpace (L r) where
type Scalar (L r) = r
x *^ L y = L $ fmap (x *) . y
clamp :: Int -> Int -> Int
clamp n k
| k <= 0 = 0
| k >= n = n - 1
| otherwise = k
-- | The average of all of the order statistics. Not robust.
--
-- > breakdown mean = 0%
mean :: Fractional r => L r
mean = L $ \n -> IM.fromList [ (i, 1 / fromIntegral n) | i <- [0..n-1]]
-- | The sum of all of the order statistics. Not robust.
--
-- > breakdown total = 0%
total :: Num r => L r
total = L $ \n -> IM.fromList [ (i, 1) | i <- [0..n-1]]
-- | Calculate a trimmed L-estimator. If the sample size isn't evenly divided, linear interpolation is used
-- as described in <http://en.wikipedia.org/wiki/Trimmed_mean#Interpolation>
-- Trimming can increase the robustness of a statistic by removing outliers.
trimmed :: Fractional r => Rational -> L r -> L r
trimmed p (L g) = L $ \n -> case properFraction (fromIntegral n * p) of
(w, 0) -> IM.fromDistinctAscList [ (k + w, v) | (k,v) <- IM.toAscList $ g (n - w*2)]
(w, f) | w' <- w + 1 -> IM.fromListWith (+) $ [ (k + w, fromRational (1 - f) * v) | (k,v) <- IM.toList $ g (n - w*2)] ++
[ (k + w', fromRational f * v) | (k,v) <- IM.toList $ g (n - w'*2)]
-- | Calculates an interpolated winsorized L-estimator in a manner analogous to the trimmed estimator.
-- Unlike trimming, winsorizing replaces the extreme values.
winsorized, winsorised :: Fractional r => Rational -> L r -> L r
winsorised = winsorized
winsorized p (L g) = L $ \n -> case properFraction (fromIntegral n * p) of
(w, 0) -> IM.fromAscListWith (+) [ (w `max` min (n - 1 - w) k, v) | (k,v) <- IM.toAscList (g n) ]
(w, f) | w' <- w + 1 -> IM.fromListWith (+) $ do
(k,v) <- IM.toList (g n)
[ (w `max` min (n - 1 - w ) k, v * fromRational (1 - f)),
(w' `max` min (n - 1 - w') k, v * fromRational f)]
-- | Jackknifes the statistic by removing each sample in turn and recalculating the L-estimator,
-- requires at least 2 samples!
jackknifed :: Fractional r => L r -> L r
jackknifed (L g) = L $ \n -> IM.fromAscListWith (+) $ do
let n' = fromIntegral n
(k,v) <- IM.toAscList (g (n - 1))
let k' = fromIntegral k + 1
[(k, (n' - k') * v / n'), (k + 1, k' * v / n')]
-- | The most robust L-estimator possible.
--
-- > breakdown median = 50
median :: Fractional r => L r
median = L go where
go n
| odd n = IM.singleton (div (n - 1) 2) 1
| k <- div n 2 = IM.fromList [(k-1, 0.5), (k, 0.5)]
-- | Sample quantile estimators
data Estimate r = Estimate {-# UNPACK #-} !Rational (IntMap r)
type Estimator r = Rational -> Int -> Estimate r
-- | Compute a quantile using the given estimation strategy to interpolate when an exact quantile isn't available
quantileBy :: Num r => Estimator r -> Rational -> L r
quantileBy f p = L $ \n -> case f p n of
Estimate h qp -> case properFraction h of
(w, 0) -> IM.singleton (clamp n (w - 1)) 1
_ -> qp
-- | Compute a quantile with traditional direct averaging
quantile :: Fractional r => Rational -> L r
quantile = quantileBy r2
tercile :: Fractional r => Rational -> L r
tercile n = quantile (n/3)
-- | terciles 1 and 2
--
-- > breakdown t1 = breakdown t2 = 33%
t1, t2 :: Fractional r => L r
t1 = quantile (1/3)
t2 = quantile (2/3)
quartile :: Fractional r => Rational -> L r
quartile n = quantile (n/4)
-- | quantiles, with breakdown points 25%, 50%, and 25% respectively
q1, q2, q3 :: Fractional r => L r
q1 = quantile 0.25
q2 = median
q3 = quantile 0.75
quintile :: Fractional r => Rational -> L r
quintile n = quantile (n/5)
-- | quintiles 1 through 4
qu1, qu2, qu3, qu4 :: Fractional r => L r
qu1 = quintile 1
qu2 = quintile 2
qu3 = quintile 3
qu4 = quintile 4
-- |
--
-- > breakdown (percentile n) = min n (100 - n)
percentile :: Fractional r => Rational -> L r
percentile n = quantile (n/100)
permille :: Fractional r => Rational -> L r
permille n = quantile (n/1000)
nthSmallest :: Num r => Int -> L r
nthSmallest k = L $ \n -> IM.singleton (clamp n k) 1
nthLargest :: Num r => Int -> L r
nthLargest k = L $ \n -> IM.singleton (clamp n (n - 1 - k)) 1
-- |
--
-- > midhinge = trimmed 0.25 midrange
-- > breakdown midhinge = 25%
midhinge :: Fractional r => L r
midhinge = (q1 ^+^ q3) ^/ 2
-- | Tukey's trimean
--
-- > breakdown trimean = 25
trimean :: Fractional r => L r
trimean = (q1 ^+^ 2 *^ q2 ^+^ q3) ^/ 4
-- | The maximum value in the sample
lmax :: Num r => L r
lmax = L $ \n -> IM.singleton (n-1) 1
-- | The minimum value in the sample
lmin :: Num r => L r
lmin = L $ \_ -> IM.singleton 0 1
-- |
-- > midrange = lmax - lmin
-- > breakdown midrange = 0%
midrange :: Fractional r => L r
midrange = L $ \n -> IM.fromList [(0,-1),(n-1,1)]
-- | interquartile range
--
-- > breakdown iqr = 25%
-- > iqr = trimmed 0.25 midrange
iqr :: Fractional r => L r
iqr = q3 ^-^ q1
-- | interquartile mean
--
-- > iqm = trimmed 0.25 mean
iqm :: Fractional r => L r
iqm = trimmed 0.25 mean
-- | Direct estimator for the second L-moment given a sample
lscale :: Fractional r => L r
lscale = L $ \n -> let
r = fromIntegral n
scale = 1 / (r * (r-1))
in IM.fromList [ (i - 1, scale * (2 * fromIntegral i - 1 - r)) | i <- [1..n] ]
-- | The Harrell-Davis quantile estimate. Uses multiple order statistics to approximate the quantile
-- to reduce variance.
hdquantile :: Fractional r => Rational -> L r
hdquantile q = L $ \n ->
let n' = fromIntegral n
np1 = n' + 1
q' = fromRational q
d = betaDistr (q'*np1) (np1*(1-q')) in
if q == 0 then IM.singleton 0 1
else if q == 1 then IM.singleton (n - 1) 1
else IM.fromAscList
[ (i, realToFrac $ D.cumulative d ((fromIntegral i + 1) / n') -
D.cumulative d (fromIntegral i / n'))
| i <- [0 .. n - 1]
]
-- More information on the individual estimators used below can be found in:
-- http://stat.ethz.ch/R-manual/R-devel/library/stats/html/quantile.html
-- and
-- http://en.wikipedia.org/wiki/Quantile#Estimating_the_quantiles_of_a_population
-- | Inverse of the empirical distribution function
r1 :: Num r => Estimator r
r1 p n = Estimate (np + 1%2) $ IM.singleton (clamp n (ceiling np - 1)) 1
where np = fromIntegral n * p
-- | .. with averaging at discontinuities
r2 :: Fractional r => Estimator r
r2 p n = Estimate (np + 1%2) $
if p == 0 then IM.singleton 0 1
else if p == 1 then IM.singleton (n - 1) 1
else IM.fromList [(ceiling np - 1, 0.5), (floor np, 0.5)]
where np = fromIntegral n * p
-- | The observation numbered closest to Np. NB: does not yield a proper median
r3 :: Num r => Estimator r
r3 p n = Estimate np $ IM.singleton (clamp n (round np - 1)) 1
where np = fromIntegral n * p
-- continuous sample quantiles
continuousEstimator ::
Fractional r =>
(Rational -> (Rational, Rational)) -> -- take the number of samples, and return upper and lower bounds on 'p = k/n' for which this interpolation should be used
(Rational -> Rational -> Rational) -> -- take p = k/q, and n the number of samples, and return the coefficient h which will be used for interpolation when h is not integral
Estimator r
continuousEstimator bds f p n = Estimate h $
if p < lo then IM.singleton 0 1
else if p >= hi then IM.singleton (n - 1) 1
else case properFraction h of
(w,frac) | frac' <- fromRational frac -> IM.fromList [(w - 1, frac'), (w, 1 - frac')]
where
r = fromIntegral n
h = f p r
(lo, hi) = bds r
-- | Linear interpolation of the empirical distribution function. NB: does not yield a proper median.
r4 :: Fractional r => Estimator r
r4 = continuousEstimator (\n -> (1 / n, 1)) (*)
-- | .. with knots midway through the steps as used in hydrology. This is the simplest continuous estimator that yields a correct median
r5 :: Fractional r => Estimator r
r5 = continuousEstimator (\n -> let tn = 2 * n in (1 / tn, (tn - 1) / tn)) $ \p n -> p*n + 0.5
-- | Linear interpolation of the expectations of the order statistics for the uniform distribution on [0,1]
r6 :: Fractional r => Estimator r
r6 = continuousEstimator (\n -> (1 / (n + 1), n / (n + 1))) $ \p n -> p*(n+1)
-- | Linear interpolation of the modes for the order statistics for the uniform distribution on [0,1]
r7 :: Fractional r => Estimator r
r7 = continuousEstimator (\_ -> (0, 1)) $ \p n -> p*(n-1) + 1
-- | Linear interpolation of the approximate medans for order statistics.
r8 :: Fractional r => Estimator r
r8 = continuousEstimator (\n -> (2/3 / (n + 1/3), (n - 1/3)/(n + 1/3))) $ \p n -> p*(n + 1/3) + 1/3
-- | The resulting quantile estimates are approximately unbiased for the expected order statistics if x is normally distributed.
r9 :: Fractional r => Estimator r
r9 = continuousEstimator (\n -> (0.625 / (n + 0.25), (n - 0.375)/(n + 0.25))) $ \p n -> p*(n + 0.25) + 0.375
-- | When rounding h, this yields the order statistic with the least expected square deviation relative to p.
r10 :: Fractional r => Estimator r
r10 = continuousEstimator (\n -> (1.5 / (n + 2), (n + 0.5)/(n + 2))) $ \p n -> p*(n + 2) - 0.5
| ekmett/order-statistics | Statistics/Order.hs | bsd-3-clause | 12,159 | 0 | 21 | 2,837 | 4,237 | 2,276 | 1,961 | 199 | 3 |
{-# LANGUAGE GeneralizedNewtypeDeriving,
FlexibleInstances,
MultiParamTypeClasses #-}
module Main where
import Control.Monad.Identity
import Data.Binary (Binary, decode, encode)
import Test.Framework (Test, defaultMain, testGroup)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Network.Kontiki.Raft
main :: IO ()
main = defaultMain tests
tests :: [Test]
tests = [
testGroup "Serialization" [
testGroup "Messages" [
testProperty "Message Int" (prop_serialization :: Message Int -> Bool)
, testProperty "RequestVote" (prop_serialization :: RequestVote -> Bool)
, testProperty "RequestVoteResponse" (prop_serialization :: RequestVoteResponse -> Bool)
, testProperty "AppendEntries Int" (prop_serialization :: AppendEntries Int -> Bool)
, testProperty "AppendEntriesResponse" (prop_serialization :: AppendEntriesResponse -> Bool)
]
, testGroup "State" [
testProperty "SomeState" (prop_serialization :: SomeState -> Bool)
, testProperty "Follower" (prop_serialization :: Follower -> Bool)
, testProperty "Candidate" (prop_serialization :: Candidate -> Bool)
, testProperty "Leader" (prop_serialization :: Leader -> Bool)
]
, testProperty "Entry Int" (prop_serialization :: Entry Int -> Bool)
]
, testProperty "handle" prop_handle
]
prop_serialization :: (Eq a, Binary a) => a -> Bool
prop_serialization a = decode (encode a) == a
-- A stub MonadLog which, well... has no log at all
newtype Stub a = Stub { unStub :: Identity a }
deriving ( Functor
, Applicative
, Monad
)
instance MonadLog Stub Int where
logEntry _ = return Nothing
logLastEntry = return Nothing
-- Make sure there are no obvious 'error' cases in the FSM
prop_handle :: Config -> SomeState -> Event Int -> Bool
prop_handle cfg state event =
let (state', commands) = runIdentity $ unStub $ handle cfg state event in
state' `seq` commands `seq` True
| NicolasT/kontiki | bin/test.hs | bsd-3-clause | 2,102 | 0 | 13 | 522 | 498 | 274 | 224 | 40 | 1 |
module Obsidian.Coordination.CoordC where
import Obsidian.GCDObsidian.Exp
import Obsidian.GCDObsidian.Types
import Data.Word
import Data.Monoid
data LaunchConfig = LaunchConfig {launchBlocks :: Int,
launchThreads :: Int,
launchShared :: Int}
deriving (Eq, Show)
data CVar = CVar String Type
deriving (Eq, Show)
type IOS = [CVar]
-- TODO: print as CUDA and OpenCL C code.
--
data CoordC
= Skip
| Malloc CVar (Exp Word32)
| Launch String LaunchConfig IOS IOS
| MemCpy CVar CVar (Exp Word32)
| Free CVar
| Seq CoordC CoordC
deriving (Eq,Show)
-- CoordFunction Name ins outs body
data CoordFunction = CoordFunction String IOS IOS CoordC
instance Monoid CoordC where
mempty = Skip
mappend Skip b = b
mappend a Skip = a
mappend a b = a `Seq` b
| svenssonjoel/GCDObsidian | Obsidian/Coordination/CoordC.hs | bsd-3-clause | 940 | 0 | 8 | 320 | 234 | 135 | 99 | 26 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DeriveDataTypeable #-}
import Control.Monad.State.Strict
import Network.UDP.Pal
import Control.Concurrent.STM
import Halive.Concurrent
import Control.Lens.Extra hiding (view)
import Data.Time
import Graphics.UI.GLFW.Pal
import Linear.Extra
import System.Random
import Types
import Render
{-
SERVER LOGIC:
[x] Reliable messages from clients (like 'CreateCube') should be broadcasted (with a new seqNum) to all except the sender
Unreliable messages from clients (like 'ObjectPose') should be broadcasted to all except the sender
Server unreliable sim messages should be broadcasted to all clients
clients should be ready for updates to non-existent objects and ignore them
[ ] Let's try starting with having the server expire cubes since it has to anyway.
Can add having the client expire them too (locally, no network message) later.
Client sends hand and head updates unreliably to the server.
Server receives all these and broadcasts every frame to the all clients.
Client sends reliable "create cube" updates to the server.
Server re-broadcasts these to clients, and also starts physics sim
to send unreliable updates and expiration timer to send reliable "DeleteCube" message.
-}
main :: IO ()
main = do
killThreads
-------------------
-- Networking setup
-------------------
ourName <- randomName
ourPose <- liftIO $ Pose
<$> (V3 <$> randomRIO (-1, 1) <*> randomRIO (-1, 1) <*> randomRIO (0, -5))
<*> pure (axisAngle (V3 0 1 0) 0)
ourColor <- randomColor
let ourConnectMessage = ConnectClient ourName ourPose ourColor
_transceiver@Transceiver{..} <- createTransceiverToAddress serverName serverPort packetSize
-- Initial connection to the server
liftIO . atomically . writeTChan tcOutgoingPackets $ Reliable ourConnectMessage
------------------
-- GL/Window setup
------------------
(window, events, cube) <- initRenderer
newWorld <- execStateT (interpretToState ourConnectMessage) emptyAppState
void . flip runStateT newWorld . whileWindow window $ do
-------------------------
-- Process network events
-------------------------
interpretNetworkPackets tcVerifiedPackets interpretToState
--------------------
-- Process UI events
--------------------
processEvents events $ \e -> do
closeOnEscape window e
case e of
MouseButton _ MouseButtonState'Pressed _ -> do
-- Add a cube at a random location
newCubeID <- liftIO randomIO
randomPos <- liftIO $ V3 <$> randomRIO (-1, 1) <*> randomRIO (-1, 1) <*> randomRIO (0, -5)
let pose = Pose randomPos (axisAngle (V3 0 1 0) 0)
message = CreateObject newCubeID pose ourColor
interpretToState message
liftIO . atomically . writeTChan tcOutgoingPackets $ Reliable message
_ -> return ()
---------------------------
-- Simulate player movement
---------------------------
now <- realToFrac . utctDayTime <$> liftIO getCurrentTime
let poseMessage = PlayerPose ourName (ourPose & posPosition . _xy .~ V2 (sin now) (cos now))
interpretToState poseMessage
liftIO . atomically . writeTChan tcOutgoingPackets $ Unreliable [poseMessage]
---------
-- Render
---------
renderFrame window cube
| lukexi/udp-pal | reliable/MainGLClient.hs | bsd-3-clause | 3,683 | 0 | 26 | 869 | 631 | 322 | 309 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
module Rendering
(
renderPicIO
) where
import Game
import GraphObject
import Ship
import Universe
import ClientSide
import Graphics.Gloss.Rendering
import Graphics.Gloss
import Control.Concurrent.STM
drawShield :: Ship -> Picture
drawShield s =
if shieldOn s then
translate x y $
color (shipColors (shipColor s)) $
circle (shieldRad s)
else
blank
where
(x, y) = shipLoc s
renderPic :: GameState -> Picture
renderPic (Waiting n) =
scale 5 5 $
pictures[
translate 0 0 $
scale 0.05 0.05 $
color red $
text ("Waiting players: " ++ (show n))]
renderPic (InGame (_u@Universe{..}:_)) =
pictures
((map draw ships) ++ (map draw asteroids) ++ (map draw bullets) ++ (map drawShield ships))
renderPic GameOver =
scale 10 10 (pictures[
translate 0 0 $
color (shipColors 1) $
rotate 0 $
polygon [(10, -5), (0, 0), (0, 20)],
translate 0 0 $
color (shipColors 1) $
rotate 0 $
polygon [(-10, -5), (0, 0), (0, 20)],
translate (-18) (-20) $
scale 0.05 0.05 $
color red $
text "Game Over"])
renderPic _ = pictures [text "foo"]
renderPicIO :: ClientState -> IO Picture
renderPicIO cs = do
gs <- readTVarIO (game cs)
return $ renderPic gs | cmc-haskell-2016/asteroids | src/Rendering.hs | bsd-3-clause | 1,373 | 0 | 14 | 415 | 538 | 278 | 260 | 50 | 2 |
module FooSpec (main, spec) where
import Prelude
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "reverse" $ do
it "reverses a list" $ do
reverse [1 :: Int, 2, 3] `shouldBe` [3, 2, 1]
| hspec/hspec | hspec-discover/integration-test/with-no-implicit-prelude/FooSpec.hs | mit | 253 | 0 | 15 | 78 | 101 | 56 | 45 | 10 | 1 |
module HAHP.Data.Errors where
import Data.Map (Map)
import GHC.Generics
import Numeric.LinearAlgebra.HMatrix
import HAHP.Data.Core
-- * Errors definition
data TreeError = ConsistencyError { ahpTree :: AHPTree
, consistencyThreshold :: Double
, consistency :: Double
}
| ChildrenUnicityError { ahpTree :: AHPTree
, repeatedChildrenNames :: [String]
}
| InverseError { ahpTree :: AHPTree }
| LeavesUnicityError { ahpTree :: AHPTree
, repeatedLeavesNames :: [String]
}
| NotComputedConsistencyError { ahpTree :: AHPTree}
| NotUnitaryDiagError { ahpTree :: AHPTree }
| NullDivisionError { ahpTree :: AHPTree}
| ParentChildrenSizeMismatchError {ahpTree :: AHPTree
, errorParentSize :: Int
, errorChildrenSize :: Int
}
| PositivePreferenceError { ahpTree :: AHPTree
}
| SquareMatrixError { ahpTree :: AHPTree
, errorRows :: Int
, errorCols :: Int
}
deriving (Show)
data AlternativesError = NoAlternativesError {}
| AlternativesUnicityError {repeatedAlternativesNames :: [String]}
| IndicatorsValuesExistenceError { indValuesErrors :: [(Alternative, String)] }
deriving (Show)
| jpierre03/hahp | src/HAHP/Data/Errors.hs | gpl-3.0 | 1,959 | 1 | 10 | 1,028 | 261 | 167 | 94 | 28 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- Module : Network.AWS.EC2.DescribeAddresses
-- Copyright : (c) 2013-2014 Brendan Hay <[email protected]>
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public License, v. 2.0.
-- A copy of the MPL can be found in the LICENSE file or
-- you can obtain it at http://mozilla.org/MPL/2.0/.
-- Maintainer : Brendan Hay <[email protected]>
-- Stability : experimental
-- Portability : non-portable (GHC extensions)
--
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- | Describes one or more of your Elastic IP addresses.
--
-- An Elastic IP address is for use in either the EC2-Classic platform or in a
-- VPC. For more information, see <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html Elastic IP Addresses> in the /Amazon ElasticCompute Cloud User Guide for Linux/.
--
-- <http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeAddresses.html>
module Network.AWS.EC2.DescribeAddresses
(
-- * Request
DescribeAddresses
-- ** Request constructor
, describeAddresses
-- ** Request lenses
, daAllocationIds
, daDryRun
, daFilters
, daPublicIps
-- * Response
, DescribeAddressesResponse
-- ** Response constructor
, describeAddressesResponse
-- ** Response lenses
, darAddresses
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.EC2.Types
import qualified GHC.Exts
data DescribeAddresses = DescribeAddresses
{ _daAllocationIds :: List "AllocationId" Text
, _daDryRun :: Maybe Bool
, _daFilters :: List "Filter" Filter
, _daPublicIps :: List "PublicIp" Text
} deriving (Eq, Read, Show)
-- | 'DescribeAddresses' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'daAllocationIds' @::@ ['Text']
--
-- * 'daDryRun' @::@ 'Maybe' 'Bool'
--
-- * 'daFilters' @::@ ['Filter']
--
-- * 'daPublicIps' @::@ ['Text']
--
describeAddresses :: DescribeAddresses
describeAddresses = DescribeAddresses
{ _daDryRun = Nothing
, _daPublicIps = mempty
, _daFilters = mempty
, _daAllocationIds = mempty
}
-- | [EC2-VPC] One or more allocation IDs.
--
-- Default: Describes all your Elastic IP addresses.
daAllocationIds :: Lens' DescribeAddresses [Text]
daAllocationIds = lens _daAllocationIds (\s a -> s { _daAllocationIds = a }) . _List
daDryRun :: Lens' DescribeAddresses (Maybe Bool)
daDryRun = lens _daDryRun (\s a -> s { _daDryRun = a })
-- | One or more filters. Filter names and values are case-sensitive.
--
-- 'allocation-id' - [EC2-VPC] The allocation ID for the address.
--
-- 'association-id' - [EC2-VPC] The association ID for the address.
--
-- 'domain' - Indicates whether the address is for use in EC2-Classic ('standard') or in a VPC (
-- 'vpc').
--
-- 'instance-id' - The ID of the instance the address is associated with, if
-- any.
--
-- 'network-interface-id' - [EC2-VPC] The ID of the network interface that the
-- address is associated with, if any.
--
-- 'network-interface-owner-id' - The AWS account ID of the owner.
--
-- 'private-ip-address' - [EC2-VPC] The private IP address associated with the
-- Elastic IP address.
--
-- 'public-ip' - The Elastic IP address.
--
--
daFilters :: Lens' DescribeAddresses [Filter]
daFilters = lens _daFilters (\s a -> s { _daFilters = a }) . _List
-- | [EC2-Classic] One or more Elastic IP addresses.
--
-- Default: Describes all your Elastic IP addresses.
daPublicIps :: Lens' DescribeAddresses [Text]
daPublicIps = lens _daPublicIps (\s a -> s { _daPublicIps = a }) . _List
newtype DescribeAddressesResponse = DescribeAddressesResponse
{ _darAddresses :: List "item" Address
} deriving (Eq, Read, Show, Monoid, Semigroup)
-- | 'DescribeAddressesResponse' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'darAddresses' @::@ ['Address']
--
describeAddressesResponse :: DescribeAddressesResponse
describeAddressesResponse = DescribeAddressesResponse
{ _darAddresses = mempty
}
-- | Information about one or more Elastic IP addresses.
darAddresses :: Lens' DescribeAddressesResponse [Address]
darAddresses = lens _darAddresses (\s a -> s { _darAddresses = a }) . _List
instance ToPath DescribeAddresses where
toPath = const "/"
instance ToQuery DescribeAddresses where
toQuery DescribeAddresses{..} = mconcat
[ "AllocationId" `toQueryList` _daAllocationIds
, "DryRun" =? _daDryRun
, "Filter" `toQueryList` _daFilters
, "PublicIp" `toQueryList` _daPublicIps
]
instance ToHeaders DescribeAddresses
instance AWSRequest DescribeAddresses where
type Sv DescribeAddresses = EC2
type Rs DescribeAddresses = DescribeAddressesResponse
request = post "DescribeAddresses"
response = xmlResponse
instance FromXML DescribeAddressesResponse where
parseXML x = DescribeAddressesResponse
<$> x .@? "addressesSet" .!@ mempty
| kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DescribeAddresses.hs | mpl-2.0 | 5,546 | 0 | 10 | 1,145 | 678 | 421 | 257 | 70 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module FRP.Peakachu.Backend.GLUT
( GlutToProgram(..), Image(..), ProgramToGlut(..), glut
, gIdleEvent, gTimerEvent, gMouseMotionEvent
, gKeyboardMouseEvent
) where
import Control.Concurrent.MVar.YC (modifyMVarPure)
import Data.ADT.Getters (mkADTGetters)
import FRP.Peakachu.Backend (Backend(..))
import FRP.Peakachu.Backend.Internal
(Sink(..), MainLoop(..), ParallelIO(..))
import Control.Concurrent.MVar (MVar, newMVar, putMVar, takeMVar)
import Data.Monoid (Monoid(..))
import Graphics.UI.GLUT
( GLfloat, ($=), ($~), get
, ClearBuffer(..), Key(..), KeyState(..)
, Modifiers, Position(..), Size(..), Timeout
, DisplayMode(..), initialDisplayMode, swapBuffers
, createWindow, getArgsAndInitialize
, displayCallback, idleCallback
, keyboardMouseCallback
, motionCallback, passiveMotionCallback
, windowSize, addTimerCallback
, clear, flush, mainLoop, leaveMainLoop
)
data Image = Image { runImage :: IO ()}
instance Monoid Image where
mempty = Image $ return ()
mappend (Image a) (Image b) = Image $ a >> b
data GlutToProgram a
= IdleEvent
| TimerEvent a
| MouseMotionEvent GLfloat GLfloat
| KeyboardMouseEvent Key KeyState Modifiers Position
$(mkADTGetters ''GlutToProgram)
data ProgramToGlut a
= DrawImage Image
| SetTimer Timeout a
glutConsume :: (GlutToProgram a -> IO ()) -> ProgramToGlut a -> IO ()
glutConsume _ (DrawImage image) = do
clear [ ColorBuffer ]
runImage image
swapBuffers
flush
glutConsume handler (SetTimer timeout tag) =
-- there seems to be a bug with addTimerCallback.
-- sometimes it calls you back straight away..
-- but doing a work around with an io-thread seems
-- to be very slow
addTimerCallback timeout . handler . TimerEvent $ tag
setGlutCallbacks :: MVar [ProgramToGlut a] -> (GlutToProgram a -> IO ()) -> IO ()
setGlutCallbacks todoVar handler = do
idleCallback $= Just (preHandler IdleEvent)
keyboardMouseCallback $=
Just (
(fmap . fmap . fmap . fmap)
preHandler KeyboardMouseEvent)
motionCallback $= Just motion
passiveMotionCallback $= Just motion
where
preHandler event = do
todo <- takeMVar todoVar
putMVar todoVar []
mapM_ (glutConsume handler) . reverse $ todo
handler event
motion (Position px py) = do
Size sx sy <- get windowSize
preHandler $ MouseMotionEvent (p2g sx px) (- p2g sy py)
p2g sa pa = 2 * fromIntegral pa / fromIntegral sa - 1
glut :: Backend (ProgramToGlut a) (GlutToProgram a)
glut =
Backend b
where
b handler = do
_ <- getArgsAndInitialize
initialDisplayMode $~ (DoubleBuffered:)
_ <- createWindow "test"
displayCallback $= return ()
-- all the OpenGL drawing must be performed from the same thread
-- that runs the GLUT event-loop.
-- so instead of consuming when given input, we add it to the todo-list.
-- the next time any GLUT event comes (should be immediate),
-- we consume all the todo-list.
-- without this mechanism the graphics flickers.
todoVar <- newMVar []
setGlutCallbacks todoVar handler
return Sink
{ sinkConsume = modifyMVarPure todoVar . (:)
, sinkMainLoop =
MainLoop
{ mlInit = handler $ MouseMotionEvent 0 0
, mlQuit = leaveMainLoop
, mlRun = Just $ ParIO mainLoop
}
}
| yairchu/peakachu | src/FRP/Peakachu/Backend/GLUT.hs | bsd-3-clause | 3,688 | 1 | 15 | 1,049 | 941 | 513 | 428 | 79 | 1 |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, DeriveDataTypeable #-}
{-# LANGUAGE PatternGuards #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.Spacing
-- Copyright : (c) Brent Yorgey
-- License : BSD-style (see LICENSE)
--
-- Maintainer : <[email protected]>
-- Stability : unstable
-- Portability : portable
--
-- Add a configurable amount of space around windows.
-----------------------------------------------------------------------------
module XMonad.Layout.Spacing (
-- * Usage
-- $usage
spacing, Spacing,
spacingWithEdge, SpacingWithEdge,
smartSpacing, SmartSpacing,
smartSpacingWithEdge, SmartSpacingWithEdge,
ModifySpacing(..), setSpacing, incSpacing
) where
import Graphics.X11 (Rectangle(..))
import Control.Arrow (second)
import XMonad.Operations (sendMessage)
import XMonad.Core (X,runLayout,Message,fromMessage,Typeable)
import XMonad.StackSet (up, down, Workspace(..))
import XMonad.Util.Font (fi)
import XMonad.Layout.LayoutModifier
-- $usage
-- You can use this module by importing it into your @~\/.xmonad\/xmonad.hs@ file:
--
-- > import XMonad.Layout.Spacing
--
-- and modifying your layoutHook as follows (for example):
--
-- > layoutHook = spacing 2 $ Tall 1 (3/100) (1/2)
-- > -- put a 2px space around every window
--
-- | Surround all windows by a certain number of pixels of blank space.
spacing :: Int -> l a -> ModifiedLayout Spacing l a
spacing p = ModifiedLayout (Spacing p)
data Spacing a = Spacing Int deriving (Show, Read)
-- | Message to dynamically modify (e.g. increase/decrease/set) the size of the window spacing
data ModifySpacing = ModifySpacing (Int -> Int) deriving (Typeable)
instance Message ModifySpacing
-- | Set spacing to given amount
setSpacing :: Int -> X ()
setSpacing n = sendMessage $ ModifySpacing $ const n
-- | Increase spacing by given amount
incSpacing :: Int -> X ()
incSpacing n = sendMessage $ ModifySpacing $ (+n)
instance LayoutModifier Spacing a where
pureModifier (Spacing p) _ _ wrs = (map (second $ shrinkRect p) wrs, Nothing)
pureMess (Spacing px) m
| Just (ModifySpacing f) <- fromMessage m = Just $ Spacing $ max 0 $ f px
| otherwise = Nothing
modifierDescription (Spacing p) = "Spacing " ++ show p
-- | Surround all windows by a certain number of pixels of blank space, and
-- additionally adds the same amount of spacing around the edge of the screen.
spacingWithEdge :: Int -> l a -> ModifiedLayout SpacingWithEdge l a
spacingWithEdge p = ModifiedLayout (SpacingWithEdge p)
data SpacingWithEdge a = SpacingWithEdge Int deriving (Show, Read)
instance LayoutModifier SpacingWithEdge a where
pureModifier (SpacingWithEdge p) _ _ wrs = (map (second $ shrinkRect p) wrs, Nothing)
pureMess (SpacingWithEdge px) m
| Just (ModifySpacing f) <- fromMessage m = Just $ SpacingWithEdge $ max 0 $ f px
| otherwise = Nothing
modifyLayout (SpacingWithEdge p) w r = runLayout w (shrinkRect p r)
modifierDescription (SpacingWithEdge p) = "SpacingWithEdge " ++ show p
shrinkRect :: Int -> Rectangle -> Rectangle
shrinkRect p (Rectangle x y w h) = Rectangle (x+fi p) (y+fi p) (fi $ max 1 $ fi w-2*p) (fi $ max 1 $ fi h-2*p)
-- | Surrounds all windows with blank space, except when the window is the only
-- visible window on the current workspace.
smartSpacing :: Int -> l a -> ModifiedLayout SmartSpacing l a
smartSpacing p = ModifiedLayout (SmartSpacing p)
data SmartSpacing a = SmartSpacing Int deriving (Show, Read)
instance LayoutModifier SmartSpacing a where
pureModifier _ _ _ [x] = ([x], Nothing)
pureModifier (SmartSpacing p) _ _ wrs = (map (second $ shrinkRect p) wrs, Nothing)
modifierDescription (SmartSpacing p) = "SmartSpacing " ++ show p
-- | Surrounds all windows with blank space, and adds the same amount of spacing
-- around the edge of the screen, except when the window is the only visible
-- window on the current workspace.
smartSpacingWithEdge :: Int -> l a -> ModifiedLayout SmartSpacingWithEdge l a
smartSpacingWithEdge p = ModifiedLayout (SmartSpacingWithEdge p)
data SmartSpacingWithEdge a = SmartSpacingWithEdge Int deriving (Show, Read)
instance LayoutModifier SmartSpacingWithEdge a where
pureModifier _ _ _ [x] = ([x], Nothing)
pureModifier (SmartSpacingWithEdge p) _ _ wrs = (map (second $ shrinkRect p) wrs, Nothing)
modifyLayout (SmartSpacingWithEdge p) w r
| maybe False (\s -> null (up s) && null (down s)) (stack w) = runLayout w r
| otherwise = runLayout w (shrinkRect p r)
modifierDescription (SmartSpacingWithEdge p) = "SmartSpacingWithEdge " ++ show p
| CaptainPatate/xmonad-contrib | XMonad/Layout/Spacing.hs | bsd-3-clause | 4,938 | 0 | 15 | 1,090 | 1,226 | 648 | 578 | 59 | 1 |
module B1.Program.Chart.SideBar
( SideBarInput(..)
, SideBarOutput(..)
, SideBarState(..)
, drawSideBar
, newSideBarState
, cleanSideBarState
) where
import Control.Monad
import Data.Maybe
import Graphics.Rendering.OpenGL
import B1.Control.TaskManager
import B1.Data.Range
import B1.Data.Symbol
import B1.Graphics.Rendering.FTGL.Utils
import B1.Graphics.Rendering.OpenGL.Box
import B1.Graphics.Rendering.OpenGL.BufferManager
import B1.Graphics.Rendering.OpenGL.LineSegment
import B1.Graphics.Rendering.OpenGL.Point
import B1.Graphics.Rendering.OpenGL.Shapes
import B1.Graphics.Rendering.OpenGL.Utils
import B1.Program.Chart.Animation
import B1.Program.Chart.Colors
import B1.Program.Chart.Dirty
import B1.Program.Chart.Resources
import qualified B1.Program.Chart.Chart as C
import qualified B1.Program.Chart.ChartFrame as F
import qualified B1.Program.Chart.Graph as G
import qualified B1.Program.Chart.Header as H
import qualified B1.Program.Chart.Overlay as O
slotHeight = 100::GLfloat
dragFreelyOffset = slotHeight / 2
scrollIncrement = 25::GLfloat
dragScrollIncrement = 10::GLfloat
incomingHeightAnimation = animateOnce $ linearRange 100 100 10
outgoingHeightAnimation = animateOnce $ linearRange 100 0 10
draggedInHeightAnimation = animateOnce $ linearRange 50 100 10
draggedInAlphaAnimation = animateOnce $ linearRange 1 1 10
draggedInScaleAnimation = animateOnce $ linearRange 1 1 10
draggedOutHeightAnimation = animateOnce $ linearRange 100 0 10
draggedOutAlphaAnimation = animateOnce $ linearRange 0 0 10
draggedOutScaleAnimation = animateOnce $ linearRange 0 0 10
data SideBarInput = SideBarInput
{ bounds :: Box
, newSymbols :: [Symbol]
, selectedSymbol :: Maybe Symbol
, draggedSymbol :: Maybe Symbol
, refreshRequested :: Bool
, inputState :: SideBarState
}
data SideBarOutput = SideBarOutput
{ isDirty :: Dirty
, symbolRequest :: Maybe Symbol
, symbols :: [Symbol]
, outputState :: SideBarState
}
data SideBarState = SideBarState
{ scrollAmount :: GLfloat
, slots :: [Slot] -- ^ Slots currently part of the side bar
, newSlots :: [Slot] -- ^ TODO: Remove this!
, maybeFreeDragSlot :: Maybe Slot -- ^ Slot dragged outside of the side bar
}
data Slot = Slot
{ symbol :: Symbol
, remove :: Bool
, isBeingDragged :: Bool
, dragFreely :: Bool
, dragOffset :: GLfloat
, heightAnimation :: Animation (GLfloat, Dirty)
, alphaAnimation :: Animation (GLfloat, Dirty)
, scaleAnimation :: Animation (GLfloat, Dirty)
, frameState :: F.FrameState
}
newSideBarState :: SideBarState
newSideBarState = SideBarState
{ scrollAmount = 0
, slots = []
, newSlots = []
, maybeFreeDragSlot = Nothing
}
cleanSideBarState :: Resources -> SideBarState -> IO SideBarState
cleanSideBarState
resources
state@SideBarState
{ slots = slots
, newSlots = newSlots
} = do
cleanedSlots <- mapM (cleanSlot resources) slots
cleanedNewSlots <- mapM (cleanSlot resources) newSlots
return state
{ slots = cleanedSlots
, newSlots = cleanedNewSlots
}
cleanSlot :: Resources -> Slot -> IO Slot
cleanSlot resources slot = do
nextFrameState <- F.cleanFrameState resources $ frameState slot
return slot { frameState = nextFrameState }
drawSideBar :: Resources -> SideBarInput -> IO SideBarOutput
drawSideBar resources
SideBarInput
{ bounds = bounds
, newSymbols = newSymbols
, selectedSymbol = selectedSymbol
, draggedSymbol = maybeDraggedSymbol
, refreshRequested = refreshRequested
, inputState = inputState
} = do
newSlots <- createSlots resources newSymbols
maybeNewFreeDragSlot <- createDraggedSlot resources maybeDraggedSymbol
(drawSlots resources bounds refreshRequested
. addDraggingScrollAmount resources bounds
. calculateNextScrollAmount resources bounds selectedSymbol
. reorderSlotsBeingDragged resources bounds
. markSlotsBeingDragged resources bounds
. excludeFreeDragSlot resources bounds
. includeFreeDragSlot resources bounds
. addNewSlots newSlots maybeNewFreeDragSlot) inputState
createSlots :: Resources -> [Symbol] -> IO [Slot]
createSlots resources = do
let options = F.FrameOptions
{ F.chartOptions = C.ChartOptions
{ C.headerOptions = H.HeaderOptions
{ H.fontSize = 10
, H.padding = 5
, H.statusStyle = H.ShortStatus
, H.button = H.RemoveButton
}
, C.graphOptions = G.GraphOptions
{ G.boundSet = G.GraphBoundSet
{ G.graphBounds = Nothing
, G.volumeBounds = Nothing
, G.stochasticsBounds = Just $ Box (-1, 1) (1, 0)
, G.weeklyStochasticsBounds = Just $ Box (-1, 0) (1, -1)
, G.monthLineBounds = Just $ Box (-1, 1) (1, -1)
, G.dividerLines =
[ LineSegment (-1, 0) (1, -0)
]
}
, G.fontSize = 10
, G.maybeOverlayOptions = Nothing
}
, C.showRefreshButton = False
}
, F.inScaleAnimation = animateOnce [1, 1]
, F.inAlphaAnimation = animateOnce $ linearRange 0 1 5
, F.outScaleAnimation = animateOnce [1, 1]
, F.outAlphaAnimation = animateOnce $ linearRange 1 0 3
}
mapM (\symbol -> do
frameState <- F.newFrameState options (taskManager resources) $
Just symbol
return Slot
{ symbol = symbol
, remove = False
, isBeingDragged = False
, dragFreely = False
, dragOffset = 0
, heightAnimation = incomingHeightAnimation
, alphaAnimation = incomingAlphaAnimation
, scaleAnimation = incomingScaleAnimation
, frameState = frameState
})
createDraggedSlot :: Resources -> Maybe Symbol -> IO (Maybe Slot)
createDraggedSlot _ Nothing = return Nothing
createDraggedSlot resources (Just symbol) = do
newSlots <- createSlots resources [symbol]
return $ (Just . head . map makeDraggedSlot) newSlots
where
makeDraggedSlot :: Slot -> Slot
makeDraggedSlot slot = slot
{ isBeingDragged = True
, dragFreely = True
, dragOffset = dragFreelyOffset
, heightAnimation = draggedInHeightAnimation
, alphaAnimation = draggedInAlphaAnimation
, scaleAnimation = draggedInScaleAnimation
}
addNewSlots :: [Slot] -> Maybe Slot -> SideBarState -> SideBarState
addNewSlots newSlots maybeNewFreeDragSlot
state@SideBarState
{ slots = slots
, maybeFreeDragSlot = maybeFreeDragSlot
}
| isJust maybeFreeDragSlot && isJust maybeNewFreeDragSlot =
error "Can't drag two slots at once!"
| otherwise = state
{ newSlots = newSlots
, slots = foldl addOnlyUniqueSymbols slots newSlots
, maybeFreeDragSlot =
if isJust maybeFreeDragSlot
then maybeFreeDragSlot
else maybeNewFreeDragSlot
}
addOnlyUniqueSymbols :: [Slot] -> Slot -> [Slot]
addOnlyUniqueSymbols slots newSlot
| alreadyAdded = slots
| otherwise = slots ++ [newSlot]
where
alreadyAdded = any (containsSymbol (symbol newSlot)) slots
containsSymbol :: Symbol -> Slot -> Bool
containsSymbol newSymbol slot = symbol slot == newSymbol && not (remove slot)
includeFreeDragSlot :: Resources -> Box -> SideBarState -> SideBarState
includeFreeDragSlot resources bounds
state@SideBarState
{ scrollAmount = scrollAmount
, slots = slots
, maybeFreeDragSlot = maybeFreeDragSlot
}
| isDraggedIntoBounds = draggedIntoBoundsState
| otherwise = state
where
dragSymbol = symbol $ fromJust maybeFreeDragSlot
alreadyAdded = any (containsSymbol dragSymbol) slots
isDraggedIntoBounds = isJust maybeFreeDragSlot
&& not alreadyAdded
&& boxContains bounds (mousePosition resources)
draggedIntoBoundsState = state
{ slots = newSlots
, maybeFreeDragSlot = Nothing
}
(mouseX, mouseY) = mousePosition resources
isSlotAboveMousePosition :: (Int, Slot) -> Bool
isSlotAboveMousePosition (index, slot) =
let Box (_, _) (_, bottom) = getSlotBounds bounds scrollAmount slots index
in mouseY < bottom
indexedSlots = zip [0 .. ] slots
(indexedSlotsAbove, indexedSlotsBelow) =
span isSlotAboveMousePosition indexedSlots
removeIndices = snd . unzip
slotsAbove = removeIndices indexedSlotsAbove
slotsBelow = removeIndices indexedSlotsBelow
newSlots = slotsAbove ++ [fromJust maybeFreeDragSlot] ++ slotsBelow
excludeFreeDragSlot :: Resources -> Box -> SideBarState -> SideBarState
excludeFreeDragSlot resources bounds
state@SideBarState
{ slots = slots
}
| isDraggedOutOfBounds = draggedOutOfBoundsState
| otherwise = state
where
freeDragSlots = filter dragFreely slots
isDraggedOutOfBounds = not (null freeDragSlots)
&& not (boxContains bounds (mousePosition resources))
withoutFreeDragSlot = filter (not . dragFreely) slots
draggedOutOfBoundsState = state
{ slots = withoutFreeDragSlot
, maybeFreeDragSlot = Just $ head freeDragSlots
}
calculateNextScrollAmount :: Resources -> Box -> Maybe Symbol
-> SideBarState -> SideBarState
calculateNextScrollAmount resources bounds selectedSymbol
state@SideBarState
{ scrollAmount = scrollAmount
, slots = slots
, newSlots = newSlots
}
| allShowing = state { scrollAmount = 0 }
| addedNewSlots = state { scrollAmount = maxScrollAmount }
| needScrollToSelected = state { scrollAmount = selectedScrollAmount }
| scrolling = state { scrollAmount = adjustedScrollAmount }
| otherwise = state { scrollAmount = possiblySameScrollAmount }
where
allShowing = areAllSlotsShowing bounds slots
addedNewSlots = length newSlots > 0
needScrollToSelected = isJust selectedSymbol
&& any (containsSymbol (fromJust selectedSymbol)) slots
&& not (boxContainsBox bounds selectedBounds)
selectedIndex = (fst . head
. filter (containsSymbol (fromJust selectedSymbol) . snd)) $
zip [0..] slots
selectedBounds = getSlotBounds bounds scrollAmount slots selectedIndex
selectedScrollAmount
| boxBottom selectedBounds >= boxTop bounds =
scrollAmount - (boxTop selectedBounds - boxTop bounds)
| boxTop selectedBounds <= boxBottom bounds =
scrollAmount + (boxBottom bounds - boxBottom selectedBounds)
| otherwise = scrollAmount
scrolling = isMouseWheelMoving resources
maxScrollAmount = getMaximumScrollAmount bounds slots
possiblySameScrollAmount = min scrollAmount maxScrollAmount
adjustedScrollAmount =
if getMouseWheelVelocity resources > 0
then getScrollUpAmount bounds slots scrollAmount scrollIncrement
else getScrollDownAmount scrollAmount scrollIncrement
areAllSlotsShowing :: Box -> [Slot] -> Bool
areAllSlotsShowing bounds slots = visibleHeight > getTotalHeight slots
where
visibleHeight = boxHeight bounds
getTotalHeight :: [Slot] -> GLfloat
getTotalHeight slots = sum $ map (fst . current . heightAnimation) slots
getMaximumScrollAmount :: Box -> [Slot] -> GLfloat
getMaximumScrollAmount bounds slots =
if areAllSlotsShowing bounds slots
then 0
else getTotalHeight slots - visibleHeight
where
visibleHeight = boxHeight bounds
getScrollUpAmount :: Box -> [Slot] -> GLfloat -> GLfloat -> GLfloat
getScrollUpAmount bounds slots scrollAmount increment =
min (scrollAmount + increment) $ getMaximumScrollAmount bounds slots
getScrollDownAmount :: GLfloat -> GLfloat -> GLfloat
getScrollDownAmount scrollAmount increment = max (scrollAmount - increment) 0
markSlotsBeingDragged :: Resources -> Box -> SideBarState -> SideBarState
markSlotsBeingDragged resources bounds
state@SideBarState
{ scrollAmount = scrollAmount
, slots = slots
} =
state { slots = markedSlots }
where
markedSlots = map (updateIsBeingDragged resources bounds scrollAmount slots)
[0 .. length slots - 1]
updateIsBeingDragged :: Resources -> Box -> GLfloat -> [Slot] -> Int -> Slot
updateIsBeingDragged resources bounds scrollAmount slots index
| hasMouseDragFinished resources = updatedSlot { dragFreely = False }
| hasMouseDragStarted resources = updatedSlot
| otherwise = slot
where
slot = slots !! index
(beingDragged, dragOffset) =
isDraggingSlot resources bounds scrollAmount slots index
updatedSlot = slot
{ isBeingDragged = beingDragged
, dragOffset = dragOffset
}
removeSlot = slot
{ isBeingDragged = False
, dragOffset = 0
, remove = True
, heightAnimation = draggedOutHeightAnimation
, alphaAnimation = draggedOutAlphaAnimation
, scaleAnimation = draggedOutScaleAnimation
}
isDraggingSlot :: Resources -> Box -> GLfloat -> [Slot] -> Int
-> (Bool, GLfloat)
isDraggingSlot resources bounds scrollAmount slots index =
(slotDragged, dragOffset)
where
isDraggedFreely = dragFreely $ slots !! index
slotDragged = isMouseDrag resources
&& (isDraggedFreely || boxContains slotBounds dragStartPosition)
slotBounds = getSlotBounds bounds scrollAmount slots index
dragStartPosition = mouseDragStartPosition resources
dragOffset
| not (isMouseDrag resources) = 0
| isDraggedFreely = dragFreelyOffset
| otherwise = boxTop slotBounds - snd dragStartPosition
getSlotBounds :: Box -> GLfloat -> [Slot] -> Int -> Box
getSlotBounds (Box (left, top) (right, _)) scrollAmount slots index =
slotBounds
where
slotsAbove = take index slots
heightAbove = sum $ map (fst . current . heightAnimation) slotsAbove
slot = slots !! index
slotTop = top - heightAbove + scrollAmount
slotBottom = slotTop - slotHeight
slotBounds = Box (left, slotTop) (right, slotBottom)
reorderSlotsBeingDragged :: Resources -> Box -> SideBarState -> SideBarState
reorderSlotsBeingDragged resources bounds
state@SideBarState
{ scrollAmount = scrollAmount
, slots = slots
}
| length slots == 1 = state
| null indexedDragSlots = state
| isMouseDrag resources = state { slots = reorderedSlots }
| otherwise = state
where
indexedSlots = zip [0..] slots
indexedDragSlots = filter (isBeingDragged . snd) indexedSlots
(dragIndex, dragSlot) = head indexedDragSlots
dragPoint = boxCenter $ getDraggedBounds resources bounds scrollAmount
dragSlot
reorderedSlots = swapSlots resources bounds scrollAmount slots
dragPoint dragIndex
swapSlots :: Resources -> Box -> GLfloat -> [Slot] -> Point -> Int -> [Slot]
swapSlots resources bounds scrollAmount slots dragPoint dragIndex = swappedSlots
where
allSlotBounds = map (getSlotBounds bounds scrollAmount slots)
[0 .. length slots - 1]
indexedSlotBounds = zip [0..] allSlotBounds
containingSlots = filter (\(_, slotBounds) ->
boxContains slotBounds dragPoint) indexedSlotBounds
(_, dragY) = dragPoint
swapIndex = case containingSlots of
((firstIndex, _):_) -> firstIndex
_ -> if dragY > boxTop bounds
then 0
else length slots - 1
swapSlot = slots !! swapIndex
dragSlot = slots !! dragIndex
swappedSlots =
map (\(index, slot) ->
if index == swapIndex
then dragSlot
else if index == dragIndex
then swapSlot
else slot) (zip [0..] slots)
getDraggedBounds :: Resources -> Box -> GLfloat -> Slot -> Box
getDraggedBounds resources bounds@(Box (left, _) (right, _)) scrollAmount slot =
dragBounds
where
(mouseX, mouseY) = mousePosition resources
(_, dragStartY) = mouseDragStartPosition resources
(dragLeft, dragRight) =
if dragFreely slot
then
let halfWidth = boxWidth bounds / 2
in (mouseX - halfWidth, mouseX + halfWidth)
else (left, right)
dragTop = mouseY + dragOffset slot
dragBottom = dragTop - slotHeight
dragBounds = Box (dragLeft, dragTop) (dragRight, dragBottom)
drawSlots :: Resources -> Box -> Bool -> SideBarState -> IO SideBarOutput
drawSlots resources bounds refreshRequested
state@SideBarState
{ scrollAmount = scrollAmount
, slots = slots
, maybeFreeDragSlot = maybeFreeDragSlot
} = do
let drawOne = drawOneSlot resources bounds scrollAmount refreshRequested
outputs <- mapM (drawOne slots) [0 .. length slots - 1]
case maybeFreeDragSlot of
Just freeDragSlot -> do
freeDragOutput <- drawOne [freeDragSlot] 0
convertDrawingOutputs resources state outputs [freeDragOutput]
_ ->
convertDrawingOutputs resources state outputs []
drawOneSlot :: Resources -> Box -> GLfloat -> Bool -> [Slot] -> Int
-> IO (F.FrameOutput, Dirty)
drawOneSlot resources
bounds@(Box (left, top) (right, bottom))
scrollAmount refreshRequested slots index =
preservingMatrix $ do
-- Translate to the bottom left from the center
translate $ vector3 (-(boxWidth bounds / 2)) (-(boxHeight bounds / 2)) 0
-- Translate back up to the center of the slot
translate $ vector3 (boxRight slotBounds - boxWidth slotBounds / 2)
(boxTop slotBounds - slotHeight / 2) 0
scale3 scale scale 1
output <- F.drawChartFrame resources input
return (output, alphaDirty || scaleDirty || heightDirty)
where
slot = slots !! index
(height, heightDirty) = current $ heightAnimation slot
(alpha, alphaDirty) = current $ alphaAnimation slot
(scale, scaleDirty) = current $ scaleAnimation slot
slotBounds =
if isBeingDragged slot
then getDraggedBounds resources bounds scrollAmount slot
else getSlotBounds bounds scrollAmount slots index
maybeSymbolRequest =
if refreshRequested
then Just $ symbol slot
else Nothing
input = F.FrameInput
{ F.bounds = slotBounds
, F.alpha = alpha
, F.maybeSymbolRequest = maybeSymbolRequest
, F.inputState = frameState slot
}
convertDrawingOutputs :: Resources -> SideBarState -> [(F.FrameOutput, Dirty)]
-> [(F.FrameOutput, Dirty)] -> IO SideBarOutput
convertDrawingOutputs resources state outputs freeDragOutputs = do
mapM_ (F.cleanFrameState resources . frameState)
(cleanSlots ++ cleanFreeDragSlots)
return nextOutput
where
(outputStates, dirtyFlags) = unzip outputs
(updatedSlots, animationsDirty) = unzip $ zipWith
(updateSlot resources)
(slots state)
outputStates
cleanSlots = filter
(\slot -> shouldRemoveSlot slot && not (dragFreely slot))
updatedSlots
nextSlots = filter (not . shouldRemoveSlot) updatedSlots
(freeDragOutputStates, freeDragDirtyFlags) = unzip freeDragOutputs
(updatedFreeDragSlots, freeDragAnimationsDirty) = unzip $ zipWith
(updateSlot resources)
(maybeToList (maybeFreeDragSlot state))
freeDragOutputStates
cleanFreeDragSlots = filter
shouldRemoveSlot
updatedFreeDragSlots
nextMaybeFreeDragSlot = listToMaybe $
filter (not . shouldRemoveSlot) updatedFreeDragSlots
nextState = state
{ slots = nextSlots
, maybeFreeDragSlot = nextMaybeFreeDragSlot
}
isSideBarDirty = length (newSlots state) > 0
|| any F.isDirty outputStates
|| any F.isDirty freeDragOutputStates
|| any id dirtyFlags
|| any id freeDragDirtyFlags
|| any id animationsDirty
|| any id freeDragAnimationsDirty
nextSymbolRequest = (listToMaybe . mapMaybe F.otherClickedSymbol) outputStates
nextSymbols = map symbol nextSlots
nextOutput = SideBarOutput
{ isDirty = isSideBarDirty
, symbolRequest = nextSymbolRequest
, symbols = nextSymbols
, outputState = nextState
}
shouldRemoveSlot :: Slot -> Bool
shouldRemoveSlot slot@Slot
{ remove = remove
, heightAnimation = heightAnimation
} =
remove && (fst . current) heightAnimation == 0
updateSlot :: Resources -> Slot -> F.FrameOutput -> (Slot, Dirty)
updateSlot resources
slot@Slot
{ remove = alreadyRemoved
, dragFreely = dragFreely
, heightAnimation = heightAnimation
, alphaAnimation = alphaAnimation
, scaleAnimation = scaleAnimation
}
F.FrameOutput
{ F.outputState = nextState
, F.buttonClickedSymbol = buttonClickedSymbol
} = (updatedSlot, animationsDirty)
where
removeNow = isJust buttonClickedSymbol
|| (dragFreely && hasMouseDragFinished resources)
(nextHeightAnimation, nextAlphaAnimation, nextScaleAnimation) =
if removeNow
then (outgoingHeightAnimation, outgoingAlphaAnimation,
outgoingScaleAnimation)
else (next heightAnimation, next alphaAnimation,
next scaleAnimation)
updatedSlot = slot
{ remove = alreadyRemoved || removeNow
, heightAnimation = nextHeightAnimation
, alphaAnimation = nextAlphaAnimation
, scaleAnimation = nextScaleAnimation
, frameState = nextState
}
isDirty :: Animation (GLfloat, Dirty) -> Bool
isDirty = snd . current
animationsDirty = any isDirty [nextHeightAnimation, nextAlphaAnimation,
nextScaleAnimation]
addDraggingScrollAmount :: Resources -> Box -> SideBarState -> SideBarState
addDraggingScrollAmount resources bounds
state@SideBarState
{ scrollAmount = scrollAmount
, slots = slots
}
| dragging = state { scrollAmount = dragScrollAmount }
| otherwise = state
where
dragHeight = 20::GLfloat
dragTopBox = Box (boxLeft bounds, boxTop bounds)
(boxRight bounds, boxTop bounds - dragHeight)
dragBottomBox = Box (boxLeft bounds, boxBottom bounds + dragHeight)
(boxRight bounds, boxBottom bounds)
draggingAtTop = isMouseDrag resources
&& boxContains dragTopBox (mousePosition resources)
draggingAtBottom = isMouseDrag resources
&& boxContains dragBottomBox (mousePosition resources)
dragging = draggingAtTop || draggingAtBottom
dragScrollAmount
| draggingAtTop = getScrollDownAmount scrollAmount dragScrollIncrement
| draggingAtBottom = getScrollUpAmount bounds slots scrollAmount
dragScrollIncrement
| otherwise = scrollAmount
| madjestic/b1 | src/B1/Program/Chart/SideBar.hs | bsd-3-clause | 22,348 | 0 | 21 | 5,184 | 5,735 | 3,089 | 2,646 | 517 | 5 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE CPP #-}
module Network.Wai.Handler.Warp.Response (
sendResponse
, sanitizeHeaderValue -- for testing
, fileRange -- for testing
, warpVersion
, addDate
, addServer
, hasBody
) where
#ifndef MIN_VERSION_base
#define MIN_VERSION_base(x,y,z) 1
#endif
#ifndef MIN_VERSION_http_types
#define MIN_VERSION_http_types(x,y,z) 1
#endif
import Blaze.ByteString.Builder.HTTP (chunkedTransferEncoding, chunkedTransferTerminator)
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative
#endif
import Control.Exception
import Control.Monad (unless, when)
import Data.Array ((!))
import Data.ByteString (ByteString)
import qualified Data.ByteString as S
import qualified Data.ByteString.Char8 as S8
import Data.ByteString.Builder (byteString, Builder)
import Data.ByteString.Builder.Extra (flush)
import qualified Data.CaseInsensitive as CI
import Data.Function (on)
import Data.List (deleteBy)
import Data.Maybe
#if MIN_VERSION_base(4,5,0)
# if __GLASGOW_HASKELL__ < 709
import Data.Monoid (mempty)
# endif
import Data.Monoid ((<>))
#else
import Data.Monoid (mappend, mempty)
#endif
import Data.Streaming.Blaze (newBlazeRecv, reuseBufferStrategy)
import Data.Version (showVersion)
import Data.Word8 (_cr, _lf)
import qualified Network.HTTP.Types as H
#if MIN_VERSION_http_types(0,9,0)
import qualified Network.HTTP.Types.Header as H
#endif
import Network.Wai
import Network.Wai.Handler.Warp.Buffer (toBuilderBuffer)
import qualified Network.Wai.Handler.Warp.Date as D
import qualified Network.Wai.Handler.Warp.FdCache as F
import Network.Wai.Handler.Warp.Header
import Network.Wai.Handler.Warp.IO (toBufIOWith)
import Network.Wai.Handler.Warp.ResponseHeader
import qualified Network.Wai.Handler.Warp.Timeout as T
import Network.Wai.Handler.Warp.Types
import Network.Wai.Internal
import qualified Paths_warp
#if !MIN_VERSION_base(4,5,0)
(<>) :: Monoid m => m -> m -> m
(<>) = mappend
#endif
-- $setup
-- >>> :set -XOverloadedStrings
----------------------------------------------------------------
fileRange :: H.Status -> H.ResponseHeaders -> FilePath
-> Maybe FilePart -> Maybe HeaderValue
-> IO (Either IOException
(H.Status, H.ResponseHeaders, Integer, Integer))
fileRange s0 hs0 path Nothing mRange =
fmap (fileRangeSized s0 hs0 Nothing mRange) <$> tryGetFileSize path
fileRange s0 hs0 _ mPart@(Just part) mRange =
return . Right $ fileRangeSized s0 hs0 mPart mRange size
where
size = filePartFileSize part
fileRangeSized :: H.Status -> H.ResponseHeaders
-> Maybe FilePart -> Maybe HeaderValue -> Integer
-> (H.Status, H.ResponseHeaders, Integer, Integer)
fileRangeSized s0 hs0 mPart mRange fileSize = (s, hs, beg, len)
where
part = fromMaybe (chooseFilePart fileSize mRange) mPart
beg = filePartOffset part
len = filePartByteCount part
(s, hs) = adjustForFilePart s0 hs0 $ FilePart beg len fileSize
----------------------------------------------------------------
-- | Sending a HTTP response to 'Connection' according to 'Response'.
--
-- Applications/middlewares MUST specify a proper 'H.ResponseHeaders'.
-- so that inconsistency does not happen.
-- No header is deleted by this function.
--
-- Especially, Applications/middlewares MUST take care of
-- Content-Length, Content-Range, and Transfer-Encoding
-- because they are inserted, when necessary,
-- regardless they already exist.
-- This function does not insert Content-Encoding. It's middleware's
-- responsibility.
--
-- The Date and Server header is added if not exist
-- in HTTP response header.
--
-- There are three basic APIs to create 'Response':
--
-- ['responseFile' :: 'H.Status' -> 'H.ResponseHeaders' -> 'FilePath' -> 'Maybe' 'FilePart' -> 'Response']
-- HTTP response body is sent by sendfile() for GET method.
-- HTTP response body is not sent by HEAD method.
-- Applications are categorized into simple and sophisticated.
-- Simple applications should specify 'Nothing' to
-- 'Maybe' 'FilePart'. The size of the specified file is obtained
-- by disk access. Then Range is handled.
-- Sophisticated applications should specify 'Just' to
-- 'Maybe' 'FilePart'. They should treat Range (and If-Range) by
-- themselves. In both cases,
-- Content-Length and Content-Range (if necessary) are automatically
-- added into the HTTP response header.
-- If Content-Length and Content-Range exist in the HTTP response header,
-- they would cause inconsistency.
-- Status is also changed to 206 (Partial Content) if necessary.
--
-- ['responseBuilder' :: 'H.Status' -> 'H.ResponseHeaders' -> 'Builder' -> 'Response']
-- HTTP response body is created from 'Builder'.
-- Transfer-Encoding: chunked is used in HTTP/1.1.
--
-- ['responseStream' :: 'H.Status' -> 'H.ResponseHeaders' -> 'StreamingBody' -> 'Response']
-- HTTP response body is created from 'Builder'.
-- Transfer-Encoding: chunked is used in HTTP/1.1.
--
-- ['responseRaw' :: ('IO' 'ByteString' -> ('ByteString' -> 'IO' ()) -> 'IO' ()) -> 'Response' -> 'Response']
-- No header is added and no Transfer-Encoding: is applied.
sendResponse :: ByteString -- ^ default server value
-> Connection
-> InternalInfo
-> Request -- ^ HTTP request.
-> IndexedHeader -- ^ Indexed header of HTTP request.
-> IO ByteString -- ^ source from client, for raw response
-> Response -- ^ HTTP response including status code and response header.
-> IO Bool -- ^ Returing True if the connection is persistent.
sendResponse defServer conn ii req reqidxhdr src response = do
hs <- addServerAndDate hs0
if hasBody s then do
-- HEAD comes here even if it does not have body.
sendRsp conn mfdc ver s hs rsp
T.tickle th
return ret
else do
sendResponseNoBody conn ver s hs
T.tickle th
return isPersist
where
ver = httpVersion req
s = responseStatus response
hs0 = sanitizeHeaders $ responseHeaders response
rspidxhdr = indexResponseHeader hs0
th = threadHandle ii
dc = dateCacher ii
mfdc = fdCacher ii
addServerAndDate = addDate dc rspidxhdr . addServer defServer rspidxhdr
mRange = reqidxhdr ! idxRange
(isPersist,isChunked0) = infoFromRequest req reqidxhdr
isChunked = not isHead && isChunked0
(isKeepAlive, needsChunked) = infoFromResponse rspidxhdr (isPersist,isChunked)
isHead = requestMethod req == H.methodHead
rsp = case response of
ResponseFile _ _ path mPart -> RspFile path mPart mRange isHead (T.tickle th)
ResponseBuilder _ _ b -> RspBuilder b needsChunked
ResponseStream _ _ fb -> RspStream fb needsChunked th
ResponseRaw raw _ -> RspRaw raw src (T.tickle th)
ret = case response of
ResponseFile {} -> isPersist
ResponseBuilder {} -> isKeepAlive
ResponseStream {} -> isKeepAlive
ResponseRaw {} -> False
----------------------------------------------------------------
sanitizeHeaders :: H.ResponseHeaders -> H.ResponseHeaders
sanitizeHeaders = map (sanitize <$>)
where
sanitize v
| containsNewlines v = sanitizeHeaderValue v -- slow path
| otherwise = v -- fast path
{-# INLINE containsNewlines #-}
containsNewlines :: ByteString -> Bool
containsNewlines = S.any (\w -> w == _cr || w == _lf)
{-# INLINE sanitizeHeaderValue #-}
sanitizeHeaderValue :: ByteString -> ByteString
sanitizeHeaderValue v = case S8.lines $ S.filter (/= _cr) v of
[] -> ""
x : xs -> S8.intercalate "\r\n" (x : mapMaybe addSpaceIfMissing xs)
where
addSpaceIfMissing line = case S8.uncons line of
Nothing -> Nothing
Just (first, _)
| first == ' ' || first == '\t' -> Just line
| otherwise -> Just $ " " <> line
----------------------------------------------------------------
data Rsp = RspFile FilePath (Maybe FilePart) (Maybe HeaderValue) Bool (IO ())
| RspBuilder Builder Bool
| RspStream StreamingBody Bool T.Handle
| RspRaw (IO ByteString -> (ByteString -> IO ()) -> IO ()) (IO ByteString) (IO ())
----------------------------------------------------------------
sendRsp :: Connection
-> Maybe F.MutableFdCache
-> H.HttpVersion
-> H.Status
-> H.ResponseHeaders
-> Rsp
-> IO ()
sendRsp conn mfdc ver s0 hs0 (RspFile path mPart mRange isHead hook) = do
ex <- fileRange s0 hs0 path mPart mRange
case ex of
Left _ex ->
#ifdef WARP_DEBUG
print _ex >>
#endif
sendRsp conn mfdc ver s2 hs2 (RspBuilder body True)
Right (s, hs, beg, len)
| len >= 0 ->
if isHead then
sendRsp conn mfdc ver s hs (RspBuilder mempty False)
else do
lheader <- composeHeader ver s hs
#ifdef WINDOWS
let fid = FileId path Nothing
hook' = hook
#else
(mfd, hook') <- case mfdc of
-- settingsFdCacheDuration is 0
Nothing -> return (Nothing, hook)
Just fdc -> do
(fd, fresher) <- F.getFd fdc path
return (Just fd, hook >> fresher)
let fid = FileId path mfd
#endif
connSendFile conn fid beg len hook' [lheader]
| otherwise ->
sendRsp conn mfdc ver H.status416
(filter (\(k, _) -> k /= "content-length") hs)
(RspBuilder mempty True)
where
s2 = H.status404
hs2 = replaceHeader H.hContentType "text/plain; charset=utf-8" hs0
body = byteString "File not found"
----------------------------------------------------------------
sendRsp conn _ ver s hs (RspBuilder body needsChunked) = do
header <- composeHeaderBuilder ver s hs needsChunked
let hdrBdy
| needsChunked = header <> chunkedTransferEncoding body
<> chunkedTransferTerminator
| otherwise = header <> body
buffer = connWriteBuffer conn
size = connBufferSize conn
toBufIOWith buffer size (connSendAll conn) hdrBdy
----------------------------------------------------------------
sendRsp conn _ ver s hs (RspStream streamingBody needsChunked th) = do
header <- composeHeaderBuilder ver s hs needsChunked
(recv, finish) <- newBlazeRecv $ reuseBufferStrategy
$ toBuilderBuffer (connWriteBuffer conn) (connBufferSize conn)
let send builder = do
popper <- recv builder
let loop = do
bs <- popper
unless (S.null bs) $ do
sendFragment conn th bs
loop
loop
sendChunk
| needsChunked = send . chunkedTransferEncoding
| otherwise = send
send header
streamingBody sendChunk (sendChunk flush)
when needsChunked $ send chunkedTransferTerminator
mbs <- finish
maybe (return ()) (sendFragment conn th) mbs
----------------------------------------------------------------
sendRsp conn _ _ _ _ (RspRaw withApp src tickle) =
withApp recv send
where
recv = do
bs <- src
unless (S.null bs) tickle
return bs
send bs = connSendAll conn bs >> tickle
----------------------------------------------------------------
sendResponseNoBody :: Connection
-> H.HttpVersion
-> H.Status
-> H.ResponseHeaders
-> IO ()
sendResponseNoBody conn ver s hs = composeHeader ver s hs >>= connSendAll conn
----------------------------------------------------------------
----------------------------------------------------------------
-- | Use 'connSendAll' to send this data while respecting timeout rules.
sendFragment :: Connection -> T.Handle -> ByteString -> IO ()
sendFragment Connection { connSendAll = send } th bs = do
T.resume th
send bs
T.pause th
-- We pause timeouts before passing control back to user code. This ensures
-- that a timeout will only ever be executed when Warp is in control. We
-- also make sure to resume the timeout after the completion of user code
-- so that we can kill idle connections.
----------------------------------------------------------------
infoFromRequest :: Request -> IndexedHeader -> (Bool -- isPersist
,Bool) -- isChunked
infoFromRequest req reqidxhdr = (checkPersist req reqidxhdr, checkChunk req)
checkPersist :: Request -> IndexedHeader -> Bool
checkPersist req reqidxhdr
| ver == H.http11 = checkPersist11 conn
| otherwise = checkPersist10 conn
where
ver = httpVersion req
conn = reqidxhdr ! idxConnection
checkPersist11 (Just x)
| CI.foldCase x == "close" = False
checkPersist11 _ = True
checkPersist10 (Just x)
| CI.foldCase x == "keep-alive" = True
checkPersist10 _ = False
checkChunk :: Request -> Bool
checkChunk req = httpVersion req == H.http11
----------------------------------------------------------------
-- Used for ResponseBuilder and ResponseSource.
-- Don't use this for ResponseFile since this logic does not fit
-- for ResponseFile. For instance, isKeepAlive should be True in some cases
-- even if the response header does not have Content-Length.
--
-- Content-Length is specified by a reverse proxy.
-- Note that CGI does not specify Content-Length.
infoFromResponse :: IndexedHeader -> (Bool,Bool) -> (Bool,Bool)
infoFromResponse rspidxhdr (isPersist,isChunked) = (isKeepAlive, needsChunked)
where
needsChunked = isChunked && not hasLength
isKeepAlive = isPersist && (isChunked || hasLength)
hasLength = isJust $ rspidxhdr ! idxContentLength
----------------------------------------------------------------
hasBody :: H.Status -> Bool
hasBody s = sc /= 204
&& sc /= 304
&& sc >= 200
where
sc = H.statusCode s
----------------------------------------------------------------
addTransferEncoding :: H.ResponseHeaders -> H.ResponseHeaders
#if MIN_VERSION_http_types(0,9,0)
addTransferEncoding hdrs = (H.hTransferEncoding, "chunked") : hdrs
#else
addTransferEncoding hdrs = ("transfer-encoding", "chunked") : hdrs
#endif
addDate :: D.DateCache -> IndexedHeader -> H.ResponseHeaders -> IO H.ResponseHeaders
addDate dc rspidxhdr hdrs = case rspidxhdr ! idxDate of
Nothing -> do
gmtdate <- D.getDate dc
return $ (H.hDate, gmtdate) : hdrs
Just _ -> return hdrs
----------------------------------------------------------------
-- | The version of Warp.
warpVersion :: String
warpVersion = showVersion Paths_warp.version
addServer :: HeaderValue -> IndexedHeader -> H.ResponseHeaders -> H.ResponseHeaders
addServer serverName rspidxhdr hdrs = case rspidxhdr ! idxServer of
Nothing -> (H.hServer, serverName) : hdrs
_ -> hdrs
----------------------------------------------------------------
-- |
--
-- >>> replaceHeader "Content-Type" "new" [("content-type","old")]
-- [("Content-Type","new")]
replaceHeader :: H.HeaderName -> HeaderValue -> H.ResponseHeaders -> H.ResponseHeaders
replaceHeader k v hdrs = (k,v) : deleteBy ((==) `on` fst) (k,v) hdrs
----------------------------------------------------------------
composeHeaderBuilder :: H.HttpVersion -> H.Status -> H.ResponseHeaders -> Bool -> IO Builder
composeHeaderBuilder ver s hs True =
byteString <$> composeHeader ver s (addTransferEncoding hs)
composeHeaderBuilder ver s hs False =
byteString <$> composeHeader ver s hs
| dylex/wai | warp/Network/Wai/Handler/Warp/Response.hs | mit | 15,990 | 0 | 21 | 3,757 | 3,233 | 1,723 | 1,510 | 252 | 8 |
{- |
Module : $Header$
Description : document data type Doc for (pretty) printing in various formats
Copyright : (c) Christian Maeder and Uni Bremen 2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : [email protected]
Stability : provisional
Portability : portable
This module contains a document data type 'Doc' for displaying
(heterogenous) CASL specifications at least as plain text and latex
(and maybe html as well)
Inspired by John Hughes's and Simon Peyton Jones's Pretty Printer
Combinators in Text.PrettyPrint.HughesPJ, Thomas Hallgren's
PrettyDoc within programatica,
Daan Leijen's PPrint: A prettier printer 2001, and Olaf Chiti's Pretty
printing with lazy Dequeues 2003
The main combinators are those of HughesPJ except
nest, hang and $$. Instead of $$ '$+$' must be used that always forces a
line break. Indentation must be constructed using '<>' or '<+>', i.e.
'text' \"spec\" '<+>' MultilineBlock.
Also char, ptext, int, integer, float, double and rational do not
exist. These can all be simulated using 'text' (and 'show'). There's
an instance for 'Int' in "Common.DocUtils".
Furthermore, documents can no longer be tested with isEmpty. 'empty'
documents are silently ignored (as by HughesPJ) and
often it is more natural (or even necessary anyway) to test the
original data structure for emptiness.
Putting a document into braces should be done using 'specBraces' (but
a function braces is also exported), ensuring that opening and closing
braces are in the same column if the whole document does not fit on a
single line.
Rendering of documents is achieved by translations to the old
"Common.Lib.Pretty". For plain text simply 'show' can be
used. Any document can be translated to LaTeX via 'toLatex' and then
processed further by "Common.PrintLaTeX". If you like the output is a
different question, but the result should be legal LaTeX in
conjunction with the hetcasl.sty file.
For nicer looking LaTeX the predefined symbol constants should be
used! There is a difference between 'bullet' and 'dot' that is not
visible in plain text.
There are also three kinds of keywords, a plain 'keyword', a
'topSigKey' having the width of \"preds\", and a 'topKey' having the
width of \"view\". In plain text only inserted spaces are visible.
Strings in small caps are created by 'structId' and
'indexed'. The latter puts the string also into a LaTeX index.
In order to avoid considering display annotations and precedences,
documents can be constructed using 'annoDoc', 'idDoc', and 'idApplDoc'.
Currently only a few annotations (i.e. labels and %implied) are
printed 'flushRight'. This function is problematic as it does not
prevent something to be appended using '<>' or '<+>'. Furthermore
flushed parts are currently only visible in plain text, if they don't
fit on the same line (as nest is used for indenting).
Further functions are documented in "Common.DocUtils".
Examples can be produced using: hets -v2 -o pp.het,pp.tex
-}
module Common.Doc
( -- * the document type
Doc
, Label (..)
, StripComment (..)
, renderHtml
, renderExtHtml
, renderText
, renderExtText
-- * primitive documents
, empty
, space
, semi
, comma
, colon
, quMarkD
, equals
, lparen
, rparen
, lbrack
, rbrack
, lbrace
, rbrace
-- * converting strings into documents
, plainText
, text
, codeToken
, commentText
, keyword
, topSigKey
, topKey
, indexed
, structId
-- * wrapping documents in delimiters
, parens
, brackets
, braces
, specBraces
, quotes
, doubleQuotes
-- * combining documents
, (<>)
, (<+>)
, hcat
, hsep
, ($+$)
, ($++$)
, vcat
, vsep
, sep
, cat
, fsep
, fcat
, punctuate
, sepByCommas
, sepBySemis
-- * symbols possibly rendered differently for Text or LaTeX
, dot
, bullet
, defn
, less
, greater
, lambda
, mapsto
, funArrow
, pfun
, cfun
, pcfun
, exequal
, forallDoc
, exists
, unique
, cross
, bar
, notDoc
, inDoc
, andDoc
, orDoc
, implies
, equiv
, prefix_proc
, sequential
, interleave
, synchronous
, genpar_open
, genpar_close
, alpar_open
, alpar_sep
, alpar_close
, external_choice
, internal_choice
, hiding_proc
, ren_proc_open
, ren_proc_close
, dagger
, vdash
, dashv
, breve
-- * for Hybrid casl
, prettyAt
, prettyHere
, prettyBind
, prettyUniv
, prettyExist
-- * docifying annotations and ids
, annoDoc
, idDoc
, idLabelDoc
, predIdApplDoc
, idApplDoc
-- * transforming to existing formats
, toLatex
, toLatexAux
-- * manipulating documents
, flushRight
, changeGlobalAnnos
, rmTopKey
, showRaw
) where
import Common.AS_Annotation
import Common.ConvertLiteral
import Common.GlobalAnnotations
import Common.Id
import Common.IRI
import Common.Keywords
import Common.LaTeX_funs
import Common.Prec
import qualified Common.Lib.Pretty as Pretty
import Data.Char
import Data.List
import Data.Maybe
import qualified Data.Map as Map
import qualified Data.Set as Set
infixl 6 <>
infixl 6 <+>
infixl 5 $+$
infixl 5 $++$
-- * the data type
data LabelKind = IdDecl | IdAppl deriving (Show, Eq)
data TextKind =
IdKind | IdSymb | Symbol | Comment | Keyword | TopKey Int
| Indexed | StructId | Native | HetsLabel
| IdLabel LabelKind TextKind Id deriving Show
data Format = Small | FlushRight deriving Show
data ComposeKind
= Vert -- ($+$) (no support for $$!)
| Horiz -- (<>)
| HorizOrVert -- either Horiz or Vert
| Fill
deriving (Eq, Show)
-- | an abstract data type
data Doc
= Empty -- creates an empty line if composed vertically
| AnnoDoc Annotation -- we know how to print annotations
| IdDoc LabelKind Id -- for plain ids outside applications
| IdApplDoc Bool Id [Doc] -- for mixfix applications and literal terms
| Text TextKind String -- non-empty and no white spaces inside
| Cat ComposeKind [Doc]
| Attr Format Doc -- for annotations
| ChangeGlobalAnnos (GlobalAnnos -> GlobalAnnos) Doc
showRawList :: [Doc] -> String
showRawList l = "[" ++ intercalate ", " (map showRaw l) ++ "]"
showRaw :: Doc -> String
showRaw gd =
case gd of
Empty -> "Empty"
AnnoDoc an -> "AnnoDoc(" ++ show an ++ ")"
IdDoc lk n -> "IdDoc" ++ show (lk, n)
IdApplDoc b n l ->
"IdApplDoc(" ++ show b ++ ", " ++ show n ++ ", " ++ showRawList l ++ ")"
Text tk s -> "Text(" ++ show tk ++ ", " ++ s ++ ")"
Cat ck l ->
"Cat(" ++ show ck ++ ", " ++ showRawList l ++ ")"
Attr fm d -> "Attr(" ++ show fm ++ ", " ++ showRaw d ++ ")"
ChangeGlobalAnnos _ d -> "ChangeGlobalAnnos(" ++ showRaw d ++ ")"
textStyle :: Pretty.Style
textStyle = Pretty.style
{ Pretty.ribbonsPerLine = 1.19
, Pretty.lineLength = 80 }
renderText :: GlobalAnnos -> Doc -> String
renderText = renderExtText $ StripComment False
renderExtText :: StripComment -> GlobalAnnos -> Doc -> String
renderExtText stripCs ga =
removeTrailingSpaces 0 . Pretty.renderStyle textStyle . toText stripCs ga
instance Show Doc where
show = renderText emptyGlobalAnnos
removeTrailingSpaces :: Int -> String -> String
removeTrailingSpaces n s = case s of
"" -> ""
c : r -> case c of
' ' -> removeTrailingSpaces (n + 1) r
_ -> (if c == '\n' then "" else replicate n ' ')
++ c : removeTrailingSpaces 0 r
renderHtml :: GlobalAnnos -> Doc -> String
renderHtml = renderExtHtml (StripComment False) $ MkLabel False
renderExtHtml :: StripComment -> Label -> GlobalAnnos -> Doc -> String
renderExtHtml stripCs lbl ga = replSpacesForHtml 0
. Pretty.renderStyle textStyle . toHtml stripCs lbl ga
replSpacesForHtml :: Int -> String -> String
replSpacesForHtml n s = case s of
"" -> ""
c : r -> case c of
'\n' -> c : "<br />" ++ replSpacesForHtml 0 r
' ' -> replSpacesForHtml (n + 1) r
_ -> (case n of
0 -> (c :)
1 -> ([' ', c] ++)
_ -> ((' ' : concat (replicate n " ") ++ [c]) ++))
$ replSpacesForHtml 0 r
isEmpty :: Doc -> Bool
isEmpty d = case d of
Empty -> True
Cat _ [] -> True
_ -> False
-- * the visible interface
empty :: Doc -- ^ An empty document
empty = Empty
plainText :: String -> Doc
plainText = Text IdKind
text :: String -> Doc
text s = case lines s of
[] -> Text IdKind ""
[x] -> Text IdKind x
l -> vcat $ map (Text IdKind) l
semi :: Doc -- ^ A ';' character
semi = text ";"
comma :: Doc -- ^ A ',' character
comma = text ","
colon :: Doc -- ^ A ':' character
colon = symbol colonS
-- the only legal white space within Text
space :: Doc -- ^ A horizontal space (omitted at end of line)
space = text " "
equals :: Doc -- ^ A '=' character
equals = symbol equalS
-- use symbol for signs that need to be put in mathmode for latex
symbol :: String -> Doc
symbol = Text Symbol
-- for text within comments
commentText :: String -> Doc
commentText = Text Comment
-- put this string into math mode for latex and don't escape it
native :: String -> Doc
native = Text Native
lparen, rparen, lbrack, rbrack, lbrace, rbrace, quote, doubleQuote :: Doc
lparen = text "("
rparen = text ")"
lbrack = text "["
rbrack = text "]"
lbrace = symbol "{" -- to allow for latex translations
rbrace = symbol "}"
quote = symbol "\'"
doubleQuote = symbol "\""
parens :: Doc -> Doc -- ^ Wrap document in @(...)@
parens d = hcat [lparen, d, rparen]
brackets :: Doc -> Doc -- ^ Wrap document in @[...]@
brackets d = hcat [lbrack, d, rbrack]
braces :: Doc -> Doc -- ^ Wrap document in @{...}@
braces d = hcat [lbrace, d, rbrace]
specBraces :: Doc -> Doc -- ^ Wrap document in @{...}@
specBraces d = cat [addLBrace d, rbrace]
-- | move the opening brace inwards
addLBrace :: Doc -> Doc
addLBrace d = case d of
Cat k (e : r) -> Cat k $ addLBrace e : r
ChangeGlobalAnnos f e -> ChangeGlobalAnnos f $ addLBrace e
_ -> lbrace <> d
quotes :: Doc -> Doc -- ^ Wrap document in @\'...\'@
quotes d = hcat [quote, d, quote]
doubleQuotes :: Doc -> Doc -- ^ Wrap document in @\"...\"@
doubleQuotes d = hcat [doubleQuote, d, doubleQuote]
(<>) :: Doc -> Doc -> Doc -- ^Beside
a <> b = hcat [a, b]
rmEmpties :: [Doc] -> [Doc]
rmEmpties = filter (not . isEmpty)
hcat :: [Doc] -> Doc -- ^List version of '<>'
hcat = Cat Horiz . rmEmpties
(<+>) :: Doc -> Doc -> Doc -- ^Beside, separated by space
a <+> b = hsep [a, b]
punctuate :: Doc -> [Doc] -> [Doc]
punctuate d l = case l of
x : r@(_ : _) -> (x <> d) : punctuate d r
_ -> l
hsep :: [Doc] -> Doc -- ^List version of '<+>'
hsep = Cat Horiz . punctuate space . rmEmpties
($+$) :: Doc -> Doc -> Doc -- ^Above, without dovetailing.
a $+$ b = vcat [a, b]
-- | vertical composition with a specified number of blank lines
aboveWithNLs :: Int -> Doc -> Doc -> Doc
aboveWithNLs n d1 d2
| isEmpty d2 = d1
| isEmpty d1 = d2
| otherwise = d1 $+$ foldr ($+$) d2 (replicate n $ text "")
-- | vertical composition with one blank line
($++$) :: Doc -> Doc -> Doc
($++$) = aboveWithNLs 1
-- | list version of '($++$)'
vsep :: [Doc] -> Doc
vsep = foldr ($++$) empty
vcat :: [Doc] -> Doc -- ^List version of '$+$'
vcat = Cat Vert . rmEmpties
cat :: [Doc] -> Doc -- ^ Either hcat or vcat
cat = Cat HorizOrVert . rmEmpties
sep :: [Doc] -> Doc -- ^ Either hsep or vcat
sep = Cat HorizOrVert . punctuate space . rmEmpties
fcat :: [Doc] -> Doc -- ^ \"Paragraph fill\" version of cat
fcat = Cat Fill . rmEmpties
fsep :: [Doc] -> Doc -- ^ \"Paragraph fill\" version of sep
fsep = Cat Fill . punctuate space . rmEmpties
keyword, topSigKey, topKey, indexed, structId :: String -> Doc
keyword = Text Keyword
indexed = Text Indexed
structId = Text StructId
topKey = Text (TopKey 4)
topSigKey = Text (TopKey 5)
lambdaSymb, daggerS, vdashS, dashvS, breveS :: String
lambdaSymb = "\\"
daggerS = "!"
vdashS = "|-"
dashvS = "-|"
breveS = "~"
-- docs possibly rendered differently for Text or LaTeX
quMarkD, dot, bullet, defn, less, greater, lambda, mapsto, funArrow, pfun,
cfun, pcfun, exequal, forallDoc, exists, unique, cross, bar, notDoc,
inDoc, andDoc, orDoc, implies, equiv, prefix_proc, sequential,
interleave, synchronous, genpar_open, genpar_close, alpar_open,
alpar_sep, alpar_close, external_choice, internal_choice, hiding_proc,
ren_proc_open, ren_proc_close, dagger, vdash, dashv, breve, prettyAt,
prettyHere, prettyBind, prettyUniv, prettyExist :: Doc
quMarkD = text quMark
dot = text dotS
bullet = symbol dotS
defn = symbol defnS
less = symbol lessS
greater = symbol greaterS
lambda = symbol lambdaSymb
mapsto = symbol mapsTo
funArrow = symbol funS
pfun = symbol pFun
cfun = symbol contFun
pcfun = symbol pContFun
exequal = symbol exEqual
forallDoc = symbol forallS
exists = symbol existsS
unique = symbol existsUnique
cross = symbol prodS
bar = symbol barS
notDoc = symbol notS
inDoc = symbol inS
andDoc = symbol lAnd
orDoc = symbol lOr
implies = symbol implS
equiv = symbol equivS
prefix_proc = symbol prefix_procS
sequential = text sequentialS
interleave = symbol interleavingS
synchronous = symbol synchronousS
genpar_open = symbol genpar_openS
genpar_close = symbol genpar_closeS
alpar_open = symbol alpar_openS
-- note that alpar_sepS and synchronousS are equal
alpar_sep = symbol alpar_sepS
alpar_close = symbol alpar_closeS
external_choice = symbol external_choiceS
internal_choice = symbol internal_choiceS
hiding_proc = text hiding_procS -- otherwise it clashes with lambda
ren_proc_open = symbol ren_proc_openS
ren_proc_close = symbol ren_proc_closeS
dagger = symbol daggerS
vdash = symbol vdashS
dashv = symbol dashvS
breve = symbol breveS
-- * for hybrid casl
prettyAt = symbol asP
prettyHere = symbol "Here"
prettyBind = symbol "Bind"
prettyUniv = symbol "Univ"
prettyExist = symbol "Exist"
-- | we know how to print annotations
annoDoc :: Annotation -> Doc
annoDoc = AnnoDoc
-- | for plain ids outside of terms
idDoc :: Id -> Doc
idDoc = IdDoc IdAppl
-- | for newly declared ids
idLabelDoc :: Id -> Doc
idLabelDoc = IdDoc IdDecl
-- | for mixfix applications and literal terms (may print \"\" for empty)
idApplDoc :: Id -> [Doc] -> Doc
idApplDoc = IdApplDoc False
-- | for mixfix applications of predicate identifiers
predIdApplDoc :: Id -> [Doc] -> Doc
predIdApplDoc = IdApplDoc True
-- | put document as far to the right as fits (for annotations)
flushRight :: Doc -> Doc
flushRight = Attr FlushRight
small :: Doc -> Doc
small = Attr Small
-- * folding stuff
data DocRecord a = DocRecord
{ foldEmpty :: Doc -> a
, foldAnnoDoc :: Doc -> Annotation -> a
, foldIdDoc :: Doc -> LabelKind -> Id -> a
, foldIdApplDoc :: Doc -> Bool -> Id -> [a] -> a
, foldText :: Doc -> TextKind -> String -> a
, foldCat :: Doc -> ComposeKind -> [a] -> a
, foldAttr :: Doc -> Format -> a -> a
, foldChangeGlobalAnnos :: Doc -> (GlobalAnnos -> GlobalAnnos) -> a -> a
}
foldDoc :: DocRecord a -> Doc -> a
foldDoc r d = case d of
Empty -> foldEmpty r d
AnnoDoc a -> foldAnnoDoc r d a
IdDoc l i -> foldIdDoc r d l i
IdApplDoc b i l -> foldIdApplDoc r d b i $ map (foldDoc r) l
Text k s -> foldText r d k s
Cat k l -> foldCat r d k $ map (foldDoc r) l
Attr a e -> foldAttr r d a $ foldDoc r e
ChangeGlobalAnnos f e -> foldChangeGlobalAnnos r d f $ foldDoc r e
idRecord :: DocRecord Doc
idRecord = DocRecord
{ foldEmpty = const Empty
, foldAnnoDoc = const AnnoDoc
, foldIdDoc = const IdDoc
, foldIdApplDoc = const IdApplDoc
, foldText = const Text
, foldCat = const Cat
, foldAttr = const Attr
, foldChangeGlobalAnnos = const ChangeGlobalAnnos
}
anyRecord :: DocRecord a
anyRecord = DocRecord
{ foldEmpty = error "anyRecord.Empty"
, foldAnnoDoc = error "anyRecord.AnnoDoc"
, foldIdDoc = error "anyRecord.IdDoc"
, foldIdApplDoc = error "anyRecord.IdApplDoc"
, foldText = error "anyRecord.Text"
, foldCat = error "anyRecord.Cat"
, foldAttr = error "anyRecord.Attr"
, foldChangeGlobalAnnos = error "anyRecord.ChangeGlobalAnnos"
}
newtype Label = MkLabel Bool
newtype StripComment = StripComment Bool
-- * conversion to plain text
-- | simple conversion to a standard text document
toText :: StripComment -> GlobalAnnos -> Doc -> Pretty.Doc
toText stripCs ga = toTextAux . codeOut stripCs ga
(mkPrecIntMap $ prec_annos ga) Nothing Map.empty
toTextAux :: Doc -> Pretty.Doc
toTextAux = foldDoc anyRecord
{ foldEmpty = const Pretty.empty
, foldText = \ _ k s -> case k of
TopKey n -> Pretty.text $ s ++ replicate (n - length s) ' '
_ -> Pretty.text s
, foldCat = \ d c l -> case d of
Cat _ ds@(_ : _) -> if all hasSpace $ init ds then
(case c of
Vert -> Pretty.vcat
Horiz -> Pretty.hsep
HorizOrVert -> Pretty.sep
Fill -> Pretty.fsep) $ map (toTextAux . rmSpace) ds
else (case c of
Vert -> Pretty.vcat
Horiz -> Pretty.hcat
HorizOrVert -> Pretty.cat
Fill -> Pretty.fcat) l
_ -> Pretty.empty
, foldAttr = \ _ k d -> case k of
FlushRight -> let l = length $ show d in
if l < 66 then Pretty.nest (66 - l) d else d
_ -> d
, foldChangeGlobalAnnos = \ _ _ d -> d
}
-- * conversion to html
-- | conversion to html
toHtml :: StripComment -> Label -> GlobalAnnos -> Doc -> Pretty.Doc
toHtml stripCs lbl ga d = let
dm = Map.map (Map.! DF_HTML)
. Map.filter (Map.member DF_HTML) $ display_annos ga
dis = getDeclIds d
in foldDoc (toHtmlRecord lbl dis) $ codeOut stripCs ga
(mkPrecIntMap $ prec_annos ga) (Just DF_HTML) dm d
toHtmlRecord :: Label -> Set.Set Id -> DocRecord Pretty.Doc
toHtmlRecord lbl dis = anyRecord
{ foldEmpty = const Pretty.empty
, foldText = const $ textToHtml lbl dis
, foldCat = \ d c l -> case d of
Cat _ ds@(_ : _) -> if all hasSpace $ init ds then
(case c of
Vert -> Pretty.vcat
Horiz -> Pretty.hsep
HorizOrVert -> Pretty.sep
Fill -> Pretty.fsep)
$ map (foldDoc (toHtmlRecord lbl dis) . rmSpace) ds
else (case c of
Vert -> Pretty.vcat
Horiz -> Pretty.hcat
HorizOrVert -> Pretty.cat
Fill -> Pretty.fcat) l
_ -> Pretty.empty
, foldAttr = \ a k d -> case k of
FlushRight ->
let Attr _ o = a
l = length $ show $ toTextAux o
in if l < 66 then Pretty.nest (66 - l) d else d
_ -> d
, foldChangeGlobalAnnos = \ _ _ d -> d
}
textToHtml :: Label -> Set.Set Id -> TextKind -> String -> Pretty.Doc
textToHtml lbl@(MkLabel mkLbl) dis k s = let
e = escapeHtml s ""
h = Pretty.text e
zeroText = Pretty.sizedText 0
tagB t = '<' : t ++ ">"
tagE t = tagB $ '/' : t
tag t d = Pretty.hcat [zeroText (tagB t), d, zeroText (tagE t) ]
tagBold = tag "strong"
hi = tag "em" h
in case k of
Native -> Pretty.text s
Keyword -> tagBold h
TopKey n -> let l = n - length s in
tagBold $ h Pretty.<> Pretty.text (replicate l ' ')
Comment -> tag "small" h
Indexed -> hi
StructId -> hi
HetsLabel -> tag "small" hi
IdLabel appl tk i -> let
d = textToHtml lbl dis tk s
si = escapeHtml (showId i "") ""
in if mkLbl && Set.member i dis then Pretty.hcat
[zeroText $ "<a " ++ (if appl == IdAppl then "href=\"#" else "name=\"")
++ si ++ "\">", d, zeroText "</a>"]
else d
_ -> h
escChar :: Char -> ShowS
escChar c = case c of
'\'' -> showString "'"
'<' -> showString "<"
'>' -> showString ">"
'&' -> showString "&"
'"' -> showString """
_ -> showChar c
escapeHtml :: String -> ShowS
escapeHtml cs rs = foldr escChar rs cs
-- * conversion to latex
toLatex :: GlobalAnnos -> Doc -> Pretty.Doc
toLatex = toLatexAux (StripComment False) $ MkLabel False
toLatexAux :: StripComment -> Label -> GlobalAnnos -> Doc -> Pretty.Doc
toLatexAux stripCs lbl ga d = let
dm = Map.map (Map.! DF_LATEX) .
Map.filter (Map.member DF_LATEX) $ display_annos ga
dis = getDeclIds d
in foldDoc (toLatexRecord lbl dis False)
. makeSmallMath False False $ codeOut stripCs ga
(mkPrecIntMap $ prec_annos ga) (Just DF_LATEX) dm d
-- avoid too many tabs
toLatexRecord :: Label -> Set.Set Id -> Bool -> DocRecord Pretty.Doc
toLatexRecord lbl dis tab = anyRecord
{ foldEmpty = const Pretty.empty
, foldText = const $ textToLatex lbl dis False
, foldCat = \ o _ _ -> case o of
Cat c os@(d : r)
| any isNative os -> Pretty.hcat $
latex_macro "{\\Ax{"
: map (foldDoc (toLatexRecord lbl dis False)
{ foldText = \ _ k s ->
case k of
Native -> Pretty.sizedText (axiom_width s) s
IdLabel _ Native _ ->
Pretty.sizedText (axiom_width s) s
IdKind | s == " " ->
Pretty.sizedText (axiom_width s) "\\,"
_ -> textToLatex lbl dis False k s
}) os
++ [latex_macro "}}"]
| null r -> foldDoc (toLatexRecord lbl dis tab) d
| otherwise -> (if tab && c /= Horiz then
(latex_macro setTab Pretty.<>)
. (latex_macro startTab Pretty.<>)
. (Pretty.<> latex_macro endTab)
else id)
$ (case c of
Vert -> Pretty.vcat
Horiz -> Pretty.hcat
HorizOrVert -> Pretty.cat
Fill -> Pretty.fcat)
$ case c of
Vert ->
map (foldDoc $ toLatexRecord lbl dis False) os
_ -> foldDoc (toLatexRecord lbl dis False) d :
map (foldDoc $ toLatexRecord lbl dis True) r
_ -> Pretty.empty
, foldAttr = \ o k d -> case k of
FlushRight -> flushright d
Small -> case o of
Attr Small (Text j s) -> textToLatex lbl dis True j s
_ -> makeSmallLatex True d
, foldChangeGlobalAnnos = \ _ _ d -> d
}
-- | move a small attribute inwards but not into mathmode bits
makeSmallMath :: Bool -> Bool -> Doc -> Doc
makeSmallMath smll math =
foldDoc idRecord
{ foldAttr = \ o _ _ -> case o of
Attr Small d -> makeSmallMath True math d
Attr k d -> Attr k $ makeSmallMath smll math d
_ -> error "makeSmallMath.foldAttr"
, foldCat = \ o _ _ -> case o of
Cat c l
| any isNative l ->
(if smll then Attr Small else id)
-- flatten math mode bits
$ Cat Horiz $ map
(makeSmallMath False True . rmSpace) l
| math -> Cat Horiz
$ map (makeSmallMath False True) l
| smll && allHoriz o ->
-- produce fewer small blocks with wrong size though
Attr Small $ Cat Horiz $
map (makeSmallMath False math) l
| otherwise -> Cat c $ map (makeSmallMath smll math) l
_ -> error "makeSmallMath.foldCat"
, foldText = \ d _ _ -> if smll then Attr Small d else d
}
-- | check for unbalanced braces
needsMathMode :: Int -> String -> Bool
needsMathMode i s = case s of
[] -> i > 0
'{' : r -> needsMathMode (i + 1) r
'}' : r -> i == 0 || needsMathMode (i - 1) r
_ : r -> needsMathMode i r
isMathLatex :: Doc -> Bool
isMathLatex d = case d of
Text Native s -> needsMathMode 0 s
Text (IdLabel _ Native _) s -> needsMathMode 0 s
Attr Small f -> isMathLatex f
_ -> False
isNative :: Doc -> Bool
isNative d = case d of
Cat Horiz [t, _] -> isMathLatex t
_ -> isMathLatex d
-- | remove the spaces inserted by punctuate
rmSpace :: Doc -> Doc
rmSpace = snd . anaSpace
hasSpace :: Doc -> Bool
hasSpace = fst . anaSpace
anaSpace :: Doc -> (Bool, Doc)
anaSpace d = case d of
Cat Horiz [t, Text IdKind s] | s == " " -> (True, t)
_ -> (False, d)
allHoriz :: Doc -> Bool
allHoriz d = case d of
Text _ _ -> True
Cat Horiz l -> all allHoriz l
Attr _ f -> allHoriz f
Empty -> True
_ -> False
makeSmallLatex :: Bool -> Pretty.Doc -> Pretty.Doc
makeSmallLatex b d = if b then
Pretty.hcat [latex_macro startAnno, d, latex_macro endAnno] else d
symbolToLatex :: String -> Pretty.Doc
symbolToLatex s =
Map.findWithDefault (hc_sty_axiom $ escapeSpecial s) s latexSymbols
getDeclIds :: Doc -> Set.Set Id
getDeclIds = foldDoc anyRecord
{ foldEmpty = const Set.empty
, foldText = \ _ _ _ -> Set.empty
, foldCat = \ _ _ -> Set.unions
, foldAttr = \ _ _ d -> d
, foldChangeGlobalAnnos = \ _ _ d -> d
, foldIdDoc = \ _ lk i ->
if lk == IdDecl then Set.singleton i else Set.empty
, foldIdApplDoc = \ _ _ _ _ -> Set.empty
, foldAnnoDoc = \ _ _ -> Set.empty
}
textToLatex :: Label -> Set.Set Id -> Bool -> TextKind -> String -> Pretty.Doc
textToLatex lbl@(MkLabel mkLbl) dis b k s = case s of
"" -> Pretty.text ""
h : _ -> let e = escapeLatex s in case k of
IdKind -> makeSmallLatex b $ if elem s $ map (: []) ",;[]() "
then casl_normal_latex s
else hc_sty_id e
IdSymb -> makeSmallLatex b $ if s == "__" then symbolToLatex s
else if isAlpha h || elem h "._'" then hc_sty_id e
else hc_sty_axiom (escapeSpecial s)
Symbol -> makeSmallLatex b $ symbolToLatex s
Comment -> makeSmallLatex b $ casl_comment_latex e
-- multiple spaces should be replaced by \hspace
Keyword -> (if b then makeSmallLatex b . hc_sty_small_keyword
else hc_sty_plain_keyword) s
TopKey _ -> hc_sty_casl_keyword s
Indexed -> hc_sty_structid_indexed s
StructId -> hc_sty_structid s
Native -> hc_sty_axiom s
HetsLabel -> let d = textToLatex lbl dis b Comment s in
if mkLbl then Pretty.hcat [ latex_macro "\\HetsLabel{", d
, latex_macro $ "}{" ++ escapeLabel s ++ "}" ]
else d
-- HetsLabel may be avoided by the Label case
IdLabel appl tk i -> let
d = textToLatex lbl dis b tk s
si = showId i ""
in if b || not mkLbl || appl == IdAppl && not (Set.member i dis)
|| not (isLegalLabel si)
-- make this case True to avoid labels
then d else Pretty.hcat
[ latex_macro $ '\\' : shows appl "Label{"
, d
, latex_macro $ "}{" ++ escapeLabel si ++ "}" ]
escapeLabel :: String -> String
escapeLabel = map ( \ c -> if c == '_' then ':' else c)
latexSymbols :: Map.Map String Pretty.Doc
latexSymbols = Map.union (Map.fromList
[ ("{", casl_normal_latex "\\{")
, ("}", casl_normal_latex "\\}")
, (barS, casl_normal_latex "\\AltBar{}")
, (percentS, hc_sty_small_keyword "%")
, (percents, hc_sty_small_keyword "%%")
, (exEqual, Pretty.sizedText (axiom_width "=") "\\Ax{\\stackrel{e}{=}}") ])
$ Map.map hc_sty_axiom $ Map.fromList
[ (dotS, "\\bullet")
, (diamondS, "\\Diamond")
, ("__", "\\_\\_")
, (lambdaSymb, "\\lambda")
, (mapsTo, "\\mapsto")
, (funS, "\\rightarrow")
, (pFun, "\\rightarrow?")
, (contFun, "\\stackrel{c}{\\rightarrow}")
, (pContFun, "\\stackrel{c}{\\rightarrow}?")
, (forallS, "\\forall")
, (existsS, "\\exists")
, (existsUnique, "\\exists!")
, (prodS, "\\times")
, (notS, "\\neg")
, (inS, "\\in")
, (lAnd, "\\wedge")
, (lOr, "\\vee")
, (daggerS, "\\dag")
, (vdashS, "\\vdash")
, (dashvS, "\\dashv")
, (breveS, "\\breve{~}")
, (implS, "\\Rightarrow")
, (equivS, "\\Leftrightarrow")
, (interleavingS, "{|}\\mkern-2mu{|}\\mkern-2mu{|}")
, (synchronousS, "\\parallel")
, (external_choiceS, "\\Box")
, (internal_choiceS, "\\sqcap")
, (ren_proc_openS, "[\\mkern-2mu{[}")
, (ren_proc_closeS, "]\\mkern-2mu{]}")
]
-- * coding out stuff
{- | transform document according to a specific display map and other
global annotations like precedences, associativities, and literal
annotations. -}
codeOut :: StripComment -> GlobalAnnos -> PrecMap -> Maybe Display_format
-> Map.Map Id [Token] -> Doc -> Doc
codeOut stripCs ga precs d m = foldDoc idRecord
{ foldAnnoDoc = \ _ -> small . codeOutAnno stripCs m
, foldIdDoc = \ _ lk -> codeOutId lk m
, foldIdApplDoc = \ o _ _ -> codeOutAppl stripCs ga precs d m o
, foldChangeGlobalAnnos = \ o _ _ ->
let ChangeGlobalAnnos fg e = o
ng = fg ga
in codeOut stripCs ng (mkPrecIntMap $ prec_annos ng) d
(maybe m (\ f -> Map.map (Map.! f) .
Map.filter (Map.member f) $ display_annos ng) d) e
}
codeToken :: String -> Doc
codeToken = Text IdSymb
codeOrigId :: LabelKind -> Map.Map Id [Token] -> Id -> [Doc]
codeOrigId lk m i@(Id ts cs _) = let
(toks, places) = splitMixToken ts
conv = reverse . snd . foldl ( \ (b, l) t ->
let s = tokStr t
in if isPlace t then (b, symbol s : l)
else (True, (if b then codeToken s else makeLabel lk IdSymb s i)
: l)) (False, [])
in if null cs then conv ts
else conv toks ++ codeCompIds m cs : conv places
cCommaT :: Map.Map Id [Token] -> [Id] -> [Doc]
cCommaT m = punctuate comma . map (codeOutId IdAppl m)
codeCompIds :: Map.Map Id [Token] -> [Id] -> Doc
codeCompIds m = brackets . fcat . cCommaT m
codeOutId :: LabelKind -> Map.Map Id [Token] -> Id -> Doc
codeOutId lk m i = fcat $ case Map.lookup i m of
Nothing -> codeOrigId lk m i
Just ts -> reverse $ snd $ foldl ( \ (b, l) t ->
let s = tokStr t
in if isPlace t then (b, symbol s : l) else
(True, (if b then native s else
makeLabel lk Native s i) : l)) (False, []) ts
makeLabel :: LabelKind -> TextKind -> String -> Id -> Doc
makeLabel l k s i = Text (IdLabel l k i) s
annoLine :: String -> Doc
annoLine w = percent <> keyword w
annoLparen :: String -> Doc
annoLparen w = percent <> keyword w <> lparen
wrapLines :: TextKind -> Doc -> [String] -> Doc -> Doc
wrapLines k a l b = let p = (null (head l), null (last l)) in
case map (Text k) l of
[] -> a <> b
[x] -> hcat [a, x, b]
[x, y] -> case p of
(True, c) -> a $+$ if c then b else y <> b
(False, True) -> a <> x $+$ b
_ -> a <> (x $+$ y <> b)
x : r -> let
m = init r
y = last r
xm = x : m
am = a : m
yb = [y <> b]
in case p of
(True, c) -> vcat $ am ++ if c then [b] else yb
(False, True) -> a <> vcat xm $+$ b
_ -> a <> vcat (xm ++ yb)
wrapAnnoLines :: Doc -> [String] -> Doc -> Doc
wrapAnnoLines = wrapLines Comment
percent :: Doc
percent = symbol percentS
annoRparen :: Doc
annoRparen = rparen <> percent
hCommaT :: Map.Map Id [Token] -> [Id] -> Doc
hCommaT m = hsep . cCommaT m
fCommaT :: Map.Map Id [Token] -> [Id] -> Doc
fCommaT m = fsep . cCommaT m
codeOutAnno :: StripComment -> Map.Map Id [Token] -> Annotation -> Doc
codeOutAnno (StripComment stripCs) m a = case a of
Unparsed_anno aw at _ -> if stripCs then empty else case at of
Line_anno s -> (case aw of
Annote_word w -> annoLine w
Comment_start -> symbol percents) <> commentText s
Group_anno l -> case aw of
Annote_word w -> wrapAnnoLines (annoLparen w) l annoRparen
Comment_start -> wrapAnnoLines (percent <> lbrace) l
$ rbrace <> percent
Display_anno i ds _ -> annoLparen displayS <> fsep
( fcat (codeOrigId IdAppl m i) :
map ( \ (df, s) -> percent <> commentText (lookupDisplayFormat df)
<+> maybe (commentText s) (const $ codeOutId IdAppl m i)
(Map.lookup i m)) ds) <> annoRparen
List_anno i1 i2 i3 _ -> annoLine listS <+> hCommaT m [i1, i2, i3]
Number_anno i _ -> annoLine numberS <+> codeOutId IdAppl m i
Float_anno i1 i2 _ -> annoLine floatingS <+> hCommaT m [i1, i2]
String_anno i1 i2 _ -> annoLine stringS <+> hCommaT m [i1, i2]
Prec_anno p l1 l2 _ -> annoLparen precS <>
fsep [ braces $ fCommaT m l1
, case p of
Lower -> less
Higher -> greater
BothDirections -> less <> greater
NoDirection -> greater <> less
, braces $ fCommaT m l2
] <> annoRparen
Assoc_anno s l _ -> annoLparen (case s of
ALeft -> left_assocS
ARight -> right_assocS)
<> fCommaT m l <> annoRparen
Label l _ -> wrapLines (case l of
[x] -> if isLegalLabel x then HetsLabel else Comment
_ -> Comment) (percent <> lparen) l annoRparen
Prefix_anno pm _ -> annoLparen prefixS <> vcat
(map ( \ (s, i) -> text (s ++ ":")
<+> text (iriToStringUnsecure $ setAngles True i)) pm)
<> annoRparen
Semantic_anno sa _ -> annoLine $ lookupSemanticAnno sa
isLegalLabel :: String -> Bool
isLegalLabel r = not (null r) && all ( \ c -> isAlphaNum c || elem c "_" ) r
splitDoc :: Doc -> Maybe (Id, [Doc])
splitDoc d = case d of
IdApplDoc _ i l -> Just (i, l)
_ -> Nothing
sepByCommas :: [Doc] -> Doc
sepByCommas = fsep . punctuate comma
sepBySemis :: [Doc] -> Doc
sepBySemis = fsep . punctuate semi
data Weight = Weight Int Id Id Id -- top, left, right
parenAppl :: GlobalAnnos -> PrecMap -> Doc -> [Bool] -> Doc -> [Bool]
parenAppl ga precs origDoc l arg = case origDoc of
IdApplDoc isPred i _ -> let
pa = prec_annos ga
assocs = assoc_annos ga
mx = maxWeight precs
pm = precMap precs
e = Map.findWithDefault mx eqId pm
p = Map.findWithDefault (if isInfix i then e else mx) i pm
in case getWeight ga precs arg of
Nothing -> False : l
Just (Weight q ta la ra) ->
let d = isBoth pa i ta
oArg = (q < e || p >= e &&
(notElem i [eqId, exEq]
|| elem ta [eqId, exEq]))
&& isDiffAssoc assocs pa i ta
|| d
in (if isLeftArg i l then
if checkArg ARight ga (i, p) (ta, q) ra
then oArg
else not (isPred || isSafeLhs i ta) || d
else if isRightArg i l then
if checkArg ALeft ga (i, p) (ta, q) la
then oArg
else (applId == i || isInfix ta)
&& not isPred || d
else d) : l
_ -> False : l
parenApplArgs :: GlobalAnnos -> PrecMap -> Doc -> [Bool]
parenApplArgs ga precs origDoc = case origDoc of
IdApplDoc _ _ aas -> reverse $ foldl (parenAppl ga precs origDoc) [] aas
_ -> []
-- print literal terms and mixfix applications
codeOutAppl :: StripComment -> GlobalAnnos -> PrecMap -> Maybe Display_format
-> Map.Map Id [Token] -> Doc -> [Doc] -> Doc
codeOutAppl stripCs ga precs md m origDoc args = case origDoc of
IdApplDoc _ i@(Id ts cs _) aas ->
let mk = codeToken . tokStr
doSplit = fromMaybe (error "doSplit") . splitDoc
mkList op largs cl = fsep $ codeOutId IdAppl m op : punctuate comma
(map (codeOut stripCs ga precs md m) largs)
++ [codeOutId IdAppl m cl]
in if isGenNumber splitDoc ga i aas then
mk $ toNumber doSplit i aas
else if isGenFrac splitDoc ga i aas then
mk $ toFrac doSplit aas
else if isGenFloat splitDoc ga i aas then
mk $ toFloat doSplit ga aas
else if isGenString splitDoc ga i aas then
mk $ toString doSplit ga i aas
else if isGenList splitDoc ga i aas then
toMixfixList mkList doSplit ga i aas
else if null args || length args /= placeCount i then
codeOutId IdAppl m i <> if null args then empty else
parens (sepByCommas args)
else let
pars = parenApplArgs ga precs origDoc
parArgs = zipWith (\ b -> if b then parens else id) pars args
(fts, ncs, cFun) = case Map.lookup i m of
Nothing ->
(fst $ splitMixToken ts, cs, IdSymb)
Just nts -> (nts, [], Native)
((_, rArgs), fArgs) = mapAccumL ( \ (b, ac) t ->
if isPlace t then case ac of
hd : tl -> ((b, tl), (False, hd))
_ -> error "Common.Doc.codeOutAppl1"
else ((True, ac), (True,
let s = tokStr t in
if b then Text cFun s else makeIdApplLabel cFun s i)))
(False, parArgs) fts
in fsep $ hgroup $
(if null ncs then fArgs
else if null fArgs then error "Common.Doc.codeOutAppl2"
else init fArgs ++
[(True, snd (last fArgs) <> codeCompIds m cs)])
++ map ( \ d -> (False, d)) rArgs
_ -> error "Common.Doc.codeOutAppl2"
hgroup :: [(Bool, Doc)] -> [Doc]
hgroup l = case l of
(True, d1) : (False, d2) : r -> hsep [d1, d2] : hgroup r
(_, d) : r -> d : hgroup r
[] -> []
makeIdApplLabel :: TextKind -> String -> Id -> Doc
makeIdApplLabel k s i = Text (IdLabel IdAppl k i) s
getWeight :: GlobalAnnos -> PrecMap -> Doc -> Maybe Weight
getWeight ga precs d = let
m = precMap precs
in case d of
IdApplDoc _ i aas@(hd : _) ->
let p = Map.findWithDefault
(if begPlace i || endPlace i then Map.findWithDefault 0 eqId m
else maxWeight precs)
i m in
if isGenLiteral splitDoc ga i aas then Nothing else
let pars@(par : _) = parenApplArgs ga precs d
lw = case getWeight ga precs hd of
Just (Weight _ _ l _) -> nextWeight ALeft ga i l
Nothing -> i
rw = case getWeight ga precs $ last aas of
Just (Weight _ _ _ r) -> nextWeight ARight ga i r
Nothing -> i
in Just $ Weight p i (if par then i else lw)
$ if last pars then i else rw
_ -> Nothing
{- checkArg allows any nested infixes that are not listed in the
precedence graph in order to report ambiguities when parsed. The
following case require parens when printed. -}
isDiffAssoc :: AssocMap -> PrecedenceGraph -> Id -> Id -> Bool
isDiffAssoc assocs precs op arg = isInfix op && isInfix arg &&
if op /= arg then
arg /= applId && case precRel precs op arg of
Lower -> False
_ -> True
else not $ Map.member arg assocs
-- no need for parens in the following cases
isSafeLhs :: Id -> Id -> Bool
isSafeLhs op arg = applId /= op &&
(applId == arg || isPostfix arg || endPlace op && not (isInfix arg))
isBoth :: PrecedenceGraph -> Id -> Id -> Bool
isBoth precs op arg = case precRel precs op arg of
BothDirections -> True
_ -> False
-- | change top-level to plain keywords
rmTopKey :: Doc -> Doc
rmTopKey = foldDoc idRecord
{ foldText = \ d k s -> case k of
TopKey _ -> Text Keyword s
_ -> d
}
-- | add global annotations for proper mixfix printing
changeGlobalAnnos :: (GlobalAnnos -> GlobalAnnos) -> Doc -> Doc
changeGlobalAnnos = ChangeGlobalAnnos
| mariefarrell/Hets | Common/Doc.hs | gpl-2.0 | 40,763 | 0 | 30 | 12,644 | 12,289 | 6,483 | 5,806 | 944 | 21 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE ViewPatterns #-}
-- | Functionality for downloading packages securely for cabal's usage.
module Stack.Fetch
( unpackPackages
, unpackPackageIdents
, fetchPackages
, resolvePackages
, resolvePackagesAllowMissing
, ResolvedPackage (..)
, withCabalFiles
, withCabalLoader
) where
import qualified Codec.Archive.Tar as Tar
import qualified Codec.Archive.Tar.Check as Tar
import qualified Codec.Archive.Tar.Entry as Tar
import Codec.Compression.GZip (decompress)
import Control.Applicative
import Control.Concurrent.Async (Concurrently (..))
import Control.Concurrent.MVar.Lifted (modifyMVar, newMVar)
import Control.Concurrent.STM (TVar, atomically, modifyTVar,
newTVarIO, readTVar,
readTVarIO, writeTVar)
import Control.Exception (assert)
import Control.Monad (join, liftM, unless, void,
when)
import Control.Monad.Catch
import Control.Monad.IO.Class
import Control.Monad.Logger
import Control.Monad.Reader (asks, runReaderT)
import Control.Monad.Trans.Control
import "cryptohash" Crypto.Hash (SHA512 (..))
import Data.ByteString (ByteString)
import qualified Data.ByteString as S
import qualified Data.ByteString.Lazy as L
import Data.Either (partitionEithers)
import qualified Data.Foldable as F
import Data.Function (fix)
import Data.IORef (newIORef, readIORef,
writeIORef)
import Data.List (intercalate)
import Data.List.NonEmpty (NonEmpty)
import qualified Data.List.NonEmpty as NE
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Maybe (maybeToList, catMaybes)
import Data.Monoid ((<>))
import Data.Set (Set)
import qualified Data.Set as Set
import qualified Data.Text as T
import Data.Text.Encoding (decodeUtf8)
import Data.Typeable (Typeable)
import Data.Word (Word64)
import Network.HTTP.Download
import Path
import Path.IO
import Prelude -- Fix AMP warning
import Stack.GhcPkg
import Stack.PackageIndex
import Stack.Types
import qualified System.Directory as D
import System.FilePath ((<.>))
import qualified System.FilePath as FP
import System.IO (IOMode (ReadMode),
SeekMode (AbsoluteSeek), hSeek,
withBinaryFile)
import System.PosixCompat (setFileMode)
import Text.EditDistance as ED
type PackageCaches = Map PackageIdentifier (PackageIndex, PackageCache)
data FetchException
= Couldn'tReadIndexTarball FilePath Tar.FormatError
| Couldn'tReadPackageTarball FilePath SomeException
| UnpackDirectoryAlreadyExists (Set FilePath)
| CouldNotParsePackageSelectors [String]
| UnknownPackageNames (Set PackageName)
| UnknownPackageIdentifiers (Set PackageIdentifier) String
deriving Typeable
instance Exception FetchException
instance Show FetchException where
show (Couldn'tReadIndexTarball fp err) = concat
[ "There was an error reading the index tarball "
, fp
, ": "
, show err
]
show (Couldn'tReadPackageTarball fp err) = concat
[ "There was an error reading the package tarball "
, fp
, ": "
, show err
]
show (UnpackDirectoryAlreadyExists dirs) = unlines
$ "Unable to unpack due to already present directories:"
: map (" " ++) (Set.toList dirs)
show (CouldNotParsePackageSelectors strs) =
"The following package selectors are not valid package names or identifiers: " ++
intercalate ", " strs
show (UnknownPackageNames names) =
"The following packages were not found in your indices: " ++
intercalate ", " (map packageNameString $ Set.toList names)
show (UnknownPackageIdentifiers idents suggestions) =
"The following package identifiers were not found in your indices: " ++
intercalate ", " (map packageIdentifierString $ Set.toList idents) ++
(if null suggestions then "" else "\n" ++ suggestions)
-- | Fetch packages into the cache without unpacking
fetchPackages :: (MonadIO m, MonadBaseControl IO m, MonadReader env m, HasHttpManager env, HasConfig env, MonadThrow m, MonadLogger m, MonadCatch m)
=> EnvOverride
-> Set PackageIdentifier
-> m ()
fetchPackages menv idents = do
resolved <- resolvePackages menv idents Set.empty
ToFetchResult toFetch alreadyUnpacked <- getToFetch Nothing resolved
assert (Map.null alreadyUnpacked) (return ())
nowUnpacked <- fetchPackages' Nothing toFetch
assert (Map.null nowUnpacked) (return ())
-- | Intended to work for the command line command.
unpackPackages :: (MonadIO m, MonadBaseControl IO m, MonadReader env m, HasHttpManager env, HasConfig env, MonadThrow m, MonadLogger m, MonadCatch m)
=> EnvOverride
-> FilePath -- ^ destination
-> [String] -- ^ names or identifiers
-> m ()
unpackPackages menv dest input = do
dest' <- resolveDir' dest
(names, idents) <- case partitionEithers $ map parse input of
([], x) -> return $ partitionEithers x
(errs, _) -> throwM $ CouldNotParsePackageSelectors errs
resolved <- resolvePackages menv (Set.fromList idents) (Set.fromList names)
ToFetchResult toFetch alreadyUnpacked <- getToFetch (Just dest') resolved
unless (Map.null alreadyUnpacked) $
throwM $ UnpackDirectoryAlreadyExists $ Set.fromList $ map toFilePath $ Map.elems alreadyUnpacked
unpacked <- fetchPackages' Nothing toFetch
F.forM_ (Map.toList unpacked) $ \(ident, dest'') -> $logInfo $ T.pack $ concat
[ "Unpacked "
, packageIdentifierString ident
, " to "
, toFilePath dest''
]
where
-- Possible future enhancement: parse names as name + version range
parse s =
case parsePackageNameFromString s of
Right x -> Right $ Left x
Left _ ->
case parsePackageIdentifierFromString s of
Left _ -> Left s
Right x -> Right $ Right x
-- | Ensure that all of the given package idents are unpacked into the build
-- unpack directory, and return the paths to all of the subdirectories.
unpackPackageIdents
:: (MonadBaseControl IO m, MonadIO m, MonadReader env m, HasHttpManager env, HasConfig env, MonadThrow m, MonadLogger m, MonadCatch m)
=> EnvOverride
-> Path Abs Dir -- ^ unpack directory
-> Maybe (Path Rel Dir) -- ^ the dist rename directory, see: https://github.com/fpco/stack/issues/157
-> Set PackageIdentifier
-> m (Map PackageIdentifier (Path Abs Dir))
unpackPackageIdents menv unpackDir mdistDir idents = do
resolved <- resolvePackages menv idents Set.empty
ToFetchResult toFetch alreadyUnpacked <- getToFetch (Just unpackDir) resolved
nowUnpacked <- fetchPackages' mdistDir toFetch
return $ alreadyUnpacked <> nowUnpacked
data ResolvedPackage = ResolvedPackage
{ rpCache :: !PackageCache
, rpIndex :: !PackageIndex
}
-- | Resolve a set of package names and identifiers into @FetchPackage@ values.
resolvePackages :: (MonadIO m, MonadReader env m, HasHttpManager env, HasConfig env, MonadLogger m, MonadBaseControl IO m, MonadCatch m)
=> EnvOverride
-> Set PackageIdentifier
-> Set PackageName
-> m (Map PackageIdentifier ResolvedPackage)
resolvePackages menv idents0 names0 = do
eres <- go
case eres of
Left _ -> do
updateAllIndices menv
go >>= either throwM return
Right x -> return x
where
go = r <$> resolvePackagesAllowMissing menv idents0 names0
r (missingNames, missingIdents, idents)
| not $ Set.null missingNames = Left $ UnknownPackageNames missingNames
| not $ Set.null missingIdents = Left $ UnknownPackageIdentifiers missingIdents ""
| otherwise = Right idents
resolvePackagesAllowMissing
:: (MonadIO m, MonadReader env m, HasHttpManager env, HasConfig env, MonadLogger m, MonadThrow m, MonadBaseControl IO m, MonadCatch m)
=> EnvOverride
-> Set PackageIdentifier
-> Set PackageName
-> m (Set PackageName, Set PackageIdentifier, Map PackageIdentifier ResolvedPackage)
resolvePackagesAllowMissing menv idents0 names0 = do
caches <- getPackageCaches menv
let versions = Map.fromListWith max $ map toTuple $ Map.keys caches
(missingNames, idents1) = partitionEithers $ map
(\name -> maybe (Left name ) (Right . PackageIdentifier name)
(Map.lookup name versions))
(Set.toList names0)
(missingIdents, resolved) = partitionEithers $ map (goIdent caches)
$ Set.toList
$ idents0 <> Set.fromList idents1
return (Set.fromList missingNames, Set.fromList missingIdents, Map.fromList resolved)
where
goIdent caches ident =
case Map.lookup ident caches of
Nothing -> Left ident
Just (index, cache) -> Right (ident, ResolvedPackage
{ rpCache = cache
, rpIndex = index
})
data ToFetch = ToFetch
{ tfTarball :: !(Path Abs File)
, tfDestDir :: !(Maybe (Path Abs Dir))
, tfUrl :: !T.Text
, tfSize :: !(Maybe Word64)
, tfSHA512 :: !(Maybe ByteString)
, tfCabal :: !ByteString
-- ^ Contents of the .cabal file
}
data ToFetchResult = ToFetchResult
{ tfrToFetch :: !(Map PackageIdentifier ToFetch)
, tfrAlreadyUnpacked :: !(Map PackageIdentifier (Path Abs Dir))
}
-- | Add the cabal files to a list of idents with their caches.
withCabalFiles
:: (MonadThrow m, MonadIO m, MonadReader env m, HasConfig env)
=> IndexName
-> [(PackageIdentifier, PackageCache, a)]
-> (PackageIdentifier -> a -> ByteString -> IO b)
-> m [b]
withCabalFiles name pkgs f = do
indexPath <- configPackageIndex name
liftIO $ withBinaryFile (toFilePath indexPath) ReadMode $ \h ->
mapM (goPkg h) pkgs
where
goPkg h (ident, pc, tf) = do
hSeek h AbsoluteSeek $ fromIntegral $ pcOffset pc
cabalBS <- S.hGet h $ fromIntegral $ pcSize pc
f ident tf cabalBS
-- | Provide a function which will load up a cabal @ByteString@ from the
-- package indices.
withCabalLoader
:: (MonadThrow m, MonadIO m, MonadReader env m, HasConfig env, MonadLogger m, HasHttpManager env, MonadBaseControl IO m, MonadCatch m)
=> EnvOverride
-> ((PackageIdentifier -> IO ByteString) -> m a)
-> m a
withCabalLoader menv inner = do
icaches <- getPackageCaches menv >>= liftIO . newIORef
env <- ask
-- Want to try updating the index once during a single run for missing
-- package identifiers. We also want to ensure we only update once at a
-- time
updateRef <- liftIO $ newMVar True
runInBase <- liftBaseWith $ \run -> return (void . run)
-- TODO in the future, keep all of the necessary @Handle@s open
let doLookup :: PackageIdentifier
-> IO ByteString
doLookup ident = do
cachesCurr <- liftIO $ readIORef icaches
eres <- lookupPackageIdentifierExact ident env cachesCurr
case eres of
Just bs -> return bs
-- Update the cache and try again
Nothing -> do
let fuzzy = fuzzyLookupCandidates ident cachesCurr
suggestions = case fuzzy of
Nothing ->
case typoCorrectionCandidates ident cachesCurr of
Nothing -> ""
Just cs -> "Perhaps you meant " <>
orSeparated cs <> "?"
Just cs -> "Possible candidates: " <>
commaSeparated (NE.map packageIdentifierString cs)
<> "."
join $ modifyMVar updateRef $ \toUpdate ->
if toUpdate then do
runInBase $ do
$logInfo $ T.concat
[ "Didn't see "
, T.pack $ packageIdentifierString ident
, " in your package indices.\n"
, "Updating and trying again."
]
updateAllIndices menv
caches <- getPackageCaches menv
liftIO $ writeIORef icaches caches
return (False, doLookup ident)
else return (toUpdate,
throwM $ UnknownPackageIdentifiers
(Set.singleton ident) suggestions)
inner doLookup
lookupPackageIdentifierExact
:: HasConfig env
=> PackageIdentifier
-> env
-> PackageCaches
-> IO (Maybe ByteString)
lookupPackageIdentifierExact ident env caches =
case Map.lookup ident caches of
Nothing -> return Nothing
Just (index, cache) -> do
[bs] <- flip runReaderT env
$ withCabalFiles (indexName index) [(ident, cache, ())]
$ \_ _ bs -> return bs
return $ Just bs
-- | Given package identifier and package caches, return list of packages
-- with the same name and the same two first version number components found
-- in the caches.
fuzzyLookupCandidates
:: PackageIdentifier
-> PackageCaches
-> Maybe (NonEmpty PackageIdentifier)
fuzzyLookupCandidates (PackageIdentifier name ver) caches =
let (_, zero, bigger) = Map.splitLookup zeroIdent caches
zeroIdent = PackageIdentifier name $(mkVersion "0.0")
sameName (PackageIdentifier n _) = n == name
sameMajor (PackageIdentifier _ v) = toMajorVersion v == toMajorVersion ver
in NE.nonEmpty . filter sameMajor $ maybe [] (pure . const zeroIdent) zero
<> takeWhile sameName (Map.keys bigger)
-- | Try to come up with typo corrections for given package identifier using
-- package caches. This should be called before giving up, i.e. when
-- 'fuzzyLookupCandidates' cannot return anything.
typoCorrectionCandidates
:: PackageIdentifier
-> PackageCaches
-> Maybe (NonEmpty String)
typoCorrectionCandidates ident =
let getName = packageNameString . packageIdentifierName
name = getName ident
in NE.nonEmpty
. Map.keys
. Map.filterWithKey (const . (== 1) . damerauLevenshtein name)
. Map.mapKeys getName
-- | Figure out where to fetch from.
getToFetch :: (MonadThrow m, MonadIO m, MonadReader env m, HasConfig env)
=> Maybe (Path Abs Dir) -- ^ directory to unpack into, @Nothing@ means no unpack
-> Map PackageIdentifier ResolvedPackage
-> m ToFetchResult
getToFetch mdest resolvedAll = do
(toFetch0, unpacked) <- liftM partitionEithers $ mapM checkUnpacked $ Map.toList resolvedAll
toFetch1 <- mapM goIndex $ Map.toList $ Map.fromListWith (++) toFetch0
return ToFetchResult
{ tfrToFetch = Map.unions toFetch1
, tfrAlreadyUnpacked = Map.fromList unpacked
}
where
checkUnpacked (ident, resolved) = do
dirRel <- parseRelDir $ packageIdentifierString ident
let mdestDir = (</> dirRel) <$> mdest
mexists <-
case mdestDir of
Nothing -> return Nothing
Just destDir -> do
exists <- doesDirExist destDir
return $ if exists then Just destDir else Nothing
case mexists of
Just destDir -> return $ Right (ident, destDir)
Nothing -> do
let index = rpIndex resolved
d = pcDownload $ rpCache resolved
targz = T.pack $ packageIdentifierString ident ++ ".tar.gz"
tarball <- configPackageTarball (indexName index) ident
return $ Left (indexName index, [(ident, rpCache resolved, ToFetch
{ tfTarball = tarball
, tfDestDir = mdestDir
, tfUrl = case d of
Just d' -> decodeUtf8 $ pdUrl d'
Nothing -> indexDownloadPrefix index <> targz
, tfSize = fmap pdSize d
, tfSHA512 = fmap pdSHA512 d
, tfCabal = S.empty -- filled in by goIndex
})])
goIndex (name, pkgs) =
liftM Map.fromList $
withCabalFiles name pkgs $ \ident tf cabalBS ->
return (ident, tf { tfCabal = cabalBS })
-- | Download the given name,version pairs into the directory expected by cabal.
--
-- For each package it downloads, it will optionally unpack it to the given
-- @Path@ (if present). Note that unpacking is not simply a matter of
-- untarring, but also of grabbing the cabal file from the package index. The
-- destinations should not include package identifiers.
--
-- Returns the list of paths unpacked, including package identifiers. E.g.:
--
-- @
-- fetchPackages [("foo-1.2.3", Just "/some/dest")] ==> ["/some/dest/foo-1.2.3"]
-- @
--
-- Since 0.1.0.0
fetchPackages' :: (MonadIO m,MonadReader env m,HasHttpManager env,HasConfig env,MonadLogger m,MonadThrow m,MonadBaseControl IO m)
=> Maybe (Path Rel Dir) -- ^ the dist rename directory, see: https://github.com/fpco/stack/issues/157
-> Map PackageIdentifier ToFetch
-> m (Map PackageIdentifier (Path Abs Dir))
fetchPackages' mdistDir toFetchAll = do
connCount <- asks $ configConnectionCount . getConfig
outputVar <- liftIO $ newTVarIO Map.empty
runInBase <- liftBaseWith $ \run -> return (void . run)
parMapM_
connCount
(go outputVar runInBase)
(Map.toList toFetchAll)
liftIO $ readTVarIO outputVar
where
go :: (MonadIO m,Functor m,MonadThrow m,MonadLogger m,MonadReader env m,HasHttpManager env)
=> TVar (Map PackageIdentifier (Path Abs Dir))
-> (m () -> IO ())
-> (PackageIdentifier, ToFetch)
-> m ()
go outputVar runInBase (ident, toFetch) = do
req <- parseUrl $ T.unpack $ tfUrl toFetch
let destpath = tfTarball toFetch
let toHashCheck bs = HashCheck SHA512 (CheckHexDigestByteString bs)
let downloadReq = DownloadRequest
{ drRequest = req
, drHashChecks = map toHashCheck $ maybeToList (tfSHA512 toFetch)
, drLengthCheck = fromIntegral <$> tfSize toFetch
, drRetryPolicy = drRetryPolicyDefault
}
let progressSink _ =
liftIO $ runInBase $ $logInfo $ packageIdentifierText ident <> ": download"
_ <- verifiedDownload downloadReq destpath progressSink
let fp = toFilePath destpath
F.forM_ (tfDestDir toFetch) $ \destDir -> do
let dest = toFilePath $ parent destDir
innerDest = toFilePath destDir
liftIO $ ensureDir (parent destDir)
liftIO $ withBinaryFile fp ReadMode $ \h -> do
-- Avoid using L.readFile, which is more likely to leak
-- resources
lbs <- L.hGetContents h
let entries = fmap (either wrap wrap)
$ Tar.checkTarbomb identStr
$ Tar.read $ decompress lbs
wrap :: Exception e => e -> FetchException
wrap = Couldn'tReadPackageTarball fp . toException
identStr = packageIdentifierString ident
getPerms :: Tar.Entry -> (FilePath, Tar.Permissions)
getPerms e = (dest FP.</> Tar.fromTarPath (Tar.entryTarPath e),
Tar.entryPermissions e)
filePerms :: [(FilePath, Tar.Permissions)]
filePerms = catMaybes $ Tar.foldEntries (\e -> (:) (Just $ getPerms e))
[] (const []) entries
Tar.unpack dest entries
-- Reset file permissions as they were in the tarball
mapM_ (\(fp', perm) -> setFileMode
(FP.dropTrailingPathSeparator fp')
perm) filePerms
case mdistDir of
Nothing -> return ()
-- See: https://github.com/fpco/stack/issues/157
Just distDir -> do
let inner = dest FP.</> identStr
oldDist = inner FP.</> "dist"
newDist = inner FP.</> toFilePath distDir
exists <- D.doesDirectoryExist oldDist
when exists $ do
-- Previously used takeDirectory, but that got confused
-- by trailing slashes, see:
-- https://github.com/commercialhaskell/stack/issues/216
--
-- Instead, use Path which is a bit more resilient
ensureDir . parent =<< parseAbsDir newDist
D.renameDirectory oldDist newDist
let cabalFP =
innerDest FP.</>
packageNameString (packageIdentifierName ident)
<.> "cabal"
S.writeFile cabalFP $ tfCabal toFetch
atomically $ modifyTVar outputVar $ Map.insert ident destDir
parMapM_ :: (F.Foldable f,MonadIO m,MonadBaseControl IO m)
=> Int
-> (a -> m ())
-> f a
-> m ()
parMapM_ (max 1 -> 1) f xs = F.mapM_ f xs
parMapM_ cnt f xs0 = do
var <- liftIO (newTVarIO $ F.toList xs0)
-- See comment on similar line in Stack.Build
runInBase <- liftBaseWith $ \run -> return (void . run)
let worker = fix $ \loop -> join $ atomically $ do
xs <- readTVar var
case xs of
[] -> return $ return ()
x:xs' -> do
writeTVar var xs'
return $ do
runInBase $ f x
loop
workers 1 = Concurrently worker
workers i = Concurrently worker *> workers (i - 1)
liftIO $ runConcurrently $ workers cnt
damerauLevenshtein :: String -> String -> Int
damerauLevenshtein = ED.restrictedDamerauLevenshteinDistance ED.defaultEditCosts
orSeparated :: NonEmpty String -> String
orSeparated xs
| NE.length xs == 1 = NE.head xs
| NE.length xs == 2 = NE.head xs <> " or " <> NE.last xs
| otherwise = intercalate ", " (NE.init xs) <> ", or " <> NE.last xs
commaSeparated :: NonEmpty String -> String
commaSeparated = F.fold . NE.intersperse ", "
| harendra-kumar/stack | src/Stack/Fetch.hs | bsd-3-clause | 24,355 | 0 | 29 | 8,312 | 5,619 | 2,862 | 2,757 | 463 | 5 |
module Install.Plan where
import qualified Data.Map as Map
import qualified Elm.Package.Solution as S
import qualified Elm.Package.Name as N
import qualified Elm.Package.Version as V
data Plan = Plan
{ installs :: Map.Map N.Name V.Version
, upgrades :: Map.Map N.Name (V.Version, V.Version)
, removals :: Map.Map N.Name V.Version
}
create :: S.Solution -> S.Solution -> Plan
create old new =
Plan
{ installs = Map.difference new old
, upgrades = discardNoOps (Map.intersectionWith (,) old new)
, removals = Map.difference old new
}
where
discardNoOps updates =
Map.mapMaybe isChanged updates
isChanged upgrade@(oldVersion,newVersion) =
if oldVersion == newVersion
then Nothing
else Just upgrade
isEmpty :: Plan -> Bool
isEmpty (Plan installs upgrades removals) =
Map.null installs
&& Map.null upgrades
&& Map.null removals
-- DISPLAY
display :: Plan -> String
display (Plan installs upgrades removals) =
"\n"
++ displayCategory "Install" displayInstall installs
++ displayCategory "Upgrade" displayUpgrade upgrades
++ displayCategory "Remove" displayRemove removals
where
displayCategory name render category =
if Map.null category then "" else
" " ++ name ++ ":"
++ concatMap (\entry -> "\n " ++ render entry) (Map.toList category)
++ "\n"
displayInstall (name, version) =
N.toString name ++ " " ++ V.toString version
displayUpgrade (name, (old, new)) =
N.toString name ++ " (" ++ V.toString old ++ " => " ++ V.toString new ++ ")"
displayRemove (name, _version) =
N.toString name
| johnpmayer/elm-package | src/Install/Plan.hs | bsd-3-clause | 1,690 | 0 | 14 | 427 | 525 | 280 | 245 | 43 | 2 |
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# LANGUAGE PatternGuards #-}
module DFAMin (minimizeDFA) where
import AbsSyn
import Data.Map (Map)
import qualified Data.Map as Map
import Data.IntSet (IntSet)
import qualified Data.IntSet as IS
import Data.IntMap (IntMap)
import qualified Data.IntMap as IM
import Data.List as List
-- Hopcroft's Algorithm for DFA minimization (cut/pasted from Wikipedia):
-- P := {{all accepting states}, {all nonaccepting states}};
-- Q := {{all accepting states}};
-- while (Q is not empty) do
-- choose and remove a set A from Q
-- for each c in ∑ do
-- let X be the set of states for which a transition on c leads to a state in A
-- for each set Y in P for which X ∩ Y is nonempty do
-- replace Y in P by the two sets X ∩ Y and Y \ X
-- if Y is in Q
-- replace Y in Q by the same two sets
-- else
-- add the smaller of the two sets to Q
-- end;
-- end;
-- end;
minimizeDFA :: Ord a => DFA Int a -> DFA Int a
minimizeDFA dfa@ DFA { dfa_start_states = starts,
dfa_states = statemap
}
= DFA { dfa_start_states = starts,
dfa_states = Map.fromList states }
where
equiv_classes = groupEquivStates dfa
numbered_states = number (length starts) equiv_classes
-- assign each state in the minimized DFA a number, making
-- sure that we assign the numbers [0..] to the start states.
number _ [] = []
number n (ss:sss) =
case filter (`IS.member` ss) starts of
[] -> (n,ss) : number (n+1) sss
starts' -> zip starts' (repeat ss) ++ number n sss
-- if one of the states of the minimized DFA corresponds
-- to multiple starts states, we just have to duplicate
-- that state.
states = [
let old_states = map (lookup statemap) (IS.toList equiv)
accs = map fix_acc (state_acc (head old_states))
-- accepts should all be the same
out = IM.fromList [ (b, get_new old)
| State _ out <- old_states,
(b,old) <- IM.toList out ]
in (n, State accs out)
| (n, equiv) <- numbered_states
]
fix_acc acc = acc { accRightCtx = fix_rctxt (accRightCtx acc) }
fix_rctxt (RightContextRExp s) = RightContextRExp (get_new s)
fix_rctxt other = other
lookup m k = Map.findWithDefault (error "minimizeDFA") k m
get_new = lookup old_to_new
old_to_new :: Map Int Int
old_to_new = Map.fromList [ (s,n) | (n,ss) <- numbered_states,
s <- IS.toList ss ]
groupEquivStates :: (Ord a) => DFA Int a -> [IntSet]
groupEquivStates DFA { dfa_states = statemap }
= go init_p init_q
where
(accepting, nonaccepting) = Map.partition acc statemap
where acc (State as _) = not (List.null as)
nonaccepting_states = IS.fromList (Map.keys nonaccepting)
-- group the accepting states into equivalence classes
accept_map = {-# SCC "accept_map" #-}
foldl' (\m (n,s) -> Map.insertWith (++) (state_acc s) [n] m)
Map.empty
(Map.toList accepting)
-- accept_groups :: Ord s => [Set s]
accept_groups = map IS.fromList (Map.elems accept_map)
init_p = nonaccepting_states : accept_groups
init_q = accept_groups
-- map token T to
-- a map from state S to the list of states that transition to
-- S on token T
-- This is a cache of the information needed to compute x below
bigmap :: IntMap (IntMap [SNum])
bigmap = IM.fromListWith (IM.unionWith (++))
[ (i, IM.singleton to [from])
| (from, state) <- Map.toList statemap,
(i,to) <- IM.toList (state_out state) ]
-- incoming I A = the set of states that transition to a state in
-- A on token I.
incoming :: Int -> IntSet -> IntSet
incoming i a = IS.fromList (concat ss)
where
map1 = IM.findWithDefault IM.empty i bigmap
ss = [ IM.findWithDefault [] s map1
| s <- IS.toList a ]
-- The outer loop: recurse on each set in Q
go p [] = p
go p (a:q) = go1 0 p q
where
-- recurse on each token (0..255)
go1 256 p q = go p q
go1 i p q = go1 (i+1) p' q'
where
(p',q') = go2 p [] q
x = incoming i a
-- recurse on each set in P
go2 [] p' q = (p',q)
go2 (y:p) p' q
| IS.null i || IS.null d = go2 p (y:p') q
| otherwise = go2 p (i:d:p') q1
where
i = IS.intersection x y
d = IS.difference y x
q1 = replaceyin q
where
replaceyin [] =
if IS.size i < IS.size d then [i] else [d]
replaceyin (z:zs)
| z == y = i : d : zs
| otherwise = z : replaceyin zs
| hvr/alex | src/DFAMin.hs | bsd-3-clause | 5,307 | 0 | 18 | 2,017 | 1,327 | 710 | 617 | 80 | 6 |
module Main where
import T14285a
import Prelude hiding (null)
main :: IO ()
main = do
let args = "hw"
print $ null $ pre_images 'a' (Rel (fromList [('a',sfromList args)]) (fromList [('b',sfromList args)]))
| shlevy/ghc | testsuite/tests/stranal/should_run/T14285.hs | bsd-3-clause | 212 | 0 | 15 | 39 | 100 | 54 | 46 | 7 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Reporting
-- Copyright : (c) David Waern 2008
-- License : BSD-like
--
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability : portable
--
-- Anonymous build report data structure, printing and parsing
--
-----------------------------------------------------------------------------
module Distribution.Client.BuildReports.Storage (
-- * Storing and retrieving build reports
storeAnonymous,
storeLocal,
-- retrieve,
-- * 'InstallPlan' support
fromInstallPlan,
fromPlanningFailure,
) where
import qualified Distribution.Client.BuildReports.Anonymous as BuildReport
import Distribution.Client.BuildReports.Anonymous (BuildReport)
import Distribution.Client.Types
import qualified Distribution.Client.InstallPlan as InstallPlan
import qualified Distribution.Client.ComponentDeps as CD
import Distribution.Client.InstallPlan
( InstallPlan )
import Distribution.Package
( PackageId, packageId )
import Distribution.PackageDescription
( FlagAssignment )
import Distribution.Simple.InstallDirs
( PathTemplate, fromPathTemplate
, initialPathTemplateEnv, substPathTemplate )
import Distribution.System
( Platform(Platform) )
import Distribution.Compiler
( CompilerId(..), CompilerInfo(..) )
import Distribution.Simple.Utils
( comparing, equating )
import Data.List
( groupBy, sortBy )
import Data.Maybe
( catMaybes )
import System.FilePath
( (</>), takeDirectory )
import System.Directory
( createDirectoryIfMissing )
storeAnonymous :: [(BuildReport, Maybe Repo)] -> IO ()
storeAnonymous reports = sequence_
[ appendFile file (concatMap format reports')
| (repo, reports') <- separate reports
, let file = repoLocalDir repo </> "build-reports.log" ]
--TODO: make this concurrency safe, either lock the report file or make sure
-- the writes for each report are atomic (under 4k and flush at boundaries)
where
format r = '\n' : BuildReport.show r ++ "\n"
separate :: [(BuildReport, Maybe Repo)]
-> [(Repo, [BuildReport])]
separate = map (\rs@((_,repo,_):_) -> (repo, [ r | (r,_,_) <- rs ]))
. map concat
. groupBy (equating (repoName . head))
. sortBy (comparing (repoName . head))
. groupBy (equating repoName)
. onlyRemote
repoName (_,_,rrepo) = remoteRepoName rrepo
onlyRemote :: [(BuildReport, Maybe Repo)]
-> [(BuildReport, Repo, RemoteRepo)]
onlyRemote rs =
[ (report, repo, remoteRepo)
| (report, Just repo@Repo { repoKind = Left remoteRepo }) <- rs ]
storeLocal :: CompilerInfo -> [PathTemplate] -> [(BuildReport, Maybe Repo)]
-> Platform -> IO ()
storeLocal cinfo templates reports platform = sequence_
[ do createDirectoryIfMissing True (takeDirectory file)
appendFile file output
--TODO: make this concurrency safe, either lock the report file or make
-- sure the writes for each report are atomic
| (file, reports') <- groupByFileName
[ (reportFileName template report, report)
| template <- templates
, (report, _repo) <- reports ]
, let output = concatMap format reports'
]
where
format r = '\n' : BuildReport.show r ++ "\n"
reportFileName template report =
fromPathTemplate (substPathTemplate env template)
where env = initialPathTemplateEnv
(BuildReport.package report)
-- ToDo: In principle, we can support $pkgkey, but only
-- if the configure step succeeds. So add a Maybe field
-- to the build report, and either use that or make up
-- a fake identifier if it's not available.
(error "storeLocal: package key not available")
cinfo
platform
groupByFileName = map (\grp@((filename,_):_) -> (filename, map snd grp))
. groupBy (equating fst)
. sortBy (comparing fst)
-- ------------------------------------------------------------
-- * InstallPlan support
-- ------------------------------------------------------------
fromInstallPlan :: Platform -> CompilerId
-> InstallPlan
-> [(BuildReport, Maybe Repo)]
fromInstallPlan platform comp plan =
catMaybes
. map (fromPlanPackage platform comp)
. InstallPlan.toList
$ plan
fromPlanPackage :: Platform -> CompilerId
-> InstallPlan.PlanPackage
-> Maybe (BuildReport, Maybe Repo)
fromPlanPackage (Platform arch os) comp planPackage = case planPackage of
InstallPlan.Installed (ReadyPackage (ConfiguredPackage srcPkg flags _ _) deps)
_ result
-> Just $ ( BuildReport.new os arch comp
(packageId srcPkg) flags
(map packageId (CD.nonSetupDeps deps))
(Right result)
, extractRepo srcPkg)
InstallPlan.Failed (ConfiguredPackage srcPkg flags _ deps) result
-> Just $ ( BuildReport.new os arch comp
(packageId srcPkg) flags
(map confSrcId (CD.nonSetupDeps deps))
(Left result)
, extractRepo srcPkg )
_ -> Nothing
where
extractRepo (SourcePackage { packageSource = RepoTarballPackage repo _ _ })
= Just repo
extractRepo _ = Nothing
fromPlanningFailure :: Platform -> CompilerId
-> [PackageId] -> FlagAssignment -> [(BuildReport, Maybe Repo)]
fromPlanningFailure (Platform arch os) comp pkgids flags =
[ (BuildReport.new os arch comp pkgid flags [] (Left PlanningFailed), Nothing)
| pkgid <- pkgids ]
| trskop/cabal | cabal-install/Distribution/Client/BuildReports/Storage.hs | bsd-3-clause | 6,030 | 0 | 19 | 1,682 | 1,357 | 751 | 606 | 108 | 4 |
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
newtype MaybeA a = MaybeA (Maybe a)
deriving (Show, Functor, Applicative)
main :: IO ()
main = print $ do
x <- MaybeA $ Just 42
pure x
| olsner/ghc | testsuite/tests/ado/T11607.hs | bsd-3-clause | 237 | 0 | 10 | 63 | 72 | 37 | 35 | 8 | 1 |
{-# LANGUAGE CPP, MagicHash, BangPatterns #-}
import Data.Char
import Data.Array
import GHC.Exts
import System.IO
import System.IO.Unsafe
import Debug.Trace
import Control.Applicative (Applicative(..))
import Control.Monad (liftM, ap)
-- parser produced by Happy Version 1.16
data HappyAbsSyn
= HappyTerminal Token
| HappyErrorToken Int
| HappyAbsSyn4 (Exp)
| HappyAbsSyn5 (Exp1)
| HappyAbsSyn6 (Term)
| HappyAbsSyn7 (Factor)
happyActOffsets :: HappyAddr
happyActOffsets = HappyA# "\x01\x00\x25\x00\x1e\x00\x1b\x00\x1d\x00\x18\x00\x00\x00\x00\x00\x00\x00\x01\x00\xf8\xff\x03\x00\x03\x00\x03\x00\x03\x00\x20\x00\x01\x00\x18\x00\x18\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x01\x00\x00\x00\x00\x00"#
happyGotoOffsets :: HappyAddr
happyGotoOffsets = HappyA# "\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x07\x00\xfe\xff\x1c\x00\x06\x00\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x00"#
happyDefActions :: HappyAddr
happyDefActions = HappyA# "\x00\x00\x00\x00\x00\x00\x00\x00\xfd\xff\xfa\xff\xf7\xff\xf6\xff\xf5\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb\xff\xfc\xff\xf8\xff\xf9\xff\xf4\xff\x00\x00\x00\x00\xfe\xff"#
happyCheck :: HappyAddr
happyCheck = HappyA# "\xff\xff\x03\x00\x01\x00\x0b\x00\x03\x00\x04\x00\x03\x00\x04\x00\x02\x00\x03\x00\x03\x00\x0a\x00\x02\x00\x0a\x00\x00\x00\x01\x00\x02\x00\x03\x00\x00\x00\x01\x00\x02\x00\x03\x00\x00\x00\x01\x00\x02\x00\x03\x00\x00\x00\x01\x00\x02\x00\x03\x00\x02\x00\x03\x00\x08\x00\x09\x00\x04\x00\x06\x00\x07\x00\x05\x00\x01\x00\x0c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
happyTable :: HappyAddr
happyTable = HappyA# "\x00\x00\x13\x00\x03\x00\x16\x00\x08\x00\x09\x00\x08\x00\x09\x00\x11\x00\x06\x00\x14\x00\x0a\x00\x18\x00\x0a\x00\x18\x00\x04\x00\x05\x00\x06\x00\x16\x00\x04\x00\x05\x00\x06\x00\x0a\x00\x04\x00\x05\x00\x06\x00\x03\x00\x04\x00\x05\x00\x06\x00\x12\x00\x06\x00\x0c\x00\x0d\x00\x10\x00\x0e\x00\x0f\x00\x11\x00\x03\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
happyReduceArr = array (1, 11) [
(1 , happyReduce_1),
(2 , happyReduce_2),
(3 , happyReduce_3),
(4 , happyReduce_4),
(5 , happyReduce_5),
(6 , happyReduce_6),
(7 , happyReduce_7),
(8 , happyReduce_8),
(9 , happyReduce_9),
(10 , happyReduce_10),
(11 , happyReduce_11)
]
happy_n_terms = 13 :: Int
happy_n_nonterms = 4 :: Int
happyReduce_1 = happyReduce 6# 0# happyReduction_1
happyReduction_1 ((HappyAbsSyn4 happy_var_6) `HappyStk`
_ `HappyStk`
(HappyAbsSyn4 happy_var_4) `HappyStk`
_ `HappyStk`
(HappyTerminal (TokenVar happy_var_2)) `HappyStk`
_ `HappyStk`
happyRest)
= HappyAbsSyn4
(Let happy_var_2 happy_var_4 happy_var_6
) `HappyStk` happyRest
happyReduce_2 = happySpecReduce_1 0# happyReduction_2
happyReduction_2 (HappyAbsSyn5 happy_var_1)
= HappyAbsSyn4
(Exp1 happy_var_1
)
happyReduction_2 _ = notHappyAtAll
happyReduce_3 = happySpecReduce_3 1# happyReduction_3
happyReduction_3 (HappyAbsSyn6 happy_var_3)
_
(HappyAbsSyn5 happy_var_1)
= HappyAbsSyn5
(Plus happy_var_1 happy_var_3
)
happyReduction_3 _ _ _ = notHappyAtAll
happyReduce_4 = happySpecReduce_3 1# happyReduction_4
happyReduction_4 (HappyAbsSyn6 happy_var_3)
_
(HappyAbsSyn5 happy_var_1)
= HappyAbsSyn5
(Minus happy_var_1 happy_var_3
)
happyReduction_4 _ _ _ = notHappyAtAll
happyReduce_5 = happySpecReduce_1 1# happyReduction_5
happyReduction_5 (HappyAbsSyn6 happy_var_1)
= HappyAbsSyn5
(Term happy_var_1
)
happyReduction_5 _ = notHappyAtAll
happyReduce_6 = happySpecReduce_3 2# happyReduction_6
happyReduction_6 (HappyAbsSyn7 happy_var_3)
_
(HappyAbsSyn6 happy_var_1)
= HappyAbsSyn6
(Times happy_var_1 happy_var_3
)
happyReduction_6 _ _ _ = notHappyAtAll
happyReduce_7 = happySpecReduce_3 2# happyReduction_7
happyReduction_7 (HappyAbsSyn7 happy_var_3)
_
(HappyAbsSyn6 happy_var_1)
= HappyAbsSyn6
(Div happy_var_1 happy_var_3
)
happyReduction_7 _ _ _ = notHappyAtAll
happyReduce_8 = happySpecReduce_1 2# happyReduction_8
happyReduction_8 (HappyAbsSyn7 happy_var_1)
= HappyAbsSyn6
(Factor happy_var_1
)
happyReduction_8 _ = notHappyAtAll
happyReduce_9 = happySpecReduce_1 3# happyReduction_9
happyReduction_9 (HappyTerminal (TokenInt happy_var_1))
= HappyAbsSyn7
(Int happy_var_1
)
happyReduction_9 _ = notHappyAtAll
happyReduce_10 = happySpecReduce_1 3# happyReduction_10
happyReduction_10 (HappyTerminal (TokenVar happy_var_1))
= HappyAbsSyn7
(Var happy_var_1
)
happyReduction_10 _ = notHappyAtAll
happyReduce_11 = happySpecReduce_3 3# happyReduction_11
happyReduction_11 _
(HappyAbsSyn4 happy_var_2)
_
= HappyAbsSyn7
(Brack happy_var_2
)
happyReduction_11 _ _ _ = notHappyAtAll
happyNewToken action sts stk [] =
happyDoAction 12# notHappyAtAll action sts stk []
happyNewToken action sts stk (tk:tks) =
let cont i = happyDoAction i tk action sts stk tks in
case tk of {
TokenLet -> cont 1#;
TokenIn -> cont 2#;
TokenInt happy_dollar_dollar -> cont 3#;
TokenVar happy_dollar_dollar -> cont 4#;
TokenEq -> cont 5#;
TokenPlus -> cont 6#;
TokenMinus -> cont 7#;
TokenTimes -> cont 8#;
TokenDiv -> cont 9#;
TokenOB -> cont 10#;
TokenCB -> cont 11#;
_ -> happyError' (tk:tks)
}
happyError_ tk tks = happyError' (tk:tks)
newtype HappyIdentity a = HappyIdentity a
happyIdentity = HappyIdentity
happyRunIdentity (HappyIdentity a) = a
instance Functor HappyIdentity where
fmap = liftM
instance Applicative HappyIdentity where
pure = return
(<*>) = ap
instance Monad HappyIdentity where
return = HappyIdentity
(HappyIdentity p) >>= q = q p
happyThen :: () => HappyIdentity a -> (a -> HappyIdentity b) -> HappyIdentity b
happyThen = (>>=)
happyReturn :: () => a -> HappyIdentity a
happyReturn = (return)
happyThen1 m k tks = (>>=) m (\a -> k a tks)
happyReturn1 :: () => a -> b -> HappyIdentity a
happyReturn1 = \a tks -> (return) a
happyError' :: () => [Token] -> HappyIdentity a
happyError' = HappyIdentity . happyError
calc tks = happyRunIdentity happySomeParser where
happySomeParser = happyThen (happyParse 0# tks) (\x -> case x of {HappyAbsSyn4 z -> happyReturn z; _other -> notHappyAtAll })
happySeq = happyDontSeq
happyError tks = error "Parse error"
data Exp = Let String Exp Exp | Exp1 Exp1
data Exp1 = Plus Exp1 Term | Minus Exp1 Term | Term Term
data Term = Times Term Factor | Div Term Factor | Factor Factor
data Factor = Int Int | Var String | Brack Exp
data Token
= TokenLet
| TokenIn
| TokenInt Int
| TokenVar String
| TokenEq
| TokenPlus
| TokenMinus
| TokenTimes
| TokenDiv
| TokenOB
| TokenCB
lexer :: String -> [Token]
lexer [] = []
lexer (c:cs)
| isSpace c = lexer cs
| isAlpha c = lexVar (c:cs)
| isDigit c = lexNum (c:cs)
lexer ('=':cs) = TokenEq : lexer cs
lexer ('+':cs) = TokenPlus : lexer cs
lexer ('-':cs) = TokenMinus : lexer cs
lexer ('*':cs) = TokenTimes : lexer cs
lexer ('/':cs) = TokenDiv : lexer cs
lexer ('(':cs) = TokenOB : lexer cs
lexer (')':cs) = TokenCB : lexer cs
lexNum cs = TokenInt (read num) : lexer rest
where (num,rest) = span isDigit cs
lexVar cs =
case span isAlpha cs of
("let",rest) -> TokenLet : lexer rest
("in",rest) -> TokenIn : lexer rest
(var,rest) -> TokenVar var : lexer rest
runCalc :: String -> Exp
runCalc = calc . lexer
main = case runCalc "1 + 2 + 3" of {
(Exp1 (Plus (Plus (Term (Factor (Int 1))) (Factor (Int 2))) (Factor (Int 3)))) ->
case runCalc "1 * 2 + 3" of {
(Exp1 (Plus (Term (Times (Factor (Int 1)) (Int 2))) (Factor (Int 3)))) ->
case runCalc "1 + 2 * 3" of {
(Exp1 (Plus (Term (Factor (Int 1))) (Times (Factor (Int 2)) (Int 3)))) ->
case runCalc "let x = 2 in x * (x - 2)" of {
(Let "x" (Exp1 (Term (Factor (Int 2)))) (Exp1 (Term (Times (Factor (Var "x")) (Brack (Exp1 (Minus (Term (Factor (Var "x"))) (Factor (Int 2))))))))) -> print "Test works\n";
_ -> quit } ; _ -> quit } ; _ -> quit } ; _ -> quit }
quit = print "Test failed\n"
{-# LINE 1 "GenericTemplate.hs" #-}
{-# LINE 1 "<built-in>" #-}
{-# LINE 1 "<command line>" #-}
{-# LINE 1 "GenericTemplate.hs" #-}
-- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp
{-# LINE 28 "GenericTemplate.hs" #-}
data Happy_IntList = HappyCons Int# Happy_IntList
{-# LINE 49 "GenericTemplate.hs" #-}
{-# LINE 59 "GenericTemplate.hs" #-}
happyTrace string expr = unsafePerformIO $ do
hPutStr stderr string
return expr
infixr 9 `HappyStk`
data HappyStk a = HappyStk a (HappyStk a)
-----------------------------------------------------------------------------
-- starting the parse
happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll
-----------------------------------------------------------------------------
-- Accepting the parse
-- If the current token is 0#, it means we've just accepted a partial
-- parse (a %partial parser). We must ignore the saved token on the top of
-- the stack in this case.
happyAccept 0# tk st sts (_ `HappyStk` ans `HappyStk` _) =
happyReturn1 ans
happyAccept j tk st sts (HappyStk ans _) =
(happyTcHack j (happyTcHack st)) (happyReturn1 ans)
-----------------------------------------------------------------------------
-- Arrays only: do the next action
happyDoAction i tk st
= (happyTrace ("state: " ++ show (I# (st)) ++ ",\ttoken: " ++ show (I# (i)) ++ ",\taction: ")) $
case action of
0# -> (happyTrace ("fail.\n")) $
happyFail i tk st
-1# -> (happyTrace ("accept.\n")) $
happyAccept i tk st
n | isTrue# (n <# (0# :: Int#)) -> (happyTrace ("reduce (rule " ++ show rule ++ ")")) $
(happyReduceArr ! rule) i tk st
where rule = (I# ((negateInt# ((n +# (1# :: Int#))))))
n -> (happyTrace ("shift, enter state " ++ show (I# (new_state)) ++ "\n")) $
happyShift new_state i tk st
where new_state = (n -# (1# :: Int#))
where off = indexShortOffAddr happyActOffsets st
off_i = (off +# i)
check = if isTrue# (off_i >=# (0# :: Int#))
then isTrue# (indexShortOffAddr happyCheck off_i ==# i)
else False
action | check = indexShortOffAddr happyTable off_i
| otherwise = indexShortOffAddr happyDefActions st
{-# LINE 127 "GenericTemplate.hs" #-}
indexShortOffAddr (HappyA# arr) off =
narrow16Int# i
where
i = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)
high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))
low = int2Word# (ord# (indexCharOffAddr# arr off'))
off' = off *# 2#
data HappyAddr = HappyA# Addr#
-----------------------------------------------------------------------------
-- HappyState data type (not arrays)
{-# LINE 170 "GenericTemplate.hs" #-}
-----------------------------------------------------------------------------
-- Shifting a token
happyShift new_state 0# tk st sts stk@(x `HappyStk` _) =
let i = (case x of { HappyErrorToken (I# (i)) -> i }) in
-- trace "shifting the error token" $
happyDoAction i tk new_state (HappyCons (st) (sts)) (stk)
happyShift new_state i tk st sts stk =
happyNewToken new_state (HappyCons (st) (sts)) ((HappyTerminal (tk))`HappyStk`stk)
-- happyReduce is specialised for the common cases.
happySpecReduce_0 i fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happySpecReduce_0 nt fn j tk st@((action)) sts stk
= happyGoto nt j tk st (HappyCons (st) (sts)) (fn `HappyStk` stk)
happySpecReduce_1 i fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happySpecReduce_1 nt fn j tk _ sts@((HappyCons (st@(action)) (_))) (v1`HappyStk`stk')
= let r = fn v1 in
happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))
happySpecReduce_2 i fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happySpecReduce_2 nt fn j tk _ (HappyCons (_) (sts@((HappyCons (st@(action)) (_))))) (v1`HappyStk`v2`HappyStk`stk')
= let r = fn v1 v2 in
happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))
happySpecReduce_3 i fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happySpecReduce_3 nt fn j tk _ (HappyCons (_) ((HappyCons (_) (sts@((HappyCons (st@(action)) (_))))))) (v1`HappyStk`v2`HappyStk`v3`HappyStk`stk')
= let r = fn v1 v2 v3 in
happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))
happyReduce k i fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happyReduce k nt fn j tk st sts stk
= case happyDrop (k -# (1# :: Int#)) sts of
!sts1@((HappyCons (st1@(action)) (_))) ->
let r = fn stk in -- it doesn't hurt to always seq here...
happyDoSeq r (happyGoto nt j tk st1 sts1 r)
happyMonadReduce k nt fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happyMonadReduce k nt fn j tk st sts stk =
happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))
where !sts1@((HappyCons (st1@(action)) (_))) = happyDrop k (HappyCons (st) (sts))
drop_stk = happyDropStk k stk
happyMonad2Reduce k nt fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happyMonad2Reduce k nt fn j tk st sts stk =
happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))
where !sts1@((HappyCons (st1@(action)) (_))) = happyDrop k (HappyCons (st) (sts))
drop_stk = happyDropStk k stk
off = indexShortOffAddr happyGotoOffsets st1
off_i = (off +# nt)
new_state = indexShortOffAddr happyTable off_i
happyDrop 0# l = l
happyDrop n (HappyCons (_) (t)) = happyDrop (n -# (1# :: Int#)) t
happyDropStk 0# l = l
happyDropStk n (x `HappyStk` xs) = happyDropStk (n -# (1#::Int#)) xs
-----------------------------------------------------------------------------
-- Moving to a new state after a reduction
happyGoto nt j tk st =
(happyTrace (", goto state " ++ show (I# (new_state)) ++ "\n")) $
happyDoAction j tk new_state
where off = indexShortOffAddr happyGotoOffsets st
off_i = (off +# nt)
new_state = indexShortOffAddr happyTable off_i
-----------------------------------------------------------------------------
-- Error recovery (0# is the error token)
-- parse error if we are in recovery and we fail again
happyFail 0# tk old_st _ stk =
-- trace "failing" $
happyError_ tk
{- We don't need state discarding for our restricted implementation of
"error". In fact, it can cause some bogus parses, so I've disabled it
for now --SDM
-- discard a state
happyFail 0# tk old_st (HappyCons ((action)) (sts))
(saved_tok `HappyStk` _ `HappyStk` stk) =
-- trace ("discarding state, depth " ++ show (length stk)) $
happyDoAction 0# tk action sts ((saved_tok`HappyStk`stk))
-}
-- Enter error recovery: generate an error token,
-- save the old token and carry on.
happyFail i tk (action) sts stk =
-- trace "entering error recovery" $
happyDoAction 0# tk action sts ( (HappyErrorToken (I# (i))) `HappyStk` stk)
-- Internal happy errors:
notHappyAtAll = error "Internal Happy error\n"
-----------------------------------------------------------------------------
-- Hack to get the typechecker to accept our action functions
happyTcHack :: Int# -> a -> a
happyTcHack x y = y
{-# INLINE happyTcHack #-}
-----------------------------------------------------------------------------
-- Seq-ing. If the --strict flag is given, then Happy emits
-- happySeq = happyDoSeq
-- otherwise it emits
-- happySeq = happyDontSeq
happyDoSeq, happyDontSeq :: a -> b -> b
happyDoSeq a b = a `seq` b
happyDontSeq a b = b
-----------------------------------------------------------------------------
-- Don't inline any functions from the template. GHC has a nasty habit
-- of deciding to inline happyGoto everywhere, which increases the size of
-- the generated parser quite a bit.
{-# NOINLINE happyDoAction #-}
{-# NOINLINE happyTable #-}
{-# NOINLINE happyCheck #-}
{-# NOINLINE happyActOffsets #-}
{-# NOINLINE happyGotoOffsets #-}
{-# NOINLINE happyDefActions #-}
{-# NOINLINE happyShift #-}
{-# NOINLINE happySpecReduce_0 #-}
{-# NOINLINE happySpecReduce_1 #-}
{-# NOINLINE happySpecReduce_2 #-}
{-# NOINLINE happySpecReduce_3 #-}
{-# NOINLINE happyReduce #-}
{-# NOINLINE happyMonadReduce #-}
{-# NOINLINE happyGoto #-}
{-# NOINLINE happyFail #-}
-- end of Happy Template.
| gridaphobe/ghc | testsuite/tests/ghci.debugger/HappyTest.hs | bsd-3-clause | 16,372 | 213 | 36 | 2,947 | 4,861 | 2,563 | 2,298 | 321 | 12 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- Don't do the cunning new newtype-deriving thing
-- when the type constructor is recursive
module Main where
newtype A = A [A] deriving (Eq)
-- The derived instance would be:
-- instance Eq A where
-- (A xs) == (A ys) = xs==ys
-- $df :: Eq [A] => Eq A
-- $df d = d |> Eq (sym co)
x :: A
x = A [A [], A [A []]]
main = print (x == x)
| urbanslug/ghc | testsuite/tests/typecheck/should_compile/tc159.hs | bsd-3-clause | 395 | 0 | 10 | 99 | 80 | 48 | 32 | 6 | 1 |
module Data.YahooPortfolioManager.Plot where
import Data.Time
import Data.YahooPortfolioManager.DateUtils
import Data.YahooPortfolioManager.DbAdapter
--import System.Exit
import qualified Data.YahooPortfolioManager.TimeSeries as TS
import qualified Graphics.Gnuplot.Advanced as GP
import qualified Graphics.Gnuplot.Simple as GS
import qualified Graphics.Gnuplot.Plot.TwoDimensional as Plot2D
import qualified Graphics.Gnuplot.Graph.TwoDimensional as Graph2D
import Graphics.Gnuplot.Time (prepXTime)
import Database.HDBC.Sqlite3
symbol :: String
symbol = "IWRD.L"
mydata :: (TS.TimePoint Double -> Bool) -> TS.TimeSeries Double -> Plot2D.T Int Double
mydata filter ts = Plot2D.list Graph2D.listPoints . tsValues $ TS.filter filter ts
dateFilter :: Day -> Day -> TS.TimePoint a -> Bool
dateFilter from to tp = (TS.date tp) >= from && (TS.date tp) <= to
test1 :: IO ()
test1 = do
conn <- connectSqlite3 "portfolio.db"
ts <- fetchHisto conn symbol
GS.plotList [] (TS.toList ts)
test2 :: IO () --System.Exit.ExitCode
test2 = do
--db <- dbFile
conn <- connectSqlite3 "portfolio.db" --db
ts <- fetchHisto conn symbol
end <- getDate
let start = addGregorianYearsRollOver (-5) end in do
sequence_ $ GP.plotDefault (mydata (dateFilter start end) ts) : []
-- Given a list of symbols, plot their history in the db
test3 :: [String] -> IO [()]
test3 ss = do
db <- dbFile
conn <- connectSqlite3 db
sequence $ map (\s -> (fetchHisto conn s) >>= flip plotTitle s) ss
plotSymbol :: String -> IO ()
plotSymbol s = do
db <- dbFile
conn <- connect db
ts <- fetchHisto conn s
-- can also try plotDots with sim effect
-- can specify angle and offset in rotate: rotate by -60 offset -0.5, -1.5
-- ... these attributes really do just wrap the gnuplot commands
GS.plotPath [GS.Title s, GS.Key Nothing, GS.XTicks (Just ["rotate"]), GS.XTime, GS.XFormat "%Y-%m-%d"]
$ prepXTime
$ map (\(d, v) -> (UTCTime d 0, v)) (TS.toList ts)
disconnect conn
plotAllSymbols :: IO ()
plotAllSymbols = do
db <- dbFile
conn <- connect db
syms <- fetchSymbols conn
disconnect conn
mapM_ plotSymbol syms
plotTitle :: TS.TimeSeries Double -> String -> IO ()
plotTitle ts s =
GS.plotPath [GS.Title s, GS.Key Nothing, GS.XTicks (Just ["rotate"]), GS.XTime, GS.XFormat "%Y-%m-%d"]
$ prepXTime
$ map (\(d, v) -> (UTCTime d 0, v)) (TS.toList ts)
plot :: TS.TimeSeries Double -> IO ()
plot ts =
GS.plotPath [GS.Key Nothing, GS.XTicks (Just ["rotate"]), GS.XTime, GS.XFormat "%Y-%m-%d"]
$ prepXTime
$ map (\(d, v) -> (UTCTime d 0, v)) (TS.toList ts)
tsValues :: TS.TimeSeries a -> [a]
tsValues = map snd . TS.toList
tsDates :: TS.TimeSeries a -> [Day]
tsDates = map fst . TS.toList
| lhoghu/yahoo-portfolio-manager | src/Data/YahooPortfolioManager/Plot.hs | mit | 2,811 | 0 | 17 | 580 | 999 | 515 | 484 | 64 | 1 |
-- |
-- A silly library to convert integers to Strings, as an english speaker might
-- pronounce them.
--
-- For example, 2 becomes "two", 101 becomes "one hundred and one".
--
-- This is probably enormously slow and un-Haskellish, but (a) it's just for
-- practice, and (b) it's version 0.
--
module Text.SayNumber
( renderMin
, renderMax
, sayNumber
) where
import Data.List (foldl1')
--
-- PUBLIC
--
-- |
-- The maximum value that we can render. The most likely values for the max
-- will be 2 ^ 63 - 1 (for 64-bit machines) or 2 ^ 32 - 1 (for 32-bit
-- machines). We have an arbitrary ceiling of 10^22 because that's all of the
-- "illion" strings I defined.
--
renderMin = 0
-- |
-- The minimum value that we can render. This is (currently) just going to be 0
-- (it could easily be made [-1 * renderMax - 1]).
--
renderMax = min (maxBound :: Int) (10^22)
-- |
-- Given an integer, return the common english pronunciation of it as a String.
--
sayNumber :: Int -> String
sayNumber n
| n < 0 || n > renderMax = "<ERANGE>"
| n == 0 = "zero"
| otherwise = render n
--
-- PRIVATE
--
--
-- Given an integer n, 0 < n < renderMax, return the common english
-- pronunciation of n as a String. This is an "unchecked" version of sayNumber.
--
render :: Int -> String
render n
| null fromThousand = sayHundred justHundred
| otherwise = if justHundred == 0
then renderFromThousand fromThousand
else joinParts fromThousand justHundred
where justHundred = head parts
fromThousand = tail parts
parts = splitHundreds n
--
-- This function is passed the "hundred parts" of a number in the form of a
-- list of Ints representing the "init" of this collection, and another Int
-- representing the "last" of the collection.
--
-- The function converts the list into a String representing the parts of the
-- total number >= 1000, and then combines that with a String representing the
-- last part.
--
-- We split this out because we may or may not need an extra "and" in between
-- the two parts, depending on the value of the last part.
--
joinParts :: [Int] -> Int -> String
joinParts t h
| h == 0 || h > 99 = renderedThousands ++ (' ' : renderedHundred)
| otherwise = renderedThousands ++ " and " ++ renderedHundred
where renderedThousands = renderFromThousand t
renderedHundred = sayHundred h
--
-- Values used to join groups of "hundreds" beyond 1000.
--
joinStringsBase = [ "thousand"
, "million"
, "billion"
, "trillion"
, "quadrillion"
, "quintillion"
, "sextillion"
]
--
-- Render the parts of a number >1000 to a String.
--
-- Note that we could use intercalate instead of foldl', but that means
-- reversing the list first.
--
renderFromThousand :: [Int] -> String
renderFromThousand xs = foldl1' (\a x -> x ++ (' ':a)) $ filtered
where filtered = filter (not . null) $ bits
bits = zipWith zipFunc strings joinStringsBase
zipFunc = (\x j -> if null x then "" else x ++ (' ':j))
strings = map sayHundred xs
--
-- Splits a number n into parts, where each part i [0,1..] consists of:
--
-- 1 * (n / 10^(3i) % 10) +
-- 10 * (n / 10^(3i + 1) % 10) +
-- 100 * (n / 10^(3i + 2) % 10)
--
-- For example, splitHundreds 1176142 evaluates to [142, 176, 1]
--
splitHundreds :: Int -> [Int]
splitHundreds 0 = []
splitHundreds n = next : splitHundreds rest
where next = n `mod` 1000
rest = n `div` 1000
--
-- Given a number n, 0 < n < 1000, convert the number to a string. The output
-- is in "full english" form, e.g. 4 -> "four", 76 -> "seventy-six", etc.
--
sayHundred :: Int -> String
sayHundred n
| n > 999 = error "n > 999 in sayHundred"
| n > 99 = sayDigit (n `div` 100) ++ afterHundreds
| n > 9 = joinDigits (n `div` 10) (n `mod` 10)
| n > 0 = sayDigit n
| otherwise = ""
where afterHundreds = case sayHundred lessThan100 of
"" -> " hundred"
s -> " hundred and " ++ sayHundred lessThan100
lessThan100 = n `mod` 100
--
-- Join two digits (if applicable) to produce a String, representing the
-- common English pronunciation of the resulting number. For example:
--
-- joinDigits 1 3 = "thirteen"
-- joinDigits 4 0 = "forty"
-- joinDigits 0 7 = "seven"
-- joinDigits 6 9 = "sixty-nine"
--
joinDigits :: Int -> Int -> String
joinDigits 1 u = sayTeens u
joinDigits t 0 = sayTens t
joinDigits 0 u = sayDigit u
joinDigits t u = sayTens t ++ ('-' : sayDigit u)
--
-- Given a number n, 0 <= n < 10, return a string representing the common
-- English pronunciation of (n + 10). For example:
--
-- sayTeens 4 = "fourteen"
-- sayTeens 0 = "ten"
--
sayTeens :: Int -> String
sayTeens 9 = "nineteen"
sayTeens 8 = "eighteen"
sayTeens 7 = "seventeen"
sayTeens 6 = "sixteen"
sayTeens 5 = "fifteen"
sayTeens 4 = "fourteen"
sayTeens 3 = "thirteen"
sayTeens 2 = "twelve"
sayTeens 1 = "eleven"
sayTeens 0 = "ten"
--
-- Given a number n, 1 < n < 10, return a string representing the common
-- english pronunciation of (n * 10). For example:
--
-- sayTens 8 = "eighty"
-- sayTens 2 = "twenty"
--
sayTens :: Int -> String
sayTens 9 = "ninety"
sayTens 8 = "eighty"
sayTens 7 = "seventy"
sayTens 6 = "sixty"
sayTens 5 = "fifty"
sayTens 4 = "forty"
sayTens 3 = "thirty"
sayTens 2 = "twenty"
--
-- Given a number n, 0 < n < 10, return a string representing the common
-- English pronunciation of n. For example:
--
-- sayDigit 7 = "seven"
-- sayDigit 1 = "one"
--
sayDigit :: Int -> String
sayDigit 9 = "nine"
sayDigit 8 = "eight"
sayDigit 7 = "seven"
sayDigit 6 = "six"
sayDigit 5 = "five"
sayDigit 4 = "four"
sayDigit 3 = "three"
sayDigit 2 = "two"
sayDigit 1 = "one"
| cmball/haskell-saynumber | Text/SayNumber.hs | mit | 5,969 | 0 | 12 | 1,596 | 1,086 | 606 | 480 | 91 | 2 |
module Cascade.Parse (tryParse, doParse) where
import Cascade.Data.Ast (Item(..))
import Cascade.Data.Parse ( Result(..)
, State(..)
, Token(..)
, Parser
, Parsers
, expect
, expectOne
, readToken
)
tryParse :: Parsers -> State -> Result Item
tryParse [] _ = Error { message = ("no suitable parser found") }
tryParse (parser:parsers) state =
let result = parser state
in case result of
(Error _) -> tryParse parsers state
(Result _ _) -> result
doParse :: Parsers -> State -> Result [Item]
doParse parsers state = doParse' parsers state []
doParse' :: Parsers -> State -> [Item] -> Result [Item]
doParse' parsers state results =
let (State raw) = state
in if raw == ""
then Result { state = state, result = results }
else
let result = tryParse parsers state
in case result of
(Error message) -> Error { message = message }
(Result state' inner) -> doParse' parsers state' (results ++ [inner])
| bash/cascade | src/Cascade/Parse.hs | mit | 1,211 | 0 | 16 | 471 | 369 | 201 | 168 | 28 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE LambdaCase #-}
module Logger ( runEvtLogger
, runServerInputLogger
, serverLogDir
, evtLogDir
, printEvents
, filterQuestEvent
, filterTravelActions
, obstacleActions
, scanDoorEvents
, parseEventLogProducer
) where
import Protolude hiding ((<>), toStrict, Location)
import Pipes
import Pipes.Concurrent
import qualified Pipes.Prelude as PP
import qualified Pipes.ByteString as PBS
import Event
import qualified System.IO as IO
import Control.Exception.Safe
import Control.Monad
import Data.String
import Data.Maybe
import Data.Either
import Data.Binary
import Data.Binary.Get
import qualified Data.ByteString.Char8 as C8
import qualified Data.ByteString.Lazy.Char8 as LC8
import Data.Monoid
import qualified Data.Foldable as F
import Data.Map.Strict hiding (foldl, foldl')
import qualified Data.Map.Strict as M
import qualified Data.Text as T
import qualified Data.List as L
import Control.Lens hiding ((&))
import Data.Time
import Data.Time.Format
serverLogDir = archiveDir ++ "/server-input-log/"
evtLogDir = archiveDir ++ "/evt-log/"
archiveDir = "archive"
runEvtLogger evtBusInput h = runLogger evtBusInput h serverInteractions
runServerInputLogger :: Input Event -> IO ()
runServerInputLogger input = do startTimestamp <- timestamp
h <- openFile serverInputLogFilename WriteMode
writeLog h
IO.hClose h
stopTimestamp <- timestamp
archive $ archivedLogFilename startTimestamp stopTimestamp
runServerInputLogger input
where writeLog h = runEffect $ fromInput input >-> filter >-> PBS.toHandle h
archivedLogFilename startTs stopTs = serverLogDir ++ "genod-" ++ startTs ++ "__" ++ stopTs ++ ".log"
timestamp = formatTime defaultTimeLocale "%Y%m%d_%H%M%S" <$> getCurrentTime
serverInputLogFilename = "server-input.log"
archive toFilename =
openFile serverInputLogFilename ReadMode >>= \from ->
openFile toFilename WriteMode >>= \to ->
do runEffect $ PBS.fromHandle from >-> PBS.toHandle to
IO.hClose from
IO.hClose to
filter = await >>= \case (ServerInput input) -> yield input >> filter
ServerClosedChannel -> return ()
ServerIOException -> return ()
UserInputIOException -> return ()
_ -> filter
runLogger :: Input Event -> Handle -> Pipe Event ByteString IO () -> IO ()
runLogger evtBusInput h msgFilter = runEffect $ fromInput evtBusInput >-> msgFilter >-> PBS.toHandle h >> liftIO (C8.putStr "logger input stream ceased\n")
serverInteractions :: Pipe Event ByteString IO ()
serverInteractions = forever $ await >>= \evt -> case evt of (SendToServer x) -> yield $ LC8.toStrict $ encode evt
(ServerEvent x) -> yield $ LC8.toStrict $ encode evt
_ -> return ()
serverInput :: Pipe Event ByteString IO ()
serverInput = forever $ await >>= \evt -> case evt of (ServerInput input) -> yield input
_ -> return ()
parseEventLogProducer :: Monad m => LC8.ByteString -> Producer Event m ()
parseEventLogProducer input = parse input
where parse "" = return ()
parse bs = case decodeEvent bs of (Right (rem, _, evt)) -> yield evt >> parse rem
(Left (_, _, err)) -> yield $ ConsoleOutput $ "error: " <> C8.pack err <> "\n"
decodeEvent input = decodeOrFail input :: Either (LC8.ByteString, ByteOffset, String) (LC8.ByteString, ByteOffset, Event)
printEvents :: Consumer Event IO ()
printEvents = forever $ await >>= lift . printEvent
where printEvent (ServerEvent (UnknownServerEvent txt)) = C8.putStrLn ("UnknownServerEvent: " <> txt <> "\ESC[0m")
printEvent (ServerEvent (MoveEvent txt)) = putStrLn ("MoveEvent: " <> txt <> "\ESC[0m")
printEvent (ConsoleInput txt) = putStrLn ("ConsoleInput: " <> txt <> "\ESC[0m")
printEvent (SendToServer txt) = putStrLn ("SendToServer: " <> txt <> "\ESC[0m")
printEvent event = print event
{-printMove :: [LocToLocActions] -> IO ()
printMove moves = mapM_ printM moves
where printM m = do print (fst m)
printEvents (snd m)-}
filterQuestEvent :: Event -> Bool
filterQuestEvent e = (not $ isServerInput e)
&& (not $ isMoveEvent e)
&& (e /= (ServerEvent PromptEvent))
&& (not $ emptyUnknownServerEvent e)
&& (not $ isConsoleOutput e)
where emptyUnknownServerEvent (ServerEvent (UnknownServerEvent "")) = True
emptyUnknownServerEvent _ = False
isMoveEvent (ServerEvent (MoveEvent _)) = True
isMoveEvent _ = False
isServerInput (ServerInput _) = True
isServerInput _ = False
isConsoleOutput (ConsoleOutput _) = True
isConsoleOutput _ = False
filterTravelActions :: Event -> Bool
filterTravelActions evt = isQuestEvent evt
where isQuestEvent e = (not $ botCommand e) && (not $ simpleMoveCommands e) && (isLocationEvent e || isConsoleOutput e || isUnknownServerEvent e)
isLocationEvent (ServerEvent (LocationEvent loc _ _)) = True
isLocationEvent _ = False
isConsoleOutput (ConsoleInput _) = True
isConsoleOutput _ = False
botCommand (ConsoleInput cmd) = T.isPrefixOf "/" cmd
botCommand _ = False
isUnknownServerEvent (ServerEvent (UnknownServerEvent _)) = True
isUnknownServerEvent _ = False
simpleMoveCommands e = e == (ConsoleInput "с")
|| e == (ConsoleInput "в")
|| e == (ConsoleInput "з")
|| e == (ConsoleInput "ю")
|| e == (ConsoleInput "вн")
|| e == (ConsoleInput "вв")
obstacleActions :: Monad m => Producer Event m () -> m (Map (LocationId, LocationId) [Event])
obstacleActions questEventsProducer = snd <$> PP.fold toActionMap ((Nothing, []), M.empty) identity questEventsProducer
where toActionMap ((Nothing, actions), travelActions) (ServerEvent (LocationEvent loc _ _)) = ((Just $ loc^.locationId, []), travelActions)
toActionMap acc@((Nothing, actions), travelActions) _ = acc
toActionMap ((Just leftLocId, actions), travelActions) (ServerEvent (LocationEvent loc _ _)) =
let newTravelActions = case actions of [] -> travelActions
_ -> insert (leftLocId, loc^.locationId) (L.reverse actions) travelActions
in ((Just $ loc^.locationId, []), newTravelActions)
toActionMap ((leftLoc, actions), travelActions) evt = ((leftLoc, evt : actions), travelActions)
type LocToLocActions = ([LocationId], [Event])
type LocPair = [LocationId]
scanDoorEvents :: [Event] -> [LocToLocActions]
scanDoorEvents evts = L.filter (\x -> (length $ fst x) >= 2) $ (\pair -> ((fst . snd) pair, (snd . fst) pair)) <$> (L.filter changeLocsOnly $ zipped)
where doorEvents ([], actions) (ServerEvent (LocationEvent (Location locId _) _ _)) = ([locId], [])
doorEvents (from:[], actions) (ServerEvent (LocationEvent (Location locId _) _ _)) = ([from, locId], [])
doorEvents (from:to:[], actions) (ServerEvent (LocationEvent (Location locId _) _ _)) = ([to, locId], [])
doorEvents (locPair, actions) ev = (locPair, ev:actions)
events = scanl doorEvents ([], []) evts :: [LocToLocActions]
zipped = events `zip` (L.tail events) :: [(LocToLocActions, LocToLocActions)]
changeLocsOnly (left, right) = fst left /= fst right
| tort/mud-drifter | src/Logger.hs | mit | 8,127 | 0 | 19 | 2,335 | 2,377 | 1,261 | 1,116 | 138 | 5 |
{-# LANGUAGE
TemplateHaskell, TypeSynonymInstances, ScopedTypeVariables #-}
module DB (
DBLocation(..), existsDB, readDB, writeDB, backupDB )
where
import ClassyPrelude
import Prelude (read)
import Data.UUID
import System.Directory (
getAppUserDataDirectory, doesFileExist, createDirectoryIfMissing)
import qualified Data.Aeson as A
import Data.Aeson ((.:), (.=))
import Filesystem (copyFile)
import Text.Printf
import ClassesLens hiding ((<.>), (.:), (.=))
import Helpers
import Notes
data DBLocation =
NoDB |
DBFile FilePath |
DefaultDBFile
deriving (Show)
instance A.FromJSON NID where
parseJSON = A.withText "NID" $ maybe mempty pure . readMay
instance A.ToJSON NID where
toJSON = A.toJSON . show
instance A.FromJSON Note where
parseJSON (A.Object v) =
Note
<$> v .: "nid"
<*> v .: "subs"
<*> v .: "title"
<*> v .: "created"
<*> v .: "lastModified"
parseJSON _ = mempty
instance A.ToJSON Note where
toJSON n = A.object [
"nid" .= (n ^. nid),
"subs" .= (n ^. subs),
"title" .= (n ^. title),
"created" .= (n ^. created),
"lastModified" .= (n ^. lastModified) ]
instance A.FromJSON NStore where
parseJSON = A.withArray "NStore"
(fmap (mapFromList . unpack . map (_nid &&& id)) . mapM A.parseJSON)
instance A.ToJSON NStore where
toJSON = A.Array . map A.toJSON . repack
instance A.FromJSON DBState where
parseJSON (A.Object v) = DBState <$>
v A..: "notes" <*>
v A..: "root"
parseJSON _ = mempty
instance A.ToJSON DBState where
toJSON db = A.object ["notes" A..= (db ^. notes),
"root" A..= (db ^. root)]
-- | By default the database is stored in system-specific directory for
-- application files (different for each user), in a file named “Jane.db”.
defaultDBPath :: IO_ FilePath
defaultDBPath = liftIO' $ do
d ← getAppUserDataDirectory "Jane"
return (fpFromString d </> "Jane.db")
existsDB :: DBLocation → IO_ Bool
existsDB NoDB = return True
existsDB DefaultDBFile = existsDB /$/ DBFile $/ defaultDBPath
existsDB (DBFile file) = liftIO' $ doesFileExist $ fpToString file
-- | Fails if the database doesn't exist.
readDB :: DBLocation → IO_ (Maybe DBState)
readDB NoDB = return Nothing
readDB DefaultDBFile = readDB /$/ DBFile $/ defaultDBPath
readDB (DBFile file) = liftIO' $ A.decode $/ readFile file
writeDB :: DBLocation → DBState → IO_ ()
writeDB NoDB _ = return ()
writeDB DefaultDBFile db = do
file ← defaultDBPath
writeDB (DBFile file) db
writeDB (DBFile file) db = liftIO' $ do
createDirectoryIfMissing True $ fpToString $ directory file
writeFile file (A.encode db)
backupDB :: DBLocation → IO_ ()
backupDB NoDB = return ()
backupDB DefaultDBFile = backupDB /$/ DBFile $/ defaultDBPath
backupDB (DBFile file) = liftIO' $ copyFile file (file <.> "backup")
| aelve/Jane | DB.hs | mit | 2,993 | 0 | 15 | 719 | 935 | 491 | 444 | 78 | 1 |
module Alfin.SimpleCore where
import Data.List(nub)
type Name = String
data ModName = ModName Name Name deriving Eq
data DataCon = DataCon ModName Name
data TypeCon = TypeCon ModName Name
data SCModule = SCModule ModName [SCTypeDef] [SCTopDef]
data SCTypeDef
= SCData TypeCon [Name] [SCConstr]
| SCNewType
data SCConstr = SCConstr ModName Name [SCType]
data SCTopDef = SCTopDef ModName Name [(Name,SCType)] (SCType, SCExp)
data SCType
= SCTypeCon TypeCon [SCType]
| SCTypeArrow SCType SCType
| SCTypeOther
data SCExp
= SCFun (ModName, Name) [SCExp]
| SCVar Name
| SCCon DataCon [SCExp]
| SCLit SCLit
| SCApply SCExp [SCExp]
| SCLam [(Name,SCType)] SCExp
| SCLet SCLetBinding SCExp
| SCLetRec [SCLetBinding] SCExp
| SCCase SCExp (Name, SCType) SCType [SCAlt]
data SCLetBinding = SCLB {lbName :: Name, lbArgs :: [(Name,SCType)], lbType :: SCType, lbExp :: SCExp}
data SCAlt
= SCConAlt DataCon [(Name, SCType)] SCExp
| SCLitAlt SCLit SCExp
| SCDefault SCExp
data SCLit
= SCInt Integer SCType
| SCRational Rational SCType
| SCChar Char SCType
| SCString String SCType
freeVars :: SCExp -> [String]
freeVars = nub . freeVarsE
freeVarsE :: SCExp -> [String]
freeVarsE (SCFun _ xs) = concatMap freeVars xs
freeVarsE (SCVar n) = [n]
freeVarsE (SCCon _ xs) = concatMap freeVars xs
freeVarsE (SCLit _) = []
freeVarsE (SCApply f xs) = freeVars f ++ concatMap freeVars xs
freeVarsE (SCLam vs x) = filter (flip notElem $ map fst vs) $ freeVars x
freeVarsE (SCLet x e) = filter (/= lbName x) (freeVarsLB x ++ freeVars e)
freeVarsE (SCLetRec rs e) = filter (flip notElem $ map lbName rs) (concatMap freeVarsLB rs ++ freeVars e)
freeVarsE (SCCase x (v, _) _ as) = freeVars x ++ filter (/= v) (concatMap freeVarsA as)
freeVarsLB :: SCLetBinding -> [String]
freeVarsLB (SCLB _ as _ x) = filter (flip notElem (map fst as)) (freeVars x)
freeVarsA :: SCAlt -> [String]
freeVarsA (SCConAlt _ ns e) = filter (flip notElem (map fst ns)) $ freeVars e
freeVarsA (SCLitAlt _ e) = freeVars e
freeVarsA (SCDefault e) = freeVars e
resType :: Int -> SCType -> SCType
resType 0 x = x
resType n (SCTypeArrow _ y) = resType (n-1) y
resType n x = x -- error ("resType " ++ show x)
instance Show ModName where
show (ModName "" "") = ""
show (ModName p m) = p ++ ":" ++ m ++ "."
instance Show DataCon where
show (DataCon m c) = show m ++ c
instance Show TypeCon where
show (TypeCon m c) = show m ++ c
instance Show SCModule where
show (SCModule m ts vs) = "module " ++ show m ++ "\n" ++ concatMap ((++ "\n") . show) ts ++ concatMap ((++ "\n") . show) vs
instance Show SCTypeDef where
show (SCData tc vs cs) = "data " ++ show tc ++ concatMap (" " ++) vs ++ " \n" ++ concatMap show cs
show (SCNewType) = "newtype \n"
instance Show SCConstr where
show (SCConstr m c ts) = " " ++ show m ++ c ++ concatMap ((" " ++) . showNestType) ts ++ "\n"
instance Show SCTopDef where
show (SCTopDef _ n as (rt,e)) = n ++ " :: " ++ concatMap ((++ " -> ") . show . snd) as ++ show rt ++ "\n" ++ n ++ concatMap ((" " ++) . fst) as ++ " =\n" ++ show e ++ "\n"
instance Show SCType where
show (SCTypeCon c xs ) = show c ++ concatMap ((" " ++) . showNestType) xs
show (SCTypeArrow x y) = showNestType x ++ " -> " ++ show y
show (SCTypeOther ) = "t"
showNestType :: SCType -> String
showNestType (SCTypeOther ) = "t"
showNestType (SCTypeCon c []) = show c
showNestType t = "(" ++ show t ++ ")"
instance Show SCExp where
show (SCFun (m, n) xs) = show m ++ n ++ concatMap ((" " ++) . showNestExp) xs
show (SCVar n ) = n
show (SCCon c xs ) = show c ++ concatMap ((" " ++) . showNestExp) xs
show (SCLit i ) = show i
show (SCApply a xs ) = showNestExp a ++ concatMap ((" " ++) . showNestExp) xs
show (SCLam vs e ) = "\\" ++ concatMap ((" " ++) . fst) vs ++ " -> " ++ show e
show (SCLet x e ) = "%let " ++ show x ++ " %in\n" ++ show e
show (SCLetRec rs e ) = "%letrec" ++ concatMap (("\n " ++) . show) rs ++ " %in\n" ++ show e
show (SCCase e (v,t) r xs) = "%case " ++ showNestExp e ++ " " ++ v ++ " :: " ++ show t ++ " -> " ++ show r ++ " %of {" ++ concatMap (("\n " ++) . show) xs ++ "\n}"
showNestExp :: SCExp -> String
showNestExp (SCFun (m, n) []) = show m ++ n
showNestExp (SCVar n) = n
showNestExp (SCCon c []) = show c
showNestExp (SCLit i) = show i
showNestExp x = "(" ++ show x ++ ")"
instance Show SCLetBinding where
show (SCLB n as _ x) = n ++ concatMap ((" " ++) . fst) as ++ " = " ++ show x
instance Show SCAlt where
show (SCConAlt c xs e) = show c ++ concatMap ((" " ++) . fst) xs ++ " -> " ++ show e
show (SCLitAlt i e) = show i ++ " -> " ++ show e
show (SCDefault e) = "_ -> " ++ show e
instance Show SCLit where
show (SCInt i _) = show i
show (SCRational r _) = show r
show (SCChar c _) = show c
show (SCString s _) = show s
| comonoidial/ALFIN | Alfin/SimpleCore.hs | mit | 4,999 | 0 | 18 | 1,266 | 2,246 | 1,160 | 1,086 | 109 | 1 |
module Bonawitz_3_8
where
import Blaze
import Tree
-- Replicating instance of Bonawitz 3.8
-- In addition, the tempering density described on pg. 48 is used
sr :: State
sr = collectStates dummyState $
(scs `tagNode` "cs") : mkDoubleParams ["p","alpha","beta"] [0.3,1.5,1.5]
scs :: State
scs = collectStates dummyCState $
zipWith (\t v -> mkIntData v `tagNode` ("x" ++ show t)) [1..] [0,0,1]
dr :: Density
dr = productDensity [dbeta, dbin]
dbeta :: Density
dbeta = mkDensity [] [["p"]] [["alpha"], ["beta"]] beta
dbin :: Density
dbin = productDensity $ map mkBernoulli (map tagged $ children scs)
where mkBernoulli t = mkDensity [] [["cs",t]] [["p"]] bernoulli
tempered :: Double -> Prob
tempered tau = density s' (mkDensity [dr] [] [["tau"]] tempering)
where s' = collectStates sr [mkDoubleParam "tau" tau]
main = print $ map tempered [0.01,0.1,1.0,10.0,100.0]
| othercriteria/blaze | Bonawitz_3_8.hs | mit | 937 | 0 | 12 | 209 | 350 | 197 | 153 | 20 | 1 |
module Reverse where
rvrs :: String -> String
rvrs text = (take 7 (drop 9 text) ++ " " ++ drop 6 (take 8 text)) ++ " " ++ (take 5 text)
main :: IO ()
main = print $ rvrs "Curry is awesome!"
-- main = print (rvrs "Curry is awesome!")
| Numberartificial/workflow | haskell-first-principles/haskell-from-first-principles-master/03/03.08.06-moduleReverse.hs | mit | 237 | 0 | 12 | 56 | 97 | 50 | 47 | 5 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- | GHCJS support for Yesod.
module Yesod.GHCJS
(ghcjsFileDev)
where
import Control.Monad.Trans.Resource (runResourceT)
import qualified Data.ByteString as BS
import Data.Char
import Data.Conduit
import qualified Data.Conduit.Combinators as CL
import Data.Conduit.Process
import Data.FileEmbed (embedFile)
import Data.Maybe
import Data.String (fromString)
import Filesystem.Path (hasExtension)
import qualified Filesystem.Path.CurrentOS as FP
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
import Prelude
import System.Directory
import System.Environment
import System.Exit
import System.IO
import System.IO.Temp
import Yesod.Core
-- | Make a widget by compiling the module to JS to a temporary file
-- and then loading in the JS. Results in a @Handler TypedContent@
-- expression.
ghcjsFileDev :: Bool -> [String] -> [FilePath] -> FilePath -> Q Exp
ghcjsFileDev development args folders fp = do
let args' = ["-i"] ++ map (\folder -> "-i" ++ folder) folders ++ args
if development
then [| liftIO $ do
genfp <- runGhcjs fp args'
content <- BS.readFile genfp
return $ TypedContent typeJavascript $ toContent content |]
else do
genfp <- runIO $ runGhcjs fp args'
sourceFiles <- runIO $ runResourceT $
mapM_ (CL.sourceDirectoryDeep False . fromString) folders $=
CL.filter (`hasExtension` "hs") $$
CL.sinkList
mapM_ (qAddDependentFile . FP.encodeString) sourceFiles
bs <- embedFile genfp
f <- [|return . TypedContent typeJavascript . toContent|]
return $ f `AppE` bs
runGhcjs :: FilePath -> [String] -> IO FilePath
runGhcjs fp args = do
let dir = "dist/ghcjs-cache/"
genfp = dir ++ slugize fp ++ ".js"
createDirectoryIfMissing True dir
runGhcJSAll args fp $ \f -> do
putStrLn ("Copying " ++ f ++ " to " ++ genfp ++ " ...")
copyFile f genfp
return genfp
-- | Make a slug from a file path.
slugize :: FilePath -> String
slugize = map replace
where replace c
| isLetter c || isDigit c = toLower c
| otherwise = '_'
-- | Run ghcjs on a file and return the all.js content.
runGhcJSAll :: [String] -> FilePath -> (FilePath -> IO a) -> IO a
runGhcJSAll args fp cont =
do tempDir <- getTemporaryDirectory
withTempDirectory
tempDir
"run-ghcjs."
(\tmpdir ->
do path <- fmap (fromMaybe "ghcjs") (lookupEnv "GHCJS_PATH")
(Just inh,Nothing,Nothing,p) <- createProcess (config path tmpdir)
hClose inh
let display = path ++ " " ++
unwords (mkArgs tmpdir)
putStrLn display
code <- waitForProcess p
case code of
ExitSuccess ->
cont (tmpdir ++ "/all.js")
ExitFailure e -> error ("The GHCJS process failed with exit code " ++ show e ++ "."))
where config path tmpdir =
(proc path (mkArgs tmpdir)) {close_fds = True
,std_in = CreatePipe}
mkArgs tmpdir =
[fp,"-outputdir","dist/ghcjs","-o",tmpdir] ++
args
| fpco/stackage-view | server/Yesod/GHCJS.hs | mit | 3,410 | 0 | 19 | 1,089 | 832 | 437 | 395 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Main
-- Copyright : (c) Gushcha Anton 2013-2014
-- License : GNU GPLv3 (see the file LICENSE)
--
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability : portable
--
-- Benchmarking module that runs in console without gui. There are stubs for
-- application layer functions.
--
-- The test tries to connect to the other side (other instance of the benchmark)
-- over 5 seconds after the beginning. The first two arguments are as usual:
-- port name and user name. The third one is name for the test file that would
-- be sent over the serial port.
-----------------------------------------------------------------------------
module Main (main) where
import Channel.Layer
import Channel.Options
import Utility
import Control.Monad (when)
import Control.Distributed.Process
import Control.Distributed.Process.Node
import Control.Concurrent (threadDelay)
import Network.Transport.Chan
import System.Environment
-- | Handler for incoming user messages.
printUserMessage :: (ProcessId, String, String, String) -> Process Bool
printUserMessage (_, _, user, msg) = do
liftIO $ putStrLn $ "[" ++ user ++ "]:" ++ msg
return True
-- | Handler for local info messages.
printInfoMessage :: (ProcessId, String, String) -> Process Bool
printInfoMessage (_, _, msg) = do
liftIO $ putStrLn $ "Info: " ++ msg
return True
-- | Handler for local error messages.
printErrorMessage :: (ProcessId, String, String) -> Process Bool
printErrorMessage (_, _, msg) = do
liftIO $ putStrLn $ "Error: " ++ msg
return True
-- | Stub handler for changing options event.
setupOptionsHandler :: (ProcessId, String, ChannelOptions) -> Process Bool
setupOptionsHandler = const $ return True
-- | Stub handler for user connection event.
userConnectHandler :: (ProcessId, String, String) -> Process Bool
userConnectHandler (_, _, name) = do
liftIO $ putStrLn $ "User connected: " ++ name
return True
-- | Stub handler for user disconnecting event.
userDisconnectHandler :: (ProcessId, String, String) -> Process Bool
userDisconnectHandler (_, _, name) = do
liftIO $ putStrLn $ "User disconnected: " ++ name
return True
-- | Main benchmark function.
main :: IO ()
main = do
args <- getArgs
t <- createTransport
node <- newLocalNode t initRemoteTable
runProcess node $ do
rootId <- getSelfPid
channelId <- initChannelLayer rootId $ startOptions $ convertArgs args
liftIO $ threadDelay 5000000
send channelId (rootId, "connect")
liftIO $ threadDelay 1000000
when (length args == 3) $ do
dt <- liftIO $ testData args
send channelId (rootId, "send", dt)
while $ receiveWait [
matchIf (\(_, com) -> com == "exit") exitMsg
, matchIf (\(_, com, _, _) -> com == "message") printUserMessage
, matchIf (\(_, com, _) -> com == "info") printInfoMessage
, matchIf (\(_, com, _) -> com == "error") printErrorMessage
, matchIf (\(_, com, _) -> com == "options") setupOptionsHandler
, matchIf (\(_, com, _) -> com == "connect") userConnectHandler
, matchIf (\(_, com, _) -> com == "disconnect") userDisconnectHandler]
where
testData :: [String] -> IO String
testData args = readFile (args !! 2)
convertArgs args = if length args >= 2 then
Just (head args, args !! 1)
else Nothing
startOptions args = case args of
Just (port, uname) -> defaultOptions {portName = port, userName = uname}
Nothing -> defaultOptions | NCrashed/PowerCom | src/powercom/Benchmark.hs | gpl-3.0 | 3,729 | 0 | 16 | 865 | 931 | 509 | 422 | 62 | 3 |
{- |
Module : Tct.CommandLine
Copyright : (c) Martin Avanzini <[email protected]>,
Georg Moser <[email protected]>,
Andreas Schnabl <[email protected]>,
License : LGPL (see COPYING)
Maintainer : Martin Avanzini <[email protected]>
Stability : unstable
Portability : unportable
This section covers usage information of the /command line interface/
of TcT, for usage information on the /interactive interface/, please
refer to "Tct.Interactive". As explained in "Tct.Configuration", TcT can be easily
customized.
TcT is invoked from the command line as follows:
>>> tct [options] <filename>
Here '<filename>' specifies a complexity problem either
in the old /termination problem database/ format (cf. <http://www.lri.fr/~marche/tpdb/format.html>)
or in the new xml-based format (cf. <http://dev.aspsimon.org/xtc.xsd>).
Examples are available in the directory 'examples' in the software distribution,
or the current termination problem database
(<http://termcomp.uibk.ac.at/status/downloads/tpdb-current-exported.tar.gz>).
Be sure that you have the SAT-Solver 'minisat' (cf. <http://minisat.se/>)
installed on your system.
If invoked as above, TcT will apply the /default processor/ on the
input problem.
A processor is the TcT terminology of an object that guides the proof
search.
The option '-s \"\<processor\>\"' allows the specification of the
particular processor employed by TcT. The syntax of processors
follows a simple LISP-like language, where a processor is invoked
as
>>> (name [:opt v]* [pos]*)
Here 'name' refers to the processor name, ':opt v'
sets the /optional argument/ 'opt' to 'v', and 'pos'
are zero or more positional arguments.
In addition, outermost paranthesis can be dropped.
See module "Tct.Processors"
for further documentation on processors, and a complete list
of available processors.
The following lines properly construct processors
>>> popstar
>>> popstar :ps On
>>> matrix :dim 1
>>> fastest (popstar :ps On) (matrix :dim 1)
>>> uncurry (fastest (popstar :ps On) (matrix :dim 1))
In addition, TcT supports the following command line options
[--timeout \<num>]
Maximum running time in seconds.
[-t \<num>]
Same as '-timeout'.
[--verbosity \< answer | proof | strategy | a | p | s >]
Verbosity of proof mode.
answer: print only answer from proof
proof: print the full proof
strategy: print the full proof, enriched with strategy information
a: like answer
p: like proof
s: like strategy
[-v \< answer | proof | strategy | a | p | s >]
Same as '-verbosity'.
[--answer \< dc | rc | irc | idc | dc! | rc! | irc! | idc! >]
Overwrite problem specification. Can be one of the following:
dc: derivational complexity
idc: innermost derivational complexity
rc: runtime complexity
irc: innermost runtime complexity
Add '!' at the end to throw an error if problem specification and
given option conflict.
[-a \< dc | rc | irc | idc | dc! | rc! | irc! | idc! >]
Same as '-answer'.
[--minisat \<file>]
Specify the path to the minisat SAT-solver executable.
[-m \<file>]
Same as '-minisat'.
[--processor \<string>]
Specifies the strategy. For a list of strategies see '-l'.
[-s \<string>]
Same as '-processor'.
[--processorfile \<file>]
Like '-s', but reads the strategy from the given file.
[-S \<file>]
Same as '-processorfile'.
[--list \<string>]
Prints a full list of processors.
[-l \<string>]
Same as '-list'.
[--logfile \<file>]
Enable logging. Logging output is sent to specified file.
[-g \<file>]
Same as '-logfile'.
[--help ]
Displays this help message.
[-h ]
Same as '-help'.
[--version ]
Displays the version number.
[-z ]
Same as '-version'.
[--norecompile ]
No recompilation of the binaries.
[-r ]
Same as '-norecompile'.
[--interactive ]
Start TcT in interactive mode.
[-i ]
Same as '-interactive'.
-}
module Tct.CommandLine () where | mzini/TcT | source/Tct/CommandLine.hs | gpl-3.0 | 3,907 | 0 | 3 | 675 | 10 | 7 | 3 | 1 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Kevin.Damn.Protocol.Send (
sendPacket,
formatRoom,
deformatRoom,
sendHandshake,
sendLogin,
sendJoin,
sendPart,
sendMsg,
sendAction,
sendNpMsg,
sendPromote,
sendDemote,
sendBan,
sendUnban,
sendKick,
sendGet,
sendWhois,
sendSet,
sendAdmin,
sendKill
) where
import Data.Char (toLower)
import Data.List (sort)
import Data.Monoid
import qualified Data.Text as T
import Kevin.Base
import Kevin.Version
maybeBody :: Maybe T.Text -> T.Text
maybeBody = maybe "" ("\n\n" <>)
sendPacket :: T.Text -> KevinIO ()
sendPacket p = get_ >>= \k -> io . writeServer k . T.snoc p $ '\0'
formatRoom :: T.Text -> KevinIO T.Text
formatRoom b = case T.splitAt 1 b of
("#",s) -> return $ "chat:" <> s
("&",s) -> do
uname <- use_ name
return . ("pchat:" <>) . T.intercalate ":" . sort . map (T.map toLower) $ [uname, s]
r -> return $ "chat" <> uncurry (<>) r
deformatRoom :: T.Text -> KevinIO T.Text
deformatRoom room = if "chat:" `T.isPrefixOf` room
then return $ '#' `T.cons` T.drop 5 room
else do
uname <- use_ name
return $ T.cons '&' (head (filter (/= uname) . T.splitOn ":" . T.drop 6 $ room))
type Str = T.Text -- just make it shorter
type Room = Str
type Username = Str
type Pc = Str
-- * Communication to the server
sendHandshake :: KevinIO ()
sendLogin :: Username -> Str -> KevinIO ()
sendJoin, sendPart :: Room -> KevinIO ()
sendMsg, sendAction, sendNpMsg :: Room -> Str -> KevinIO ()
sendPromote, sendDemote :: Room -> Username -> Maybe Pc -> KevinIO ()
sendBan, sendUnban :: Room -> Username -> KevinIO ()
sendKick :: Room -> Username -> Maybe Str -> KevinIO ()
sendGet :: Room -> Str -> KevinIO ()
sendWhois :: Username -> KevinIO ()
sendSet :: Room -> Str -> Str -> KevinIO ()
sendAdmin :: Room -> Str -> KevinIO ()
sendKill :: Username -> Str -> KevinIO ()
sendHandshake = sendPacket $ printf "dAmnClient 0.3\nagent=kevin%s\n" [versionStr]
sendLogin u token = sendPacket $ printf "login %s\npk=%s\n" [u, token]
sendJoin room = do
roomname <- formatRoom room
sendPacket $ printf "join %s\n" [roomname]
sendPart room = do
roomname <- formatRoom room
sendPacket $ printf "part %s\n" [roomname]
sendMsg = sendNpMsg
sendAction room msg = do
roomname <- formatRoom room
sendPacket $ printf "send %s\n\naction main\n\n%s" [roomname, msg]
sendNpMsg room msg = do
roomname <- formatRoom room
sendPacket $ printf "send %s\n\nnpmsg main\n\n%s" [roomname, msg]
sendPromote room us pc = do
roomname <- formatRoom room
sendPacket $ printf "send %s\n\npromote %s%s" [roomname, us, maybeBody pc]
sendDemote room us pc = do
roomname <- formatRoom room
sendPacket $ printf "send %s\n\ndemote %s%s" [roomname, us, maybeBody pc]
sendBan room us = do
roomname <- formatRoom room
sendPacket $ printf "send %s\n\nban %s\n\n" [roomname, us]
sendUnban room us = do
roomname <- formatRoom room
sendPacket $ printf "send %s\n\nunban %s\n\n" [roomname, us]
sendKick room us reason = do
roomname <- formatRoom room
sendPacket $ printf "kick %s\nu=%s%s\n" [roomname, us, maybeBody reason]
sendGet room prop = do
guard $ prop `elem` ["title", "topic", "privclasses", "members"]
roomname <- formatRoom room
sendPacket $ printf "get %s\np=%s\n" [roomname, prop]
sendWhois us = sendPacket $ printf "get login:%s\np=info\n" [us]
sendSet room prop val = do
guard (prop == "topic" || prop == "title")
roomname <- formatRoom room
sendPacket $ printf "set %s\np=%s\n\n%s\n" [roomname, prop, val]
sendAdmin room cmd = do
roomname <- formatRoom room
sendPacket $ printf "send %s\n\nadmin\n\n%s" [roomname, cmd]
sendKill = undefined
| pikajude/kevin | src/Kevin/Damn/Protocol/Send.hs | gpl-3.0 | 4,399 | 0 | 17 | 1,434 | 1,314 | 678 | 636 | 104 | 3 |
--------------------------------------------------------------------------------
-- $Id: DateTime.hs,v 1.1 2004/01/13 12:31:24 graham Exp $
--
-- Copyright (c) 2003, G. KLYNE. All rights reserved.
-- See end of this file for licence information.
--------------------------------------------------------------------------------
-- |
-- Module : DateTime
-- Copyright : (c) 2003, Graham Klyne
-- License : GPL V2
--
-- Maintainer : Graham Klyne
-- Stability : provisional
-- Portability : H98
--
-- This Module defines a collection of date/time manipulation functions.
--
-- Date/time value manipulation.
--
-- Date/time can be date-only or time-only
--
-- type DateTime is an instance of built-in classes Eq and Show
-- type DateTime has a constructor that accepts a string in the format
-- defined by RFC 3339.
-- Timezone interpretation is per RFC3339.
--
--------------------------------------------------------------------------------
--
-- year,month,day,hour,min,sec,millisec,timezone
--class (Show a,Eq a) => DateTimeClass a where
-- newDateTime :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> a
-- toString :: a -> String
-- size :: a -> Int
-- toDateTime :: String -> a
-- toDate :: String -> a
-- toTime :: String -> a
-- (==) :: a -> a -> Bool -- same date/time
-- (<) :: a -> a -> Bool -- first precedes second
-- (+) :: a -> a -> a -- advance by time
-- (-) :: a -> a -> a -- difference between times
-- dtShow :: a -> String -- return string form
-- dtYear :: a -> Int
-- dtMonth :: a -> Int
-- dtDay :: a -> Int
-- dtHour :: a -> Int
-- dtMinute :: a -> Int
-- dtSecond :: a -> Int
-- dtMillisecs :: a -> Int
-- dtTimezone :: a -> Int -- time zone offset in minutes
--
--------------------------------------------------------------------------------
module Swish.HaskellUtils.DateTime where
data DateTime
= DateTime Int Int Int Int Int Int Int Int
instance Eq DateTime where
d1 == d2 = simpleEq ( normTZ d1 ) ( normTZ d2 )
instance Show DateTime where
show dt = dtShow dt
instance Ord DateTime where
dt1 < dt2 = simpleLT ( normTZ dt1 ) ( normTZ dt2 )
dt1 > dt2 = dt2 < dt1
dt1 <= dt2 = (dt1 < dt2)||(dt1==dt2)
dt1 >= dt2 = (dt2 < dt1)||(dt1==dt2)
leapYear :: Int -> Bool
leapYear year
| ( year `mod` 4 == 0 ) &&
not ( ( year `mod` 100 == 0 ) &&
not ( year `mod` 400 == 0 ) ) = True
| otherwise = False
daysInMonth :: Int -> Int -> Int
daysInMonth month year
| month==1 = 31 --Jan
| month==2 = if leapYear year then 29 else 28 --Feb
| month==3 = 31 --Mar
| month==4 = 30 --Apr
| month==5 = 31 --May
| month==6 = 30 --Jun
| month==7 = 31 --Jul
| month==8 = 31 --Aug
| month==9 = 30 --Sep
| month==10 = 31 --Oct
| month==11 = 30 --Nov
| month==12 = 31 --Dec
| otherwise = 0
validJulianDate :: Int -> Int -> Int -> Bool
validJulianDate yr mo da
| yr < 1900 = False
| mo > 12 = False
| da > (daysInMonth mo yr) = False
| otherwise = True
toJulianDate1 :: DateTime -> Int
toJulianDate1 (DateTime y m d _ _ _ _ _) = toJulianDate y m d
toJulianDate :: Int -> Int -> Int -> Int
toJulianDate year month day
-- | not (validJulianDate year month day) = -1
| year==1900 && month<=2 = if month==2 then day + 30 else day - 1
| month>=3 = toJD1 (year-1900) (month-3) (day)
| otherwise = toJD1 (year-1901) (month+9) (day)
where
toJD1 :: Int -> Int -> Int -> Int
toJD1 year month day
= ( (1461*year) `div` 4 ) -
(year `div` 100) +
((year+300) `div` 400) +
( ( (153*month) + 2 ) `div` 5 ) +
day + 58
fromJulianDate:: Int -> DateTime
fromJulianDate jdate
| jdate <= 58 = fromJD1 jdate
| otherwise = fromJD2 jdate
where
fromJD1 :: Int -> DateTime
fromJD1 jdate
| jdate<=30 = (DateTime 1900 1 (jdate+1 ) 0 0 0 0 0)
| otherwise = (DateTime 1900 2 (jdate-30) 0 0 0 0 0)
fromJD2 :: Int -> DateTime
fromJD2 j
= DateTime y2 m2 d1 0 0 0 0 0
where
-- t1 = (400*(j+((j+36467)`div`36525)-((j+109517)`div`dc))) - 23638 -- 1/400-days from 1900-02-28 [t]
t1 = (400*
(j
+((4*(j+36465))`div`146097)
-((j+109513)`div`146097))) - 23638 -- 1/400-days from 1900-02-28 [t]
dc = 146100 -- days in cycle period (400 years) = 1/400-days in year
t2 = ( ( t1 `mod` dc ) `div` 400 )*5 + 2 -- fifth-days into year, +2 [j3]
d1 = ( t2 `mod` 153 ) `div` 5 + 1 -- day of month (magic number 153) [d]
m1 = t2 `div` 153 -- month Mar=0 -> Feb=11 [j4]
m2 = if m1 <= 9 then m1+3 else m1-9 -- correct month to Jan=1 -> Dec=12 [m]
y1 = t1 `div` dc + 1900 -- year from 1900-02-28
y2 = if m1 <= 9 then y1 else y1+1 -- correct year for month wrap-around
-- 36525 = days/century, not counting century adjustments
-- 109517 = 146100 * (1900-1600)/400 - 58
-- 23238 = 58*400 + 38 ??? 38=152/4 ??
{- -- this code works for dates before 2100 only
t1 = (4*j) - 233 -- quarter-days from 1900-02-28
dc = 1461 -- days in cycle period (4 years) = quarter-days in year
t2 = ( ( t1 `mod` dc ) `div` 4 )*5 + 2 -- fifth-days into year, +2
d1 = ( t2 `mod` 153 ) `div` 5 + 1 -- day of month (magic number 153)
m1 = t2 `div` 153 -- month Mar=0 -> Feb=11
m2 = if m1 <= 9 then m1+3 else m1-9 -- correct month to Jan=1 -> Dec=12
y1 = t1 `div` dc + 1900 -- year from 1900-02-28
y2 = if m1 <= 9 then y1 else y1+1 -- correct year for month wrap-around
-}
date :: Int -> Int -> Int -> DateTime
date y m d = DateTime y m d 0 0 0 0 0
time :: Int -> Int -> Int -> Int -> Int -> DateTime
time h m s ms z = DateTime 0 0 0 h m s ms z
dtYear :: DateTime -> Int
dtMonth :: DateTime -> Int
dtDay :: DateTime -> Int
dtHour :: DateTime -> Int
dtMinute :: DateTime -> Int
dtSecond :: DateTime -> Int
dtMillisecs :: DateTime -> Int
dtTimezone :: DateTime -> Int -- time zone offset in minutes
dtYear ( DateTime x _ _ _ _ _ _ _ ) = x
dtMonth ( DateTime _ x _ _ _ _ _ _ ) = x
dtDay ( DateTime _ _ x _ _ _ _ _ ) = x
dtHour ( DateTime _ _ _ x _ _ _ _ ) = x
dtMinute ( DateTime _ _ _ _ x _ _ _ ) = x
dtSecond ( DateTime _ _ _ _ _ x _ _ ) = x
dtMillisecs ( DateTime _ _ _ _ _ _ x _ ) = x
dtTimezone ( DateTime _ _ _ _ _ _ _ x ) = x
lenFix :: String -> Int -> String
lenFix inStr newLen
| length inStr >= newLen = inStr
| otherwise = lenFix ('0':inStr) newLen
showTZ :: Int -> String
showTZ tz
| tz<0 = "-" ++ showTZabs ( -tz )
| tz==0 = showTZabs ( tz )
| otherwise = "+" ++ showTZabs ( tz )
showTZabs :: Int -> String
showTZabs tz
| tz==0 = "Z"
| otherwise = lenFix ( show ( tz `div` 60 ) ) 2 ++ ":" ++
lenFix ( show ( tz `mod` 60 ) ) 2
showTime :: DateTime -> String
showTime ( DateTime yr mo da hr mi se ms tz )
| ms==0 = lenFix ( show hr ) 2 ++ ":" ++
lenFix ( show mi ) 2 ++ ":" ++
lenFix ( show se ) 2
| otherwise = lenFix ( show hr ) 2 ++ ":" ++
lenFix ( show mi ) 2 ++ ":" ++
lenFix ( show se ) 2 ++ "." ++
lenFix ( show ms ) 3
showDate :: DateTime -> String
showDate ( DateTime yr mo da hr mi se ms tz )
= lenFix ( show yr ) 4 ++ "-" ++
lenFix ( show mo ) 2 ++ "-" ++
lenFix ( show da ) 2
dtShow :: DateTime -> String -- return string form
dtShow ( DateTime yr mo da hr mi se ms tz )
= showDate ( DateTime yr mo da hr mi se ms tz ) ++ "T" ++
showTime ( DateTime yr mo da hr mi se ms tz ) ++ showTZ tz
carryMins :: DateTime -> DateTime
carryMins ( DateTime yr mo da hr mi se ms tz )
| newhrs >= 24 = carryHours ( DateTime yr mo da newhrs (mi`mod`60) se ms tz )
| otherwise = ( DateTime yr mo da newhrs (mi`mod`60) se ms tz )
where
newhrs = (hr+(mi`div`60))
carryHours :: DateTime -> DateTime
carryHours ( DateTime yr mo da hr mi se ms tz )
= ( DateTime y m d (hr`mod`24) mi se ms tz )
where
(DateTime y m d _ _ _ _ _) = fromJulianDate ((toJulianDate yr mo da)+ (hr`div`24))
normTZ :: DateTime -> DateTime
normTZ ( DateTime yr mo da hr mi se ms tz )
= carryMins ( DateTime yr mo da hr (mi-tz) se ms 0 )
-- = addMinutes (-tz) ( DateTime yr mo da hr mi se ms tz )
{- another way -}
addMilliSecs addms ( DateTime yr mo da hr mi se ms tz )
| totms < 1000 = DateTime yr mo da hr mi se totms tz
| otherwise = addSeconds addse ( DateTime yr mo da hr mi se newms tz )
where
totms = (ms+addms)
newms = totms `mod` 1000
addse = totms `div` 1000
addSeconds addse ( DateTime yr mo da hr mi se ms tz )
| totse < 60 = DateTime yr mo da hr mi totse ms tz
| otherwise = addMinutes addmi ( DateTime yr mo da hr mi newse ms tz )
where
totse = (se+addse)
newse = totse `mod` 60
addmi = totse `div` 60
addMinutes addmi ( DateTime yr mo da hr mi se ms tz )
| totmi < 60 = DateTime yr mo da hr totmi se ms tz
| otherwise = addHours addhr ( DateTime yr mo da hr newmi se ms tz )
where
totmi = (mi+addmi)
newmi = totmi `mod` 60
addhr = totmi `div` 60
addHours addhr ( DateTime yr mo da hr mi se ms tz )
| tothr < 24 = DateTime yr mo da tothr mi se ms tz
| otherwise = addDays addda ( DateTime yr mo da newhr mi se ms tz )
where
tothr = (hr+addhr)
newhr = tothr `mod` 24
addda = tothr `div` 24
addDays addda ( DateTime yr mo da hr mi se ms tz )
= DateTime newyr newmo newda hr mi se ms tz
where
-- newdate = fromJulianDate (toJulianDate yr mo (da+addda) )
-- newyr = dtYear newdate
-- newmo = dtMonth newdate
-- newda = dtDay newdate
DateTime newyr newmo newda _ _ _ _ _ = fromJulianDate ( (toJulianDate yr mo da)+addda )
{- another way -}
simpleEq :: DateTime -> DateTime -> Bool
--simpleEq ( DateTime yr1 mo1 da1 hr1 mi1 se1 ms1 tz1 ) ( DateTime yr2 mo2 da2 hr2 mi2 se2 ms2 tz2 ) = ( ( yr1 mo1 da1 hr1 mi1 se1 ms1 tz1 ) == ( yr2 mo2 da2 hr2 mi2 se2 ms2 tz2 ) )
simpleEq ( DateTime yr1 mo1 da1 hr1 mi1 se1 ms1 tz1 ) ( DateTime yr2 mo2 da2 hr2 mi2 se2 ms2 tz2 ) = ( ( yr1 == yr2 ) && ( mo1 == mo2 ) && ( da1 == da2 ) && ( hr1 == hr2 ) && ( mi1 == mi2 ) && ( se1 == se2 ) && ( ms1 == ms2 ) && ( tz1 == tz2 ) )
simpleLT :: DateTime -> DateTime -> Bool
simpleLT ( DateTime yr1 mo1 da1 hr1 mi1 se1 ms1 tz1 ) ( DateTime yr2 mo2 da2 hr2 mi2 se2 ms2 tz2 )
| (yr1<yr2) = True
| (yr1==yr2)&&(mo1<mo2) = True
| (yr1==yr2)&&(mo1==mo2)&&(da1<da2) = True
| (yr1==yr2)&&(mo1==mo2)&&(da1==da2)&&(hr1<hr2) = True
| (yr1==yr2)&&(mo1==mo2)&&(da1==da2)&&(hr1==hr2)&&(mi1<mi2) = True
| (yr1==yr2)&&(mo1==mo2)&&(da1==da2)&&(hr1==hr2)&&(mi1==mi2)&&(se1<se2) = True
| (yr1==yr2)&&(mo1==mo2)&&(da1==da2)&&(hr1==hr2)&&(mi1==mi2)&&(se1==se2)&&(ms1<ms2) = True
| otherwise = False
--------------------------------------------------------------------------------
--
-- Copyright (c) 2003, G. KLYNE. All rights reserved.
--
-- This file is part of Swish.
--
-- Swish is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- Swish is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with Swish; if not, write to:
-- The Free Software Foundation, Inc.,
-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
--------------------------------------------------------------------------------
-- $Source: /file/cvsdev/HaskellUtils/DateTime.hs,v $
-- $Author: graham $
-- $Revision: 1.1 $
-- $Log: DateTime.hs,v $
-- Revision 1.1 2004/01/13 12:31:24 graham
-- Move modules from HaskellRDF to HaskellUtils project
--
-- Revision 1.23 2003/09/24 18:50:52 graham
-- Revised module format to be Haddock compatible.
--
-- Revision 1.22 2003/06/03 19:24:13 graham
-- Updated all source modules to cite GNU Public Licence
--
-- Revision 1.21 2003/02/21 14:35:10 ronan
-- Minor performance tweaks.
--
-- Revision 1.20 2003/02/17 13:15:13 ronan
-- fromJulianDate passed exhaustive 2299-3601
--
-- Revision 1.19 2003/02/15 13:44:29 graham
-- Added test output to file.
-- Still a bug around 2300-03-01
--
-- Revision 1.18 2003/02/15 12:00:30 graham
-- Fix 400-year roll-over bug
--
-- Revision 1.17 2003/02/14 20:33:43 ronan
-- fromJulianDate works.
--
-- Revision 1.16 2003/02/14 20:31:44 ronan
-- fromJulianDate works.
--
-- Revision 1.14 2003/02/14 10:22:06 graham
-- fromJulianDate works for dates before 2100
--
-- Revision 1.13 2003/02/13 13:01:55 graham
-- Added some test cases for fromJulianDate and comparison
-- with date rollover. Currently not working.
--
-- Revision 1.12 2003/02/13 10:26:01 ronan
-- Minor tweaks to performance. Still passes tests.
--
-- Revision 1.11 2003/02/12 12:26:43 ronan
-- fromJulianDate now also working perfectly.
--
-- Revision 1.10 2003/02/12 11:57:02 ronan
-- Julian date stuff PERFECT!!!
--
-- Revision 1.9 2003/02/11 18:08:43 graham
-- Added loads of new test cases
-- Moved Julian date test cases to DateTimeTest
--
-- Revision 1.8 2003/02/11 16:04:28 ronan
-- Put Julian in DateTime and added normTZ functionality. Vaguely tested (2 cases).
--
-- Revision 1.7 2003/02/11 12:02:34 graham
-- Minor updates
-- Add some Julian date test cases
--
-- Revision 1.6 2003/02/11 10:47:17 ronan
-- Work on DateTime. (==) works as intended. Julian date work done, needs testing.
--
-- Revision 1.5 2003/02/10 14:21:57 ronan
-- Tests very bodged, but working. Show working to a good standard. (==) replaced with (===) for now. Next step: timezone correction.
--
-- Revision 1.2 2003/02/09 09:20:37 ronan
-- Working on DateTime in Haskell. Not working. Yet.
--
-- Revision 1.1 2003/02/07 18:46:07 graham
-- Add new date/time modules
-- Update copyright year
--
| amccausl/Swish | Swish/HaskellUtils/DateTime.hs | lgpl-2.1 | 15,345 | 0 | 20 | 4,754 | 3,872 | 2,072 | 1,800 | 178 | 3 |
module Dictionary where
import General
import Data.List (intersperse,sortBy, group,sort)
import Data.Char
import System.IO
import Util
import System.IO.Unsafe (unsafePerformIO)
import qualified Data.Set as Set
import SharedString
import Dict.ErrM
import Data.Maybe
import qualified Data.Set as Set
-- | An instance of the Dict class provides information on how
-- | to construct an entry for a given dictionary type. In
-- | particular, it associated a word class identifier to the
-- | dictionary type.
class Param a => Dict a where
dictword :: (a -> Str) -> String
dictword f = getDictWord f
category :: (a -> Str) -> String
category = const "Undefined"
defaultAttr :: (a -> Str) -> Attr
defaultAttr = const noComp
attrException :: (a -> Str) -> [(a,Attr)]
attrException = const []
getDictWord f =
case [x | (x:_) <- map (unStr . f) values] of
(w:_) -> w
_ -> "ET"
-- | The Dictionary ADT
data Dictionary = Dict [Entry]
-- | Dictionary_Word = citation form
type Dictionary_Word = String
-- | Part of speech
type Category = String
-- | Untyped inherent
type Inherent = String
-- | Untyped inflection parameter configuration
type Untyped = String
-- | Untyped inflection table
type Inflection_Table = [(Untyped,(Attr,Str))]
-- | It is possible to add information about every word form,
-- | such as pronounciation.
type Extra = [Str]
-- | Paradigm identifier.
type Paradigm = String
type LemmaID = String
-- | An Entry contains all information about a word.
type Entry = (LemmaID, Dictionary_Word, Paradigm, Category, [Inherent], Inflection_Table,Extra)
-- | An Entry without the compound information.
type EntryN = (Dictionary_Word, Category, [Inherent], [(Untyped,Str)])
get_id :: Entry -> String
get_id (i,_,_,_,_,_,_) = i
is_equal_entry :: Entry -> Entry -> Bool
is_equal_entry e1 e2 = f e1 == f e2
where f (_,d,_,c,inhs,infl,e) = (d,c,inhs,sort_table infl,e)
sort_table table = [(p,(a,strings (sort (unStr s)))) | (p,(a,s)) <- table]
-- | Empty Dictionary
emptyDict :: Dictionary
emptyDict = Dict []
emptyEntry :: Entry
emptyEntry = ([],[],[],[],[],[],[])
is_empty_entry :: Entry -> Bool
is_empty_entry e = case e of
(_,[],_,[],[],[],[]) -> True
_ -> False
is_empty_dictionary :: Dictionary -> Bool
is_empty_dictionary (Dict xs) = and $ map is_empty_entry xs
-- | Perform sharing on the strings in the Dictionary.
shareDictionary :: Dictionary -> Dictionary
shareDictionary (Dict xs) = Dict $ map shareEntry xs
-- | set paradigm id.
set_paradigm_id :: String -> Entry -> Entry
set_paradigm_id p (i,x@(_:_),_,c,y,z,w) = (i,x,p,c,y,z,w)
set_paradigm_id _ e = e
-- | set pos.
set_pos :: String -> Entry -> Entry
set_pos pos (i,x,p,_,y,z,w) = (i,x,p,pos,y,z,w)
get_pos :: Entry -> Category
get_pos (i,x,p,pos,y,z,w) = pos
set_inhs :: [String] -> Entry -> Entry
set_inhs inhs (i,x,p,pos,_,z,w) = (i,x,p,pos,inhs,z,w)
-- | get head.
get_head :: Entry -> String
get_head (i,h,p,x,y,z,w) = h
-- | set head.
set_head :: String -> Entry -> Entry
set_head h (i,_,p,x,y,z,w) = (i,h,p,x,y,z,w)
-- | set lemma id.
set_lemma_id :: String -> Entry -> Entry
set_lemma_id i (_,x,p,pos,y,z,w) = (i,x,p,pos,y,z,w)
get_lemma_id :: Entry -> String
get_lemma_id (i,x,p,pos,y,z,w) = i
replace_attr :: Attr -> Attr -> Entry -> Entry
replace_attr a b (i,x,p,pos,y,table,w) = (i,x,p,pos,y,table',w)
where table' = [(u,(if n == a then b else n,str)) | (u,(n,str)) <- table]
replace_param :: [(String,String)] -> Entry -> Entry
replace_param xs (i,x,p,pos,y,table,w) = (i,x,p,pos,y,table',w)
where table' = [(param_map u,s) | (u,s) <- table]
param_map u = case lookup u xs of
Nothing -> u
Just p_new -> p_new
-- | share an Entry
shareEntry :: Entry -> Entry
shareEntry (i,dict_word, p, cat, inhs, infl, extra) =
(i,
shareString dict_word,
shareString p,
shareString cat,
map shareString inhs,
shareTable infl,
extra)
where shareTable xs = map (\(a,(p,b)) -> (shareString a,(p,shareStr b))) xs
-- [(Untyped,(Attr,Str))]
multi_words :: ([String], Entry ,[String]) -> Entry
multi_words (xs,e,ys) = e'
where
f = (ps ++) . (++ ss)
ps = unwords xs ++ (if (null xs) then "" else " ")
ss = (if (null ys) then "" else " ") ++ unwords ys
e' = case e of
(id,dict_word, p, cat, inhs, infl, extra) ->
(id,f dict_word, p, cat, inhs,
[ (p,(a,mapStr f str)) | (p,(a,str)) <- infl], extra)
first_mw :: Category -> (String -> Entry) -> (String -> Entry)
first_mw pos f s =
case words s of
(x:xs) -> set_pos pos $ multi_words ([],f x,xs)
_ -> error $ "first, invalid multiword: " ++ s
last_mw :: Category -> (String -> Entry) -> (String -> Entry)
last_mw pos f s = set_pos pos $ multi_words (xs, f l, [])
where ws = words s
l = last ws
xs = init ws
mw_position :: Int -> Category -> (String -> Entry) -> (String -> Entry)
mw_position i pos f s = set_pos pos $ multi_words (fw, f t, ls)
where ws = words s
fw = take (i-1) ws
t = ws !! (i-1)
ls = drop i ws
-- | create an inflection table with the compound information.
infTable :: Dict a => (a -> Str) -> Inflection_Table
infTable f = prTableAttr f (defaultAttr f) (attrException f)
-- | Translate the function encoding the extra information about the
-- | word forms to a list of strings.
extraTable :: Dict a => (a -> Str) -> Extra
extraTable f = [s | (_,s) <- table f]
-- | Translate an inflection function to an Entry.
entry :: Dict a => (a -> Str) -> Entry
entry f = entryI f []
-- | Translate an inflection function with inherent information to an Entry.
entryI :: Dict a => (a -> Str) -> [Inherent] -> Entry
entryI f ihs = (entry_id f ihs [], dictword f, "", category f, ihs, infTable f,[])
entry_id :: Dict a => (a -> Str) -> [Inherent] -> Paradigm -> LemmaID
entry_id f inhs p = construct_name (dictword f) (category f) (concat (intersperse "_" inhs)) p
-- | Translate an inflection function with paradigm identifier to an Entry.
entryP :: Dict a => (a -> Str) -> Paradigm -> Entry
entryP f p = entryIP f [] p
-- | Inflection function + inherent + paradigm identifier -> Entry
entryIP :: Dict a => (a -> Str) -> [Inherent] -> Paradigm -> Entry
entryIP f ihs p = (entry_id f ihs p, dictword f, p , category f, ihs, infTable f,[])
-- | Inflection function with extra information
entryWithInfo :: Dict a => (a -> (Str,Str)) -> Entry
entryWithInfo f = entryWithInfoI f []
-- | inflection function with extra information and inherent information.
entryWithInfoI :: Dict a => (a -> (Str,Str)) -> [Inherent] -> Entry
entryWithInfoI fun ihs = (entry_id f ihs [], dictword f, "", category f, ihs, infTable f,extraTable g)
where f = \a -> fst (fun a)
g = \a -> snd (fun a)
-- entryI (\a -> unionStr (f a) (unionStr (mkStr "|") (g a))) ihs
-- | inflection function with extra information and inherent information.
entryWithInfoP :: Dict a => (a -> (Str,Str)) -> Paradigm -> Entry
entryWithInfoP f = entryWithInfoIP f []
-- | inflection function with extra information and inherent information
-- | and paradigm identifier.
entryWithInfoIP :: Dict a => (a -> (Str,Str)) -> [Inherent] -> Paradigm -> Entry
entryWithInfoIP fun ihs p = (entry_id f ihs p, dictword f, p, category f, ihs, infTable f,extraTable g)
where f = \a -> fst (fun a)
g = \a -> snd (fun a)
-- | Create a table with compound attributes.
prTableAttr :: Param a => (a -> Str) -> Attr -> [(a,Attr)] -> [(String,(Attr,Str))]
prTableAttr t da ts =
[(prValue a,(maybe da id (lookup a ts),s)) | (a,s) <- table t]
-- | Create a table with compound attributes when compound analysis
-- | is not used.
--prTableW :: Param a => Table a -> [(String,(Attr,Str))]
--prTableW t = [ (a,(noComp,s)) | (a,s) <- prTable t]
-- | Transform typed table to untyped.
prTable :: Param a => Table a -> Table String
prTable = map (\ (a,b) -> (prValue a, b))
unDict :: Dictionary -> [Entry]
unDict (Dict xs) = xs
-- | Number of Entry:s in Dictionary
size :: Dictionary -> Int
size = length . unDict
-- | Number of word forms.
sizeW :: Dictionary -> Int
sizeW = sum . map sizeEntry . unDict
-- | Number of word forms in Entry.
sizeEntry :: Entry -> Int
sizeEntry (_,_,_,_,_,t,_) = length t
-- | Create a Dictionary
dictionary :: [Entry] -> Dictionary
dictionary = Dict . filter (not . is_empty_entry)
is_empty :: Dictionary -> Bool
is_empty (Dict []) = True
is_empty _ = False
-- | Concatenate two dictionaries.
unionDictionary :: Dictionary -> Dictionary -> Dictionary
unionDictionary (Dict xs) (Dict ys) = Dict $ xs ++ ys
-- | Concatenate a list of Dictionaries.
unionDictionaries :: [Dictionary] -> Dictionary
unionDictionaries = foldr unionDictionary emptyDict
-- | Remove attributes from a dictionary.
removeAttr :: Dictionary -> [EntryN]
removeAttr = map noAttr . unDict
-- | Remove attributes from Entry. Also remove extra information.
noAttr :: Entry -> EntryN
noAttr (_,d,_,c,inh,tab,_) = (d,c,inh,[(i, s) | (i,(_,s)) <- tab])
-- | Group a dictionary into categories; reverses the entries...
classifyDict :: Dictionary -> [(Category,[Entry])]
classifyDict = foldr addNext [] . unDict
where
addNext entry@(_,_,_,cat,_,_,_) dict = case dict of
(c,es) : dict' | cat == c -> (c, entry:es) : dict'
ces : dict' -> ces : addNext entry dict'
[] -> [(cat,[entry])]
-- | A list of the word form together with the analyses and compound attributes.
type FullFormLex = [(String,[(Attr,String)])]
-- | A fullform lexicon structured around the word identifier
dict2idlex :: Dictionary -> FullFormLex
dict2idlex (Dict es) = map entry2id es
-- | Translate Entry to a word identifier and its associated word forms.
entry2id :: Entry -> (String,[(Attr,String)])
entry2id (name, stem, para, typ, inhs, infl,_) =
(name,[(a,concat $ "{":(jword w):jk:(jhead stem):jk :(jpos typ):
(jparam par):jk:(jinhs inhs):jk:(jid name):jk:(jp para):jk:(jattr (show a)) : ["}"])
| (par,(a,str)) <- infl,
w <- unStr str])
-- name = construct_name stem typ (concat (intersperse "_" inhs)) para
testdata :: Dictionary -> [(String,String,String,String,[String],[String],String)]
testdata (Dict es) = concat $ map createTest es
where
createTest (id,stem,para,typ,inhs,infl,_) = [(s,stem,typ,para,words u, inhs,id) | (u,(_,str)) <- infl, s <- f (unStr str)]
f [] = [""]
f xs = xs
entrywords :: Entry -> (String,[String])
entrywords (_,stem, para, typ, inhs, infl,extra) = (stem, [ x | (_,(_,str)) <- infl, x <- unStr str ])
--- | Create a fullform lexicon.
dict2fullform :: Dictionary -> FullFormLex
dict2fullform (Dict es) = concat $ map entry2full es
entry2full :: Entry -> [(String,[(Attr,String)])]
entry2full (name, stem, para, typ, inhs, infl,_) =
concatMap mkForm infl where
mkForm (par,(a,str)) =
[(s1, [(a,concat ["{",jword s1,jk,jhead stem,jk,jpos typ,jk,jparam par,jk,jinhs inhs,jk,jid name,jk,jp para,jk,jattr (show a),"}"])])
| s1 <- unStr str]
jword :: String -> String
jword s1 = "\"word\":" ++ pr_v s1
jhead :: String -> String
jhead s1 = "\"head\":" ++ pr_v s1
jpos :: String -> String
jpos s1 = "\"pos\":" ++ pr_v s1
jparam :: String -> String
jparam s1 = "\"param\":" ++ pr_v s1
jinhs :: [String] -> String
jinhs s1 = "\"inhs\":" ++ "[" ++ (concat (intersperse ", " (map quote s1))) ++ "]"
jid :: String -> String
jid s1 = "\"id\":" ++ pr_v s1
jp :: String -> String
jp s1 = "\"p\":" ++ pr_v s1
jattr :: String -> String
jattr s1 = "\"attr\":" ++ pr_v s1
jk :: String
jk = ","
pr_v :: String -> String
pr_v [] = show "*"
pr_v v = quote v
--json_list :: String -> [String] -> String
--json_list field values = quote field ++ ":[" ++ (concat (intersperse ", " (map quote values))) ++ "]"
-- | Create word identifier.
construct_name :: String -> String -> String -> String -> String
construct_name stem typ inhs para =
case para of
[] -> nospace $ stem++"_"++typ++ inhs'
para -> nospace $ stem++"_"++typ++ inhs' ++ "_" ++para
where
inhs' = if null inhs then "" else "_" ++ inhs
nospace = map (\c -> if (c==' ') then '_' else c)
type Unknowns = Set.Set String
type WrongArguments = Set.Set (String,Int)
type ParadigmErrors = (Unknowns, WrongArguments)
emptyParadigmErrors :: ParadigmErrors
emptyParadigmErrors = (Set.empty,Set.empty)
insertParadigmError :: Either String (String,Int) -> ParadigmErrors -> ParadigmErrors
insertParadigmError (Left p) (unknowns, wa) = (Set.insert p unknowns, wa)
insertParadigmError (Right a) (us, wrong_arguments) =
(us, Set.insert a wrong_arguments)
prErrorTable :: [String] -> String
prErrorTable ts = unlines
[unwords [" ",pad s1 c1,pad s2 c2, pad s3 c3] | (s1,s2,s3) <- sp]
where f1 (x,_,_) = length x
f2 (_,x,_) = length x
f3 (_,_,x) = length x
c1 = maximum (map f1 sp)
c2 = maximum (map f2 sp)
c3 = maximum (map f3 sp)
sp = splits ts
pad s c = s ++ take (c - length s) (repeat ' ')
splits [] = []
splits [x] = [(x,[],[])]
splits [x,y] = [(x,y,[])]
splits xs = case splitAt 3 xs of
([x,y,z],rs) -> (x,y,z):splits rs
equal_entry :: [(String,String)] -> Entry -> Entry -> Maybe (String,String)
equal_entry tab e1 e2
| is_equal_entry e1 e2 = if (except tab e1 e2) then Nothing else Just (pr e1, pr e2)
| otherwise = Nothing
where pr (name, stem, para, typ, inhs, infl,extra) = para
except xs (n1, _, _, _,_,_,_) (n2, _, _, _,_,_,_) = elem (n1,n2) xs || elem (n2,n1) xs
check_duplication :: [(Entry,[Entry])] -> [(String,String)] -> [(String,String)]
check_duplication entries tab = catMaybes $ run_check entries
where run_check [] = []
run_check ((e,es):ess) = map (equal_entry tab e) es ++ run_check ess
print_duplicates :: [(Entry,[Entry])] -> [(String,String)] -> IO ()
print_duplicates ds tab = case clean (check_duplication ds tab) of
(x:xs) -> do prStd $ "\nPotentially identical paradigms found:"
prStd $ unlines [ " " ++ p1 ++ " ~ " ++ p2 | (p1,p2) <- (x:xs)]
_ -> prStd "No identical paradigms found!"
where clean [] = []
clean ((x@(p1,p2)):xs)
| elem (p1,p2) xs || elem (p2,p1) xs = x:clean xs
| otherwise = clean xs
transform_dictionary (pos,inhs,param) (Dict xs) = Dict (map tr xs)
where tr (name, stem, para, typ, is, infl,extra) =
let infl' = [(param_f (typ,a,is),b) | (a,b) <- infl] in
(name,stem,para,pos_f typ, inhs_f is,infl',extra)
pos_f = f pos
inhs_f = f inhs
param_f i@(p,a,is)= case param of
Nothing -> a
Just g -> g i
f Nothing = id
f (Just g) = g
map_wordforms :: (String -> String) -> Entry -> Entry
map_wordforms f (name, stem, para, typ, inhs, infl,extra) =
(name,stem,para,typ,inhs,infl',extra)
where infl' = [(u,(a,strings (map f (unStr ss)))) | (u,(a,ss)) <- infl]
duplicated_lemma_id :: Dictionary -> [String]
duplicated_lemma_id (Dict es) = check (map get_lemma_id es) (Set.empty,Set.empty)
where check [] (_,b) = Set.toList b
check (x:xs) (s,b)
| Set.member x s = check xs (s,Set.insert x b)
| otherwise = check xs (Set.insert x s, b)
remove_param :: String -> Entry -> Entry
remove_param p (name, stem, para, typ, inhs, infl,extra) =
(name, stem, para, typ, inhs, infl',extra)
where infl' = [f (u,(a,ss)) | (u,(a,ss)) <- infl]
f (u,(a,ss))
| elem p (words u) = (u,(a,nonExist))
| otherwise = (u,(a,ss))
type Positive = [String]
type Negative = [String]
expand_multiword :: String -> [(Positive,Negative,String)] -> Entry -> Entry
expand_multiword p xs (name, stem, para, typ, inhs, infl,extra) =
(name, stem, para, typ, inhs, infl',extra)
where infl' = [(u,(a,strings (concat (map (f (words u) . words) (unStr ss))))) | (u,(a,ss)) <- infl]
f us = map unwords . flatten . map (g us)
g us x = if x == p then [ s | (pos,neg,s) <- xs, all_in pos us && (null neg || not (all_in neg us))] else [x]
all_in [] ys = True
all_in (x:xs) ys = elem x ys && all_in xs ys
flatten [] = [[]]
flatten (x:xs) = [x':xs' | x' <- x, xs' <- flatten xs]
combine_tables :: Entry -> Entry -> Entry
combine_tables (name, stem, para, typ, inhs, infl,extra) (_, _, _, _, _, infl1, _) =
(name, stem, para, typ, inhs, infl',extra)
where infl' = [(u,(a,unionStr ss ss2)) | ((u,(a,ss)),(_,(_,ss2))) <- zip infl infl1]
| johnjcamilleri/maltese-functional-morphology | lib/Dictionary.hs | lgpl-3.0 | 16,970 | 0 | 24 | 4,037 | 7,125 | 4,001 | 3,124 | 313 | 4 |
-- P01 (*) Find the last element of a list.
lastItem :: [a] -> a
lastItem (x:[]) = x
lastItem (_:ys) = lastItem ys
-- P02 (*) Find the last but one element of a list.
lastButOne :: [a] -> a
lastButOne (x:_:[]) = x
lastButOne (_:ys) = lastButOne ys
-- P03 (*) Find the K'th element of a list.
elementAt :: Int -> [a] -> a
elementAt 1 (x:_) = x
elementAt i (_:ys) = elementAt (i - 1) ys
-- P04 (*) Find the number of elements of a list.
lengthOf :: [a] -> Int
lengthOf xs = len xs 0 where
len [] acc = acc
len (_:ys) acc = len ys (acc+1)
| andreashug/ninty-nine-problems | haskell/src/lists.hs | unlicense | 554 | 0 | 9 | 134 | 232 | 124 | 108 | 13 | 2 |
-- Copyright (c) 2010 - Seweryn Dynerowicz
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- imitations under the License.
module Utils
( log2
, toArray
, arrayOrder
, squareMultiply
) where
import Data.Bits
import Data.Array
log2 :: Int -> Int
log2 1 = 0
log2 n = 1 + log2 (n `div` 2)
toArray :: Int -> [s] -> Array (Int,Int) s
toArray n ms | ((n*n) == (length ms)) =
array bnds (zip (range bnds) ms)
where bnds = ((1,1),(n,n))
arrayOrder :: Array (Int,Int) s -> Int
arrayOrder as = fst (snd (bounds as))
squareMultiply :: (a -> a -> a) -> a -> a -> Int -> a
squareMultiply _ mulId _ 0 = mulId
squareMultiply mul mulId a k | (k>0) = pInt k ((log2 k)-1) a a
where pInt _ i _ acc | (i<0) = acc
pInt k i a acc = pInt k (i-1) a uAcc
where uAcc = if (testBit k i)
then (mul (mul a acc) acc)
else (mul acc acc) | sdynerow/SemiringsLibrary | Utils.hs | apache-2.0 | 1,367 | 0 | 13 | 337 | 432 | 234 | 198 | 24 | 3 |
{-# LANGUAGE TypeFamilies, FlexibleInstances, FlexibleContexts,
DeriveDataTypeable, StandaloneDeriving #-}
-----------------------------------------------------------------------------
-- |
-- Module : HEP.Automation.MadGraph.Model.ADMXUDD
-- Copyright : (c) 2011, 2012 Ian-Woo Kim
--
-- License : BSD3
-- Maintainer : Ian-Woo Kim <[email protected]>
-- Stability : experimental
-- Portability : GHC
--
-- ADM (asymmetric dark matter) XUDD model
--
-----------------------------------------------------------------------------
module HEP.Automation.MadGraph.Model.ADMXUDD where
import Control.Monad.Identity
import Data.Typeable
import Data.Data
import Text.Parsec
import Text.Printf
import Text.StringTemplate
import Text.StringTemplate.Helpers
-- from hep-platform
import HEP.Automation.MadGraph.Model
-- |
data ADMXUDD = ADMXUDD
deriving (Show, Typeable, Data)
instance Model ADMXUDD where
data ModelParam ADMXUDD = ADMXUDDParam { mgluino :: Double
, msquark :: Double
, mneut :: Double }
deriving Show
briefShow ADMXUDD = "ADMXUDD"
madgraphVersion _ = MadGraph5
modelName _ = "ADMXUDD"
modelFromString str = case str of
"ADMXUDD" -> Just ADMXUDD
_ -> Nothing
paramCard4Model ADMXUDD = "param_card_ADMXUDD.dat"
paramCardSetup tpath ADMXUDD (ADMXUDDParam mg msq mn) = do
templates <- directoryGroup tpath
return $ ( renderTemplateGroup
templates
[ ("mgluino", (printf "%.4e" mg :: String))
, ("msquark", (printf "%.4e" msq :: String))
, ("mneut", (printf "%.4e" mn :: String)) ]
(paramCard4Model ADMXUDD) ) ++ "\n\n\n"
briefParamShow (ADMXUDDParam mg msq mn) = "MG"++show mg++"MQ"++show msq ++ "MN"++show mn
interpreteParam str = let r = parse xuddparse "" str
in case r of
Right param -> param
Left err -> error (show err)
-- |
xuddparse :: ParsecT String () Identity (ModelParam ADMXUDD)
xuddparse = do
string "MG"
mgstr <- many1 (oneOf "+-0123456789.")
string "MQ"
mqstr <- many1 (oneOf "+-0123456789.")
string "MN"
mnstr <- many1 (oneOf "+-0123456789.")
return (ADMXUDDParam (read mgstr) (read mqstr) (read mnstr))
-----------------------------
-- for type representation
-----------------------------
-- |
admxuddTr :: TypeRep
admxuddTr = mkTyConApp (mkTyCon "HEP.Automation.MadGraph.Model.ADMXUDD.ADMXUDD") []
-- |
instance Typeable (ModelParam ADMXUDD) where
typeOf _ = mkTyConApp modelParamTc [admxuddTr]
-- |
deriving instance Data (ModelParam ADMXUDD) | wavewave/madgraph-auto-model | src/HEP/Automation/MadGraph/Model/ADMXUDD.hs | bsd-2-clause | 2,806 | 0 | 15 | 737 | 616 | 326 | 290 | 52 | 1 |
-- check if the number we supplied to it is a seven or not
lucky :: (Integral a) => a -> String
lucky 7 = "LUCKY NUMBER SEVEN!"
lucky x = "Sorry, you're out of luck, pal!"
-- without pattern matching, will use a lot if-else
sayMe :: (Integral a) => a -> String
sayMe 1 = "One!"
sayMe 2 = "Two!"
sayMe 3 = "Three!"
sayMe 4 = "Four!"
sayMe 5 = "Five!"
sayMe x = "Not between 1 and 5"
factorial :: (Integral a) => a -> a
factorial 0 = 1
factorial n = n * factorial (n-1)
-- pattern matching on tuples
addVectors :: (Num a) => (a, a) -> (a, a) -> (a, a)
{-addVectors a b = (fst a + fst b, snd a + snd b)-}
-- two pairs as parameters
addVectors (x1, y1) (x2, y2) = (x1 + x2, y1 + y2)
-- fst snd in triples (three elements tuple)
first :: (a, b, c) -> a
first (x, _, _) = x
second :: (a, b, c) -> b
second (_, x, _) = x
third :: (a, b, c) -> c
third (_, _, x) = x
-- sum element in a list
sumElement :: (Num a) => [(a, a)] -> [a]
sumElement xs = [a + b | (a, b) <- xs]
-- our head function
head' :: [a] -> a
head' [] = error "Can't call head on an empty list, dummy!"
head' (x:_) = x
-- tell
tell :: (Show a) => [a] -> String
tell [] = "Empty List"
tell (x: []) = "One element: " ++ show x
tell (x:y:[]) = "Two elements: " ++ show x ++ " and " ++ show y
tell (x:y:_) = "Too Long.First two are: " ++ show x ++ show y
-- length new implement
length' :: (Num b) => [a] -> b
length' [] = 0
length' (_:xs) = 1 + length' xs
-- our sum
sum' :: (Num a) => [a] -> a
sum' [] = 0
sum' (x:xs) = x + sum' xs
-- as patterns
capital :: String -> String
capital "" = "Empty string."
capital all@(x:xs) = "First letter of " ++ all ++ " is " ++ [x]
-- 用 [x] 而不是 x, 是因为 [x] 是字符串
| sharkspeed/dororis | languages/haskell/LYHGG/4-syntax-in-functions/1-pattern-matching.hs | bsd-2-clause | 1,692 | 0 | 9 | 400 | 725 | 400 | 325 | 40 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Mismi.EC2.Data (
module Mismi.EC2.Core.Data
, fromMismiInstanceType
, toMismiInstanceType
, fromMismiVirtualizationType
, toMismiVirtualizationType
, fromMismiBlockDeviceMapping
, toMismiTag
, fromMismiTag
) where
import Control.Lens ((.~), view)
import qualified Mismi.EC2.Amazonka as A
import Mismi.EC2.Core.Data
import P
fromMismiBlockDeviceMapping :: BlockDeviceMapping -> A.BlockDeviceMapping
fromMismiBlockDeviceMapping (BlockDeviceMapping n v) =
A.blockDeviceMapping n
& A.bdmVirtualName .~ Just v
fromMismiInstanceType :: MismiInstanceType -> A.InstanceType
fromMismiInstanceType m =
case m of
C1_Medium ->
A.C1_Medium
C1_XLarge ->
A.C1_XLarge
C3_2XLarge ->
A.C3_2XLarge
C3_4XLarge ->
A.C3_4XLarge
C3_8XLarge ->
A.C3_8XLarge
C3_Large ->
A.C3_Large
C3_XLarge ->
A.C3_XLarge
C4_2XLarge ->
A.C4_2XLarge
C4_4XLarge ->
A.C4_4XLarge
C4_8XLarge ->
A.C4_8XLarge
C4_Large ->
A.C4_Large
C4_XLarge ->
A.C4_XLarge
C5_18XLarge ->
A.C5_18XLarge
C5_2XLarge ->
A.C5_2XLarge
C5_4XLarge ->
A.C5_4XLarge
C5_9XLarge ->
A.C5_9XLarge
C5_Large ->
A.C5_Large
C5_XLarge ->
A.C5_XLarge
C5d_18XLarge ->
A.C5d_18XLarge
C5d_2XLarge ->
A.C5d_2XLarge
C5d_4XLarge ->
A.C5d_4XLarge
C5d_9XLarge ->
A.C5d_9XLarge
C5d_Large ->
A.C5d_Large
C5d_XLarge ->
A.C5d_XLarge
CC1_4XLarge ->
A.CC1_4XLarge
CC2_8XLarge ->
A.CC2_8XLarge
CG1_4XLarge ->
A.CG1_4XLarge
CR1_8XLarge ->
A.CR1_8XLarge
D2_2XLarge ->
A.D2_2XLarge
D2_4XLarge ->
A.D2_4XLarge
D2_8XLarge ->
A.D2_8XLarge
D2_XLarge ->
A.D2_XLarge
F1_16XLarge ->
A.F1_16XLarge
F1_2XLarge ->
A.F1_2XLarge
G2_2XLarge ->
A.G2_2XLarge
G2_8XLarge ->
A.G2_8XLarge
G3_16XLarge ->
A.G3_16XLarge
G3_4XLarge ->
A.G3_4XLarge
G3_8XLarge ->
A.G3_8XLarge
H1_16XLarge ->
A.H1_16XLarge
H1_2XLarge ->
A.H1_2XLarge
H1_4XLarge ->
A.H1_4XLarge
H1_8XLarge ->
A.H1_8XLarge
HI1_4XLarge ->
A.HI1_4XLarge
HS1_8XLarge ->
A.HS1_8XLarge
I2_2XLarge ->
A.I2_2XLarge
I2_4XLarge ->
A.I2_4XLarge
I2_8XLarge ->
A.I2_8XLarge
I2_XLarge ->
A.I2_XLarge
I3_16XLarge ->
A.I3_16XLarge
I3_2XLarge ->
A.I3_2XLarge
I3_4XLarge ->
A.I3_4XLarge
I3_8XLarge ->
A.I3_8XLarge
I3_Large ->
A.I3_Large
I3_Metal ->
A.I3_Metal
I3_XLarge ->
A.I3_XLarge
M1_Large ->
A.M1_Large
M1_Medium ->
A.M1_Medium
M1_Small ->
A.M1_Small
M1_XLarge ->
A.M1_XLarge
M2_2XLarge ->
A.M2_2XLarge
M2_4XLarge ->
A.M2_4XLarge
M2_XLarge ->
A.M2_XLarge
M3_2XLarge ->
A.M3_2XLarge
M3_Large ->
A.M3_Large
M3_Medium ->
A.M3_Medium
M3_XLarge ->
A.M3_XLarge
M4_10XLarge ->
A.M4_10XLarge
M4_16XLarge ->
A.M4_16XLarge
M4_2XLarge ->
A.M4_2XLarge
M4_4XLarge ->
A.M4_4XLarge
M4_Large ->
A.M4_Large
M4_XLarge ->
A.M4_XLarge
M5_12XLarge ->
A.M5_12XLarge
M5_24XLarge ->
A.M5_24XLarge
M5_2XLarge ->
A.M5_2XLarge
M5_4XLarge ->
A.M5_4XLarge
M5_Large ->
A.M5_Large
M5_XLarge ->
A.M5_XLarge
M5d_12XLarge ->
A.M5d_12XLarge
M5d_24XLarge ->
A.M5d_24XLarge
M5d_2XLarge ->
A.M5d_2XLarge
M5d_4XLarge ->
A.M5d_4XLarge
M5d_Large ->
A.M5d_Large
M5d_XLarge ->
A.M5d_XLarge
P2_16XLarge ->
A.P2_16XLarge
P2_8XLarge ->
A.P2_8XLarge
P2_XLarge ->
A.P2_XLarge
P3_16XLarge ->
A.P3_16XLarge
P3_2XLarge ->
A.P3_2XLarge
P3_8XLarge ->
A.P3_8XLarge
R3_2XLarge ->
A.R3_2XLarge
R3_4XLarge ->
A.R3_4XLarge
R3_8XLarge ->
A.R3_8XLarge
R3_Large ->
A.R3_Large
R3_XLarge ->
A.R3_XLarge
R4_16XLarge ->
A.R4_16XLarge
R4_2XLarge ->
A.R4_2XLarge
R4_4XLarge ->
A.R4_4XLarge
R4_8XLarge ->
A.R4_8XLarge
R4_Large ->
A.R4_Large
R4_XLarge ->
A.R4_XLarge
R5_12XLarge ->
A.R5_12XLarge
R5_16XLarge ->
A.R5_16XLarge
R5_24XLarge ->
A.R5_24XLarge
R5_2XLarge ->
A.R5_2XLarge
R5_4XLarge ->
A.R5_4XLarge
R5_8XLarge ->
A.R5_8XLarge
R5_Large ->
A.R5_Large
R5_Metal ->
A.R5_Metal
R5_XLarge ->
A.R5_XLarge
R5d_12XLarge ->
A.R5d_12XLarge
R5d_16XLarge ->
A.R5d_16XLarge
R5d_24XLarge ->
A.R5d_24XLarge
R5d_2XLarge ->
A.R5d_2XLarge
R5d_4XLarge ->
A.R5d_4XLarge
R5d_8XLarge ->
A.R5d_8XLarge
R5d_Large ->
A.R5d_Large
R5d_Metal ->
A.R5d_Metal
R5d_XLarge ->
A.R5d_XLarge
T1_Micro ->
A.T1_Micro
T2_2XLarge ->
A.T2_2XLarge
T2_Large ->
A.T2_Large
T2_Medium ->
A.T2_Medium
T2_Micro ->
A.T2_Micro
T2_Nano ->
A.T2_Nano
T2_Small ->
A.T2_Small
T2_XLarge ->
A.T2_XLarge
X1_16XLarge ->
A.X1_16XLarge
X1_32XLarge ->
A.X1_32XLarge
X1e_16XLarge ->
A.X1e_16XLarge
X1e_2XLarge ->
A.X1e_2XLarge
X1e_32XLarge ->
A.X1e_32XLarge
X1e_4XLarge ->
A.X1e_4XLarge
X1e_8XLarge ->
A.X1e_8XLarge
X1e_XLarge ->
A.X1e_XLarge
Z1d_12XLarge ->
A.Z1d_12XLarge
Z1d_2XLarge ->
A.Z1d_2XLarge
Z1d_3XLarge ->
A.Z1d_3XLarge
Z1d_6XLarge ->
A.Z1d_6XLarge
Z1d_Large ->
A.Z1d_Large
Z1d_XLarge ->
A.Z1d_XLarge
toMismiInstanceType :: A.InstanceType -> MismiInstanceType
toMismiInstanceType i =
case i of
A.C1_Medium ->
C1_Medium
A.C1_XLarge ->
C1_XLarge
A.C3_2XLarge ->
C3_2XLarge
A.C3_4XLarge ->
C3_4XLarge
A.C3_8XLarge ->
C3_8XLarge
A.C3_Large ->
C3_Large
A.C3_XLarge ->
C3_XLarge
A.C4_2XLarge ->
C4_2XLarge
A.C4_4XLarge ->
C4_4XLarge
A.C4_8XLarge ->
C4_8XLarge
A.C4_Large ->
C4_Large
A.C4_XLarge ->
C4_XLarge
A.C5_18XLarge ->
C5_18XLarge
A.C5_2XLarge ->
C5_2XLarge
A.C5_4XLarge ->
C5_4XLarge
A.C5_9XLarge ->
C5_9XLarge
A.C5_Large ->
C5_Large
A.C5_XLarge ->
C5_XLarge
A.C5d_18XLarge ->
C5d_18XLarge
A.C5d_2XLarge ->
C5d_2XLarge
A.C5d_4XLarge ->
C5d_4XLarge
A.C5d_9XLarge ->
C5d_9XLarge
A.C5d_Large ->
C5d_Large
A.C5d_XLarge ->
C5d_XLarge
A.CC1_4XLarge ->
CC1_4XLarge
A.CC2_8XLarge ->
CC2_8XLarge
A.CG1_4XLarge ->
CG1_4XLarge
A.CR1_8XLarge ->
CR1_8XLarge
A.D2_2XLarge ->
D2_2XLarge
A.D2_4XLarge ->
D2_4XLarge
A.D2_8XLarge ->
D2_8XLarge
A.D2_XLarge ->
D2_XLarge
A.F1_16XLarge ->
F1_16XLarge
A.F1_2XLarge ->
F1_2XLarge
A.G2_2XLarge ->
G2_2XLarge
A.G2_8XLarge ->
G2_8XLarge
A.G3_16XLarge ->
G3_16XLarge
A.G3_4XLarge ->
G3_4XLarge
A.G3_8XLarge ->
G3_8XLarge
A.H1_16XLarge ->
H1_16XLarge
A.H1_2XLarge ->
H1_2XLarge
A.H1_4XLarge ->
H1_4XLarge
A.H1_8XLarge ->
H1_8XLarge
A.HI1_4XLarge ->
HI1_4XLarge
A.HS1_8XLarge ->
HS1_8XLarge
A.I2_2XLarge ->
I2_2XLarge
A.I2_4XLarge ->
I2_4XLarge
A.I2_8XLarge ->
I2_8XLarge
A.I2_XLarge ->
I2_XLarge
A.I3_16XLarge ->
I3_16XLarge
A.I3_2XLarge ->
I3_2XLarge
A.I3_4XLarge ->
I3_4XLarge
A.I3_8XLarge ->
I3_8XLarge
A.I3_Large ->
I3_Large
A.I3_Metal ->
I3_Metal
A.I3_XLarge ->
I3_XLarge
A.M1_Large ->
M1_Large
A.M1_Medium ->
M1_Medium
A.M1_Small ->
M1_Small
A.M1_XLarge ->
M1_XLarge
A.M2_2XLarge ->
M2_2XLarge
A.M2_4XLarge ->
M2_4XLarge
A.M2_XLarge ->
M2_XLarge
A.M3_2XLarge ->
M3_2XLarge
A.M3_Large ->
M3_Large
A.M3_Medium ->
M3_Medium
A.M3_XLarge ->
M3_XLarge
A.M4_10XLarge ->
M4_10XLarge
A.M4_16XLarge ->
M4_16XLarge
A.M4_2XLarge ->
M4_2XLarge
A.M4_4XLarge ->
M4_4XLarge
A.M4_Large ->
M4_Large
A.M4_XLarge ->
M4_XLarge
A.M5_12XLarge ->
M5_12XLarge
A.M5_24XLarge ->
M5_24XLarge
A.M5_2XLarge ->
M5_2XLarge
A.M5_4XLarge ->
M5_4XLarge
A.M5_Large ->
M5_Large
A.M5_XLarge ->
M5_XLarge
A.M5d_12XLarge ->
M5d_12XLarge
A.M5d_24XLarge ->
M5d_24XLarge
A.M5d_2XLarge ->
M5d_2XLarge
A.M5d_4XLarge ->
M5d_4XLarge
A.M5d_Large ->
M5d_Large
A.M5d_XLarge ->
M5d_XLarge
A.P2_16XLarge ->
P2_16XLarge
A.P2_8XLarge ->
P2_8XLarge
A.P2_XLarge ->
P2_XLarge
A.P3_16XLarge ->
P3_16XLarge
A.P3_2XLarge ->
P3_2XLarge
A.P3_8XLarge ->
P3_8XLarge
A.R3_2XLarge ->
R3_2XLarge
A.R3_4XLarge ->
R3_4XLarge
A.R3_8XLarge ->
R3_8XLarge
A.R3_Large ->
R3_Large
A.R3_XLarge ->
R3_XLarge
A.R4_16XLarge ->
R4_16XLarge
A.R4_2XLarge ->
R4_2XLarge
A.R4_4XLarge ->
R4_4XLarge
A.R4_8XLarge ->
R4_8XLarge
A.R4_Large ->
R4_Large
A.R4_XLarge ->
R4_XLarge
A.R5_12XLarge ->
R5_12XLarge
A.R5_16XLarge ->
R5_16XLarge
A.R5_24XLarge ->
R5_24XLarge
A.R5_2XLarge ->
R5_2XLarge
A.R5_4XLarge ->
R5_4XLarge
A.R5_8XLarge ->
R5_8XLarge
A.R5_Large ->
R5_Large
A.R5_Metal ->
R5_Metal
A.R5_XLarge ->
R5_XLarge
A.R5d_12XLarge ->
R5d_12XLarge
A.R5d_16XLarge ->
R5d_16XLarge
A.R5d_24XLarge ->
R5d_24XLarge
A.R5d_2XLarge ->
R5d_2XLarge
A.R5d_4XLarge ->
R5d_4XLarge
A.R5d_8XLarge ->
R5d_8XLarge
A.R5d_Large ->
R5d_Large
A.R5d_Metal ->
R5d_Metal
A.R5d_XLarge ->
R5d_XLarge
A.T1_Micro ->
T1_Micro
A.T2_2XLarge ->
T2_2XLarge
A.T2_Large ->
T2_Large
A.T2_Medium ->
T2_Medium
A.T2_Micro ->
T2_Micro
A.T2_Nano ->
T2_Nano
A.T2_Small ->
T2_Small
A.T2_XLarge ->
T2_XLarge
A.X1_16XLarge ->
X1_16XLarge
A.X1_32XLarge ->
X1_32XLarge
A.X1e_16XLarge ->
X1e_16XLarge
A.X1e_2XLarge ->
X1e_2XLarge
A.X1e_32XLarge ->
X1e_32XLarge
A.X1e_4XLarge ->
X1e_4XLarge
A.X1e_8XLarge ->
X1e_8XLarge
A.X1e_XLarge ->
X1e_XLarge
A.Z1d_12XLarge ->
Z1d_12XLarge
A.Z1d_2XLarge ->
Z1d_2XLarge
A.Z1d_3XLarge ->
Z1d_3XLarge
A.Z1d_6XLarge ->
Z1d_6XLarge
A.Z1d_Large ->
Z1d_Large
A.Z1d_XLarge ->
Z1d_XLarge
fromMismiVirtualizationType :: MismiVirtualizationType -> A.VirtualizationType
fromMismiVirtualizationType v =
case v of
HVM ->
A.HVM
Paravirtual ->
A.Paravirtual
toMismiVirtualizationType :: A.VirtualizationType -> MismiVirtualizationType
toMismiVirtualizationType v =
case v of
A.HVM ->
HVM
A.Paravirtual ->
Paravirtual
toMismiTag :: A.Tag -> EC2Tag
toMismiTag e =
EC2Tag
(view A.tagKey e)
(view A.tagValue e)
fromMismiTag :: EC2Tag -> A.Tag
fromMismiTag e =
A.tag (tagKey e) (tagValue e)
| ambiata/mismi | mismi-ec2/src/Mismi/EC2/Data.hs | bsd-3-clause | 12,144 | 0 | 8 | 4,248 | 2,597 | 1,315 | 1,282 | 615 | 142 |
{-# LANGUAGE OverloadedStrings #-}
module WreqCodeGolfExample where
import Network.Wreq (Options, defaults, param, getWith, asValue, responseBody)
import Data.Text (Text)
import Control.Lens ((&), (.~), (^.), (^..))
import Data.Aeson.Lens (key, _Array, _String)
import Control.Arrow ((>>>), (&&&))
meetupEventsUrl :: String
meetupEventsUrl = "https://api.meetup.com/2/events"
-- | A valid Meetup group ID.
type GroupId = Text
-- | For searching for events in a Meetup group.
eventsOptions :: GroupId
-> Options
eventsOptions groupId = defaults
& param "format" .~ ["json"]
& param "group_id" .~ [groupId]
& param "status" .~ ["upcoming"]
& param "order" .~ ["time"]
& param "page" .~ ["10"]
-- | Code golf version. Don't do this?
getMeetupNameAndVenues :: GroupId -> IO [(Text, Text)]
getMeetupNameAndVenues groupId =
getWith (eventsOptions groupId) meetupEventsUrl
>>= asValue
>>= ((^.. responseBody
. key "results"
. _Array . traverse)
>>> map ((^. key "name" . _String)
&&& (^. key "venue"
. key "name" . _String)
)
>>> return
)
| FranklinChen/twenty-four-days2015-of-hackage | src/WreqCodeGolfExample.hs | bsd-3-clause | 1,160 | 0 | 15 | 276 | 324 | 187 | 137 | 29 | 1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.PhoneNumber.Tests
( tests
) where
import Data.String
import Prelude
import Test.Tasty
import Test.Tasty.HUnit
import Duckling.Dimensions.Types
import Duckling.PhoneNumber.Corpus
import Duckling.PhoneNumber.Types
import Duckling.Testing.Asserts
import Duckling.Testing.Types
import qualified Duckling.PhoneNumber.AR.Tests as AR
import qualified Duckling.PhoneNumber.PT.Tests as PT
tests :: TestTree
tests = testGroup "PhoneNumber Tests"
[ makeCorpusTest [Seal PhoneNumber] corpus
, makeNegativeCorpusTest [Seal PhoneNumber] negativeCorpus
, surroundTests
, PT.tests
, AR.tests
]
surroundTests :: TestTree
surroundTests = testCase "Surround Tests" $
mapM_ (analyzedFirstTest testContext testOptions .
withTargets [Seal PhoneNumber]) xs
where
xs = examples (PhoneNumberValue "06354640807")
[ "hey 06354640807"
, "06354640807 hey"
, "hey 06354640807 hey"
]
++ examples (PhoneNumberValue "18998078030")
[ "a 18998078030 b"
]
| facebookincubator/duckling | tests/Duckling/PhoneNumber/Tests.hs | bsd-3-clause | 1,334 | 0 | 11 | 300 | 231 | 137 | 94 | 31 | 1 |
module Lingebra (LVector, plus, average, distance, zeroVector, sumVect) where
type LVector=[Double]
plus :: LVector -> LVector -> LVector
plus = zipWith (+)
sumVect :: [LVector] -> LVector
sumVect vectors = foldr plus (zeroVector l) vectors
where l = length $ head vectors
average :: [LVector] -> LVector
average vectors = map (/ count) $ sumVect vectors
where count = fromIntegral $ length vectors
distance :: LVector -> LVector -> Double
distance xs ys = sqrt $ sum $ map (** 2.0) $ zipWith (-) xs ys
zeroVector :: Int -> LVector
zeroVector dim = replicate dim 0.0 | satai/ml | src/Lingebra.hs | bsd-3-clause | 597 | 0 | 8 | 127 | 224 | 122 | 102 | 14 | 1 |
------------------------------------------------------------------------------------
import System.FilePath ((</>))
----
import qualified Paths_fancydiff as Paths_fancydiff
import System.Process (callProcess)
------------------------------------------------------------------------------------
main :: IO ()
main = do
fancydiff <- fmap (</> "fancydiff") Paths_fancydiff.getBinDir
callProcess fancydiff ["--test-suite"]
| da-x/fancydiff | test/Test.hs | bsd-3-clause | 449 | 0 | 9 | 60 | 76 | 44 | 32 | 7 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LiberalTypeSynonyms #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module Lib
( someFunc
) where
import GHC.Exts (Constraint)
type Name = String
data User = U { username :: String
, isRegistered :: Bool
} deriving (Eq)
data Post = P { isPublic :: Bool
, canCommentAnonymously :: Bool
, author :: User
} deriving (Eq)
data Pred (c :: * -> Constraint) where
Leaf :: Name -> (forall a . c a => a -> Bool) -> Pred c
And :: Pred c1 -> Pred c2 -> Pred (c1 `CC` c2)
Or :: Pred c1 -> Pred c2 -> Pred (c1 `CC` c2)
Not :: Pred c1 -> Pred c1
-- class (c1 a, c2 a) => CombineConstraint c1 c2 a
-- instance (c1 a, c2 a) => CombineConstraint c1 c2 a
type CC c1 c2 a = CombineConstraint c1 c2 a
type family CombineConstraint (c1 :: * -> Constraint) (c2 :: * -> Constraint) (a :: *) :: Constraint where
CombineConstraint c1 c2 a = (c1 a, c2 a)
class Get r a where
get :: a -> r
userIsRegistered :: Pred (Get User)
userIsRegistered = Leaf "userIsRegistered" (isRegistered . get)
-- userIsAuthor :: Pred (Get Post `CombineConstraint` Get User)
-- userIsAuthor = Leaf "userIsAuthor" (\x -> author (get x) == get x)
-- userCanEditPost :: Pred _
-- userCanEditPost = userIsAuthor `And` userIsRegistered
someFunc :: IO ()
someFunc = putStrLn "someFunc"
| cdepillabout/the-monad-reader-24-sample-code | src/Lib.hs | bsd-3-clause | 1,601 | 0 | 11 | 381 | 379 | 219 | 160 | 35 | 1 |
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module FreeAgent.Server.PeerSpec (main, spec) where
import FreeAgent.AgentPrelude
import FreeAgent.Core
import FreeAgent.Core.Lenses
import FreeAgent.Server (runAgentServers)
import qualified FreeAgent.Core.Protocol.Executive as Exec
import FreeAgent.TestHelper hiding (appConfig, testAgent)
import qualified FreeAgent.TestHelper as Helper
import FreeAgent.Fixtures
import qualified Data.Set as Set
import Control.Concurrent.Lifted
import Test.Hspec
matchRemoteHostName :: (NodeId, String) -> Listener
matchRemoteHostName (nodeid, name') = actionListener (\(TestCheckTCP host' _) -> host' == "localhost") nodeid name'
remotable ['matchRemoteHostName]
main :: IO ()
main = hspec $ afterAll_ cleanup spec
listenerName :: String
listenerName = "listener:test"
spec :: Spec
spec =
describe "FreeAgent.Peer" $
it "can find services offered on peers" $ testAgent (
-- one giant mega-spec b/c there is so much overhead in spinning up
-- the peer swarm
-- create a couple "remotes"
do let waiter = do getSelfPid >>= register "waiter"
"waithere" <- expect :: Agent String
return ()
void $ fork $ liftIO $
runAgentServers appConfig2 appPlugins waiter
void $ fork $ liftIO $
runAgentServers appConfigTX appPlugins waiter
-- wait for swarm to stabilize
let waitFor3 = do
Right count <- queryPeerCount
when (count < 3) (threadDelay 5000 >> waitFor3)
waitFor3
-- it "can count peers"
Right count <- queryPeerCount
-- it "can query for a Set of matching Peers"
Right peers <- queryPeerServers Exec.serverName
(Set.fromList [def])
(Set.fromList [Zone "TX"])
-- it "can register remote listeners"
let tx:_ = Set.toList peers
getSelfPid >>= register listenerName
nodeid <- thisNodeId
let matcher = $(mkClosure 'matchRemoteHostName) (nodeid, listenerName)
Right () <- withTarget (Remote tx) $
castServ (AddListener matcher)
threadDelay 1000
-- it "can route an action to a remote Node"
Right _ <- withTarget (Route [def] [Zone "TX"]) $
executeAction checkTCP
nr <- texpect :: Agent Result
let Just (NagiosResult _ status) = extractResult nr
let aname = key $ resultResultOf nr
-- we're done, tell the two "remotes" to exit
Right all3 <- queryPeerServers peerServerName (Set.fromList[def])
(Set.fromList[def])
forM_ all3 $ \peer' -> do
mpid <- resolve (peer', "waiter"::String)
case mpid of
Nothing -> return ()
Just pid ->
send pid ("waithere" :: String)
threadDelay 1000
return (count, Set.size peers,aname, status)
) `shouldReturn` (3, 1, key checkTCP, OK)
cleanup = closeContext "peer"
testAgent :: NFData a => Agent a -> IO a
testAgent = quickRunAgent 2000 ("peer", appConfig & nodePort .~ "9090", appPlugins)
appConfig :: AgentConfig
appConfig = Helper.appConfig & appendRemoteTable __remoteTable
{-& minLogLevel .~ LevelDebug-}
appConfig2 :: AgentConfig
appConfig2 = appConfig
& peerNodeSeeds .~ ["127.0.0.1:9090"]
{-& minLogLevel .~ LevelInfo-}
appConfigTX :: AgentConfig
appConfigTX = appConfig
& peerNodeSeeds .~ ["127.0.0.1:9090"]
& zones .~ Set.fromList [def, Zone "TX"]
{-& minLogLevel .~ LevelDebug-}
| jeremyjh/free-agent | core/test/FreeAgent/Server/PeerSpec.hs | bsd-3-clause | 4,330 | 0 | 19 | 1,595 | 921 | 473 | 448 | 77 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Server.Utils where
import qualified Data.ByteString.Char8 as BSC
import Data.Maybe (fromMaybe)
import Data.String (fromString, IsString(..))
import Network.Wai
import qualified Network.Wai.Middleware.Static as MWS
import Web.Spock
staticMiddleware :: Middleware
staticMiddleware = MWS.static
corsMiddleware :: Middleware
corsMiddleware app req respond =
app req $ respond . mapResponseHeaders (++ mkCorsHeaders req)
where
mkCorsHeaders :: (IsString a, IsString b) => Request -> [(a, b)]
mkCorsHeaders req = [allowOrigin, allowHeaders, allowMethods, allowCredentials]
where allowOrigin =
( fromString "Access-Control-Allow-Origin"
, fromString . BSC.unpack $
fromMaybe "*" $ lookup "origin" $
requestHeaders req
)
allowHeaders =
( fromString "Access-Control-Allow-Headers"
, fromString "Origin, Cache-Control, X-Requested-With, Content-Type, Accept, Authorization"
)
allowMethods =
( fromString "Access-Control-Allow-Methods"
, fromString "GET, POST, PUT, OPTIONS, DELETE"
)
allowCredentials =
( fromString "Access-Control-Allow-Credentials"
, fromString "true"
)
| tdietert/auto-playlist | web/Server/Utils.hs | bsd-3-clause | 1,498 | 0 | 14 | 519 | 262 | 149 | 113 | 29 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Network.TCP
-- Copyright : (c) Warrick Gray 2002, Bjorn Bringert 2003-2004, Simon Foster 2004
-- License : BSD
--
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability : non-portable (not tested)
--
-- An easy access TCP library. Makes the use of TCP in Haskell much easier.
-- This was originally part of Gray's\/Bringert's HTTP module.
--
-- * Changes by Robin Bate Boerop <[email protected]>:
-- - Made dependencies explicit in import statements.
-- - Removed false dependencies from import statements.
-- - Removed unused exported functions.
--
-- * Changes by Simon Foster:
-- - Split module up into to sepearate Network.[Stream,TCP,HTTP] modules
--
-----------------------------------------------------------------------------
module Network.TCP
( Connection
, openTCPPort
, isConnectedTo
) where
import Network.BSD (getHostByName, hostAddresses)
import Network.Socket
( Socket, SockAddr(SockAddrInet), SocketOption(KeepAlive, SoError)
, SocketType(Stream), inet_addr, connect, sendTo
, shutdown, ShutdownCmd(ShutdownSend, ShutdownReceive)
, sClose, sIsConnected, setSocketOption, getSocketOption
, socket, Family(AF_INET)
)
import Network.Stream
( Stream(readBlock, readLine, writeBlock, close)
, ConnError(ErrorMisc, ErrorReset, ErrorClosed)
, bindE
)
import Network.StreamSocket (myrecv, handleSocketError)
import Control.Exception as Exception (catch, catchJust, finally, ioErrors, throw)
import Data.List (elemIndex)
import Data.Char (toLower)
import Data.IORef (IORef, newIORef, readIORef, writeIORef, modifyIORef)
-----------------------------------------------------------------
------------------ TCP Connections ------------------------------
-----------------------------------------------------------------
-- | The 'Connection' newtype is a wrapper that allows us to make
-- connections an instance of the StreamIn\/Out classes, without ghc extensions.
-- While this looks sort of like a generic reference to the transport
-- layer it is actually TCP specific, which can be seen in the
-- implementation of the 'Stream Connection' instance.
newtype Connection = ConnRef {getRef :: IORef Conn}
data Conn = MkConn { connSock :: ! Socket
, connAddr :: ! SockAddr
, connBffr :: ! String
, connHost :: String
}
| ConnClosed
deriving(Eq)
-- | This function establishes a connection to a remote
-- host, it uses "getHostByName" which interrogates the
-- DNS system, hence may trigger a network connection.
--
-- Add a "persistant" option? Current persistant is default.
-- Use "Result" type for synchronous exception reporting?
openTCPPort :: String -> Int -> IO Connection
openTCPPort uri port =
do { s <- socket AF_INET Stream 6
; setSocketOption s KeepAlive 1
; host <- Exception.catch (inet_addr uri) -- handles ascii IP numbers
(\_ -> getHostByName uri >>= \host ->
case hostAddresses host of
[] -> return (error "no addresses in host entry")
(h:_) -> return h)
; let a = SockAddrInet (toEnum port) host
; Exception.catch (connect s a) (\e -> sClose s >> throw e)
; v <- newIORef (MkConn s a [] uri)
; return (ConnRef v)
}
instance Stream Connection where
readBlock ref n =
readIORef (getRef ref) >>= \conn -> case conn of
ConnClosed -> return (Left ErrorClosed)
(MkConn sk addr bfr hst)
| length bfr >= n ->
do { modifyIORef (getRef ref) (\c -> c { connBffr=(drop n bfr) })
; return (Right $ take n bfr)
}
| otherwise ->
do { modifyIORef (getRef ref) (\c -> c { connBffr=[] })
; more <- readBlock sk (n - length bfr)
; return $ case more of
Left _ -> more
Right s -> (Right $ bfr ++ s)
}
-- This function uses a buffer, at this time the buffer is just 1000 characters.
-- (however many bytes this is is left to the user to decypher)
readLine ref =
readIORef (getRef ref) >>= \conn -> case conn of
ConnClosed -> return (Left ErrorClosed)
(MkConn sk addr bfr _)
| null bfr -> {- read in buffer -}
do { str <- myrecv sk 1000 -- DON'T use "readBlock sk 1000" !!
-- ... since that call will loop.
; let len = length str
; if len == 0 {- indicates a closed connection -}
then return (Right "")
else modifyIORef (getRef ref) (\c -> c { connBffr=str })
>> readLine ref -- recursion
}
| otherwise ->
case elemIndex '\n' bfr of
Nothing -> {- need recursion to finish line -}
do { modifyIORef (getRef ref) (\c -> c { connBffr=[] })
; more <- readLine ref -- contains extra recursion
; return $ more `bindE` \str -> Right (bfr++str)
}
Just i -> {- end of line found -}
let (bgn,end) = splitAt i bfr in
do { modifyIORef (getRef ref) (\c -> c { connBffr=(drop 1 end) })
; return (Right (bgn++['\n']))
}
-- The 'Connection' object allows no outward buffering,
-- since in general messages are serialised in their entirety.
writeBlock ref str =
readIORef (getRef ref) >>= \conn -> case conn of
ConnClosed -> return (Left ErrorClosed)
(MkConn sk addr _ _) -> fn sk addr str `Exception.catch` (handleSocketError sk)
where
fn sk addr s
| null s = return (Right ()) -- done
| otherwise =
getSocketOption sk SoError >>= \se ->
if se == 0
then sendTo sk s addr >>= \i -> fn sk addr (drop i s)
else writeIORef (getRef ref) ConnClosed >>
if se == 10054
then return (Left ErrorReset)
else return (Left $ ErrorMisc $ show se)
-- Closes a Connection. Connection will no longer
-- allow any of the other Stream functions. Notice that a Connection may close
-- at any time before a call to this function. This function is idempotent.
-- (I think the behaviour here is TCP specific)
close ref =
do { c <- readIORef (getRef ref)
; Exception.catchJust Exception.ioErrors (closeConn c) (\_ -> return ())
; writeIORef (getRef ref) ConnClosed
}
where
-- Be kind to peer & close gracefully.
closeConn (ConnClosed) = return ()
closeConn (MkConn sk addr [] _) =
(`Exception.finally` sClose sk) $
do { shutdown sk ShutdownSend
; suck ref
; shutdown sk ShutdownReceive
}
suck :: Connection -> IO ()
suck cn = readLine cn >>=
either (\_ -> return ()) -- catch errors & ignore
(\x -> if null x then return () else suck cn)
-- | Checks both that the underlying Socket is connected
-- and that the connection peer matches the given
-- host name (which is recorded locally).
isConnectedTo :: Connection -> String -> IO Bool
isConnectedTo conn name =
do { v <- readIORef (getRef conn)
; case v of
ConnClosed -> return False
(MkConn sk _ _ h) ->
if (map toLower h == map toLower name)
then sIsConnected sk
else return False
}
| abuiles/turbinado-blog | tmp/dependencies/http-3001.1.4/Network/TCP.hs | bsd-3-clause | 8,382 | 6 | 25 | 3,013 | 1,755 | 949 | 806 | 118 | 3 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE RankNTypes, ScopedTypeVariables, GADTs, EmptyDataDecls, PatternGuards, TypeFamilies, NamedFieldPuns , FlexibleInstances, MultiParamTypeClasses, TypeSynonymInstances #-}
module EvalMonad (ErrorM, VarEnv, B, State,
EvalM, runProg, inNewFrame, get_proc, get_block,
get_var, set_var, get_heap, set_heap,
Event (..), event) where
import Control.Monad.Error
import qualified Data.Map as M
import Prelude hiding (succ)
import Compiler.Hoopl
import IR
type ErrorM = Either String
type InnerErrorM v = Either (State v, String)
instance Error (State v, String) where
noMsg = (undefined, "")
strMsg str = (undefined, str)
data EvalM v a = EvalM (State v -> InnerErrorM v (State v, a))
instance Monad (EvalM v) where
return x = EvalM (\s -> return (s, x))
EvalM f >>= k = EvalM $ \s -> do (s', x) <- f s
let EvalM f' = k x
f' s'
instance MonadError String (EvalM v) where
throwError e = EvalM (\s -> throwError (s, e))
catchError (EvalM f) handler =
EvalM $ \s -> f s `catchError` handler'
where handler' (s', e) = let EvalM f' = handler e
in f' s'
-- Shorthands for frequently used types
type VarEnv v = M.Map Var v
type HeapEnv v = M.Map Addr v -- word addressed heap
type Addr = Integer
type B = Block Insn C C
type PEnv = M.Map String Proc
type G = Graph Insn C C
runProg :: [Proc] -> [v] -> EvalM v x -> ErrorM (State v, x)
runProg procs vs (EvalM f) =
case f init_state of
Left (_, e) -> throwError e
Right x -> return x
where
init_state = State { frames = [], heap = M.empty, events = [],
vsupply = vs, procs = procMap }
procMap = M.fromList $ zip (map name procs) procs
get_state :: EvalM v (State v)
get_state = EvalM f
where f state = return (state, state)
upd_state :: (State v -> State v) -> EvalM v ()
upd_state upd = EvalM (\state -> return (upd state, ()))
event :: Event v -> EvalM v ()
event e = upd_state (\s -> s {events = e : events s})
----------------------------------
-- State of the machine
data State v = State { frames :: [(VarEnv v, G)]
, heap :: HeapEnv v
, procs :: PEnv
, vsupply :: [v]
, events :: [Event v]
}
data Event v = CallEvt String [v]
| RetEvt [v]
| StoreEvt Addr v
| ReadEvt Addr v
get_var :: Var -> EvalM v v
get_var var = get_state >>= k
where k (State {frames = (vars, _):_}) = mlookup "var" var vars
k _ = throwError "can't get vars from empty stack"
set_var :: Var -> v -> EvalM v ()
set_var var val = upd_state f
where f s@(State {frames = (vars, blocks):vs}) =
s { frames = (M.insert var val vars, blocks):vs }
f _ = error "can't set var with empty stack"
-- Special treatment for the heap:
-- If a heap location doesn't have a value, we give it one.
get_heap :: Addr -> EvalM v v
get_heap addr =
do State {heap, vsupply} <- get_state
(v, vs) <- case vsupply of v:vs -> return (v, vs)
_ -> throwError "hlookup hit end of value supply"
upd_state (\s -> s {heap = M.insert addr v heap, vsupply = vs})
event $ ReadEvt addr v
return v
set_heap :: Addr -> v -> EvalM v ()
set_heap addr val =
do event $ StoreEvt addr val
upd_state $ \ s -> s { heap = M.insert addr val (heap s) }
get_block :: Label -> EvalM v B
get_block lbl = get_state >>= k
where k (State {frames = (_, graph):_}) = blookup "block" graph lbl
k _ = error "can't get blocks from empty stack"
get_proc :: String -> EvalM v Proc
get_proc name = get_state >>= mlookup "proc" name . procs
newFrame :: VarEnv v -> G -> EvalM v ()
newFrame vars graph = upd_state $ \s -> s { frames = (vars, graph) : frames s}
popFrame :: EvalM v ()
popFrame = upd_state f
where f s@(State {frames = _:fs}) = s { frames = fs }
f _ = error "popFrame: no frame to pop..." -- implementation error
inNewFrame :: VarEnv v -> G -> EvalM v x -> EvalM v x
inNewFrame vars graph runFrame =
do newFrame vars graph
x <- runFrame
popFrame
return x
mlookup :: Ord k => String -> k -> M.Map k v -> EvalM v' v
mlookup blame k m =
case M.lookup k m of
Just v -> return v
Nothing -> throwError ("unknown lookup for " ++ blame)
blookup :: String -> G -> Label -> EvalM v B
blookup blame g lbl =
case lookupBlock g lbl of
BodyBlock b -> return b
NoBlock -> throwError ("unknown lookup for " ++ blame)
| ezyang/hoopl | testing/EvalMonad.hs | bsd-3-clause | 4,747 | 0 | 14 | 1,452 | 1,777 | 933 | 844 | 107 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.