diff options
author | Ben Sima <ben@bsima.me> | 2020-04-15 10:06:24 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2020-04-15 10:07:02 -0700 |
commit | afa9d701538b9e56622a0bfdf8e04aa358c9cd82 (patch) | |
tree | dee95c3955b3fe3d11e80d89823660d28eee0587 /Hero/Database.hs | |
parent | f4b8c0df041b063c0b47d2ec6c818a9c202fd833 (diff) |
Reformatting
Now I'm using ormolu instead of brittany for Haskell formatting
now. Figured I should just make all of these big changes at once.
Diffstat (limited to 'Hero/Database.hs')
-rw-r--r-- | Hero/Database.hs | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/Hero/Database.hs b/Hero/Database.hs index 5726f3c..0166c6f 100644 --- a/Hero/Database.hs +++ b/Hero/Database.hs @@ -2,20 +2,21 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} + module Hero.Database - ( ComicDB - , getComics - , load - , dummy + ( ComicDB, + getComics, + load, + dummy, ) where -import Hero.App -import Data.Map ( Map ) -import qualified Data.Map as Map -import Dhall -import Protolude -import Servant ( Handler ) +import Data.Map (Map) +import qualified Data.Map as Map +import Dhall +import Hero.App +import Protolude +import Servant (Handler) type ComicDB = (Map ComicId Comic) @@ -25,14 +26,17 @@ load :: IO ComicDB load = listToComicDB <$> input auto "./comic-database.dhall" dummy :: IO ComicDB -dummy = return $ listToComicDB - [ Comic { comicId = "ComicId" - , comicPages = 10 - , comicName = "Dummy comic" - , comicIssue = "dummy issue" - , comicDescription = "Lorem ipsum" +dummy = + return $ + listToComicDB + [ Comic + { comicId = "ComicId", + comicPages = 10, + comicName = "Dummy comic", + comicIssue = "dummy issue", + comicDescription = "Lorem ipsum" } - ] + ] listToComicDB :: [Comic] -> ComicDB listToComicDB ls = Map.fromList $ (,) <$> comicId <*> identity <$> ls |