1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2025-03-20 04:46:22 +09:00

Upgrade to GHC 8.4 and LTS 12

This commit is contained in:
fr33domlover 2018-12-05 03:41:19 +00:00
parent 4c17e3486b
commit 33338a73cc
14 changed files with 128 additions and 155 deletions
src/Data
CaseInsensitive
Git

View file

@ -36,13 +36,13 @@ import Data.Hashable (Hashable)
import Data.String (IsString)
newtype AsOriginal s = AsOriginal { unOriginal :: CI s }
deriving (Eq, Ord, Read, Show, IsString, Monoid, Hashable, FoldCase)
deriving (Eq, Ord, Read, Show, IsString, Semigroup, Hashable, FoldCase)
mkOrig :: FoldCase s => s -> AsOriginal s
mkOrig = AsOriginal . mk
newtype AsCaseFolded s = AsCaseFolded { unCaseFolded :: CI s }
deriving (Eq, Ord, Read, Show, IsString, Monoid, Hashable, FoldCase)
deriving (Eq, Ord, Read, Show, IsString, Semigroup, Hashable, FoldCase)
mkFolded :: FoldCase s => s -> AsCaseFolded s
mkFolded = AsCaseFolded . mk

View file

@ -1,6 +1,6 @@
{- This file is part of Vervis.
-
- Written in 2016 by fr33domlover <fr33domlover@riseup.net>.
- Written in 2016, 2018 by fr33domlover <fr33domlover@riseup.net>.
-
- Copying is an act of love. Please copy, reuse and share.
-
@ -33,6 +33,7 @@ import Control.Monad (when)
import Data.Byteable (toBytes)
import Data.Git
import Data.Git.Harder
import Data.Git.Ref (SHA1)
import Data.Git.Types (GitTime (..))
import Data.Set (Set)
import Data.Text (Text)
@ -104,7 +105,7 @@ data PathView
| TreeView Text ObjId TreeRows
| BlobView Text ObjId BL.ByteString
viewPath :: Git -> Tree -> EntPath -> IO PathView
viewPath :: Git SHA1 -> Tree SHA1 -> EntPath -> IO PathView
viewPath git root path = do
let toEnt False = EntObjBlob
toEnt True = EntObjTree
@ -122,8 +123,8 @@ viewPath git root path = do
Left blob -> return $ BlobView nameT oid (blobGetContent blob)
Right tree -> TreeView nameT oid <$> mkRows tree
listBranches :: Git -> IO (Set Text)
listBranches :: Git SHA1 -> IO (Set Text)
listBranches git = S.mapMonotonic (T.pack . refNameRaw) <$> branchList git
listTags :: Git -> IO (Set Text)
listTags :: Git SHA1 -> IO (Set Text)
listTags git = S.mapMonotonic (T.pack . refNameRaw) <$> tagList git