1
Fork 0

put the modules in a better path

This commit is contained in:
Jake Wheat 2013-12-13 16:04:48 +02:00
parent e3be820dfb
commit afc6933f64
5 changed files with 25 additions and 18 deletions

View file

@ -1,8 +1,9 @@
> module Parser (parseQueryExpr > module Language.SQL.SimpleSQL.Parser
> ,parseScalarExpr > (parseQueryExpr
> ,ParseError) where > ,parseScalarExpr
> ,ParseError) where
> import Text.Groom > import Text.Groom
> import Text.Parsec > import Text.Parsec
@ -12,7 +13,7 @@
> import qualified Language.Haskell.Exts.Fixity as HSE > import qualified Language.Haskell.Exts.Fixity as HSE
> import Data.Maybe > import Data.Maybe
> import Syntax > import Language.SQL.SimpleSQL.Syntax
> parseQueryExpr :: FilePath -> Maybe (Int,Int) -> String -> Either ParseError QueryExpr > parseQueryExpr :: FilePath -> Maybe (Int,Int) -> String -> Either ParseError QueryExpr

View file

@ -2,9 +2,12 @@
This is the pretty printer code which takes AST values and turns them This is the pretty printer code which takes AST values and turns them
back into SQL source text. It attempts to format the output nicely. back into SQL source text. It attempts to format the output nicely.
> module Pretty (prettyQueryExpr, prettyScalarExpr) where > module Language.SQL.SimpleSQL.Pretty
> (prettyQueryExpr
> ,prettyScalarExpr
> ) where
> import Syntax > import Language.SQL.SimpleSQL.Syntax
> import Text.PrettyPrint > import Text.PrettyPrint
> import Data.Maybe > import Data.Maybe

View file

@ -1,11 +1,12 @@
> module Syntax (QueryExpr(..) > module Language.SQL.SimpleSQL.Syntax
> ,makeSelect > (QueryExpr(..)
> ,ScalarExpr(..) > ,makeSelect
> ,TableRef(..) > ,ScalarExpr(..)
> ,JoinType(..) > ,TableRef(..)
> ,JoinCondition(..)) > ,JoinType(..)
> where > ,JoinCondition(..)
> ) where
> data ScalarExpr = Literal String > data ScalarExpr = Literal String

View file

@ -1,9 +1,9 @@
> module Tests (testData, runTests) where > module Tests (testData, runTests) where
> import Syntax > import Language.SQL.SimpleSQL.Syntax
> import Pretty > import Language.SQL.SimpleSQL.Pretty
> import Parser > import Language.SQL.SimpleSQL.Parser
> import qualified Test.HUnit as H > import qualified Test.HUnit as H
> import Control.Monad > import Control.Monad

View file

@ -2,7 +2,7 @@ name: simple-sql-parser
version: 0.1.0.0 version: 0.1.0.0
synopsis: A parser for SQL queries synopsis: A parser for SQL queries
description: A parser for SQL queries, using Parsec. Also includes pretty printer. Aims to support most of SQL2003 queries. description: A parser for SQL queries, using Parsec. Also includes pretty printer. Aims to support most of SQL2003 queries plus other dialects.
homepage: https://github.com/JakeWheat/simple_sql_parser homepage: https://github.com/JakeWheat/simple_sql_parser
license: BSD3 license: BSD3
@ -21,7 +21,9 @@ source-repository head
location: https://github.com/JakeWheat/simple_sql_parser.git location: https://github.com/JakeWheat/simple_sql_parser.git
library library
exposed-modules: Pretty, Parser, Syntax exposed-modules: Language.SQL.SimpleSQL.Pretty,
Language.SQL.SimpleSQL.Parser,
Language.SQL.SimpleSQL.Syntax
-- other-modules: -- other-modules:
-- other-extensions: -- other-extensions:
build-depends: base >=4.6 && <4.7, build-depends: base >=4.6 && <4.7,