writeIFace :: ExportIFace -> IO ()
writeIFace (Export ffic hdr exps)
   | ffic == sNS (sUN "FFI_C") ["FFI_C"]
       = do let hfile = "#ifndef " ++ hdr_guard hdr ++ "\n" ++
                        "#define " ++ hdr_guard hdr ++ "\n\n" ++
                        "#include <idris_rts.h>\n\n" ++
                        concatMap hdr_export exps ++ "\n" ++
                        "#endif\n\n"
            writeFile hdr hfile
   | otherwise = return ()
writeIFace :: ExportIFace -> IO ()
writeIFace (Export ffic hdr exps)
   | ffic == sNS (sUN "FFI_C") ["FFI_C"]
       = do let hfile = "#ifndef " ++ hdr_guard hdr ++ "\n" ++
                        "#define " ++ hdr_guard hdr ++ "\n\n" ++
                        "#include <idris_rts.h>\n\n" ++
                        concatMap hdr_export exps ++ "\n" ++
                        "#endif\n\n"
            writeFile hdr hfile
   | otherwise = return ()
writeIFace (Export ffic hdr exps)
   | ffic == sNS (sUN "FFI_C") ["FFI_C"]
       = do let hfile = "#ifndef " ++ hdr_guard hdr ++ "\n" ++
                        "#define " ++ hdr_guard hdr ++ "\n\n" ++
                        "#include <idris_rts.h>\n\n" ++
                        concatMap hdr_export exps ++ "\n" ++
                        "#endif\n\n"
            writeFile hdr hfile
   | otherwise = return ()