diff options
| author | Krasimir Angelov <kr.angelov@gmail.com> | 2017-09-28 16:33:34 +0200 |
|---|---|---|
| committer | Krasimir Angelov <kr.angelov@gmail.com> | 2017-09-28 16:33:34 +0200 |
| commit | f2bc7ec7b64973bd8147d4394a937d6c491a71fd (patch) | |
| tree | 092e61c75bfc8cd9e80417527ef36742c98e37ae /src/runtime/haskell-bind/PGF2/Internal.hsc | |
| parent | 1c04fa4897acfa2119fa32850bfcd6550b712da4 (diff) | |
added exprSubstitute in the C runtime for substituting meta variables
Diffstat (limited to 'src/runtime/haskell-bind/PGF2/Internal.hsc')
| -rw-r--r-- | src/runtime/haskell-bind/PGF2/Internal.hsc | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/runtime/haskell-bind/PGF2/Internal.hsc b/src/runtime/haskell-bind/PGF2/Internal.hsc index 259ea670d..c4aef323a 100644 --- a/src/runtime/haskell-bind/PGF2/Internal.hsc +++ b/src/runtime/haskell-bind/PGF2/Internal.hsc @@ -268,16 +268,6 @@ concrSequence c seqid = unsafePerformIO $ do forms <- peekForms (len-1) (ptr `plusPtr` (#size PgfAlternative)) return ((form,prefixes):forms) -peekSequence peekElem size ptr = do - c_len <- (#peek GuSeq, len) ptr - peekElems (c_len :: CSizeT) (ptr `plusPtr` (#offset GuSeq, data)) - where - peekElems 0 ptr = return [] - peekElems len ptr = do - e <- peekElem ptr - es <- peekElems (len-1) (ptr `plusPtr` size) - return (e:es) - deRef peekValue ptr = peek ptr >>= peekValue fidString, fidInt, fidFloat, fidVar, fidStart :: FId @@ -901,17 +891,6 @@ pokeString pool c_elem str = do c_str <- newUtf8CString str pool poke c_elem c_str -newSequence :: CSizeT -> (Ptr a -> v -> IO ()) -> [v] -> Ptr GuPool -> IO (Ptr GuSeq) -newSequence elem_size pokeElem values pool = do - c_seq <- gu_make_seq elem_size (fromIntegral (length values)) pool - pokeElems (c_seq `plusPtr` (#offset GuSeq, data)) values - return c_seq - where - pokeElems ptr [] = return () - pokeElems ptr (x:xs) = do - pokeElem ptr x - pokeElems (ptr `plusPtr` (fromIntegral elem_size)) xs - newMap key_size hasher newKey elem_size pokeElem values pool = do map <- gu_make_map key_size hasher elem_size gu_null_struct |
