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
30a7e695
Commit
30a7e695
authored
Jun 06, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PRELUDE+DOC] about id
parent
0bf8fdc8
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
15 deletions
+20
-15
CopyFrom.purs
...rgantext/Components/Forest/Tree/Node/Action/CopyFrom.purs
+1
-2
Upload.purs
...Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
+1
-2
Login.purs
src/Gargantext/Components/Login.purs
+4
-2
Types.purs
src/Gargantext/Components/Search/Types.purs
+1
-2
Prelude.purs
src/Gargantext/Prelude.purs
+10
-1
Utils.purs
src/Gargantext/Utils.purs
+3
-6
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/CopyFrom.purs
View file @
30a7e695
...
@@ -16,7 +16,7 @@ import Reactix.DOM.HTML as H
...
@@ -16,7 +16,7 @@ import Reactix.DOM.HTML as H
import URI.Extra.QueryPairs as QP
import URI.Extra.QueryPairs as QP
import Web.File.FileReader.Aff (readAsText)
import Web.File.FileReader.Aff (readAsText)
import Gargantext.Prelude (class Show, Unit, bind, const, discard, map, pure, show, unit, void, ($), (&&), (/=), (<>))
import Gargantext.Prelude (class Show, Unit, bind, const, discard, map, pure, show, unit, void, ($), (&&), (/=), (<>)
, id
)
import Gargantext.Components.Lang (readLang, Lang(..))
import Gargantext.Components.Lang (readLang, Lang(..))
import Gargantext.Components.Forest.Tree.Node.Action (Action(..), Props)
import Gargantext.Components.Forest.Tree.Node.Action (Action(..), Props)
...
@@ -25,7 +25,6 @@ import Gargantext.Hooks.Loader (useLoader)
...
@@ -25,7 +25,6 @@ import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Routes as GR
import Gargantext.Routes as GR
import Gargantext.Sessions (Session(..), postWwwUrlencoded, get)
import Gargantext.Sessions (Session(..), postWwwUrlencoded, get)
import Gargantext.Types as GT
import Gargantext.Types as GT
import Gargantext.Utils (id)
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
View file @
30a7e695
...
@@ -16,7 +16,7 @@ import Reactix.DOM.HTML as H
...
@@ -16,7 +16,7 @@ import Reactix.DOM.HTML as H
import URI.Extra.QueryPairs as QP
import URI.Extra.QueryPairs as QP
import Web.File.FileReader.Aff (readAsText)
import Web.File.FileReader.Aff (readAsText)
import Gargantext.Prelude (class Show, Unit, bind, const, discard, map, pure, show, unit, void, ($), (&&), (/=), (<>))
import Gargantext.Prelude (class Show, Unit, bind, const, discard, map, pure, show, unit, void, ($), (&&), (/=), (<>)
, id
)
import Gargantext.Components.Lang (readLang, Lang(..))
import Gargantext.Components.Lang (readLang, Lang(..))
import Gargantext.Components.Forest.Tree.Node.Action (Action(..), Props, FileType(..), UploadFileContents(..))
import Gargantext.Components.Forest.Tree.Node.Action (Action(..), Props, FileType(..), UploadFileContents(..))
...
@@ -25,7 +25,6 @@ import Gargantext.Hooks.Loader (useLoader)
...
@@ -25,7 +25,6 @@ import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Routes as GR
import Gargantext.Routes as GR
import Gargantext.Sessions (Session(..), postWwwUrlencoded, get)
import Gargantext.Sessions (Session(..), postWwwUrlencoded, get)
import Gargantext.Types as GT
import Gargantext.Types as GT
import Gargantext.Utils (id)
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
-- UploadFile Action
-- UploadFile Action
...
...
src/Gargantext/Components/Login.purs
View file @
30a7e695
...
@@ -208,8 +208,10 @@ formCpt = R.hooksComponent "G.C.Login.form" cpt where
...
@@ -208,8 +208,10 @@ formCpt = R.hooksComponent "G.C.Login.form" cpt where
csrfTokenInput :: {} -> R.Element
csrfTokenInput :: {} -> R.Element
csrfTokenInput _ =
csrfTokenInput _ =
H.input { type: "hidden", name: "csrfmiddlewaretoken"
H.input { type: "hidden"
, value: csrfMiddlewareToken }-- TODO hard-coded CSRF token
, name: "csrfmiddlewaretoken"
, value: csrfMiddlewareToken
} -- TODO hard-coded CSRF token
termsCheckbox :: R.State Boolean -> R.Element
termsCheckbox :: R.State Boolean -> R.Element
termsCheckbox setCheckBox =
termsCheckbox setCheckBox =
...
...
src/Gargantext/Components/Search/Types.purs
View file @
30a7e695
...
@@ -12,14 +12,13 @@ import Effect.Aff (Aff)
...
@@ -12,14 +12,13 @@ import Effect.Aff (Aff)
import URI.Extra.QueryPairs as QP
import URI.Extra.QueryPairs as QP
import URI.Query as Q
import URI.Query as Q
import Gargantext.Prelude (class Eq, class Ord, class Show, bind, map, pure, show, ($), (<>))
import Gargantext.Prelude (
id,
class Eq, class Ord, class Show, bind, map, pure, show, ($), (<>))
import Gargantext.Components.Lang
import Gargantext.Components.Lang
import Gargantext.Ends (class ToUrl, backendUrl)
import Gargantext.Ends (class ToUrl, backendUrl)
import Gargantext.Routes as GR
import Gargantext.Routes as GR
import Gargantext.Sessions (Session(..), post)
import Gargantext.Sessions (Session(..), post)
import Gargantext.Types as GT
import Gargantext.Types as GT
import Gargantext.Utils (id)
------------------------------------------------------------------------
------------------------------------------------------------------------
class Doc a where
class Doc a where
...
...
src/Gargantext/Prelude.purs
View file @
30a7e695
module Gargantext.Prelude (module Prelude, logs)
module Gargantext.Prelude (module Prelude, logs
, id
)
where
where
import Prelude (class Applicative, class Apply, class Bind, class BooleanAlgebra, class Bounded, class Category, class CommutativeRing, class Discard, class DivisionRing, class Eq, class EuclideanRing, class Field, class Functor, class HeytingAlgebra, class Monad, class Monoid, class Ord, class Ring, class Semigroup, class Semigroupoid, class Semiring, class Show, type (~>), Ordering(..), Unit, Void, absurd, add, ap, append, apply, between, bind, bottom, clamp, compare, comparing, compose, conj, const, degree, discard, disj, eq, flap, flip, gcd, identity, ifM, join, lcm, liftA1, liftM1, map, max, mempty, min, mod, mul, negate, not, notEq, one, otherwise, pure, recip, show, sub, top, unit, unless, unlessM, void, when, whenM, zero, (#), ($), ($>), (&&), (*), (*>), (+), (-), (/), (/=), (<), (<#>), (<$), (<$>), (<*), (<*>), (<<<), (<=), (<=<), (<>), (<@>), (=<<), (==), (>), (>=), (>=>), (>>=), (>>>), (||))
import Prelude (class Applicative, class Apply, class Bind, class BooleanAlgebra, class Bounded, class Category, class CommutativeRing, class Discard, class DivisionRing, class Eq, class EuclideanRing, class Field, class Functor, class HeytingAlgebra, class Monad, class Monoid, class Ord, class Ring, class Semigroup, class Semigroupoid, class Semiring, class Show, type (~>), Ordering(..), Unit, Void, absurd, add, ap, append, apply, between, bind, bottom, clamp, compare, comparing, compose, conj, const, degree, discard, disj, eq, flap, flip, gcd, identity, ifM, join, lcm, liftA1, liftM1, map, max, mempty, min, mod, mul, negate, not, notEq, one, otherwise, pure, recip, show, sub, top, unit, unless, unlessM, void, when, whenM, zero, (#), ($), ($>), (&&), (*), (*>), (+), (-), (/), (/=), (<), (<#>), (<$), (<$>), (<*), (<*>), (<<<), (<=), (<=<), (<>), (<@>), (=<<), (==), (>), (>=), (>=>), (>>=), (>>>), (||))
...
@@ -6,6 +6,15 @@ import Effect.Console (log)
...
@@ -6,6 +6,15 @@ import Effect.Console (log)
import Effect.Class (class MonadEffect, liftEffect)
import Effect.Class (class MonadEffect, liftEffect)
-- | JL: Astonishingly, not in the prelude
-- AD: recent Preludes in Haskell much prefer identity
-- then id can be used as a variable name (in records for instance)
-- since records in Purescript are not the same as in Haskell
-- this behavior is questionable indeed.
id :: forall a. a -> a
id a = a
logs:: forall message effect.
logs:: forall message effect.
(MonadEffect effect)
(MonadEffect effect)
=> Show message
=> Show message
...
...
src/Gargantext/Utils.purs
View file @
30a7e695
...
@@ -7,9 +7,9 @@ import Data.Set as Set
...
@@ -7,9 +7,9 @@ import Data.Set as Set
import Data.Set (Set)
import Data.Set (Set)
import Data.String as S
import Data.String as S
-- |
Astonishingly, not in the prelude
-- |
TODO (hard coded)
id :: forall a. a -> a
csrfMiddlewareToken :: String
id a = a
csrfMiddlewareToken = "Wy52D2nor8kC1r1Y4GrsrSIxQ2eqW8UwkdiQQshMoRwobzU4uldknRUhP0j4WcEM"
setterv :: forall nt record field.
setterv :: forall nt record field.
Newtype nt record
Newtype nt record
...
@@ -45,9 +45,6 @@ invertOrdering LT = GT
...
@@ -45,9 +45,6 @@ invertOrdering LT = GT
invertOrdering GT = LT
invertOrdering GT = LT
invertOrdering EQ = EQ
invertOrdering EQ = EQ
csrfMiddlewareToken :: String
csrfMiddlewareToken = "Wy52D2nor8kC1r1Y4GrsrSIxQ2eqW8UwkdiQQshMoRwobzU4uldknRUhP0j4WcEM"
-- A lens that always returns unit
-- A lens that always returns unit
_unit :: forall s. Lens' s Unit
_unit :: forall s. Lens' s Unit
_unit = lens (\_ -> unit) (\s _ -> s)
_unit = lens (\_ -> unit) (\s _ -> s)
...
...
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