2014-04-18 02:34:25 +04:00
|
|
|
#!/usr/bin/env runhaskell
|
|
|
|
|
|
|
|
-- |
|
2018-03-22 23:33:12 +03:00
|
|
|
-- Module : Main
|
2016-01-19 22:31:37 +03:00
|
|
|
-- Copyright : (c) 2013-2016 Galois, Inc.
|
2014-04-18 02:34:25 +04:00
|
|
|
-- License : BSD3
|
|
|
|
-- Maintainer : cryptol@galois.com
|
|
|
|
-- Stability : provisional
|
|
|
|
-- Portability : portable
|
|
|
|
|
|
|
|
import Cryptol.Parser
|
|
|
|
import Cryptol.Parser.AST(noPos)
|
|
|
|
import System.Process(readProcess)
|
|
|
|
|
|
|
|
main :: IO ()
|
|
|
|
main =
|
|
|
|
do txt <- getContents
|
|
|
|
putStrLn =<< readProcess "ppsh" ["--html"]
|
|
|
|
(show $ dropLoc $ parseProgram Layout txt)
|
|
|
|
|
|
|
|
dropLoc (Right a) = Right (noPos a)
|
|
|
|
dropLoc (Left a) = Left a
|
|
|
|
|