From cc39a86e1a6d292a240fdc43faa644c50a1d1986 Mon Sep 17 00:00:00 2001 From: Shane O'Brien Date: Fri, 20 Oct 2023 12:13:04 +0100 Subject: [PATCH] Move some ListTable operations to Rel8.Array to avoid name clashes --- rel8.cabal | 1 + src/Rel8.hs | 10 ---------- src/Rel8/Array.hs | 26 ++++++++++++++++++++++++++ src/Rel8/Statement/OnConflict.hs | 1 - 4 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 src/Rel8/Array.hs diff --git a/rel8.cabal b/rel8.cabal index cb6480eb..11e3a7e4 100644 --- a/rel8.cabal +++ b/rel8.cabal @@ -61,6 +61,7 @@ library src exposed-modules: Rel8 + Rel8.Array Rel8.Expr.Num Rel8.Expr.Text Rel8.Expr.Time diff --git a/src/Rel8.hs b/src/Rel8.hs index 6695d4a7..dfbd1613 100644 --- a/src/Rel8.hs +++ b/src/Rel8.hs @@ -101,10 +101,6 @@ module Rel8 , manyExpr , catListTable , catList - , head, headExpr - , index, indexExpr - , last, lastExpr - , length, lengthExpr -- ** @NonEmptyTable@ , NonEmptyTable @@ -114,10 +110,6 @@ module Rel8 , someExpr , catNonEmptyTable , catNonEmpty - , head1, head1Expr - , index1, index1Expr - , last1, last1Expr - , length1, length1Expr -- ** @NullTable@ , NullTable @@ -396,8 +388,6 @@ import Rel8.Expr.Bool import Rel8.Expr.Default import Rel8.Expr.Eq import Rel8.Expr.Function -import Rel8.Expr.List -import Rel8.Expr.NonEmpty import Rel8.Expr.Null import Rel8.Expr.Opaleye (unsafeCastExpr, unsafeLiteral) import Rel8.Expr.Ord diff --git a/src/Rel8/Array.hs b/src/Rel8/Array.hs new file mode 100644 index 00000000..283b034f --- /dev/null +++ b/src/Rel8/Array.hs @@ -0,0 +1,26 @@ +module Rel8.Array + ( + -- ** @ListTable@ + ListTable + , head, headExpr + , index, indexExpr + , last, lastExpr + , length, lengthExpr + + -- ** @NonEmptyTable@ + , NonEmptyTable + , head1, head1Expr + , index1, index1Expr + , last1, last1Expr + , length1, length1Expr + ) +where + +-- base +import Prelude hiding (head, last, length) + +-- rel8 +import Rel8.Expr.List +import Rel8.Expr.NonEmpty +import Rel8.Table.List +import Rel8.Table.NonEmpty diff --git a/src/Rel8/Statement/OnConflict.hs b/src/Rel8/Statement/OnConflict.hs index 1a00007a..4731b6d5 100644 --- a/src/Rel8/Statement/OnConflict.hs +++ b/src/Rel8/Statement/OnConflict.hs @@ -3,7 +3,6 @@ {-# language GADTs #-} {-# language LambdaCase #-} {-# language NamedFieldPuns #-} -{-# language NoFieldSelectors #-} {-# language OverloadedStrings #-} {-# language RecordWildCards #-} {-# language StandaloneKindSignatures #-}