Added Read and Show instances for CId. Also added readCId :: String -> Maybe CId, and use that for readLanguage.

This commit is contained in:
bjorn
2008-10-20 11:59:31 +00:00
parent 2174690c5e
commit d41616dd6a
5 changed files with 39 additions and 18 deletions

View File

@@ -77,7 +77,7 @@ import qualified PGF.Parsing.FCFG.Incremental as Incremental
import GF.Text.UTF8
import GF.Data.ErrM
import GF.Data.Utilities
import GF.Data.Utilities (replace)
import Data.Char
import qualified Data.Map as Map
@@ -98,7 +98,7 @@ import Control.Monad
-- > concrete LangEng of Lang = ...
type Language = CId
readLanguage :: String -> Language
readLanguage :: String -> Maybe Language
showLanguage :: Language -> String
@@ -207,7 +207,7 @@ complete :: PGF -> Language -> Type -> String
-- Implementation
---------------------------------------------------
readLanguage = mkCId
readLanguage = readCId
showLanguage = prCId