ezyang 2017-02-22 14:45:19
if there were a way of saying the moral equivalent of K(..) (there isn't), MkK would be brought into scope but not K
ezyang 2017-02-22 14:45:46
This behavior is observable when you see what happens if you do something like module A (K, f) where data K = K { f :: Int }
ezyang 2017-02-22 14:45:57
if you say import A(K(..)), indeed K and f are brought into scope
ezyang 2017-02-22 14:46:09
This is what Haskell98 says too
dmwit 2017-02-22 14:46:30
GHC has an extension that gives you the ability to differentiate between type and term level in import lists, I believe.
dmwit 2017-02-22 14:47:06
So something like `import A (type K)` and `import A (term K)` (not the real syntax) would differentiate between the two kinds of imports.
ezyang 2017-02-22 14:47:34
isn't this pattern?
MarcelineVQ 2017-02-22 14:48:51
dmwit: that's type yeah? for cases where typeoperators are in effect which causes ambiguity?
ezyang 2017-02-22 14:49:22
I'm not actually talking about the ambiguity here, I think
MarcelineVQ 2017-02-22 14:49:31
https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#explicit-namespaces-in-import-export idk, but in case it's relevant
dmwit 2017-02-22 14:50:16
Oh, MarcelineVQ beat me to it.
ezyang 2017-02-22 14:50:31
oh interesting
dmwit 2017-02-22 14:51:00
It's always exciting when the documentation isn't even sure why a thing happens.
dmwit 2017-02-22 14:51:34
"The extension -XExplicitNamespaces is implied... (for some reason) by -XTypeFamilies."
MarcelineVQ 2017-02-22 14:56:25
it's to disambiguate the associated families I guess, https://wiki.haskell.org/GHC/Indexed_types#Associated_families
Zemyla 2017-02-22 15:00:19
Is it just me, or does ircbrowse.net no longer have search?
Welkin 2017-02-22 15:01:51
Zemyla: record your own logs, then grep/ack/ag
chreekat 2017-02-22 15:16:32
Zemyla: I've been told that icrbrowse is in the midst of a migration
mitch_stevens 2017-02-22 15:21:13
@let x = 4
lambdabot 2017-02-22 15:21:16
Defined.
Axman6 2017-02-22 15:22:50
D:
Axman6 2017-02-22 15:23:02
:t (x,y)
lambdabot 2017-02-22 15:23:05
error:
lambdabot 2017-02-22 15:23:05
Ambiguous occurrence 'x'
lambdabot 2017-02-22 15:23:05
It could refer to either 'Debug.SimpleReflect.x',
Axman6 2017-02-22 15:26:05
@undef
lambdabot 2017-02-22 15:26:06
Undefined.
Axman6 2017-02-22 15:26:10
:t (x,y)
lambdabot 2017-02-22 15:26:11
(Expr, Expr)
Welkin 2017-02-22 15:27:42
:t (a,b)
lambdabot 2017-02-22 15:27:43
(Expr, Expr)
Welkin 2017-02-22 15:28:03
@let a = 2; b = "fish"
lambdabot 2017-02-22 15:28:04
Defined.
Welkin 2017-02-22 15:28:10
:t (a,b)
lambdabot 2017-02-22 15:28:12
error:
lambdabot 2017-02-22 15:28:12
Ambiguous occurrence 'a'
lambdabot 2017-02-22 15:28:12
It could refer to either 'Debug.SimpleReflect.a',
Sornaensis 2017-02-22 15:42:10
@src unsafePerformIO
lambdabot 2017-02-22 15:42:10
Source not found. Just what do you think you're doing Dave?