mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-11-29 01:45:36 +03:00
Fix for issue-258 (incude of literate file fails)
This commit is contained in:
parent
eac8c9a5f7
commit
cf0e58042c
@ -18,6 +18,7 @@ import Cryptol.Parser.AST
|
||||
import Cryptol.Parser.LexerUtils (Config(..),defaultConfig)
|
||||
import Cryptol.Parser.ParserUtils
|
||||
import Cryptol.Utils.PP
|
||||
import Cryptol.Parser.Unlit (guessPreProc)
|
||||
import qualified Control.Applicative as A
|
||||
import Data.Text.Lazy (Text)
|
||||
import qualified Data.Text.Lazy.IO as T
|
||||
@ -173,7 +174,7 @@ noIncTopDecl td = case td of
|
||||
resolveInclude :: Located FilePath -> NoIncM [TopDecl]
|
||||
resolveInclude lf = pushPath lf $ do
|
||||
source <- readInclude lf
|
||||
case parseProgramWith (defaultConfig { cfgSource = thing lf }) source of
|
||||
case parseProgramWith (defaultConfig { cfgSource = thing lf, cfgPreProc = guessPreProc (thing lf) }) source of
|
||||
|
||||
Right prog -> do
|
||||
Program ds <- withIncPath (thing lf) (noIncludeProgram prog)
|
||||
|
Loading…
Reference in New Issue
Block a user