module Unison.Codebase.Editor.StructuredArgument where
import GHC.Generics (Generic)
import U.Codebase.HashTags (CausalHash)
import Unison.Codebase.Editor.Input
import Unison.Codebase.Path (Path')
import Unison.Codebase.Path qualified as Path
import Unison.HashQualified qualified as HQ
import Unison.HashQualifiedPrime qualified as HQ'
import Unison.Name (Name)
import Unison.Parser.Ann (Ann)
import Unison.Project (ProjectAndBranch, ProjectBranchName, ProjectName)
import Unison.Server.Backend (ShallowListEntry)
import Unison.Server.SearchResult (SearchResult)
import Unison.Symbol (Symbol)
data StructuredArgument
= AbsolutePath Path.Absolute
| Name Name
| HashQualified (HQ.HashQualified Name)
| Project ProjectName
| ProjectBranch (ProjectAndBranch (Maybe ProjectName) ProjectBranchName)
| Namespace CausalHash
| NameWithBranchPrefix AbsBranchId Name
| HashQualifiedWithBranchPrefix AbsBranchId (HQ'.HashQualified Name)
| ShallowListEntry Path' (ShallowListEntry Symbol Ann)
| SearchResult (Maybe Path') SearchResult
deriving (StructuredArgument -> StructuredArgument -> Bool
(StructuredArgument -> StructuredArgument -> Bool)
-> (StructuredArgument -> StructuredArgument -> Bool)
-> Eq StructuredArgument
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StructuredArgument -> StructuredArgument -> Bool
== :: StructuredArgument -> StructuredArgument -> Bool
$c/= :: StructuredArgument -> StructuredArgument -> Bool
/= :: StructuredArgument -> StructuredArgument -> Bool
Eq, (forall x. StructuredArgument -> Rep StructuredArgument x)
-> (forall x. Rep StructuredArgument x -> StructuredArgument)
-> Generic StructuredArgument
forall x. Rep StructuredArgument x -> StructuredArgument
forall x. StructuredArgument -> Rep StructuredArgument x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. StructuredArgument -> Rep StructuredArgument x
from :: forall x. StructuredArgument -> Rep StructuredArgument x
$cto :: forall x. Rep StructuredArgument x -> StructuredArgument
to :: forall x. Rep StructuredArgument x -> StructuredArgument
Generic, Int -> StructuredArgument -> ShowS
[StructuredArgument] -> ShowS
StructuredArgument -> String
(Int -> StructuredArgument -> ShowS)
-> (StructuredArgument -> String)
-> ([StructuredArgument] -> ShowS)
-> Show StructuredArgument
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StructuredArgument -> ShowS
showsPrec :: Int -> StructuredArgument -> ShowS
$cshow :: StructuredArgument -> String
show :: StructuredArgument -> String
$cshowList :: [StructuredArgument] -> ShowS
showList :: [StructuredArgument] -> ShowS
Show)