File: HaskellParser.hs.prettyprinter.golden

package info (click to toggle)
haskell-src-exts 1.23.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,852 kB
  • sloc: haskell: 13,707; makefile: 12
file content (13 lines) | stat: -rw-r--r-- 576 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
import qualified Language.Haskell.Exts.Annotated as Parser
import qualified Language.Haskell.Exts.Annotated.Syntax as Syn
import qualified Language.Haskell.Exts.Extension as Ext
parse originalFileName input
  = Parser.parseModuleWithMode parseMode input
  where parseMode :: Parser.ParseMode
        parseMode
          = Parser.defaultParseMode{Parser.parseFilename = originalFileName,
                                    Parser.extensions = Ext.glasgowExts ++ [Ext.ExplicitForall]}
main
  = do s <- readFile "Bug.hs"
       let x = parse "Bug.hs" s
       putStrLn (show x)