Skip to content

Commit

Permalink
remove obsolete fatal
Browse files Browse the repository at this point in the history
  • Loading branch information
hanjoosten committed May 6, 2023
1 parent c90cb3b commit 0c2b8b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Ampersand/Basics/Name.hs
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ instance Named Name where
instance GVP.PrintDot Name where
unqtDot = GVP.text . TL.fromStrict . text1ToText . tName

-- | toNamePartUnsafe will convert a Text to a NamePart. The Text must be a proper ID. (See checkProperId)
-- | toNamePart will convert a Text to a NamePart, iff the Text is a proper ID. (See checkProperId)
toNamePart :: Text -> Maybe NamePart
toNamePart txt = case T.uncons txt of
Nothing -> fatal "toText1Unsafe must not be used unless you are certain that it is safe!"
Nothing -> Nothing
Just (h, tl) -> toNamePart1 $ Text1 h tl

-- | toNamePart1 will convert a Text1 to a NamePart, iff the Text1 is a proper ID. (See checkProperId)
Expand Down

0 comments on commit 0c2b8b5

Please sign in to comment.