mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-11-13 10:58:23 +03:00
parent
2d1f2c1033
commit
a53b24b8a0
@ -196,7 +196,9 @@ resolveInclude lf = pushPath lf $ do
|
||||
case parseProgramWith (defaultConfig { cfgSource = thing lf, cfgPreProc = guessPreProc (thing lf) }) source of
|
||||
|
||||
Right prog -> do
|
||||
Program ds <- withIncPath (thing lf) (noIncludeProgram prog)
|
||||
Program ds <-
|
||||
do path <- fromIncPath (thing lf)
|
||||
withIncPath path (noIncludeProgram prog)
|
||||
return ds
|
||||
|
||||
Left err -> M (raise [IncludeParseError err])
|
||||
|
4
tests/modsys/relative-include/A/B/C.cry
Normal file
4
tests/modsys/relative-include/A/B/C.cry
Normal file
@ -0,0 +1,4 @@
|
||||
module A::B::C where
|
||||
import A::B::D::E::F
|
||||
include "G/H.pcry" // succeeds when run from `test/`
|
||||
|
2
tests/modsys/relative-include/A/B/D/E/F.cry
Normal file
2
tests/modsys/relative-include/A/B/D/E/F.cry
Normal file
@ -0,0 +1,2 @@
|
||||
module A::B::D::E::F where
|
||||
x = 1
|
2
tests/modsys/relative-include/A/B/G/H.pcry
Normal file
2
tests/modsys/relative-include/A/B/G/H.pcry
Normal file
@ -0,0 +1,2 @@
|
||||
y = 2
|
||||
include "I.pcry"
|
1
tests/modsys/relative-include/A/B/G/I.pcry
Normal file
1
tests/modsys/relative-include/A/B/G/I.pcry
Normal file
@ -0,0 +1 @@
|
||||
z = 3
|
1
tests/modsys/relative-include/relative-include.icry
Normal file
1
tests/modsys/relative-include/relative-include.icry
Normal file
@ -0,0 +1 @@
|
||||
:m A::B::C
|
@ -0,0 +1,4 @@
|
||||
Loading module Cryptol
|
||||
Loading module Cryptol
|
||||
Loading module A::B::D::E::F
|
||||
Loading module A::B::C
|
Loading…
Reference in New Issue
Block a user