/usr/share/doc/happy/examples/glr/highly-ambiguous/Hugs.lhs is in happy 1.19.5-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | > module Main where
> import System(getArgs)
> import Data.Maybe(fromJust)
> import FiniteMap(fmToList,lookupFM)
> import Expr
> main
> = do
> [s] <- getArgs
> test (read s :: Int)
> test n
> = do
> case doParse $ map (:[]) $ lexer $ replicate n '+' of
> ParseOK r f -> do
> putStrLn $ "Ok " ++ show r ++ "\n"
> ++ unlines (map show $ fmToList f)
> ParseEOF f -> do
> putStrLn $ "Premature end of input:\n"
> ++ unlines (map show $ fmToList f)
> ParseError ts f -> do
> putStrLn $ "Error: " ++ show ts
> forest_lookup f i
> = fromJust $ lookupFM f i
|