-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add array concenation aggregators (#270)
- Loading branch information
1 parent
10eab21
commit 0ebb70f
Showing
12 changed files
with
236 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!-- | ||
A new scriv changelog fragment. | ||
Uncomment the section that is right (remove the HTML comment wrapper). | ||
--> | ||
|
||
<!-- | ||
### Removed | ||
- A bullet item for the Removed category. | ||
--> | ||
### Added | ||
|
||
- Added aggregators `listCat` and `nonEmptyCat` for folding a collection of lists into a single list by concatenation. | ||
|
||
<!-- | ||
### Changed | ||
- A bullet item for the Changed category. | ||
--> | ||
<!-- | ||
### Deprecated | ||
- A bullet item for the Deprecated category. | ||
--> | ||
<!-- | ||
### Fixed | ||
- A bullet item for the Fixed category. | ||
--> | ||
<!-- | ||
### Security | ||
- A bullet item for the Security category. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{-# LANGUAGE FlexibleContexts #-} | ||
{-# LANGUAGE MonoLocalBinds #-} | ||
|
||
module Rel8.Expr.Read | ||
( read | ||
, sread | ||
) | ||
where | ||
|
||
-- base | ||
import Prelude () | ||
|
||
-- rel8 | ||
import Rel8.Expr (Expr) | ||
import Rel8.Expr.Opaleye (unsafeCastExpr, sunsafeCastExpr) | ||
import Rel8.Schema.Null (Sql) | ||
import Rel8.Type (DBType) | ||
import Rel8.Type.Name (TypeName) | ||
|
||
-- text | ||
import Data.Text (Text) | ||
|
||
|
||
read :: Sql DBType a => Expr Text -> Expr a | ||
read = unsafeCastExpr | ||
|
||
|
||
sread :: TypeName -> Expr Text -> Expr a | ||
sread = sunsafeCastExpr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module Rel8.Expr.Show | ||
( show | ||
) | ||
where | ||
|
||
-- base | ||
import Prelude () | ||
|
||
-- rel8 | ||
import Rel8.Expr (Expr) | ||
import Rel8.Expr.Opaleye (unsafeCastExpr) | ||
|
||
-- text | ||
import Data.Text (Text) | ||
|
||
|
||
show :: Expr a -> Expr Text | ||
show = unsafeCastExpr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.