@@ -0,0 +1,36 @@
6+get_allocation_size : Ptr -> IO Int
7+get_allocation_size = foreign FFI_C "get_allocation_size" (Ptr -> IO Int)
11+-- As `commen_call` is a partial function and not inline, Idris should complain.
14+common_call : String -> Int -> IO ManagedPtr
20+ len <- get_allocation_size ptr
21+ pure (prim__registerPtr ptr len)
23+func_foo : IO ManagedPtr
24+func_foo = common_call "foo" 4
26+func_bar : IO ManagedPtr
27+func_bar = common_call "bar" 8
36+ printLn "I should not be seen."