diff options
| author | krangelov <kr.angelov@gmail.com> | 2020-10-02 19:34:52 +0200 |
|---|---|---|
| committer | krangelov <kr.angelov@gmail.com> | 2020-10-02 19:34:52 +0200 |
| commit | bfb94d1e48fded159bbf63a992564cb24e987772 (patch) | |
| tree | e7107cc1236004b47edaf5f917fe5603ee5e9b6f /src | |
| parent | 90fc1d750ed21e78e10a37c0699b27665bda0c47 (diff) | |
fix parsing with HOAS
Diffstat (limited to 'src')
| -rw-r--r-- | src/runtime/haskell/PGF/Forest.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/runtime/haskell/PGF/Forest.hs b/src/runtime/haskell/PGF/Forest.hs index ee15e2cf9..f51bc8909 100644 --- a/src/runtime/haskell/PGF/Forest.hs +++ b/src/runtime/haskell/PGF/Forest.hs @@ -33,6 +33,7 @@ import qualified Data.IntMap as IntMap import Control.Monad
import Control.Monad.State
import PGF.Utilities (nub')
+import qualified Data.ByteString.UTF8 as UTF8
data Forest
= Forest
@@ -103,11 +104,11 @@ bracketedTokn dp f@(Forest abs cnc forest root) = descend (PCoerce fid) = trustedSpots parents' (PArg [] fid)
descend (PConst c e _) = IntSet.empty
-isLindefCId id
+isLindefCId id@(CId utf8)
| take l s == lindef = Just (mkCId (drop l s))
| otherwise = Nothing
where
- s = showCId id
+ s = UTF8.toString utf8
lindef = "lindef "
l = length lindef
|
