~alcinnz/fontconfig-pure

583a8868b6c2e8f16f3bb00b6e0cb0d2b2dd1127 — Adrian Cochrane 1 year, 1 month ago 541a5e0
Heisenbug appears to have disappeared...
1 files changed, 2 insertions(+), 7 deletions(-)

M Graphics/Text/Font/Choose/FontSet.hs
M Graphics/Text/Font/Choose/FontSet.hs => Graphics/Text/Font/Choose/FontSet.hs +2 -7
@@ 57,15 57,10 @@ thawFontSet :: FontSet_ -> IO FontSet
thawFontSet fonts' = do
    -- Very hacky, but these debug statements must be in here to avoid segfaults.
    -- FIXME: Is there an alternative?
    print "a"
    n <- get_fontSet_nfont fonts'
    print "b"
    if n == 0 then return []
    else do
        print "c"
        ret <- forM [0..pred n] (\i -> thawPattern =<< get_fontSet_font fonts' i)
        print "d"
        return ret
    else
        forM [0..pred n] (\i -> thawPattern =<< get_fontSet_font fonts' i)
foreign import ccall "get_fontSet_nfont" get_fontSet_nfont :: FontSet_ -> IO Int
foreign import ccall "get_fontSet_font" get_fontSet_font :: FontSet_ -> Int -> IO Pattern_