ghc-9.13: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Runtime.Eval.Utils

Synopsis

Documentation

splitIdent :: String -> (String, String, String) Source #

Split up a string with an eventually qualified declaration name into 3 components

  1. module name
  2. top-level decl
  3. full-name of the eventually nested decl, but without module qualification

Example

Expand
    "foo"           = ("", "foo", "foo")
    "A.B.C.foo"     = (A.B.C, "foo", "foo")
    "M.N.foo.bar"   = (M.N, "foo", "foo.bar")

combineModIdent :: String -> String -> String Source #

Qualify an identifier name with a module name

combineModIdent A "foo"  =  "A.foo"
combineModIdent ""  "foo"  =  "foo"