You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'm trying to load ghci through stack, but i'm getting an error where it can't find the Show and Eq classes in an external library that i'm including as a dep.
(nothing else in that file changed; resolver is lts-3.13)
i type stack ghci and it fails
⚡ 02:35 PM noon ∈ thing>stack ghci
persistent-sqlite-2.2: download
persistent-sqlite-2.2: configure
persistent-sqlite-2.2: build
persistent-sqlite-2.2: install
Using main module: Package `thing' component exe:thing with main-is file: /home/noon/tmp/ss/thing/main.hs
Configuring GHCi with the following packages: sendgrid-haskell, thing
GHCi, version 7.10.2: http://www.haskell.org/ghc/ :? for help
[1 of 4] Compiling Email.SendGrid.Types ( /home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs, interpreted )
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:9:61:
Not in scope: type constructor or class ‘Eq’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:9:65:
Not in scope: type constructor or class ‘Show’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:10:61:
Not in scope: type constructor or class ‘Eq’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:10:65:
Not in scope: type constructor or class ‘Show’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:12:67:
Not in scope: type constructor or class ‘Eq’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:12:71:
Not in scope: type constructor or class ‘Show’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:15:66:
Not in scope: type constructor or class ‘Eq’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:15:70:
Not in scope: type constructor or class ‘Show’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:17:67:
Not in scope: type constructor or class ‘Eq’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:17:71:
Not in scope: type constructor or class ‘Show’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:18:67:
Not in scope: type constructor or class ‘Eq’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:18:71:
Not in scope: type constructor or class ‘Show’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:20:69:
Not in scope: type constructor or class ‘Eq’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:20:73:
Not in scope: type constructor or class ‘Show’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:21:69:
Not in scope: type constructor or class ‘Eq’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:21:73:
Not in scope: type constructor or class ‘Show’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:22:69:
Not in scope: type constructor or class ‘Eq’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:22:73:
Not in scope: type constructor or class ‘Show’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:23:93:
Not in scope: type constructor or class ‘Eq’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:23:97:
Not in scope: type constructor or class ‘Show’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:28:28:
Not in scope: type constructor or class ‘Eq’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:28:32:
Not in scope: type constructor or class ‘Show’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:39:15:
Not in scope: type constructor or class ‘Eq’
/home/noon/dev/ext/sendgrid-haskell/src/Email/SendGrid/Types.hs:39:19:
Not in scope: type constructor or class ‘Show’
Failed, modules loaded: none.
ϟ>
note that this problem only occurs if using a yesod project; from a simple new project, (and from the sendgrid-haskell project itself) everything works.
thoughts?
The text was updated successfully, but these errors were encountered:
Note that stack ghci tries to load both projects together. If you only specify one, it should work.
This is due to the yesod project specifying -XNoImplicitPrelude. Ideally we'd be able to properly load multiple packages into ghci, but that needs ghc support.
The best we can do is noisily tell the user about this issue, which I've already done (but it's not in a released version of stack yet): #1270
So, I'm closing this as already-fixed. Please re-open if I'm wrong.
i'm trying to load ghci through stack, but i'm getting an error where it can't find the
Show
andEq
classes in an external library that i'm including as a dep.the library is
sendgrid-haskell
: https://github.com/bitemyapp/sendgrid-haskell. i cloned this library locally, deleted the bounds from thecabal
file and am using the followingstack.yaml
my stack version is
to reproduce the error
i create a new project from a yesod template
i add a package dep to a local library,
sendgrid-haskell
so mypackages
section ofstack.yaml
looks like:(nothing else in that file changed; resolver is
lts-3.13
)i type
stack ghci
and it failsnote that this problem only occurs if using a
yesod
project; from asimple
new project, (and from the sendgrid-haskell project itself) everything works.thoughts?
The text was updated successfully, but these errors were encountered: