Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data HashQualified n
- = NameOnly n
- | HashQualified n ShortHash
- type HQSegment = HashQualified NameSegment
- toHQ :: HashQualified n -> HashQualified n
- fromHQ :: HashQualified n -> Maybe (HashQualified n)
- fromHQ2 :: HashQualified n -> Either ShortHash (HashQualified n)
- toName :: HashQualified n -> n
- nameLength :: (Name -> Text) -> HashQualified Name -> Int
- take :: Int -> HashQualified n -> HashQualified n
- toNameOnly :: HashQualified n -> HashQualified n
- toHash :: HashQualified n -> Maybe ShortHash
- toStringWith :: (n -> String) -> HashQualified n -> String
- toTextWith :: (n -> Text) -> HashQualified n -> Text
- fromNamedReferent :: n -> Referent -> HashQualified n
- fromNamedReference :: n -> Reference -> HashQualified n
- fromName :: n -> HashQualified n
- fromNameHash :: n -> Maybe ShortHash -> HashQualified n
- matchesNamedReferent :: Eq n => n -> Referent -> HashQualified n -> Bool
- matchesNamedReference :: Eq n => n -> Reference -> HashQualified n -> Bool
- requalify :: HashQualified Name -> Referent -> HashQualified Name
- sortByLength :: [HashQualified Name] -> [HashQualified Name]
Documentation
data HashQualified n Source #
Like Unison.HashQualified, but doesn't support a HashOnly variant
Instances
type HQSegment = HashQualified NameSegment Source #
toHQ :: HashQualified n -> HashQualified n Source #
fromHQ :: HashQualified n -> Maybe (HashQualified n) Source #
fromHQ2 :: HashQualified n -> Either ShortHash (HashQualified n) Source #
Like fromHQ
, but if the HashQualified
is just a ShortHash
, return it on the Left
, rather than as a
Nothing
.
toName :: HashQualified n -> n Source #
nameLength :: (Name -> Text) -> HashQualified Name -> Int Source #
take :: Int -> HashQualified n -> HashQualified n Source #
toNameOnly :: HashQualified n -> HashQualified n Source #
toStringWith :: (n -> String) -> HashQualified n -> String Source #
toTextWith :: (n -> Text) -> HashQualified n -> Text Source #
fromNamedReferent :: n -> Referent -> HashQualified n Source #
fromNamedReference :: n -> Reference -> HashQualified n Source #
fromName :: n -> HashQualified n Source #
fromNameHash :: n -> Maybe ShortHash -> HashQualified n Source #
matchesNamedReferent :: Eq n => n -> Referent -> HashQualified n -> Bool Source #
matchesNamedReference :: Eq n => n -> Reference -> HashQualified n -> Bool Source #
requalify :: HashQualified Name -> Referent -> HashQualified Name Source #
sortByLength :: [HashQualified Name] -> [HashQualified Name] Source #
Sort the list of names by length of segments: smaller number of segments is listed first. NameOnly < HashQualified