1-----------------------------------------------------------------------------
3-- Module : Language.PureScript
4-- Copyright : (c) Phil Freeman 2013
7-- Maintainer : Phil Freeman <paf31@cantab.net>
8-- Stability : experimental
13-----------------------------------------------------------------------------
15module Language.PureScript (module P, compile) where
17import Language.PureScript.Values as P
18import Language.PureScript.Types as P
19import Language.PureScript.Kinds as P
20import Language.PureScript.Declarations as P
21import Language.PureScript.Names as P
22import Language.PureScript.Parser as P
23import Language.PureScript.CodeGen as P
24import Language.PureScript.TypeChecker as P
25import Language.PureScript.Pretty as P
26import Language.PureScript.Sugar as P
27import Language.PureScript.Options as P
29import Data.List (intercalate)
30import Control.Monad (forM_)
32compile :: Options -> [Module] -> Either String (String, String, Environment)
34 desugared <- desugar ms
35 (_, env) <- runCheck $ forM_ desugared $ \(Module moduleName decls) -> typeCheckAll (ModuleName moduleName) decls
36 let js = prettyPrintJS . concatMap (flip (moduleToJs opts) env) $ desugared
37 let exts = intercalate "\n" . map (flip moduleToPs env) $ desugared
38 return (js, exts, env)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list