-- get C file names from CFILES pragmas throughout the source file
getCFiles :: FilePath -> IO [String]
getCFiles file =
  withHaskellFile file $ \inp ->
    let cfiles =
          [ normalise cfile
          | "{-#" : "CFILES" : rest <- map words
                                     $ lines
                                     $ stripComments True inp
          , last rest == "#-}"
          , cfile <- init rest]
     in seq (length cfiles) (return cfiles)
getCFiles :: FilePath -> IO [String]
getCFiles file =
  withHaskellFile file $ \inp ->
    let cfiles =
          [ normalise cfile
          | "{-#" : "CFILES" : rest <- map words
                                     $ lines
                                     $ stripComments True inp
          , last rest == "#-}"
          , cfile <- init rest]
     in seq (length cfiles) (return cfiles)
getCFiles file =
  withHaskellFile file $ \inp ->
    let cfiles =
          [ normalise cfile
          | "{-#" : "CFILES" : rest <- map words
                                     $ lines
                                     $ stripComments True inp
          , last rest == "#-}"
          , cfile <- init rest]
     in seq (length cfiles) (return cfiles)