1
Fork 0
This commit is contained in:
Jake Wheat 2013-12-17 20:27:11 +02:00
parent 9b1bbbf307
commit e61672ebf8
7 changed files with 26 additions and 13 deletions

View file

@ -117,7 +117,7 @@ the fixity code.
> var = HSE.Var . HSE.UnQual . HSE.Ident
> sym = HSE.UnQual . HSE.Symbol
> name n = case n of
> QName q -> "\"" ++ q
> QName q -> '"' ++ q
> Name m -> m
> orderExps = map (toHaskell . (\(OrderField a _ _) -> a))
> orderInf = map (\(OrderField _ b c) -> (b,c))

View file

@ -183,8 +183,8 @@ always used with the optionSuffix combinator.
> partitionBy = try (keyword_ "partition") >>
> keyword_ "by" >> commaSep1 scalarExpr'
> frameClause =
> mkFrame <$> (choice [FrameRows <$ keyword_ "rows"
> ,FrameRange <$ keyword_ "range"])
> mkFrame <$> choice [FrameRows <$ keyword_ "rows"
> ,FrameRange <$ keyword_ "range"]
> <*> frameStartEnd
> frameStartEnd =
> choice

View file

@ -101,7 +101,7 @@
> scalarExpr (PrefixOp f e) = name f <+> scalarExpr e
> scalarExpr (PostfixOp f e) = scalarExpr e <+> name f
> scalarExpr e@(BinOp _ op _) | op `elem` [(Name "and"), (Name "or")] =
> scalarExpr e@(BinOp _ op _) | op `elem` [Name "and", Name "or"] =
> -- special case for and, or, get all the ands so we can vcat them
> -- nicely
> case ands e of

View file

@ -66,7 +66,7 @@
> -- order by, to regular function application
> | AggregateApp
> {aggName :: Name -- ^ aggregate function name
> ,aggDistinct :: (Maybe Duplicates)-- ^ distinct
> ,aggDistinct :: Maybe Duplicates -- ^ distinct
> ,aggArgs :: [ScalarExpr]-- ^ args
> ,aggOrderBy :: [OrderField] -- ^ order by
> }