Make compatible with GHC2025
This commit is contained in:
@ -96,6 +96,7 @@ import qualified Text.Megaparsec as Megaparsec
|
||||
import Graphics.Fountainhead.Parser
|
||||
( ParseErrorBundle
|
||||
, ParseState
|
||||
, Parser
|
||||
, parseTable
|
||||
, cmapTableP
|
||||
, headTableP
|
||||
@ -831,6 +832,7 @@ parseRequired processedState fontDirectory = do
|
||||
, locaTable = requiredLoca
|
||||
}
|
||||
where
|
||||
findRequired :: String -> Parser a -> Either DumpError a
|
||||
findRequired tableName parser =
|
||||
let missingError = Left $ DumpRequiredTableMissingError tableName
|
||||
parseFound tableEntry = parseTable tableEntry parser processedState
|
||||
|
@ -133,7 +133,8 @@ collectMetrics fontFile ttfContents =
|
||||
(_processedState, Left initialResult) -> Left
|
||||
$ MetricsParseError initialResult
|
||||
(processedState, Right initialResult) -> do
|
||||
let parseForMetrics' = parseForMetrics processedState initialResult
|
||||
let parseForMetrics' :: String -> Parser a -> Either MetricsError a
|
||||
parseForMetrics' = parseForMetrics processedState initialResult
|
||||
|
||||
NameTable{ nameRecord, variable } <- parseForMetrics' "name" nameTableP
|
||||
psNameIndex <- maybeMetricsError (MetricsNameRecordNotFound 6)
|
||||
|
Reference in New Issue
Block a user