Commit 8d5bcec1 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[ps] migration to 0.14.2

Not everything compiles yet.
parent 7b40331d
...@@ -23,9 +23,9 @@ test: ...@@ -23,9 +23,9 @@ test:
# - .stack-root/ # - .stack-root/
# - .stack-work/ # - .stack-work/
script: script:
# find 0.13.8 purescript version here: # find 0.14.2 purescript version here:
# https://lazamar.co.uk/nix-versions/ # https://lazamar.co.uk/nix-versions/
- nix-env -i purescript-0.13.8 -f https://github.com/NixOS/nixpkgs/archive/bed08131cd29a85f19716d9351940bdc34834492.tar.gz - nix-env -i purescript-0.14.2 -f https://github.com/NixOS/nixpkgs/archive/bed08131cd29a85f19716d9351940bdc34834492.tar.gz
- nix-env -i git - nix-env -i git
- nix-env -i nodejs - nix-env -i nodejs
- nix-env -i yarn - nix-env -i yarn
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -5,8 +5,8 @@ import ...@@ -5,8 +5,8 @@ import
pkgs.fetchFromGitHub { pkgs.fetchFromGitHub {
owner = "justinwoo"; owner = "justinwoo";
repo = "easy-purescript-nix"; repo = "easy-purescript-nix";
rev = "c8c32741bc09e2ac0a94d5140cf51fa5de809e24"; rev = "47bdc016c7d56e987ca1aca690b1d6c9816a8584";
sha256 = "0rn938nbxqsd7lp7l8z1y7bhzaq29vbziq6hq9llb3yh9xs10lmf"; sha256 = "051fzxd03y0c63sll2bhn0h66dywy9lw6ylyh5vq8fymvix20q94";
} }
) { ) {
inherit pkgs; inherit pkgs;
......
import ( import (
builtins.fetchTarball { builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/20.03.tar.gz"; url = "https://github.com/NixOS/nixpkgs/archive/21.05.tar.gz";
sha256 = "0182ys095dfx02vl2a20j1hz92dx3mfgz2a6fhn31bqlp1wa8hlq"; sha256 = "1ckzhh24mgz6jd1xhfgx0i9mijk6xjqxwsshnvq789xsavrmsc36";
} }
) )
This diff is collapsed.
...@@ -34,38 +34,38 @@ ...@@ -34,38 +34,38 @@
"@popperjs/core": "^2.9.2", "@popperjs/core": "^2.9.2",
"aes-js": "^3.1.1", "aes-js": "^3.1.1",
"base-x": "^3.0.2", "base-x": "^3.0.2",
"bootstrap": "^4.6.0", "bootstrap": "^5.0.1",
"bootstrap-dark": "^1.0.3", "bootstrap-dark": "^1.0.3",
"create-react-class": "^15.6.3", "create-react-class": "^15.6.3",
"echarts": "^4.1.0", "echarts": "^5.1.2",
"echarts-for-react": "^2.0.14", "echarts-for-react": "^3.0.1",
"highlightjs": "^9.16.2", "highlightjs": "^9.16.2",
"immer": "^8.0.1", "immer": "^9.0.3",
"prop-types": "^15.6.2", "prop-types": "^15.6.2",
"pullstate": "^1.20.6", "pullstate": "^1.20.6",
"react": "^16.10", "react": "^17.0.2",
"react-awesome-popover": "^6.1.1", "react-awesome-popover": "^6.1.1",
"react-bootstrap": "^1.5.2", "react-bootstrap": "^1.5.2",
"react-dom": "^16.10", "react-dom": "^17.0.2",
"react-tooltip": "^4.2.8", "react-tooltip": "^4.2.8",
"secp256k1": "^3.3.0", "secp256k1": "^4.0.2",
"sigma": "git://github.com/poorscript/sigma.js#garg" "sigma": "git://github.com/poorscript/sigma.js#garg"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.12.9", "@babel/core": "^7.12.9",
"@babel/preset-react": "^7.12.7", "@babel/preset-react": "^7.12.7",
"parcel": "^1.12.4", "parcel": "^2.0.0-beta.2",
"psc-package": "^4.0.1", "psc-package": "^4.0.1",
"pulp": "^15.0.0", "pulp": "^15.0.0",
"react-testing-library": "^6.1.2", "react-testing-library": "^8.0.1",
"sass": "^1.23.7", "sass": "^1.23.7",
"serve": "^11.3.1", "serve": "^12.0.0",
"spago": "^0.19.1", "spago": "^0.20.3",
"vscode-languageserver": "^6.0.0", "vscode-languageserver": "^7.0.0",
"xhr2": "^0.1.4" "xhr2": "^0.2.1"
}, },
"optionalDependencies": { "optionalDependencies": {
"purescript": "^0.13.8", "purescript": "^0.14.2",
"purescript-language-server": "^0.12.9" "purescript-language-server": "^0.15.2"
} }
} }
let upstream = let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.13.8-20210226/packages.dhall sha256:7e973070e323137f27e12af93bc2c2f600d53ce4ae73bb51f34eb7d7ce0a43ea https://github.com/purescript/package-sets/releases/download/psc-0.14.2-20210613/packages.dhall sha256:64d7b5a1921e8458589add8a1499a1c82168e726a87fc4f958b3f8760cca2efe
let overrides = let overrides =
{ thermite = { globals =
{ dependencies =
[ "aff"
, "coroutines"
, "web-dom"
, "freet"
, "profunctor-lenses"
, "react"
, "react-dom"
]
, repo = "https://github.com/poorscript/purescript-thermite.git"
, version = "hide-2020-03-04"
}
, globals =
{ dependencies = [ "functions", "maybe" ] { dependencies = [ "functions", "maybe" ]
, repo = "https://github.com/purescript/purescript-globals" , repo = "https://github.com/purescript/purescript-globals"
, version = "v4.1.0" , version = "v4.1.0"
} }
, smolder =
{ dependencies = [
"bifunctors"
, "catenable-lists"
, "free"
, "ordered-collections"
, "prelude"
, "strings"
, "test-unit"
, "transformers"
, "tuples"]
, repo = "https://github.com/bodil/purescript-smolder"
, version = "v12.3.0"
}
} }
let additions = let additions =
...@@ -88,12 +89,12 @@ let additions = ...@@ -88,12 +89,12 @@ let additions =
, markdown = , markdown =
{ dependencies = [ "precise" ] { dependencies = [ "precise" ]
, repo = "https://github.com/poorscript/purescript-markdown" , repo = "https://github.com/poorscript/purescript-markdown"
, version = "2020-03-04" , version = "2021-06-22"
} }
, markdown-smolder = , markdown-smolder =
{ dependencies = [ "markdown", "smolder" ] { dependencies = [ "markdown", "smolder" ]
, repo = "https://github.com/poorscript/purescript-markdown-smolder" , repo = "https://github.com/poorscript/purescript-markdown-smolder"
, version = "2020-03-04" , version = "2021-06-22"
} }
, precise = , precise =
{ dependencies = [ "prelude" ] { dependencies = [ "prelude" ]
...@@ -126,12 +127,12 @@ let additions = ...@@ -126,12 +127,12 @@ let additions =
} }
, tuples-native = , tuples-native =
{ dependencies = { dependencies =
[ "generics-rep", "prelude", "typelevel", "unsafe-coerce" ] [ "prelude", "typelevel", "unsafe-coerce" ]
, repo = "https://github.com/athanclark/purescript-tuples-native" , repo = "https://github.com/athanclark/purescript-tuples-native"
, version = "v2.0.1" , version = "v2.0.1"
} }
, uint = , uint =
{ dependencies = [ "maybe", "math", "generics-rep" ] { dependencies = [ "maybe", "math" ]
, repo = "https://github.com/zaquest/purescript-uint" , repo = "https://github.com/zaquest/purescript-uint"
, version = "v5.1.1" , version = "v5.1.1"
} }
...@@ -144,10 +145,9 @@ let additions = ...@@ -144,10 +145,9 @@ let additions =
, "parsing" , "parsing"
, "integers" , "integers"
, "globals" , "globals"
, "generics-rep"
] ]
, repo = "https://github.com/slamdata/purescript-uri" , repo = "https://github.com/slamdata/purescript-uri"
, version = "v7.0.0" , version = "v8.0.1"
} }
, read = , read =
{ dependencies = [ "prelude", "maybe", "strings" ] { dependencies = [ "prelude", "maybe", "strings" ]
...@@ -157,7 +157,7 @@ let additions = ...@@ -157,7 +157,7 @@ let additions =
, versions = , versions =
{ dependencies = [ "prelude" ] { dependencies = [ "prelude" ]
, repo = "https://github.com/hdgarrood/purescript-versions.git" , repo = "https://github.com/hdgarrood/purescript-versions.git"
, version = "v5.0.1" , version = "v6.0.0"
} }
, simplecrypto = , simplecrypto =
{ dependencies = [ "prelude", "maybe", "node-buffer" ] { dependencies = [ "prelude", "maybe", "node-buffer" ]
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
"foreign-generic", "foreign-generic",
"foreign-object", "foreign-object",
"formula", "formula",
"generics-rep",
"globals", "globals",
"integers", "integers",
"js-timers", "js-timers",
...@@ -36,6 +35,7 @@ ...@@ -36,6 +35,7 @@
"record-extra", "record-extra",
"routing", "routing",
"sequences", "sequences",
"simple-json",
"simplecrypto", "simplecrypto",
"smolder", "smolder",
"spec-discovery", "spec-discovery",
......
...@@ -41,7 +41,7 @@ let ...@@ -41,7 +41,7 @@ let
in in
pkgs.mkShell { pkgs.mkShell {
buildInputs = [ buildInputs = [
easy-ps.purs easy-ps.purs-0_14_2
easy-ps.psc-package easy-ps.psc-package
easy-ps.dhall-json-simple easy-ps.dhall-json-simple
build-purs build-purs
......
...@@ -2,19 +2,18 @@ module Gargantext.AsyncTasks where ...@@ -2,19 +2,18 @@ module Gargantext.AsyncTasks where
import Gargantext.Prelude import Gargantext.Prelude
import DOM.Simple.Console (log2)
import Data.Argonaut (decodeJson)
import Data.Argonaut.Parser (jsonParser)
import Data.Array as A import Data.Array as A
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.Map as Map import Data.Map as Map
import Data.Maybe (Maybe(..), maybe, fromMaybe) import Data.Maybe (Maybe(..), maybe, fromMaybe)
import DOM.Simple.Console (log2)
import Effect (Effect) import Effect (Effect)
import Gargantext.Types as GT import Gargantext.Types as GT
import Gargantext.Utils as GU import Gargantext.Utils as GU
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as T2 import Gargantext.Utils.Toestand as T2
import Reactix as R import Reactix as R
import Simple.JSON as JSON
import Toestand as T import Toestand as T
import Web.Storage.Storage as WSS import Web.Storage.Storage as WSS
...@@ -31,15 +30,14 @@ empty = Map.empty ...@@ -31,15 +30,14 @@ empty = Map.empty
getAsyncTasks :: Effect Storage getAsyncTasks :: Effect Storage
getAsyncTasks = R2.getls >>= WSS.getItem localStorageKey >>= handleMaybe getAsyncTasks = R2.getls >>= WSS.getItem localStorageKey >>= handleMaybe
where where
handleMaybe (Just val) = handleEither (parse val >>= decode) handleMaybe (Just val) = handleEither (parse val)
handleMaybe Nothing = pure empty handleMaybe Nothing = pure empty
-- either parsing or decoding could fail, hence two errors -- either parsing or decoding could fail, hence two errors
handleEither (Left err) = err *> pure empty handleEither (Left err) = err *> pure empty
handleEither (Right ss) = pure ss handleEither (Right ss) = pure ss
parse s = GU.mapLeft (log2 "Error parsing serialised sessions:") (jsonParser s) parse s = GU.mapLeft (log2 "Error parsing serialised sessions:") (JSON.readJSON s)
decode j = GU.mapLeft (log2 "Error decoding serialised sessions:") (decodeJson j)
getTasks :: GT.NodeID -> Storage -> TaskList getTasks :: GT.NodeID -> Storage -> TaskList
getTasks nodeId storage = fromMaybe [] $ Map.lookup nodeId storage getTasks nodeId storage = fromMaybe [] $ Map.lookup nodeId storage
......
...@@ -4,7 +4,7 @@ module Gargantext.Components.Annotation.Menu where ...@@ -4,7 +4,7 @@ module Gargantext.Components.Annotation.Menu where
import Data.Array as A import Data.Array as A
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Effect (Effect) import Effect (Effect)
import Effect.Uncurried (mkEffectFn1) import Effect.Uncurried (mkEffectFn1)
......
...@@ -2,8 +2,8 @@ module Gargantext.Components.Category.Types where ...@@ -2,8 +2,8 @@ module Gargantext.Components.Category.Types where
import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, encodeJson) import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, encodeJson)
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Gargantext.Prelude import Gargantext.Prelude
......
...@@ -30,7 +30,7 @@ module Gargantext.Components.Charts.Options.Font ...@@ -30,7 +30,7 @@ module Gargantext.Components.Charts.Options.Font
import Prelude (Unit, ($), (<<<), (<>)) import Prelude (Unit, ($), (<<<), (<>))
import Data.Generic.Rep import Data.Generic.Rep
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import CSS (FontStyle(..), FontWeight(..), Prefixed(..), Value(..)) import CSS (FontStyle(..), FontWeight(..), Prefixed(..), Value(..))
import Data.String (toLower) import Data.String (toLower)
import Gargantext.Components.Charts.Options.Color (Color) import Gargantext.Components.Charts.Options.Color (Color)
......
...@@ -14,7 +14,7 @@ module Gargantext.Components.Charts.Options.Legend ...@@ -14,7 +14,7 @@ module Gargantext.Components.Charts.Options.Legend
import Prelude (class Show, show, (<<<)) import Prelude (class Show, show, (<<<))
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show import Data.Show.Generic
import Data.String (toLower) import Data.String (toLower)
import Unsafe.Coerce (unsafeCoerce) import Unsafe.Coerce (unsafeCoerce)
......
...@@ -4,8 +4,8 @@ import DOM.Simple.Types (Element) ...@@ -4,8 +4,8 @@ import DOM.Simple.Types (Element)
import Data.Argonaut.Parser (jsonParser) import Data.Argonaut.Parser (jsonParser)
import Data.Either (either, Either(..)) import Data.Either (either, Either(..))
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Nullable (Nullable, null, toMaybe) import Data.Nullable (Nullable, null, toMaybe)
import Data.String.Utils (endsWith) import Data.String.Utils (endsWith)
......
...@@ -2,7 +2,7 @@ module Gargantext.Components.DocsTable.Types where ...@@ -2,7 +2,7 @@ module Gargantext.Components.DocsTable.Types where
import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, jsonEmptyObject, (.:), (:=), (~>)) import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, jsonEmptyObject, (.:), (:=), (~>))
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Map (Map) import Data.Map (Map)
import Data.Map as Map import Data.Map as Map
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
......
...@@ -5,8 +5,8 @@ module Gargantext.Components.FacetsTable where ...@@ -5,8 +5,8 @@ module Gargantext.Components.FacetsTable where
import Data.Argonaut (class EncodeJson, jsonEmptyObject, (:=), (~>)) import Data.Argonaut (class EncodeJson, jsonEmptyObject, (:=), (~>))
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Maybe (Maybe(..), fromMaybe) import Data.Maybe (Maybe(..), fromMaybe)
import Data.Sequence (Seq) import Data.Sequence (Seq)
import Data.Sequence as Seq import Data.Sequence as Seq
......
module Gargantext.Components.Forest.Tree.Node.Action where module Gargantext.Components.Forest.Tree.Node.Action where
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Effect.Aff (Aff) import Effect.Aff (Aff)
......
...@@ -4,7 +4,7 @@ import Gargantext.Prelude (class Eq, class Show) ...@@ -4,7 +4,7 @@ import Gargantext.Prelude (class Eq, class Show)
import Gargantext.Utils.Argonaut (genericSumDecodeJson, genericSumEncodeJson) import Gargantext.Utils.Argonaut (genericSumDecodeJson, genericSumEncodeJson)
import Data.Argonaut (class DecodeJson, class EncodeJson) import Data.Argonaut (class DecodeJson, class EncodeJson)
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
data AddContactParams = data AddContactParams =
AddContactParams { firstname :: String, lastname :: String } AddContactParams { firstname :: String, lastname :: String }
......
...@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Action.Link where ...@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Action.Link where
import Data.Argonaut as Argonaut import Data.Argonaut as Argonaut
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Tuple.Nested ((/\)) import Data.Tuple.Nested ((/\))
import Effect.Aff (Aff) import Effect.Aff (Aff)
......
...@@ -5,7 +5,7 @@ import DOM.Simple.Event (MessageEvent) ...@@ -5,7 +5,7 @@ import DOM.Simple.Event (MessageEvent)
import DOM.Simple.EventListener (Callback, addEventListener, callback) import DOM.Simple.EventListener (Callback, addEventListener, callback)
import DOM.Simple.Window (window) import DOM.Simple.Window (window)
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Nullable (Nullable) import Data.Nullable (Nullable)
import Data.Tuple (Tuple(..)) import Data.Tuple (Tuple(..))
......
...@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Action.Share where ...@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Action.Share where
import Data.Argonaut as Argonaut import Data.Argonaut as Argonaut
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Effect.Aff (Aff) import Effect.Aff (Aff)
import Prelude (($)) import Prelude (($))
......
...@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Action.Update.Types where ...@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Action.Update.Types where
import Data.Argonaut as Argonaut import Data.Argonaut as Argonaut
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Gargantext.Utils.Argonaut (genericSumDecodeJson, genericSumEncodeJson, genericEnumDecodeJson, genericEnumEncodeJson) import Gargantext.Utils.Argonaut (genericSumDecodeJson, genericSumEncodeJson, genericEnumDecodeJson, genericEnumEncodeJson)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Gargantext.Prelude (class Eq, class Read, class Show) import Gargantext.Prelude (class Eq, class Read, class Show)
......
...@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Action.Upload where ...@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Action.Upload where
import Data.Either (fromRight) import Data.Either (fromRight)
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Maybe (Maybe(..), fromJust, fromMaybe) import Data.Maybe (Maybe(..), fromJust, fromMaybe)
import Data.Newtype (class Newtype) import Data.Newtype (class Newtype)
import Data.String.Regex as DSR import Data.String.Regex as DSR
......
module Gargantext.Components.Forest.Tree.Node.Action.Upload.Types where module Gargantext.Components.Forest.Tree.Node.Action.Upload.Types where
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Web.File.Blob (Blob, size) import Web.File.Blob (Blob, size)
......
module Gargantext.Components.Forest.Tree.Node.Settings where module Gargantext.Components.Forest.Tree.Node.Settings where
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Gargantext.Prelude (class Eq, class Show, show, (&&), (<>), (==)) import Gargantext.Prelude (class Eq, class Show, show, (&&), (<>), (==))
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree.Types (SubTreeParams(..)) import Gargantext.Components.Forest.Tree.Node.Tools.SubTree.Types (SubTreeParams(..))
import Data.Array (foldl) import Data.Array (foldl)
......
...@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Tools.FTree where ...@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Tools.FTree where
import Data.Argonaut (class DecodeJson, decodeJson, (.:)) import Data.Argonaut (class DecodeJson, decodeJson, (.:))
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Newtype (class Newtype) import Data.Newtype (class Newtype)
......
module Gargantext.Components.Forest.Tree.Node.Tools.SubTree.Types where module Gargantext.Components.Forest.Tree.Node.Tools.SubTree.Types where
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Gargantext.Prelude (class Eq, class Show) import Gargantext.Prelude (class Eq, class Show)
import Gargantext.Types as GT import Gargantext.Types as GT
import Reactix as R import Reactix as R
......
...@@ -3,7 +3,7 @@ module Gargantext.Components.GraphExplorer.Types where ...@@ -3,7 +3,7 @@ module Gargantext.Components.GraphExplorer.Types where
import Data.Argonaut (class DecodeJson, decodeJson, class EncodeJson, encodeJson, (.:), (.:?), jsonEmptyObject, (~>), (:=)) import Data.Argonaut (class DecodeJson, decodeJson, class EncodeJson, encodeJson, (.:), (.:?), jsonEmptyObject, (~>), (:=))
import Data.Array ((!!), length) import Data.Array ((!!), length)
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Maybe (Maybe(..), fromJust) import Data.Maybe (Maybe(..), fromJust)
import Data.Newtype (class Newtype) import Data.Newtype (class Newtype)
import Data.Ord import Data.Ord
......
...@@ -6,7 +6,7 @@ import Data.Argonaut ...@@ -6,7 +6,7 @@ import Data.Argonaut
( class DecodeJson, class EncodeJson ( class DecodeJson, class EncodeJson
, decodeJson, jsonEmptyObject, (.:), (.:!), (:=), (~>) ) , decodeJson, jsonEmptyObject, (.:), (.:!), (:=), (~>) )
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Lens (Iso', iso) import Data.Lens (Iso', iso)
import Data.Maybe (Maybe) import Data.Maybe (Maybe)
import Data.Newtype (class Newtype) import Data.Newtype (class Newtype)
......
...@@ -89,9 +89,9 @@ import Data.Foldable (class Foldable, foldMap, foldl, foldr) ...@@ -89,9 +89,9 @@ import Data.Foldable (class Foldable, foldMap, foldl, foldr)
import Data.FoldableWithIndex (class FoldableWithIndex, foldMapWithIndex, foldlWithIndex, foldrWithIndex) import Data.FoldableWithIndex (class FoldableWithIndex, foldMapWithIndex, foldlWithIndex, foldrWithIndex)
--import Data.FunctorWithIndex (class FunctorWithIndex, mapWithIndex) --import Data.FunctorWithIndex (class FunctorWithIndex, mapWithIndex)
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Generic.Rep.Ord (genericCompare) import Data.Ord.Generic (genericCompare)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Lens (Iso', Lens', use, view, (%=), (%~), (.~), (?=), (^?)) import Data.Lens (Iso', Lens', use, view, (%=), (%~), (.~), (?=), (^?))
import Data.Lens.At (class At, at) import Data.Lens.At (class At, at)
import Data.Lens.Common (_Just) import Data.Lens.Common (_Just)
......
...@@ -3,7 +3,7 @@ module Gargantext.Components.Node ...@@ -3,7 +3,7 @@ module Gargantext.Components.Node
import Data.Argonaut (class DecodeJson, decodeJson, (.:), (.:?), (.!=)) import Data.Argonaut (class DecodeJson, decodeJson, (.:), (.:?), (.!=))
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Gargantext.Prelude import Gargantext.Prelude
......
...@@ -5,7 +5,7 @@ module Gargantext.Components.Nodes.Annuaire ...@@ -5,7 +5,7 @@ module Gargantext.Components.Nodes.Annuaire
import Data.Argonaut (class DecodeJson, decodeJson, (.:), (.:?)) import Data.Argonaut (class DecodeJson, decodeJson, (.:), (.:?))
import Data.Array as A import Data.Array as A
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Maybe (Maybe(..), maybe, fromMaybe) import Data.Maybe (Maybe(..), maybe, fromMaybe)
import Data.Sequence as Seq import Data.Sequence as Seq
import Data.Tuple (fst, snd) import Data.Tuple (fst, snd)
......
...@@ -4,7 +4,7 @@ module Gargantext.Components.Nodes.Annuaire.Tabs where ...@@ -4,7 +4,7 @@ module Gargantext.Components.Nodes.Annuaire.Tabs where
import Prelude hiding (div) import Prelude hiding (div)
import Effect.Aff (Aff) import Effect.Aff (Aff)
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Tuple (fst) import Data.Tuple (fst)
import Data.Tuple.Nested ((/\)) import Data.Tuple.Nested ((/\))
......
...@@ -3,7 +3,7 @@ module Gargantext.Components.Nodes.Annuaire.User.Contacts.Tabs where ...@@ -3,7 +3,7 @@ module Gargantext.Components.Nodes.Annuaire.User.Contacts.Tabs where
import Prelude hiding (div) import Prelude hiding (div)
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Tuple (fst) import Data.Tuple (fst)
import Data.Tuple.Nested ((/\)) import Data.Tuple.Nested ((/\))
......
...@@ -3,7 +3,7 @@ module Gargantext.Components.Nodes.Annuaire.User.Contacts.Types where ...@@ -3,7 +3,7 @@ module Gargantext.Components.Nodes.Annuaire.User.Contacts.Types where
import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, (.:), (.:!), (.:?), (:=), (~>), jsonEmptyObject) import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, (.:), (.:!), (.:?), (:=), (~>), jsonEmptyObject)
import Data.Array as A import Data.Array as A
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Lens import Data.Lens
import Data.Maybe (Maybe(..), fromMaybe) import Data.Maybe (Maybe(..), fromMaybe)
import Data.Newtype (class Newtype) import Data.Newtype (class Newtype)
......
...@@ -6,8 +6,8 @@ import Data.Argonaut.Parser (jsonParser) ...@@ -6,8 +6,8 @@ import Data.Argonaut.Parser (jsonParser)
import Data.Array as A import Data.Array as A
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.List as List import Data.List as List
import Data.Maybe (Maybe(..), fromMaybe) import Data.Maybe (Maybe(..), fromMaybe)
import Data.Tuple (Tuple(..)) import Data.Tuple (Tuple(..))
......
...@@ -3,7 +3,7 @@ module Gargantext.Components.Nodes.Corpus.Chart.Histo where ...@@ -3,7 +3,7 @@ module Gargantext.Components.Nodes.Corpus.Chart.Histo where
import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, encodeJson, (.:), (~>), (:=)) import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, encodeJson, (.:), (~>), (:=))
import Data.Argonaut.Core (jsonEmptyObject) import Data.Argonaut.Core (jsonEmptyObject)
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Tuple.Nested ((/\)) import Data.Tuple.Nested ((/\))
import Effect.Aff (Aff) import Effect.Aff (Aff)
......
...@@ -3,7 +3,7 @@ module Gargantext.Components.Nodes.Corpus.Chart.Metrics where ...@@ -3,7 +3,7 @@ module Gargantext.Components.Nodes.Corpus.Chart.Metrics where
import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, encodeJson, (.:), (~>), (:=)) import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, encodeJson, (.:), (~>), (:=))
import Data.Argonaut.Core (jsonEmptyObject) import Data.Argonaut.Core (jsonEmptyObject)
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Map as Map import Data.Map as Map
import Data.Map (Map) import Data.Map (Map)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
......
...@@ -5,7 +5,7 @@ import Data.Argonaut.Core (jsonEmptyObject) ...@@ -5,7 +5,7 @@ import Data.Argonaut.Core (jsonEmptyObject)
import Data.Array (zip, filter) import Data.Array (zip, filter)
import Data.Array as A import Data.Array as A
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.String (take, joinWith, Pattern(..), split, length) import Data.String (take, joinWith, Pattern(..), split, length)
import Data.Tuple (Tuple(..)) import Data.Tuple (Tuple(..))
......
...@@ -2,8 +2,8 @@ module Gargantext.Components.Nodes.Corpus.Chart.Predefined where ...@@ -2,8 +2,8 @@ module Gargantext.Components.Nodes.Corpus.Chart.Predefined where
import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, encodeJson) import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, encodeJson)
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Ord (genericCompare) import Data.Ord.Generic (genericCompare)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Maybe (Maybe(..), fromMaybe) import Data.Maybe (Maybe(..), fromMaybe)
import Reactix as R import Reactix as R
......
...@@ -2,8 +2,8 @@ module Gargantext.Components.Nodes.Corpus.Document.Types where ...@@ -2,8 +2,8 @@ module Gargantext.Components.Nodes.Corpus.Document.Types where
import Data.Argonaut (class DecodeJson, decodeJson, (.:), (.:?)) import Data.Argonaut (class DecodeJson, decodeJson, (.:), (.:?))
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Gargantext.Prelude import Gargantext.Prelude
......
...@@ -2,7 +2,7 @@ module Gargantext.Components.Nodes.Corpus.Types where ...@@ -2,7 +2,7 @@ module Gargantext.Components.Nodes.Corpus.Types where
import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, (.:), (:=), (~>), jsonEmptyObject) import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, (.:), (:=), (~>), jsonEmptyObject)
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.List as List import Data.List as List
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
......
...@@ -2,7 +2,7 @@ module Gargantext.Components.Nodes.Dashboard.Types where ...@@ -2,7 +2,7 @@ module Gargantext.Components.Nodes.Dashboard.Types where
import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, (.:), (.:?), (:=), (~>), jsonEmptyObject) import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, (.:), (.:?), (:=), (~>), jsonEmptyObject)
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.List as List import Data.List as List
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Effect.Aff (Aff) import Effect.Aff (Aff)
......
...@@ -2,7 +2,7 @@ module Gargantext.Components.Nodes.File where ...@@ -2,7 +2,7 @@ module Gargantext.Components.Nodes.File where
import Data.Argonaut (class DecodeJson, decodeJson, (.:)) import Data.Argonaut (class DecodeJson, decodeJson, (.:))
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Effect.Aff (Aff) import Effect.Aff (Aff)
import Reactix as R import Reactix as R
......
...@@ -5,8 +5,8 @@ import Gargantext.Prelude ...@@ -5,8 +5,8 @@ import Gargantext.Prelude
import Data.Argonaut (decodeJson, (.:)) import Data.Argonaut (decodeJson, (.:))
import Data.Argonaut as Argonaut import Data.Argonaut as Argonaut
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Effect.Aff (Aff) import Effect.Aff (Aff)
import Gargantext.Components.FolderView as FV import Gargantext.Components.FolderView as FV
......
...@@ -2,7 +2,7 @@ module Gargantext.Components.Nodes.Home.Public where ...@@ -2,7 +2,7 @@ module Gargantext.Components.Nodes.Home.Public where
import Data.Argonaut as Argonaut import Data.Argonaut as Argonaut
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.String (take) import Data.String (take)
import Data.Tuple (fst) import Data.Tuple (fst)
......
...@@ -5,8 +5,8 @@ import Data.Argonaut.Decode.Error (JsonDecodeError(..)) ...@@ -5,8 +5,8 @@ import Data.Argonaut.Decode.Error (JsonDecodeError(..))
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.Types (ListId, NodeID) import Gargantext.Types (ListId, NodeID)
......
module Gargantext.Components.Nodes.Texts where module Gargantext.Components.Nodes.Texts where
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Tuple.Nested ((/\)) import Data.Tuple.Nested ((/\))
import Effect.Aff (launchAff_) import Effect.Aff (launchAff_)
......
...@@ -4,8 +4,8 @@ import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, (.:), (:=) ...@@ -4,8 +4,8 @@ import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, (.:), (:=)
import Data.Argonaut.Decode.Error (JsonDecodeError(..)) import Data.Argonaut.Decode.Error (JsonDecodeError(..))
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.List as List import Data.List as List
import Data.Tuple (Tuple) import Data.Tuple (Tuple)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
module Gargantext.Components.RangeSlider where module Gargantext.Components.RangeSlider where
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Int (fromNumber) import Data.Int (fromNumber)
import Data.Maybe (Maybe(..), fromMaybe) import Data.Maybe (Maybe(..), fromMaybe)
import Data.Nullable (Nullable, null) import Data.Nullable (Nullable, null)
......
...@@ -3,8 +3,8 @@ module Gargantext.Components.Search where ...@@ -3,8 +3,8 @@ module Gargantext.Components.Search where
import Gargantext.Prelude (class Eq, class Show) import Gargantext.Prelude (class Eq, class Show)
import Data.Argonaut as Argonaut import Data.Argonaut as Argonaut
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Maybe (Maybe) import Data.Maybe (Maybe)
import Gargantext.Utils.Argonaut (genericSumDecodeJson, genericSumEncodeJson, genericEnumDecodeJson, genericEnumEncodeJson) import Gargantext.Utils.Argonaut (genericSumDecodeJson, genericSumEncodeJson, genericEnumDecodeJson, genericEnumEncodeJson)
......
module Gargantext.Components.Table.Types where module Gargantext.Components.Table.Types where
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Maybe (Maybe) import Data.Maybe (Maybe)
import Data.Sequence as Seq import Data.Sequence as Seq
import Reactix as R import Reactix as R
......
...@@ -2,7 +2,7 @@ module Gargantext.Components.Themes where ...@@ -2,7 +2,7 @@ module Gargantext.Components.Themes where
import Data.Array as A import Data.Array as A
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Effect (Effect) import Effect (Effect)
import FFI.Simple ((.=)) import FFI.Simple ((.=))
......
...@@ -11,7 +11,7 @@ import Data.Argonaut ...@@ -11,7 +11,7 @@ import Data.Argonaut
, (:=), (~>), (.:) ) , (:=), (~>), (.:) )
import Data.Foldable (foldMap) import Data.Foldable (foldMap)
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Maybe (Maybe(..), maybe, fromMaybe) import Data.Maybe (Maybe(..), maybe, fromMaybe)
import Gargantext.Routes as R import Gargantext.Routes as R
import Gargantext.Types (ApiVersion, ChartType(..), Limit, NodePath, NodeType(..), Offset, TabType(..), TermSize(..), nodePath, nodeTypePath, showTabType', TermList(MapTerm)) import Gargantext.Types (ApiVersion, ChartType(..), Limit, NodePath, NodeType(..), Offset, TabType(..), TermSize(..), nodePath, nodeTypePath, showTabType', TermList(MapTerm))
......
...@@ -3,8 +3,8 @@ module Gargantext.Hooks.Sigmax.Types where ...@@ -3,8 +3,8 @@ module Gargantext.Hooks.Sigmax.Types where
import DOM.Simple.Types (Element) import DOM.Simple.Types (Element)
import Data.Array as A import Data.Array as A
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Map as Map import Data.Map as Map
import Data.Maybe (Maybe(..), fromJust) import Data.Maybe (Maybe(..), fromJust)
import Data.Sequence as Seq import Data.Sequence as Seq
......
...@@ -15,7 +15,7 @@ import Data.Argonaut.Decode.Error (JsonDecodeError) ...@@ -15,7 +15,7 @@ import Data.Argonaut.Decode.Error (JsonDecodeError)
import Data.Array as A import Data.Array as A
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Map (Map) import Data.Map (Map)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Sequence (Seq) import Data.Sequence (Seq)
......
...@@ -6,14 +6,15 @@ import Data.Array as A ...@@ -6,14 +6,15 @@ import Data.Array as A
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.String as S import Data.String as S
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq) import Data.Eq.Generic (genericEq)
import Data.Generic.Rep.Ord (genericCompare) import Data.Ord.Generic (genericCompare)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Data.Int (toNumber) import Data.Int (toNumber)
import Data.Maybe (Maybe(..), maybe, fromMaybe) import Data.Maybe (Maybe(..), maybe, fromMaybe)
import Effect.Aff (Aff) import Effect.Aff (Aff)
import Prim.Row (class Union) import Prim.Row (class Union)
import Reactix as R import Reactix as R
import Simple.JSON as JSON
import URI.Query (Query) import URI.Query (Query)
import Gargantext.Prelude import Gargantext.Prelude
...@@ -724,6 +725,7 @@ instance decodeJsonAsyncTaskWithType :: DecodeJson AsyncTaskWithType where ...@@ -724,6 +725,7 @@ instance decodeJsonAsyncTaskWithType :: DecodeJson AsyncTaskWithType where
task <- obj .: "task" task <- obj .: "task"
typ <- obj .: "typ" typ <- obj .: "typ"
pure $ AsyncTaskWithType { task, typ } pure $ AsyncTaskWithType { task, typ }
instance foreignAsyncTaskWithType :: JSON.ReadForeign AsyncTaskWithType
newtype AsyncProgress = AsyncProgress { newtype AsyncProgress = AsyncProgress {
id :: AsyncTaskID id :: AsyncTaskID
......
...@@ -2,9 +2,6 @@ module Gargantext.Utils.Reactix where ...@@ -2,9 +2,6 @@ module Gargantext.Utils.Reactix where
import Prelude import Prelude
import Data.Argonaut as Argonaut
import Data.Argonaut as Json
import Data.Argonaut.Core (Json)
import Data.Array as A import Data.Array as A
import Data.Either (hush) import Data.Either (hush)
import Data.Function.Uncurried (Fn1, runFn1, Fn2, runFn2) import Data.Function.Uncurried (Fn1, runFn1, Fn2, runFn2)
...@@ -35,6 +32,7 @@ import Reactix.DOM.HTML as H ...@@ -35,6 +32,7 @@ import Reactix.DOM.HTML as H
import Reactix.React (react) import Reactix.React (react)
import Reactix.SyntheticEvent as RE import Reactix.SyntheticEvent as RE
import Reactix.Utils (currySecond, hook, tuple) import Reactix.Utils (currySecond, hook, tuple)
import Simple.JSON as JSON
import Toestand as T import Toestand as T
import Unsafe.Coerce (unsafeCoerce) import Unsafe.Coerce (unsafeCoerce)
import Web.File.Blob (Blob) import Web.File.Blob (Blob)
...@@ -343,8 +341,9 @@ loadLocalStorageState :: forall s. Argonaut.DecodeJson s => LocalStorageKey -> T ...@@ -343,8 +341,9 @@ loadLocalStorageState :: forall s. Argonaut.DecodeJson s => LocalStorageKey -> T
loadLocalStorageState key cell = do loadLocalStorageState key cell = do
storage <- getls storage <- getls
item :: Maybe String <- getItem key storage item :: Maybe String <- getItem key storage
let json = hush <<< Argonaut.jsonParser =<< item -- let json = hush <<< Argonaut.jsonParser =<< item
let parsed = hush <<< Argonaut.decodeJson =<< json -- let parsed = hush <<< Argonaut.decodeJson =<< json
let parsed = hush <<< JSON.readJSON item
case parsed of case parsed of
Nothing -> pure unit Nothing -> pure unit
Just p -> void $ T.write p cell Just p -> void $ T.write p cell
......
...@@ -4,7 +4,7 @@ import Data.Argonaut as Argonaut ...@@ -4,7 +4,7 @@ import Data.Argonaut as Argonaut
import Data.Argonaut.Decode.Error (JsonDecodeError) import Data.Argonaut.Decode.Error (JsonDecodeError)
import Data.Either (Either(..), isLeft) import Data.Either (Either(..), isLeft)
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow) import Data.Show.Generic (genericShow)
import Test.Spec (Spec, describe, it) import Test.Spec (Spec, describe, it)
import Test.Spec.Assertions (shouldEqual) import Test.Spec.Assertions (shouldEqual)
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment