Skip to content

Commit

Permalink
FFI: Canonicalize module path for finding dylib
Browse files Browse the repository at this point in the history
  • Loading branch information
qsctr committed Aug 5, 2022
1 parent 65cb428 commit 9efd822
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Cryptol/Eval/FFI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import Foreign.C.Types
import GHC.Float
import LibBF (bfFromDouble, bfToDouble,
pattern NearEven)
import System.Directory

import Cryptol.Backend.Concrete
import Cryptol.Backend.FFI
Expand Down Expand Up @@ -66,7 +67,8 @@ evalForeignDecls path m env = do
InFile p -> do
-- If any error happens when loading the 'ForeignSrc', stop
-- processing the module.
fsrc <- liftIO (loadForeignSrc p) >>= liftEither
fsrc <- liftEither =<<
liftIO (canonicalizePath p >>= loadForeignSrc)
liftIO $ writeIORef foreignSrc $ Just fsrc
pure fsrc
-- We don't handle in-memory modules for now
Expand Down

0 comments on commit 9efd822

Please sign in to comment.