eff icon indicating copy to clipboard operation
eff copied to clipboard

Compatibility with GHC 9.6

Open re-xyr opened this issue 2 years ago • 0 comments

Currently the version of prompt# and control0# used in eff do not receive PromptTag#s, and so doesn't compile with GHC 9.6. Is it possible to reuse one global prompt tag through the whole program? Something like:

data PromptTag a = PromptTag { getPromptTag# :: PromptTag# a }

thePromptTag :: PromptTag Any
thePromptTag = unsafePerformIO $ IO $
  \s -> case newPromptTag# s of
    (# s, tag #) -> (# s, PromptTag tag #)
{-# NOINLINE thePromptTag #-}

re-xyr avatar Jan 26 '23 02:01 re-xyr