mirror of
https://github.com/github/semantic.git
synced 2024-12-18 20:31:55 +03:00
Use V1 instead of Maybe just in case.
This commit is contained in:
parent
30b0f31020
commit
b8ed4c9b22
@ -1,4 +1,4 @@
|
|||||||
{-# LANGUAGE DeriveAnyClass, ScopedTypeVariables, TypeFamilies, TypeOperators, UndecidableInstances #-}
|
{-# LANGUAGE DeriveAnyClass, EmptyCase, ScopedTypeVariables, TypeFamilies, TypeOperators, UndecidableInstances #-}
|
||||||
module Data.Graph.ControlFlowVertex
|
module Data.Graph.ControlFlowVertex
|
||||||
( ControlFlowVertex (..)
|
( ControlFlowVertex (..)
|
||||||
, packageVertex
|
, packageVertex
|
||||||
@ -24,6 +24,7 @@ import qualified Data.Syntax.Declaration as Declaration
|
|||||||
import qualified Data.Syntax.Expression as Expression
|
import qualified Data.Syntax.Expression as Expression
|
||||||
import Data.Term
|
import Data.Term
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
|
import GHC.Generics (V1)
|
||||||
import Prologue
|
import Prologue
|
||||||
import Source.Loc as Loc
|
import Source.Loc as Loc
|
||||||
import Source.Span
|
import Source.Span
|
||||||
@ -107,8 +108,8 @@ instance (VertexDeclarationStrategy syntax ~ strategy, VertexDeclarationWithStra
|
|||||||
toVertex = toVertexWithStrategy (Proxy :: Proxy strategy)
|
toVertex = toVertexWithStrategy (Proxy :: Proxy strategy)
|
||||||
|
|
||||||
-- | This appears to be required to convince 'Semantic.Graph.runCallGraph' not to try to specialize the instance too eagerly.
|
-- | This appears to be required to convince 'Semantic.Graph.runCallGraph' not to try to specialize the instance too eagerly.
|
||||||
instance {-# OVERLAPPING #-} VertexDeclaration Maybe where
|
instance {-# OVERLAPPING #-} VertexDeclaration V1 where
|
||||||
toVertex _ _ _ = Nothing
|
toVertex _ _ v = case v of {}
|
||||||
|
|
||||||
data Strategy = Default | Custom
|
data Strategy = Default | Custom
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user