Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
7f36bec4
Commit
7f36bec4
authored
Nov 19, 2022
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[temporary] turn off Data.Sequence, use Data.Array instead
parent
44a83609
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
3 deletions
+35
-3
packages.dhall
packages.dhall
+1
-1
Utils.purs
src/Gargantext/Utils.purs
+4
-2
DataSequence.purs
src/SeqFix/DataSequence.purs
+30
-0
No files found.
packages.dhall
View file @
7f36bec4
...
@@ -123,7 +123,7 @@ let additions =
...
@@ -123,7 +123,7 @@ let additions =
, "unsafe-coerce"
, "unsafe-coerce"
]
]
, repo = "https://github.com/garganscript/purescript-sequences.git"
, repo = "https://github.com/garganscript/purescript-sequences.git"
, version = "
7ad61fde5239fbf66ceeefc0b7608aa9cbc53701
"
, version = "
recursion-fix
"
}
}
, spec-discovery =
, spec-discovery =
{ dependencies = [ "prelude", "effect", "arrays", "spec", "node-fs" ]
{ dependencies = [ "prelude", "effect", "arrays", "spec", "node-fs" ]
...
...
src/Gargantext/Utils.purs
View file @
7f36bec4
...
@@ -2,13 +2,14 @@ module Gargantext.Utils where
...
@@ -2,13 +2,14 @@ module Gargantext.Utils where
import Prelude
import Prelude
import Data.Array as A
import Data.Char (fromCharCode)
import Data.Char (fromCharCode)
import Data.Either (Either(..))
import Data.Either (Either(..))
import Data.Foldable (class Foldable, foldr)
import Data.Foldable (class Foldable, foldr)
import Data.Lens (Lens', lens)
import Data.Lens (Lens', lens)
import Data.Maybe (Maybe(..), fromJust)
import Data.Maybe (Maybe(..), fromJust)
import Data.Newtype (class Newtype, unwrap, wrap)
import Data.Newtype (class Newtype, unwrap, wrap)
import Data.Sequence.Ordered as OSeq
--
import Data.Sequence.Ordered as OSeq
import Data.Set (Set)
import Data.Set (Set)
import Data.Set as Set
import Data.Set as Set
import Data.String as S
import Data.String as S
...
@@ -100,7 +101,8 @@ sortWith :: forall a b f. Functor f =>
...
@@ -100,7 +101,8 @@ sortWith :: forall a b f. Functor f =>
Unfoldable f =>
Unfoldable f =>
Ord b =>
Ord b =>
(a -> b) -> f a -> f a
(a -> b) -> f a -> f a
sortWith f = map (\(On _ y) -> y) <<< OSeq.toUnfoldable <<< foldr (\x -> OSeq.insert (On (f x) x)) OSeq.empty
--sortWith f = map (\(On _ y) -> y) <<< OSeq.toUnfoldable <<< foldr (\x -> OSeq.insert (On (f x) x)) OSeq.empty
sortWith f xs = A.toUnfoldable $ A.sortWith f (A.fromFoldable xs)
href :: Effect String
href :: Effect String
...
...
src/SeqFix/DataSequence.purs
0 → 100644
View file @
7f36bec4
module Data.Sequence where
import Prelude
import Data.Array as A
import Data.Functor as Functor
import Data.Tuple (Tuple(..))
type Seq = Array
cons = A.cons
length = A.length
concatMap = A.concatMap
drop = A.drop
filter = A.filter
map = Functor.map
take = A.take
fromFoldable = A.fromFoldable
toUnfoldable = A.toUnfoldable
empty = []
head = A.head
null = A.null
snoc = A.snoc
singleton = A.singleton
splitAt idx seq = Tuple s.before s.after
where
s = A.splitAt idx seq
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment