haskell-gi-0.22.6: Generate Haskell bindings for GObject Introspection capable libraries

Safe HaskellNone
LanguageHaskell98

Data.GI.CodeGen.ModulePath

Description

Abstract representation for paths into modules.

Synopsis

Documentation

toModulePath :: Text -> ModulePath Source #

Construct a path into the given GIR namespace. The given Text will be split along ".".

Examples

Expand
>>> dotModulePath (toModulePath "Foo")
"Foo"
>>> dotModulePath ("Foo" <> toModulePath "Bar.Baz")
"Foo.Bar.Baz"
>>> dotModulePath ("Foo" <> toModulePath "bar.baz")
"Foo.Bar.Baz"

(/.) :: ModulePath -> Text -> ModulePath Source #

Append the given component to the given module path.

Examples

Expand
>>> dotModulePath ("Foo" /. "Bar")
"Foo.Bar"

dotModulePath :: ModulePath -> Text Source #

Turn a module path into the corresponding dotted string. Note that the implementation ensures that the module names start with a capital letter.

Examples

Expand
>>> dotModulePath ("Foo" /. "Bar" /. "Baz")
"Foo.Bar.Baz"
>>> dotModulePath ("foo" /. "bar" /. "baz")
"Foo.Bar.Baz"