Open
Description
The IORef information is stored in the Value_World struct in the RefC backend. However, using the Control.App monad, this world struct is not passed along
Steps to Reproduce
data MyStateName : Type where
fct_b : Has [PrimIO, State MyStateName Nat] es => App es ()
fct_b = do
g <- get MyStateName
primIO $ putStrLn $ "value is " ++ (show g)
pure ()
fct_a : Has [PrimIO] es => App es ()
fct_a = new 42 fct_b
main : IO ()
main = run fct_a
Expected Behavior
Output "value is 42"
Observed Behavior
Using the RefC backend, this results in a Segmentation Fault
I am going to create a PR implementing a global IORef storage, not one that is associated with the world struct.