From 4ff67289939f309723ff25a450a09d020fdfd5cb Mon Sep 17 00:00:00 2001 From: krasimir Date: Wed, 18 Feb 2015 17:05:35 +0000 Subject: [PATCH] fix the missmatch between Int and CInt in the Haskell binding to the word alignment API. This was causing problems on 64-bit machines --- src/runtime/haskell-bind/PGF2.hsc | 6 +++--- 1 file 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