Hi. I couldn't find this mentioned anywhere.
{-# LANGUAGE LambdaCase, ScopedTypeVariables, TypeApplications #-}
import Data.Typeable
import qualified Language.Haskell.Interpreter.Unsafe as Hint
import qualified Language.Haskell.Interpreter as Hint
import Polysemy
eval :: forall t. Typeable t
=> String -> IO (Either Hint.InterpreterError t)
eval s = Hint.unsafeRunInterpreterWithArgs ["-hide-all-packages", "-package-id", "base-4.17.1.0", "-package-id", "polysemy-1.9.1.0", "-v"] $ do
Hint.setImports ["Prelude", "Polysemy"]
Hint.interpret s (Hint.as :: t)
main :: IO ()
main = do
z <- getLine
x <- eval @(Sem '[Embed IO] ()) z
case x of
Left e -> print e
Right z -> runM z
GhcException "cannot satisfy -package-id polysemy-1.9.1.0\n (use -v for more information)"
Hi. I couldn't find this mentioned anywhere.
But Hint can't pick up the external library