mirror of
https://github.com/github/semantic.git
synced 2024-11-28 18:23:44 +03:00
LambdaCase.
This commit is contained in:
parent
7ab0695766
commit
fbfcdd8985
@ -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)
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user