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
|
module Analysis.TOCSummary
|
||||||
( Declaration(..)
|
( Declaration(..)
|
||||||
, formatIdentifier
|
, formatIdentifier
|
||||||
@ -49,7 +49,7 @@ data Kind
|
|||||||
deriving (Eq, Ord, Show)
|
deriving (Eq, Ord, Show)
|
||||||
|
|
||||||
formatKind :: Kind -> T.Text
|
formatKind :: Kind -> T.Text
|
||||||
formatKind kind = case kind of
|
formatKind = \case
|
||||||
Function -> "Function"
|
Function -> "Function"
|
||||||
Method _ -> "Method"
|
Method _ -> "Method"
|
||||||
Heading l -> "Heading " <> T.pack (show l)
|
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
|
module Rendering.TOC
|
||||||
( diffTOC
|
( diffTOC
|
||||||
, Summaries(..)
|
, Summaries(..)
|
||||||
@ -60,7 +60,7 @@ data Change
|
|||||||
deriving (Eq, Show)
|
deriving (Eq, Show)
|
||||||
|
|
||||||
instance ToJSON Change where
|
instance ToJSON Change where
|
||||||
toJSON change = case change of
|
toJSON = \case
|
||||||
Changed -> "modified"
|
Changed -> "modified"
|
||||||
Deleted -> "removed"
|
Deleted -> "removed"
|
||||||
Inserted -> "added"
|
Inserted -> "added"
|
||||||
|
Loading…
Reference in New Issue
Block a user