mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-16 11:22:33 +03:00
24 lines
534 B
Haskell
24 lines
534 B
Haskell
|
#!/usr/bin/env runhaskell
|
||
|
|
||
|
-- |
|
||
|
-- Module : $Header$
|
||
|
-- Copyright : (c) 2013-2014 Galois, Inc.
|
||
|
-- 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
|
||
|
|