summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilFreeman <>2013-11-01 20:11:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2013-11-01 20:11:00 (GMT)
commit80582a7aacfe263c5d6c9edab330e46abd9ec86d (patch)
tree99052e37c6d1ec1743988f4447283fdd80b2c328
parent786efea9be659ae84b3de16c1e73f3dcee62a72e (diff)
version 0.1.10.1.1
-rw-r--r--purescript.cabal54
-rw-r--r--src/Language/PureScript.hs26
-rw-r--r--src/Language/PureScript/CodeGen.hs (renamed from src/PureScript/CodeGen.hs)11
-rw-r--r--src/Language/PureScript/CodeGen/Externs.hs (renamed from src/PureScript/CodeGen/Externs.hs)11
-rw-r--r--src/Language/PureScript/CodeGen/JS.hs (renamed from src/PureScript/CodeGen/JS.hs)16
-rw-r--r--src/Language/PureScript/CodeGen/Monad.hs (renamed from src/PureScript/CodeGen/Common/Gen.hs)4
-rw-r--r--src/Language/PureScript/Declarations.hs (renamed from src/PureScript/Declarations.hs)12
-rw-r--r--src/Language/PureScript/Kinds.hs (renamed from src/PureScript/Kinds.hs)4
-rw-r--r--src/Language/PureScript/Names.hs (renamed from src/PureScript/Names.hs)4
-rw-r--r--src/Language/PureScript/Parser.hs22
-rw-r--r--src/Language/PureScript/Parser/Common.hs (renamed from src/PureScript/Parser/Common.hs)8
-rw-r--r--src/Language/PureScript/Parser/Declarations.hs (renamed from src/PureScript/Parser/Declarations.hs)20
-rw-r--r--src/Language/PureScript/Parser/Kinds.hs (renamed from src/PureScript/Parser/Kinds.hs)10
-rw-r--r--src/Language/PureScript/Parser/State.hs (renamed from src/PureScript/Parser/State.hs)8
-rw-r--r--src/Language/PureScript/Parser/Types.hs (renamed from src/PureScript/Parser/Types.hs)10
-rw-r--r--src/Language/PureScript/Parser/Values.hs (renamed from src/PureScript/Parser/Values.hs)18
-rw-r--r--src/Language/PureScript/Pretty.hs (renamed from src/PureScript/Pretty.hs)10
-rw-r--r--src/Language/PureScript/Pretty/Common.hs (renamed from src/PureScript/CodeGen/Common.hs)12
-rw-r--r--src/Language/PureScript/Pretty/Kinds.hs (renamed from src/PureScript/CodeGen/Pretty/Kinds.hs)8
-rw-r--r--src/Language/PureScript/Pretty/Types.hs (renamed from src/PureScript/CodeGen/Pretty/Types.hs)16
-rw-r--r--src/Language/PureScript/Pretty/Values.hs (renamed from src/PureScript/CodeGen/Pretty/Values.hs)12
-rw-r--r--src/Language/PureScript/TypeChecker.hs (renamed from src/PureScript/TypeChecker.hs)24
-rw-r--r--src/Language/PureScript/TypeChecker/Kinds.hs (renamed from src/PureScript/TypeChecker/Kinds.hs)15
-rw-r--r--src/Language/PureScript/TypeChecker/Monad.hs (renamed from src/PureScript/TypeChecker/Monad.hs)10
-rw-r--r--src/Language/PureScript/TypeChecker/Synonyms.hs (renamed from src/PureScript/TypeChecker/Synonyms.hs)8
-rw-r--r--src/Language/PureScript/TypeChecker/Types.hs (renamed from src/PureScript/TypeChecker/Types.hs)22
-rw-r--r--src/Language/PureScript/Types.hs (renamed from src/PureScript/Types.hs)4
-rw-r--r--src/Language/PureScript/Values.hs (renamed from src/PureScript/Values.hs)8
-rw-r--r--src/Main.hs2
-rw-r--r--src/PureScript.hs26
-rw-r--r--src/PureScript/Parser.hs22
-rw-r--r--tests/Main.hs3
32 files changed, 224 insertions, 216 deletions
diff --git a/purescript.cabal b/purescript.cabal
index bc2c6f1..b832813 100644
--- a/purescript.cabal
+++ b/purescript.cabal
@@ -1,5 +1,5 @@
name: purescript
-version: 0.1.0
+version: 0.1.1
cabal-version: >=1.8
build-type: Simple
license: MIT
@@ -11,28 +11,45 @@ synopsis: PureScript Programming Language Compiler
description: A small compile-to-JS language with extensible records and type-safe blocks
author: Phil Freeman <paf31@cantab.net>
data-dir: ""
-
+category: Language
+
library
build-depends: base >=4 && <5, syb -any, cmdtheline -any,
containers -any, mtl -any, transformers -any, parsec -any,
utf8-string -any
- exposed-modules: PureScript.CodeGen.Pretty.Values
- PureScript.CodeGen.Pretty.Types PureScript PureScript.Declarations
- PureScript.Names PureScript.TypeChecker.Synonyms
- PureScript.CodeGen.Externs PureScript.CodeGen.JS
- PureScript.CodeGen.Common.Gen PureScript.CodeGen.Common Main
- PureScript.CodeGen PureScript.Kinds PureScript.Parser
- PureScript.TypeChecker PureScript.Types PureScript.Values
- PureScript.Parser.Common PureScript.Parser.Declarations
- PureScript.Parser.Types PureScript.Parser.Values
- PureScript.TypeChecker.Kinds PureScript.TypeChecker.Monad
- PureScript.TypeChecker.Types PureScript.Parser.State
- PureScript.Parser.Kinds PureScript.CodeGen.Pretty.Kinds
+ exposed-modules: Main
+ Language.PureScript
+ Language.PureScript.Declarations
+ Language.PureScript.Names
+ Language.PureScript.Types
+ Language.PureScript.Values
+ Language.PureScript.Kinds
+ Language.PureScript.Pretty
+ Language.PureScript.Pretty.Common
+ Language.PureScript.Pretty.Values
+ Language.PureScript.Pretty.Types
+ Language.PureScript.Pretty.Kinds
+ Language.PureScript.CodeGen
+ Language.PureScript.CodeGen.Externs
+ Language.PureScript.CodeGen.JS
+ Language.PureScript.CodeGen.Monad
+ Language.PureScript.Parser
+ Language.PureScript.Parser.Common
+ Language.PureScript.Parser.Declarations
+ Language.PureScript.Parser.Types
+ Language.PureScript.Parser.Values
+ Language.PureScript.Parser.State
+ Language.PureScript.Parser.Kinds
+ Language.PureScript.TypeChecker
+ Language.PureScript.TypeChecker.Kinds
+ Language.PureScript.TypeChecker.Monad
+ Language.PureScript.TypeChecker.Types
+ Language.PureScript.TypeChecker.Synonyms
exposed: True
buildable: True
hs-source-dirs: src
- other-modules: PureScript.Pretty
-
+ other-modules:
+
executable psc
build-depends: base >=4 && <5, cmdtheline -any, containers -any,
mtl -any, transformers -any, parsec -any, utf8-string -any,
@@ -40,8 +57,7 @@ executable psc
main-is: Main.hs
buildable: True
hs-source-dirs: src
- other-modules: PureScript.Pretty
-
+
test-suite tests
build-depends: base >=4 && <5, syb -any, directory -any,
filepath -any, containers -any, mtl -any, transformers -any,
@@ -49,4 +65,4 @@ test-suite tests
type: exitcode-stdio-1.0
main-is: Main.hs
buildable: True
- hs-source-dirs: tests \ No newline at end of file
+ hs-source-dirs: tests
diff --git a/src/Language/PureScript.hs b/src/Language/PureScript.hs
new file mode 100644
index 0000000..ae6b8ed
--- /dev/null
+++ b/src/Language/PureScript.hs
@@ -0,0 +1,26 @@
+-----------------------------------------------------------------------------
+--
+-- Module : Language.PureScript
+-- Copyright : (c) Phil Freeman 2013
+-- License : MIT
+--
+-- Maintainer : Phil Freeman <paf31@cantab.net>
+-- Stability : experimental
+-- Portability :
+--
+-- |
+--
+-----------------------------------------------------------------------------
+
+module Language.PureScript (module P) where
+
+import Language.PureScript.Values as P
+import Language.PureScript.Types as P
+import Language.PureScript.Kinds as P
+import Language.PureScript.Declarations as P
+import Language.PureScript.Names as P
+import Language.PureScript.Parser as P
+import Language.PureScript.CodeGen as P
+import Language.PureScript.TypeChecker as P
+import Language.PureScript.Pretty as P
+
diff --git a/src/PureScript/CodeGen.hs b/src/Language/PureScript/CodeGen.hs
index 1045a2a..7cb111d 100644
--- a/src/PureScript/CodeGen.hs
+++ b/src/Language/PureScript/CodeGen.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.CodeGen
+-- Module : Language.PureScript.CodeGen
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -12,10 +12,7 @@
--
-----------------------------------------------------------------------------
-module PureScript.CodeGen (
- module PureScript.CodeGen.JS,
- module PureScript.CodeGen.Externs
-) where
+module Language.PureScript.CodeGen (module C) where
-import PureScript.CodeGen.JS
-import PureScript.CodeGen.Externs
+import Language.PureScript.CodeGen.JS as C
+import Language.PureScript.CodeGen.Externs as C
diff --git a/src/PureScript/CodeGen/Externs.hs b/src/Language/PureScript/CodeGen/Externs.hs
index 9c3ae62..2d5e069 100644
--- a/src/PureScript/CodeGen/Externs.hs
+++ b/src/Language/PureScript/CodeGen/Externs.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.CodeGen.Externs
+-- Module : Language.PureScript.CodeGen.Externs
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -12,16 +12,15 @@
--
-----------------------------------------------------------------------------
-module PureScript.CodeGen.Externs (
+module Language.PureScript.CodeGen.Externs (
externToPs
) where
import Data.List (intercalate)
import qualified Data.Map as M
-import PureScript.Declarations
-import PureScript.TypeChecker.Monad
-import PureScript.CodeGen.Pretty.Types
-import PureScript.CodeGen.Pretty.Kinds
+import Language.PureScript.Declarations
+import Language.PureScript.TypeChecker.Monad
+import Language.PureScript.Pretty
externToPs :: Environment -> Declaration -> Maybe String
externToPs env (ValueDeclaration name _) = do
diff --git a/src/PureScript/CodeGen/JS.hs b/src/Language/PureScript/CodeGen/JS.hs
index 87caf43..33f94c2 100644
--- a/src/PureScript/CodeGen/JS.hs
+++ b/src/Language/PureScript/CodeGen/JS.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.CodeGen.JS
+-- Module : Language.PureScript.CodeGen.JS
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -12,7 +12,7 @@
--
-----------------------------------------------------------------------------
-module PureScript.CodeGen.JS (
+module Language.PureScript.CodeGen.JS (
declToJs
) where
@@ -24,12 +24,12 @@ import Control.Arrow ((<+>))
import Control.Monad (forM)
import Control.Applicative
-import PureScript.Types
-import PureScript.Values
-import PureScript.Names
-import PureScript.Declarations
-import PureScript.CodeGen.Common
-import PureScript.CodeGen.Common.Gen
+import Language.PureScript.Types
+import Language.PureScript.Values
+import Language.PureScript.Names
+import Language.PureScript.Declarations
+import Language.PureScript.Pretty.Common
+import Language.PureScript.CodeGen.Monad
declToJs :: Declaration -> Maybe String
declToJs (ValueDeclaration ident (Abs args ret)) = Just $ "function " ++ identToJs ident ++ "(" ++ intercalate "," (map identToJs args) ++ ") { return " ++ valueToJs ret ++ "; }"
diff --git a/src/PureScript/CodeGen/Common/Gen.hs b/src/Language/PureScript/CodeGen/Monad.hs
index 677e0fa..5cf876e 100644
--- a/src/PureScript/CodeGen/Common/Gen.hs
+++ b/src/Language/PureScript/CodeGen/Monad.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.CodeGen.Common.Gen
+-- Module : Language.PureScript.CodeGen.Monad
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -14,7 +14,7 @@
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-module PureScript.CodeGen.Common.Gen where
+module Language.PureScript.CodeGen.Monad where
import Control.Monad.State
import Control.Applicative
diff --git a/src/PureScript/Declarations.hs b/src/Language/PureScript/Declarations.hs
index 46c5084..2b580d1 100644
--- a/src/PureScript/Declarations.hs
+++ b/src/Language/PureScript/Declarations.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.Declarations
+-- Module : Language.PureScript.Declarations
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -14,12 +14,12 @@
{-# LANGUAGE DeriveDataTypeable #-}
-module PureScript.Declarations where
+module Language.PureScript.Declarations where
-import PureScript.Values
-import PureScript.Types
-import PureScript.Names
-import PureScript.Kinds
+import Language.PureScript.Values
+import Language.PureScript.Types
+import Language.PureScript.Names
+import Language.PureScript.Kinds
import qualified Data.Data as D
diff --git a/src/PureScript/Kinds.hs b/src/Language/PureScript/Kinds.hs
index 5518f8a..87786a6 100644
--- a/src/PureScript/Kinds.hs
+++ b/src/Language/PureScript/Kinds.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.Kinds
+-- Module : Language.PureScript.Kinds
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -14,7 +14,7 @@
{-# LANGUAGE DeriveDataTypeable #-}
-module PureScript.Kinds where
+module Language.PureScript.Kinds where
import Data.Data
diff --git a/src/PureScript/Names.hs b/src/Language/PureScript/Names.hs
index d823c2e..6b73e01 100644
--- a/src/PureScript/Names.hs
+++ b/src/Language/PureScript/Names.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.Names
+-- Module : Language.PureScript.Names
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -14,7 +14,7 @@
{-# LANGUAGE DeriveDataTypeable #-}
-module PureScript.Names where
+module Language.PureScript.Names where
import Data.Data
diff --git a/src/Language/PureScript/Parser.hs b/src/Language/PureScript/Parser.hs
new file mode 100644
index 0000000..503cf03
--- /dev/null
+++ b/src/Language/PureScript/Parser.hs
@@ -0,0 +1,22 @@
+-----------------------------------------------------------------------------
+--
+-- Module : Language.PureScript.Parser
+-- Copyright : (c) Phil Freeman 2013
+-- License : MIT
+--
+-- Maintainer : Phil Freeman <paf31@cantab.net>
+-- Stability : experimental
+-- Portability :
+--
+-- |
+--
+-----------------------------------------------------------------------------
+
+module Language.PureScript.Parser (module P) where
+
+import Language.PureScript.Parser.Common as P
+import Language.PureScript.Parser.Types as P
+import Language.PureScript.Parser.Values as P
+import Language.PureScript.Parser.State as P
+import Language.PureScript.Parser.Kinds as P
+import Language.PureScript.Parser.Declarations as P
diff --git a/src/PureScript/Parser/Common.hs b/src/Language/PureScript/Parser/Common.hs
index 8a19f91..16b125c 100644
--- a/src/PureScript/Parser/Common.hs
+++ b/src/Language/PureScript/Parser/Common.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.Parser.Common
+-- Module : Language.PureScript.Parser.Common
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -14,19 +14,19 @@
{-# LANGUAGE FlexibleContexts #-}
-module PureScript.Parser.Common where
+module Language.PureScript.Parser.Common where
import Data.Char (isSpace)
import Control.Applicative
import Control.Monad
import Control.Monad.State
-import PureScript.Parser.State
+import Language.PureScript.Parser.State
import qualified Data.Map as M
import qualified Text.Parsec as P
import qualified Text.Parsec.Pos as P
import qualified Text.Parsec.Token as PT
-import PureScript.Names
+import Language.PureScript.Names
reservedNames :: [String]
reservedNames = [ "case"
diff --git a/src/PureScript/Parser/Declarations.hs b/src/Language/PureScript/Parser/Declarations.hs
index f326aa3..0f22585 100644
--- a/src/PureScript/Parser/Declarations.hs
+++ b/src/Language/PureScript/Parser/Declarations.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.Parser.Declarations
+-- Module : Language.PureScript.Parser.Declarations
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -12,7 +12,7 @@
--
-----------------------------------------------------------------------------
-module PureScript.Parser.Declarations (
+module Language.PureScript.Parser.Declarations (
parseDeclaration,
parseDeclarations
) where
@@ -28,14 +28,14 @@ import qualified Data.Map as M
import qualified Text.Parsec as P
import qualified Text.Parsec.Pos as P
-import PureScript.Values
-import PureScript.Types
-import PureScript.Parser.State
-import PureScript.Parser.Common
-import PureScript.Declarations
-import PureScript.Parser.Values
-import PureScript.Parser.Types
-import PureScript.Parser.Kinds
+import Language.PureScript.Values
+import Language.PureScript.Types
+import Language.PureScript.Parser.State
+import Language.PureScript.Parser.Common
+import Language.PureScript.Declarations
+import Language.PureScript.Parser.Values
+import Language.PureScript.Parser.Types
+import Language.PureScript.Parser.Kinds
parseDataDeclaration :: P.Parsec String ParseState Declaration
parseDataDeclaration = do
diff --git a/src/PureScript/Parser/Kinds.hs b/src/Language/PureScript/Parser/Kinds.hs
index bf1ac37..38305ef 100644
--- a/src/PureScript/Parser/Kinds.hs
+++ b/src/Language/PureScript/Parser/Kinds.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.Parser.Kinds
+-- Module : Language.PureScript.Parser.Kinds
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -12,13 +12,13 @@
--
-----------------------------------------------------------------------------
-module PureScript.Parser.Kinds (
+module Language.PureScript.Parser.Kinds (
parseKind
) where
-import PureScript.Kinds
-import PureScript.Parser.State
-import PureScript.Parser.Common
+import Language.PureScript.Kinds
+import Language.PureScript.Parser.State
+import Language.PureScript.Parser.Common
import Control.Applicative
import qualified Text.Parsec as P
import qualified Text.Parsec.Expr as P
diff --git a/src/PureScript/Parser/State.hs b/src/Language/PureScript/Parser/State.hs
index 68f5a7e..98cf531 100644
--- a/src/PureScript/Parser/State.hs
+++ b/src/Language/PureScript/Parser/State.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.Parser.State
+-- Module : Language.PureScript.Parser.State
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -12,10 +12,10 @@
--
-----------------------------------------------------------------------------
-module PureScript.Parser.State where
+module Language.PureScript.Parser.State where
-import PureScript.Names
-import PureScript.Declarations
+import Language.PureScript.Names
+import Language.PureScript.Declarations
import qualified Text.Parsec as P
import qualified Data.Map as M
diff --git a/src/PureScript/Parser/Types.hs b/src/Language/PureScript/Parser/Types.hs
index 097f6d1..9b67b04 100644
--- a/src/PureScript/Parser/Types.hs
+++ b/src/Language/PureScript/Parser/Types.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.Parser.Types
+-- Module : Language.PureScript.Parser.Types
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -12,15 +12,15 @@
--
-----------------------------------------------------------------------------
-module PureScript.Parser.Types (
+module Language.PureScript.Parser.Types (
parseType,
parsePolyType,
parseRow
) where
-import PureScript.Types
-import PureScript.Parser.State
-import PureScript.Parser.Common
+import Language.PureScript.Types
+import Language.PureScript.Parser.State
+import Language.PureScript.Parser.Common
import Control.Applicative
import qualified Text.Parsec as P
import qualified Text.Parsec.Expr as P
diff --git a/src/PureScript/Parser/Values.hs b/src/Language/PureScript/Parser/Values.hs
index d38b046..a1c41b6 100644
--- a/src/PureScript/Parser/Values.hs
+++ b/src/Language/PureScript/Parser/Values.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.Parser.Values
+-- Module : Language.PureScript.Parser.Values
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -12,27 +12,27 @@
--
-----------------------------------------------------------------------------
-module PureScript.Parser.Values (
+module Language.PureScript.Parser.Values (
parseValue,
parseBinder
) where
-import PureScript.Values
-import PureScript.Names
-import PureScript.Declarations
-import PureScript.Parser.State
+import Language.PureScript.Values
+import Language.PureScript.Names
+import Language.PureScript.Declarations
+import Language.PureScript.Parser.State
import Data.Function (on)
import Data.List
import Data.Functor.Identity
import qualified Data.Map as M
-import qualified PureScript.Parser.Common as C
+import qualified Language.PureScript.Parser.Common as C
import Control.Applicative
import qualified Text.Parsec as P
import Text.Parsec.Expr
import Control.Monad
import Control.Arrow (Arrow(..))
-import PureScript.Parser.Types
-import PureScript.Types
+import Language.PureScript.Parser.Types
+import Language.PureScript.Types
booleanLiteral :: P.Parsec String ParseState Bool
booleanLiteral = (C.reserved "true" >> return True) P.<|> (C.reserved "false" >> return False)
diff --git a/src/PureScript/Pretty.hs b/src/Language/PureScript/Pretty.hs
index 124737f..279959e 100644
--- a/src/PureScript/Pretty.hs
+++ b/src/Language/PureScript/Pretty.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.Pretty
+-- Module : Language.PureScript.Pretty
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -12,11 +12,11 @@
--
-----------------------------------------------------------------------------
-module PureScript.Pretty (module P) where
+module Language.PureScript.Pretty (module P) where
-import PureScript.CodeGen.Pretty.Kinds as P
-import PureScript.CodeGen.Pretty.Values as P
-import PureScript.CodeGen.Pretty.Types as P
+import Language.PureScript.Pretty.Kinds as P
+import Language.PureScript.Pretty.Values as P
+import Language.PureScript.Pretty.Types as P
diff --git a/src/PureScript/CodeGen/Common.hs b/src/Language/PureScript/Pretty/Common.hs
index b2399e0..f480006 100644
--- a/src/PureScript/CodeGen/Common.hs
+++ b/src/Language/PureScript/Pretty/Common.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.CodeGen.Common
+-- Module : Language.PureScript.Pretty.Common
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -14,7 +14,7 @@
{-# LANGUAGE GeneralizedNewtypeDeriving, GADTs #-}
-module PureScript.CodeGen.Common where
+module Language.PureScript.Pretty.Common where
import Data.Char
import Data.Maybe (fromMaybe)
@@ -27,10 +27,10 @@ import Control.Category ((>>>))
import qualified Control.Arrow as A
import Control.Arrow ((***), (<+>))
-import PureScript.Names
-import PureScript.Values
-import PureScript.Types
-import PureScript.Declarations
+import Language.PureScript.Names
+import Language.PureScript.Values
+import Language.PureScript.Types
+import Language.PureScript.Declarations
identToJs :: Ident -> String
identToJs (Ident name) = name
diff --git a/src/PureScript/CodeGen/Pretty/Kinds.hs b/src/Language/PureScript/Pretty/Kinds.hs
index e5af635..a002a0a 100644
--- a/src/PureScript/CodeGen/Pretty/Kinds.hs
+++ b/src/Language/PureScript/Pretty/Kinds.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.CodeGen.Pretty.Kinds
+-- Module : Language.PureScript.Pretty.Kinds
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -12,7 +12,7 @@
--
-----------------------------------------------------------------------------
-module PureScript.CodeGen.Pretty.Kinds (
+module Language.PureScript.Pretty.Kinds (
prettyPrintKind
) where
@@ -23,8 +23,8 @@ import Control.Arrow ((<+>))
import qualified Data.Map as M
import Control.Applicative
-import PureScript.Kinds
-import PureScript.CodeGen.Common
+import Language.PureScript.Kinds
+import Language.PureScript.Pretty.Common
typeLiterals :: Pattern Kind String
typeLiterals = Pattern $ A.Kleisli match
diff --git a/src/PureScript/CodeGen/Pretty/Types.hs b/src/Language/PureScript/Pretty/Types.hs
index 4b7c085..f433961 100644
--- a/src/PureScript/CodeGen/Pretty/Types.hs
+++ b/src/Language/PureScript/Pretty/Types.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.CodeGen.Pretty.Types
+-- Module : Language.PureScript.Pretty.Types
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -12,7 +12,7 @@
--
-----------------------------------------------------------------------------
-module PureScript.CodeGen.Pretty.Types (
+module Language.PureScript.Pretty.Types (
prettyPrintType,
prettyPrintRow,
prettyPrintPolyType
@@ -25,12 +25,12 @@ import Control.Arrow ((<+>))
import qualified Data.Map as M
import Control.Applicative
-import PureScript.Values
-import PureScript.Types
-import PureScript.Names
-import PureScript.Declarations
-import PureScript.TypeChecker.Monad
-import PureScript.CodeGen.Common
+import Language.PureScript.Values
+import Language.PureScript.Types
+import Language.PureScript.Names
+import Language.PureScript.Declarations
+import Language.PureScript.TypeChecker.Monad
+import Language.PureScript.Pretty.Common
typeLiterals :: Pattern Type String
typeLiterals = Pattern $ A.Kleisli match
diff --git a/src/PureScript/CodeGen/Pretty/Values.hs b/src/Language/PureScript/Pretty/Values.hs
index 5fb79ba..801711c 100644
--- a/src/PureScript/CodeGen/Pretty/Values.hs
+++ b/src/Language/PureScript/Pretty/Values.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.CodeGen.Pretty.Values
+-- Module : Language.PureScript.Pretty.Values
-- Copyright : Kinds.hs(c) Phil Freeman 2013
-- License : MIT
--
@@ -12,7 +12,7 @@
--
-----------------------------------------------------------------------------
-module PureScript.CodeGen.Pretty.Values (
+module Language.PureScript.Pretty.Values (
prettyPrintValue,
prettyPrintBinder
) where
@@ -24,10 +24,10 @@ import qualified Control.Arrow as A
import Control.Arrow ((<+>))
import Control.Applicative
-import PureScript.Types
-import PureScript.Values
-import PureScript.Names
-import PureScript.CodeGen.Common
+import Language.PureScript.Types
+import Language.PureScript.Values
+import Language.PureScript.Names
+import Language.PureScript.Pretty.Common
literals :: Pattern Value String
literals = Pattern $ A.Kleisli match
diff --git a/src/PureScript/TypeChecker.hs b/src/Language/PureScript/TypeChecker.hs
index 4c92b59..4ba1c27 100644
--- a/src/PureScript/TypeChecker.hs
+++ b/src/Language/PureScript/TypeChecker.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.TypeChecker
+-- Module : Language.PureScript.TypeChecker
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -14,26 +14,26 @@
{-# LANGUAGE FlexibleInstances #-}
-module PureScript.TypeChecker (
-module T,
+module Language.PureScript.TypeChecker (
+ module T,
typeCheckAll
) where
-import PureScript.TypeChecker.Monad as T
-import PureScript.TypeChecker.Kinds as T
-import PureScript.TypeChecker.Types as T
-import PureScript.TypeChecker.Synonyms as T
+import Language.PureScript.TypeChecker.Monad as T
+import Language.PureScript.TypeChecker.Kinds as T
+import Language.PureScript.TypeChecker.Types as T
+import Language.PureScript.TypeChecker.Synonyms as T
import Data.List
import Data.Maybe
import Data.Function
import qualified Data.Map as M
-import PureScript.Values
-import PureScript.Types
-import PureScript.Names
-import PureScript.Kinds
-import PureScript.Declarations
+import Language.PureScript.Values
+import Language.PureScript.Types
+import Language.PureScript.Names
+import Language.PureScript.Kinds
+import Language.PureScript.Declarations
import Control.Monad (forM_)
import Control.Monad.State
diff --git a/src/PureScript/TypeChecker/Kinds.hs b/src/Language/PureScript/TypeChecker/Kinds.hs
index 5c617b3..ef7dcd2 100644
--- a/src/PureScript/TypeChecker/Kinds.hs
+++ b/src/Language/PureScript/TypeChecker/Kinds.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.TypeChecker.Kinds
+-- Module : Language.PureScript.TypeChecker.Kinds
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -14,7 +14,7 @@
{-# LANGUAGE DeriveDataTypeable #-}
-module PureScript.TypeChecker.Kinds (
+module Language.PureScript.TypeChecker.Kinds (
KindConstraint(..),
KindSolution(..),
kindsOf,
@@ -26,12 +26,11 @@ import Data.Maybe (fromMaybe)
import Data.Function
import Data.Data
-import PureScript.Types
-import PureScript.Kinds
-import PureScript.Declarations
-import PureScript.TypeChecker.Monad
-import PureScript.CodeGen.Pretty.Kinds
-import PureScript.CodeGen.Pretty.Types
+import Language.PureScript.Types
+import Language.PureScript.Kinds
+import Language.PureScript.Declarations
+import Language.PureScript.TypeChecker.Monad
+import Language.PureScript.Pretty
import Control.Monad.State
import Control.Monad.Error
diff --git a/src/PureScript/TypeChecker/Monad.hs b/src/Language/PureScript/TypeChecker/Monad.hs
index d283232..071d3a1 100644
--- a/src/PureScript/TypeChecker/Monad.hs
+++ b/src/Language/PureScript/TypeChecker/Monad.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.TypeChecker.Monad
+-- Module : Language.PureScript.TypeChecker.Monad
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -14,11 +14,11 @@
{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleInstances #-}
-module PureScript.TypeChecker.Monad where
+module Language.PureScript.TypeChecker.Monad where
-import PureScript.Types
-import PureScript.Kinds
-import PureScript.Names
+import Language.PureScript.Types
+import Language.PureScript.Kinds
+import Language.PureScript.Names
import Control.Applicative
import Control.Monad.State
diff --git a/src/PureScript/TypeChecker/Synonyms.hs b/src/Language/PureScript/TypeChecker/Synonyms.hs
index 5254629..62b8bd9 100644
--- a/src/PureScript/TypeChecker/Synonyms.hs
+++ b/src/Language/PureScript/TypeChecker/Synonyms.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.TypeChecker.Synonyms
+-- Module : Language.PureScript.TypeChecker.Synonyms
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -14,13 +14,13 @@
{-# LANGUAGE Rank2Types #-}
-module PureScript.TypeChecker.Synonyms (
+module Language.PureScript.TypeChecker.Synonyms (
saturateTypeSynonym,
saturateAllTypeSynonyms
) where
-import PureScript.Types
-import PureScript.Declarations
+import Language.PureScript.Types
+import Language.PureScript.Declarations
import Data.Maybe (fromMaybe)
import Data.Data
diff --git a/src/PureScript/TypeChecker/Types.hs b/src/Language/PureScript/TypeChecker/Types.hs
index e6dffbe..247fa8a 100644
--- a/src/PureScript/TypeChecker/Types.hs
+++ b/src/Language/PureScript/TypeChecker/Types.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.TypeChecker.Types
+-- Module : Language.PureScript.TypeChecker.Types
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -14,7 +14,7 @@
{-# LANGUAGE DeriveDataTypeable #-}
-module PureScript.TypeChecker.Types (
+module Language.PureScript.TypeChecker.Types (
TypeConstraint(..),
TypeSolution(..),
typeOf
@@ -27,16 +27,14 @@ import Data.Function
import qualified Data.Data as D
import Data.Generics (everywhere, everywhereM, everything, mkT, mkM, mkQ, extM, extQ)
-import PureScript.Values
-import PureScript.Types
-import PureScript.Kinds
-import PureScript.Names
-import PureScript.TypeChecker.Monad
-import PureScript.TypeChecker.Kinds
-import PureScript.TypeChecker.Synonyms
-import PureScript.CodeGen.Pretty.Types
-import PureScript.CodeGen.Pretty.Kinds
-import PureScript.CodeGen.Pretty.Values
+import Language.PureScript.Values
+import Language.PureScript.Types
+import Language.PureScript.Kinds
+import Language.PureScript.Names
+import Language.PureScript.TypeChecker.Monad
+import Language.PureScript.TypeChecker.Kinds
+import Language.PureScript.TypeChecker.Synonyms
+import Language.PureScript.Pretty
import Control.Monad.State
import Control.Monad.Error
diff --git a/src/PureScript/Types.hs b/src/Language/PureScript/Types.hs
index fd35fd4..8c9bbb4 100644
--- a/src/PureScript/Types.hs
+++ b/src/Language/PureScript/Types.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : Purescript.Types
+-- Module : Language.PureScript.Types
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -14,7 +14,7 @@
{-# LANGUAGE DeriveDataTypeable #-}
-module PureScript.Types where
+module Language.PureScript.Types where
import Data.Data
diff --git a/src/PureScript/Values.hs b/src/Language/PureScript/Values.hs
index 0ed3765..28ce5c0 100644
--- a/src/PureScript/Values.hs
+++ b/src/Language/PureScript/Values.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
--
--- Module : PureScript.Values
+-- Module : Language.PureScript.Values
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
@@ -14,10 +14,10 @@
{-# LANGUAGE DeriveDataTypeable #-}
-module PureScript.Values where
+module Language.PureScript.Values where
-import PureScript.Types
-import PureScript.Names
+import Language.PureScript.Types
+import Language.PureScript.Names
import Data.Data
diff --git a/src/Main.hs b/src/Main.hs
index a203c6c..c54343d 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -14,7 +14,7 @@
module Main where
-import PureScript
+import Language.PureScript
import Data.Maybe (mapMaybe)
import Data.List (intercalate)
import System.Console.CmdTheLine
diff --git a/src/PureScript.hs b/src/PureScript.hs
deleted file mode 100644
index 79336cc..0000000
--- a/src/PureScript.hs
+++ /dev/null
@@ -1,26 +0,0 @@
------------------------------------------------------------------------------
---
--- Module : PureScript
--- Copyright : (c) Phil Freeman 2013
--- License : MIT
---
--- Maintainer : Phil Freeman <paf31@cantab.net>
--- Stability : experimental
--- Portability :
---
--- |
---
------------------------------------------------------------------------------
-
-module PureScript (module P) where
-
-import PureScript.Values as P
-import PureScript.Types as P
-import PureScript.Kinds as P
-import PureScript.Declarations as P
-import PureScript.Names as P
-import PureScript.Parser as P
-import PureScript.CodeGen as P
-import PureScript.TypeChecker as P
-import PureScript.Pretty as P
-
diff --git a/src/PureScript/Parser.hs b/src/PureScript/Parser.hs
deleted file mode 100644
index 5640bb8..0000000
--- a/src/PureScript/Parser.hs
+++ /dev/null
@@ -1,22 +0,0 @@
------------------------------------------------------------------------------
---
--- Module : PureScript.Parser
--- Copyright : (c) Phil Freeman 2013
--- License : MIT
---
--- Maintainer : Phil Freeman <paf31@cantab.net>
--- Stability : experimental
--- Portability :
---
--- |
---
------------------------------------------------------------------------------
-
-module PureScript.Parser (module P) where
-
-import PureScript.Parser.Common as P
-import PureScript.Parser.Types as P
-import PureScript.Parser.Values as P
-import PureScript.Parser.State as P
-import PureScript.Parser.Kinds as P
-import PureScript.Parser.Declarations as P
diff --git a/tests/Main.hs b/tests/Main.hs
index 10a56c8..c81a374 100644
--- a/tests/Main.hs
+++ b/tests/Main.hs
@@ -14,8 +14,7 @@
module Main (main) where
-import PureScript
-import PureScript.CodeGen.Pretty.Types
+import Language.PureScript
import Data.List (isSuffixOf)
import Control.Applicative