-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNano.hs
27 lines (23 loc) · 1.07 KB
/
Nano.hs
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
import qualified Language.Nano.ESC.ESC as ESC
import qualified Language.Nano.Typecheck.Typecheck as TC
import qualified Language.Nano.Liquid.Liquid as Liquid
import Language.Nano.CmdLine (getOpts)
import Language.Nano.Types
import Data.Monoid
import System.Exit (exitWith)
import Language.Fixpoint.Interface (resultExit)
import qualified Language.Fixpoint.Types as F
import Language.Fixpoint.Misc
-- import Text.PrettyPrint.HughesPJ (Doc, text, render, ($+$), (<+>))
import Text.PrettyPrint.HughesPJ (render)
import Language.ECMAScript3.PrettyPrint
main = do cfg <- getOpts
run (verifier cfg) cfg
verifier (Esc {}) = ESC.verifyFile
verifier (TC {}) = TC.verifyFile
verifier (Liquid {}) = Liquid.verifyFile
run verifyFile cfg
= do rs <- mapM verifyFile $ files cfg
let r = mconcat rs
donePhase (F.colorResult r) (render $ pp r)
exitWith (resultExit r)