on master help sign in
Add entry on 'ambiguous module name' errors to FAQ (#396)
commit2958402736b9bc2e743b56c2ed758995cab6f521 authorAlexandre Esteves <2335822+alexfmpe@users.noreply.github.com> dateFri 5 Apr 2019, 19:21 (8 years ago) parentf976bb4
1 file changed+15
FAQ.md+15
FAQ.md+15
@@ -2,6 +2,8 @@
22
331. [How do I fix invalid entitlements? ](#how-do-i-fix-invalid-entitlements)
441. [`ob thunk update` or `ob deploy update` fails](#ob-thunk-update-or-ob-deploy-update-fails)
5+1. [How do I fix `Ambiguous module name` errors?](#how-do-i-fix-ambiguous-module-name-errors)
6+
57
68### How do I fix invalid entitlements?
79
@@ -44,3 +46,16 @@ ob thunk pack $SOME_THUNK
4446Substitute the directory of your thunk for `$SOME_THUNK`. In the case of `ob deploy update`, `$SOME_THUNK` will be `src` in the deployment directory.
4547
4648(Based on issue #351).
49+
50+### How do I fix `Ambiguous module name` errors?
51+Since obelisk places the common/backend/frontend modules packages into the same ghci, and ghci doesn't "sandbox" them, it is possible to have conflicting module errors inside `ob repl/watch/run` that do not appear when doing a cabal build.
52+
53+You can disambiguate this via [PackageImports](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#package-qualified-imports). For instance, if you see
54+```
55+error:
56+ Ambiguous module name ‘Crypto.Hash’:
57+ it was found in multiple packages:
58+ cryptohash-0.11.9 cryptonite-0.25
59+```
60+then specify the package you want in the import, e.g:
61+`import "cryptonite" Crypto.Hash`