<div dir="ltr">Yes you should be able to import Foundation in REPL using the latest toolchain on linux. FWIW I am getting same error you are from latest toolchain:<div><br></div><div><div>root@4027f71e87ff:/swiftpm# swift -I .build/debug -L .build/debug -lResult -I /usr/lib/clang/3.8/include</div><div>Welcome to Swift version 3.1-dev (LLVM c3e057b06a, Clang 0540ceb7ad, Swift 093e275775). Type :help for assistance.</div><div> 1> import Foundation</div><div> 2> import Result</div><div> 3> let r = Result<String, AnyError>("a")</div><div>r: Result.Result<String, Result.AnyError> = success {</div><div> success = "a"</div><div>}</div><div> 4> let nse = NSError(domain: "Foo", code: 42, userInfo: nil)</div><div>nse: Foundation.NSError = {</div><div> Foundation.NSObject = {}</div><div> _domain = "Foo"</div><div> _code = 42</div><div> _userInfo = nil</div><div>}</div><div> 5> let ae = AnyError(nse)</div><div>ae: Result.AnyError = {</div><div> error = <extracting data from value failed></div><div><br></div><div>}</div><div>Execution interrupted. Enter code to recover and continue.</div><div>Enter LLDB commands to investigate (type :help for assistance.)</div><div> 6> ae</div><div>$R0: Result.AnyError = {</div><div> error = {</div><div> instance_type = 0x0000000000000000</div><div> }</div><div>}</div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 6, 2017 at 5:50 PM, Robert Atkins <span dir="ltr"><<a href="mailto:ratkins+swift-users@fastmail.fm" target="_blank">ratkins+swift-users@fastmail.fm</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div><span class=""><div style="font-family:Arial">On Fri, 6 Jan 2017, at 11:14, Ankit Agarwal wrote:<br></div>
<blockquote type="cite"><div dir="ltr">Thats weird, you should be able to import Foundation from the toolchain<br></div>
</blockquote><div style="font-family:Arial"><br></div>
</span><div style="font-family:Arial">This is on Linux, so the toolchain stuff isn't relevant, is it?<br></div>
<div style="font-family:Arial"><br></div>
<div style="font-family:Arial">Cheers, Robert.<br></div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Ankit<br><br></div>
</div>