summaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2015-02-18 17:05:35 +0000
committerkrasimir <krasimir@chalmers.se>2015-02-18 17:05:35 +0000
commit39bbe68adf8c0ada9a1ce296bcf46c319db07488 (patch)
treefc742bce7cd23a266966db4269e8ea4ff4015c47 /src/runtime
parentf3797bb313f8ecd75466ad15b00afa3e5ad1af55 (diff)
fix the missmatch between Int and CInt in the Haskell binding to the word alignment API. This was causing problems on 64-bit machines
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/haskell-bind/PGF2.hsc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/haskell-bind/PGF2.hsc b/src/runtime/haskell-bind/PGF2.hsc
index e0bd9c4b9..0f3b46886 100644
--- a/src/runtime/haskell-bind/PGF2.hsc
+++ b/src/runtime/haskell-bind/PGF2.hsc
@@ -1,4 +1,4 @@
-{-# LANGUAGE ExistentialQuantification, DeriveDataTypeable #-}
+{-# LANGUAGE ExistentialQuantification, DeriveDataTypeable, ScopedTypeVariables #-}
-------------------------------------------------
-- |
-- Maintainer : Krasimir Angelov
@@ -459,8 +459,8 @@ alignWords lang e = unsafePerformIO $
c_phrase <- (#peek PgfAlignmentPhrase, phrase) ptr
phrase <- peekCString c_phrase
n_fids <- (#peek PgfAlignmentPhrase, n_fids) ptr
- fids <- peekArray (fromIntegral (n_fids :: CInt)) (ptr `plusPtr` (#offset PgfAlignmentPhrase, fids))
- return (phrase, fids)
+ (fids :: [CInt]) <- peekArray (fromIntegral (n_fids :: CInt)) (ptr `plusPtr` (#offset PgfAlignmentPhrase, fids))
+ return (phrase, map fromIntegral fids)
-----------------------------------------------------------------------------
-- Helper functions