diff options
Diffstat (limited to 'src/compiler/GF/Infra/Ident.hs')
| -rw-r--r-- | src/compiler/GF/Infra/Ident.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/GF/Infra/Ident.hs b/src/compiler/GF/Infra/Ident.hs index 71e86fb37..7d0bed804 100644 --- a/src/compiler/GF/Infra/Ident.hs +++ b/src/compiler/GF/Infra/Ident.hs @@ -13,6 +13,7 @@ ----------------------------------------------------------------------------- module GF.Infra.Ident (-- ** Identifiers + ModuleName(..), moduleNameS, Ident, ident2utf8, showIdent, prefixIdent, identS, identC, identV, identA, identAV, identW, argIdent, isArgIdent, getArgIndex, @@ -34,6 +35,15 @@ import PGF.Internal(Binary(..)) import GF.Text.Pretty +-- | Module names +newtype ModuleName = MN Ident deriving (Eq,Ord) + +moduleNameS = MN . identS + +instance Show ModuleName where showsPrec d (MN m) = showsPrec d m +instance Pretty ModuleName where pp (MN m) = pp m + + -- | the constructors labelled /INTERNAL/ are -- internal representation never returned by the parser data Ident = |
