Skip to content
  • Edward Z. Yang's avatar
    Fix #16219: TemplateHaskell causes indefinite package build error · d6d735c1
    Edward Z. Yang authored and Ben Gamari's avatar Ben Gamari committed
    
    
    It should work to write an indefinite package using TemplateHaskell,
    so long as all of the actual TH code lives outside of the package.
    However, cleverness we had to build TH code even when building
    with -fno-code meant that we attempted to build object code for
    modules in an indefinite package, even when the signatures were
    not instantiated.  This patch disables said logic in the event
    that an indefinite package is being typechecked.
    
    Signed-off-by: default avatarEdward Z. Yang <ezyang@fb.com>
    
    Test Plan: validate
    
    Reviewers: simonpj, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, carter
    
    GHC Trac Issues: #16219
    
    Differential Revision: https://phabricator.haskell.org/D5475
    d6d735c1