Export function for use in GHC API