Hm, that’s good to know. However, that has to go into every file I suppose. Also, I’m not trying to get rid of Prelude but rather have an extended version of it.
In that case perhaps call it something like global or alwaysimport so that it’s clear it doesn’t need to be prelude-related.
Also could this be an anti-pattern? It’s somewhat odd to have imports without them being explicitly defined in the file, at least I’ve not really encountered it. For the prelude in particular you’d have a set of commonly understood functions that now may behave differently and it not being readily apparent why that’s the case. Or that it’s happening at all if type definitions stay the same.
I’ve used NoImplicitPrelude and a Haskell-specific feature (as in not supported in DAML atm) to not just hide Prelude but replace it fairly heavily in the past. However, over time I pretty much stopped using it for two reasons:
It seems like a useful feature at first glance but the benefits are pretty small. It saves you a few lines of typing imports. In my experience, that is never what is slowing me down.
It gets really confusing especially if you frequently switch across projects. Even if you stay within a project, having the imports there explicitly doesn’t do any harm and if you use explicit imports, it’s easy to see where things come from.
So overall, I would recommend against trying to use this here.
Yeah, probably you guys are right the more I think about it. I guess if DAML Studio offered imports for project types as well (not just the ones from stdlib) this would not bother me that much.
Do you mean that there is some autocomplete feature which you would want to work differently? If so, this may be worth raising as a GitHub issue (or clarifying here a bit and I’ll make an issue for you).