mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
cp1251 coding ; trying to recognize the coding flag in grammar
This commit is contained in:
@@ -76,7 +76,7 @@ data Verbosity = Quiet | Normal | Verbose | Debug
|
||||
data Phase = Preproc | Convert | Compile | Link
|
||||
deriving (Show,Eq,Ord)
|
||||
|
||||
data Encoding = UTF_8 | ISO_8859_1
|
||||
data Encoding = UTF_8 | ISO_8859_1 | CP_1251
|
||||
deriving (Show,Eq,Ord)
|
||||
|
||||
data OutputFormat = FmtPGF
|
||||
@@ -469,7 +469,9 @@ optimizationPackages =
|
||||
encodings :: [(String,Encoding)]
|
||||
encodings =
|
||||
[("utf8", UTF_8),
|
||||
("latin1", ISO_8859_1)]
|
||||
("cp1251", CP_1251),
|
||||
("latin1", ISO_8859_1)
|
||||
]
|
||||
|
||||
lookupShow :: Eq a => [(String,a)] -> a -> String
|
||||
lookupShow xs z = fromMaybe "lookupShow" $ lookup z [(y,x) | (x,y) <- xs]
|
||||
@@ -542,4 +544,4 @@ instance Functor OptDescr where
|
||||
instance Functor ArgDescr where
|
||||
fmap f (NoArg x) = NoArg (f x)
|
||||
fmap f (ReqArg g s) = ReqArg (f . g) s
|
||||
fmap f (OptArg g s) = OptArg (f . g) s
|
||||
fmap f (OptArg g s) = OptArg (f . g) s
|
||||
|
||||
Reference in New Issue
Block a user