Skip to content
  • niteria's avatar
    Fix #13807 - foreign import nondeterminism · dcdc3916
    niteria authored and Ben Gamari's avatar Ben Gamari committed
    The problem was that the generated label included
    a freshly assigned Unique value.
    
    Test Plan:
    Added a new test and looked at the generated stub:
    
    ```
     #include "HsFFI.h"
     #ifdef __cplusplus
     extern "C" {
     #endif
     extern HsInt zdmainzdAzdAzuzzlzzgzzg(StgStablePtr the_stableptr);
     extern HsInt zdmainzdAzdAzumkStringWriter(StgStablePtr the_stableptr);
     #ifdef __cplusplus
     }
     #endif
    ```
    
    ./validate
    
    Reviewers: simonmar, austin, bgamari
    
    Reviewed By: simonmar
    
    Subscribers: rwbarton, thomie
    
    GHC Trac Issues: #13807
    
    Differential Revision: https://phabricator.haskell.org/D3633
    dcdc3916