Commit c6ba7658 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[DB] adding databases.

parent 40e5cc4b
...@@ -19,17 +19,19 @@ import Gargantext.Pages.Layout.Specs.AddCorpus.States (Response, State) ...@@ -19,17 +19,19 @@ import Gargantext.Pages.Layout.Specs.AddCorpus.States (Response, State)
import Gargantext.Utils (id) import Gargantext.Utils (id)
import URI.Extra.QueryPairs as QP import URI.Extra.QueryPairs as QP
data Database = PubMed | HAL | All data Database = All | PubMed | HAL | IsTex
instance showDatabase :: Show Database where instance showDatabase :: Show Database where
show All = "All"
show PubMed = "PubMed" show PubMed = "PubMed"
show HAL = "HAL" show HAL = "HAL"
show All = "All" show IsTex = "IsTex"
readDatabase :: String -> Maybe Database readDatabase :: String -> Maybe Database
readDatabase "All" = Just All
readDatabase "PubMed" = Just PubMed readDatabase "PubMed" = Just PubMed
readDatabase "HAL" = Just HAL readDatabase "HAL" = Just HAL
readDatabase "All" = Just All readDatabase "IsTex" = Just IsTex
readDatabase _ = Nothing readDatabase _ = Nothing
derive instance eqDatabase :: Eq Database derive instance eqDatabase :: Eq Database
......
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