Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Franklin Antony authored and Franklin Antony committed Dec 3, 2020
2 parents 9b48633 + 5f1ef25 commit 8b321c2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
5 changes: 3 additions & 2 deletions app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ main = do
print "Saving on DB"
conn <- initialiseDB
insertDB conn recs
insertLB conn recs
insertSB conn recs
insertSB conn recs
insertLB conn recs
print "Done!"


-- P.S It Outputs the haskell datatype we specified

Binary file added dist-newstyle/cache/config
Binary file not shown.
14 changes: 6 additions & 8 deletions src/Parse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ data HolidayRecord = HolidayRecord {
global::Bool
} deriving (Show, Generic)


-- data CountryRecord = CountryRecord {
-- countryCode' :: String

-- data CountriesRecord = CountriesRecord {
-- countryCode' :: String,
-- global::Bool
-- } deriving (Show, Generic)

-- data Country_holidaysRecord = Country_holidaysRecord {
Expand All @@ -40,12 +45,5 @@ data HolidayRecord = HolidayRecord {
instance FromJSON HolidayRecord
instance ToJSON HolidayRecord

-- data OuterRecords = OuterRecords{
-- records :: [InnerRecord]
-- }deriving (Show, Generic)

-- instance FromJSON OuterRecords
-- instance ToJSON OuterRecords

parse :: L8.ByteString -> Either String [HolidayRecord]
parse json = eitherDecode json :: Either String [HolidayRecord]
parse json = eitherDecode json :: Either String [HolidayRecord]

0 comments on commit 8b321c2

Please sign in to comment.