Introduce type RawIdent; only 9 imports of Data.ByteString.Char8 remain

The fact that identifiers are represented as ByteStrings is now an internal
implentation detail in module GF.Infra.Ident. Conversion between ByteString
and identifiers is only needed in the lexer and the Binary instances.
This commit is contained in:
hallgren
2013-09-19 20:48:10 +00:00
parent 38fe30c610
commit fd430a40fe
14 changed files with 74 additions and 64 deletions

View File

@@ -35,7 +35,6 @@ import qualified Data.Map as Map
--import qualified Data.Set as Set
import Data.List(nub)
import Data.Maybe (isNothing)
import qualified Data.ByteString.Char8 as BS
import Text.PrettyPrint
import PGF.CId
@@ -50,7 +49,7 @@ compileToPGF :: Options -> [FilePath] -> IOE PGF
compileToPGF opts fs =
do gr <- batchCompile opts fs
let name = justModuleName (last fs)
link opts (identC (BS.pack name)) gr
link opts (identS name) gr
link :: Options -> Ident -> SourceGrammar -> IOE PGF
link opts cnc gr = do