unison-core-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.NameSegment

Synopsis

Documentation

data NameSegment Source #

Represents the parts of a name between the .s.

Instances

Instances details
(TypeError ((('Text "You cannot implicitly convert a \8216String\8217 to a \8216NameSegment\8217. If you need a" ':$$: 'Text "special-cased segment it should exist as a constant in") ':$$: 'Text "\8220Unison.NameSegment\8221, otherwise it should be parsed via") ':$$: 'Text "\8220Unison.Syntax.NameSegment\8221.") :: Constraint) => IsString NameSegment Source # 
Instance details

Defined in Unison.NameSegment.Internal

Generic NameSegment Source # 
Instance details

Defined in Unison.NameSegment.Internal

Associated Types

type Rep NameSegment :: Type -> Type #

Show NameSegment Source # 
Instance details

Defined in Unison.NameSegment.Internal

Eq NameSegment Source # 
Instance details

Defined in Unison.NameSegment.Internal

Ord NameSegment Source # 
Instance details

Defined in Unison.NameSegment.Internal

Alphabetical NameSegment Source # 
Instance details

Defined in Unison.NameSegment.Internal

type Rep NameSegment Source # 
Instance details

Defined in Unison.NameSegment.Internal

type Rep NameSegment = D1 ('MetaData "NameSegment" "Unison.NameSegment.Internal" "unison-core-0.0.0-7TTEaGpY3e79hYDTKjX5dL" 'True) (C1 ('MetaCons "NameSegment" 'PrefixI 'True) (S1 ('MetaSel ('Just "toUnescapedText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

toUnescapedText :: NameSegment -> Text Source #

Convert a name segment to unescaped text.

You might use this when storing a name segment as text in a database, where the literal name segment bytes are all that matter. However, you wouldn't use this to display the name segment to a user - that depends on concrete syntax. See Unison.Syntax.NameSegment (or indeed, some actual yet-built interface that abstracts concrete syntax) for that kind of function.

toUnescapedText (unsafeFromText ".~") = ".~"

Sentinel name segments