mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-24 06:52:19 +03:00
Merge pull request #265 from edwinb/find-ipkg-ide
In IDE mode, look for a ipkg file before loading
This commit is contained in:
commit
42676d2504
@ -20,6 +20,7 @@ import Data.So
|
||||
import Idris.Desugar
|
||||
import Idris.Error
|
||||
import Idris.ModTree
|
||||
import Idris.Package
|
||||
import Idris.Parser
|
||||
import Idris.Resugar
|
||||
import Idris.REPL
|
||||
@ -148,8 +149,11 @@ process : {auto c : Ref Ctxt Defs} ->
|
||||
IDECommand -> Core IDEResult
|
||||
process (Interpret cmd)
|
||||
= replWrap $ interpret cmd
|
||||
process (LoadFile fname _)
|
||||
= replWrap $ Idris.REPL.process (Load fname) >>= outputSyntaxHighlighting fname
|
||||
process (LoadFile fname_in _)
|
||||
= do let fname = case !(findIpkg (Just fname_in)) of
|
||||
Nothing => fname_in
|
||||
Just f' => f'
|
||||
replWrap $ Idris.REPL.process (Load fname) >>= outputSyntaxHighlighting fname
|
||||
process (TypeOf n Nothing)
|
||||
= replWrap $ Idris.REPL.process (Check (PRef replFC (UN n)))
|
||||
process (TypeOf n (Just (l, c)))
|
||||
|
1
tests/ideMode/ideMode001/dummy.ipkg
Normal file
1
tests/ideMode/ideMode001/dummy.ipkg
Normal file
@ -0,0 +1 @@
|
||||
package idemode001
|
1
tests/ideMode/ideMode003/dummy.ipkg
Normal file
1
tests/ideMode/ideMode003/dummy.ipkg
Normal file
@ -0,0 +1 @@
|
||||
package idemode003
|
Loading…
Reference in New Issue
Block a user