Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"purescript-pathy": "^3.0.2",
"purescript-profunctor": "^2.0.0",
"purescript-profunctor-lenses": "^2.6.0",
"purescript-ejson": "^6.0.0"
"purescript-ejson": "^7.0.0"
},
"devDependencies": {
"purescript-argonaut": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"test": "pulp test -- --censor-lib --strict --stash"
},
"dependencies": {
"pulp": "^10.0.1",
"pulp": "^10.0.4",
"purescript": "^0.10.7",
"purescript-psa": "^0.4.0"
}
Expand Down
4 changes: 2 additions & 2 deletions src/SqlSquare/Constructors.purs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Prelude

import Data.Array as Arr
import Data.DateTime as DT
import Data.Json.Extended.Signature (EJsonF(..))
import Data.Json.Extended.Signature (EJsonF(..), EJsonMap(..))
import Data.Foldable as F
import Data.HugeNum as HN
import Data.List as L
Expand Down Expand Up @@ -55,7 +55,7 @@ array ∷ ∀ t f. (Corecursive t (SqlF EJsonF), F.Foldable f) ⇒ f t → t
array l = embed $ Literal $ Array $ Arr.fromFoldable l

map_ ∷ ∀ t. (Corecursive t (SqlF EJsonF), Ord t) ⇒ Map.Map t t → t
map_ m = embed $ Literal $ Map $ Arr.fromFoldable $ Map.toList m
map_ m = embed $ Literal $ Map ∘ EJsonMap $ Arr.fromFoldable $ Map.toList m

splice ∷ ∀ t f. Corecursive t (SqlF f) ⇒ Maybe t → t
splice m = embed $ Splice m
Expand Down
4 changes: 2 additions & 2 deletions src/SqlSquare/Lenses.purs
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ _MapLiteral
∷ ∀ t
. (Recursive t (S.SqlF EJ.EJsonF), Corecursive t (S.SqlF EJ.EJsonF))
⇒ Prism' t (Array (t × t))
_MapLiteral = prism' (embed ∘ S.Literal ∘ EJ.Map) $ project ⋙ case _ of
S.Literal (EJ.Map tpls) → M.Just tpls
_MapLiteral = prism' (embed ∘ S.Literal ∘ EJ.Map ∘ EJ.EJsonMap) $ project ⋙ case _ of
S.Literal (EJ.Map (EJ.EJsonMap tpls)) → M.Just tpls
_ → M.Nothing

_Splice
Expand Down
2 changes: 1 addition & 1 deletion test/src/Search.purs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ needDistinctF ∷ Algebra (S.SqlF EJ.EJsonF) Boolean
needDistinctF = case _ of
S.SetLiteral ns → F.or ns
S.Literal (EJ.Array ns) → F.or ns
S.Literal (EJ.Map tpls) → F.any (\(a × b) → a || b) tpls
S.Literal (EJ.Map (EJ.EJsonMap tpls)) → F.any (\(a × b) → a || b) tpls
S.Splice Nothing → false
S.Splice (Just a) → a
S.Binop { lhs, rhs } → lhs || rhs
Expand Down