1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

LambdaCase.

This commit is contained in:
Rob Rix 2019-10-17 21:59:35 -04:00
parent 7ab0695766
commit fbfcdd8985
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
{-# LANGUAGE AllowAmbiguousTypes, RankNTypes, ScopedTypeVariables, TypeFamilies, TypeOperators, UndecidableInstances #-}
{-# LANGUAGE AllowAmbiguousTypes, LambdaCase, RankNTypes, ScopedTypeVariables, TypeFamilies, TypeOperators, UndecidableInstances #-}
module Analysis.TOCSummary
( Declaration(..)
, formatIdentifier
@ -49,7 +49,7 @@ data Kind
deriving (Eq, Ord, Show)
formatKind :: Kind -> T.Text
formatKind kind = case kind of
formatKind = \case
Function -> "Function"
Method _ -> "Method"
Heading l -> "Heading " <> T.pack (show l)

View File

@ -1,4 +1,4 @@
{-# LANGUAGE DerivingVia, DuplicateRecordFields, RankNTypes, ScopedTypeVariables, TupleSections #-}
{-# LANGUAGE DerivingVia, DuplicateRecordFields, LambdaCase, RankNTypes, ScopedTypeVariables, TupleSections #-}
module Rendering.TOC
( diffTOC
, Summaries(..)
@ -60,7 +60,7 @@ data Change
deriving (Eq, Show)
instance ToJSON Change where
toJSON change = case change of
toJSON = \case
Changed -> "modified"
Deleted -> "removed"
Inserted -> "added"