on master help sign in
Merge pull request #3339 from BartAdv/reversed-nothing-found-in-ns
dcf6ec9Niklas Larsson
src/Idris/Error.hs+1−1
@@ -146,7 +146,7 @@ warnDisamb ist (PDisamb ds tm) = warnDisamb ist tm >>
146 when (not (any (isIn d . fst) (ctxtAlist (tt_ctxt ist)))) $
146 when (not (any (isIn d . fst) (ctxtAlist (tt_ctxt ist)))) $
147 ierror . Msg $
147 ierror . Msg $
148 "Nothing found in namespace \"" ++
148 "Nothing found in namespace \"" ++
149− intercalate "." (map T.unpack d) ++
149+ intercalate "." (map T.unpack . reverse $ d) ++
150 "\"."
150 "\"."
151 isIn d (NS _ ns) = isPrefixOf d ns
151 isIn d (NS _ ns) = isPrefixOf d ns
152 isIn d _ = False
152 isIn d _ = False
test/README.md+1−2
@@ -121,7 +121,7 @@ and somewhat self-explanatory.
121 # Using cabal
121 # Using cabal
122 cabal test --test-options="--pattern foo042 --accept"
122 cabal test --test-options="--pattern foo042 --accept"
123 # Using stack
123 # Using stack
124− stack test --test-arguments"--pattern foo042 --accept"
124+ stack test --test-arguments="--pattern foo042 --accept"
125 ```
125 ```
1268. Check the content of `expected`. Maybe the test didn't do what you thought it would. Fix and go back to 7 until it's ok.
1268. Check the content of `expected`. Maybe the test didn't do what you thought it would. Fix and go back to 7 until it's ok.
1279. Add under `Extra-source-files` in `idris.cabal` the patterns that match the folder's content. If you forget this, your test will fail in Travis CI. With the previous example, it should be at least:
1279. Add under `Extra-source-files` in `idris.cabal` the patterns that match the folder's content. If you forget this, your test will fail in Travis CI. With the previous example, it should be at least:
@@ -148,7 +148,6 @@ Currently, `NONE` has the same effect as `ANY`, but this will change.
148
148
1491. Delete the corresponding directory
1491. Delete the corresponding directory
1502. Remove the corresponding line in the definition of `testFamiliesData` in `TestData.hs`
1502. Remove the corresponding line in the definition of `testFamiliesData` in `TestData.hs`
151−3. Remove the related lines under `Extra-source-files` in `idris.cabal`
152
151
153### Updating golden files
152### Updating golden files
154
153
test/TestData.hs+2−1
@@ -111,7 +111,8 @@ testFamiliesData = [
111 ( 5, ANY ),
111 ( 5, ANY ),
112 ( 6, ANY ),
112 ( 6, ANY ),
113 ( 7, ANY ),
113 ( 7, ANY ),
114− ( 8, ANY )]),
114+ ( 8, ANY ),
115+ ( 9, ANY )]),
115 ("ffi", "FFI",
116 ("ffi", "FFI",
116 [ ( 1, ANY ),
117 [ ( 1, ANY ),
117 ( 2, ANY ),
118 ( 2, ANY ),
test/error009/expectednew file+1
@@ -0,0 +1 @@
1+Uncaught error: Nothing found in namespace "Foo.Bar".
test/error009/runnew file+2
@@ -0,0 +1,2 @@
1+#!/usr/bin/env bash
2+${IDRIS:-idris} $@ -e "with Foo.Bar 42"