This file is indexed.

/usr/share/doc/happy/examples/glr/expr-monad/Hugs.lhs is in happy 1.19.4-1.

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
27
28
> module Main where
> import System(getArgs)
> import Data.Maybe(fromJust)
> import FiniteMap(fmToList,lookupFM)
> import Expr


> main 
>  = do
>	[s] <- getArgs
>	test s

> test s 
>  = do
>	case doParse $ map (:[]) $ lexer s of 
>	  ParseOK r f -> do 
>			    putStrLn $ "Ok " ++ show r ++ "\n" 
>					++ unlines (map show $ fmToList f)
>			    let ms = decode (forest_lookup f) r ::[IO Int]
>			    mapM_ (\ma -> catch ma (\_ -> return 0) >>= print) ms
>	  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