bollu 2017-02-19 03:45:11
lyxia: Endo [a] is mysterious
padre_angolano 2017-02-19 03:46:43
lyxia: no, -hide-package doesn't work either
lyxia 2017-02-19 03:47:37
padre_angolano: can you paste your error message
padre_angolano 2017-02-19 03:48:18
grg@dell.1:~$ stack ghc -hide-package base
padre_angolano 2017-02-19 03:48:18
Invalid option `-hide-package'
padre_angolano 2017-02-19 03:48:22
grg@dell.1:~$ stack ghc --hide-package base
padre_angolano 2017-02-19 03:48:22
Invalid option `--hide-package'
Tuplanolla 2017-02-19 03:48:59
Not `stack ghc -- --hide-package base`, padre_angolano?
mroman 2017-02-19 03:49:10
Couldn't one write a safer version of Chan using Locks?
mroman 2017-02-19 03:49:19
and by safer I mean in regards to isEmptyChan
Tuplanolla 2017-02-19 03:49:44
You mean `TChan`, mroman?
mroman 2017-02-19 03:49:53
or is there some laziness problem involved there.
mroman 2017-02-19 03:50:23
i.e. if I put something into an MVar/IORef but it's not actually fully reduced to a value.
padre_angolano 2017-02-19 03:50:38
Tuplanolla: works this way, thanks!
padre_angolano 2017-02-19 03:51:06
Tuplanolla: hmm, it works for ghc, but not for ghci
mroman 2017-02-19 03:51:12
I read that TChan has some disadvantages over Chan.
dramforever 2017-02-19 03:51:15
mroman: 'I can't see a way to fix this in the implementation of Chan while retaining the properties and the other operations it has.'
dramforever 2017-02-19 03:51:33
Quoting simonmar https://ghc.haskell.org/trac/ghc/ticket/4154#comment:1
Tuplanolla 2017-02-19 03:52:00
Simon says, so you better believe.
mroman 2017-02-19 03:52:08
I don't trust that guy.
mroman 2017-02-19 03:52:09
:D
mroman 2017-02-19 03:52:13
and it's 7 years old
mroman 2017-02-19 03:55:37
locks are single wake-up too if I read this correctly.
lyxia 2017-02-19 03:59:07
bollu: a Getting is a kind of traversal. You give it a function converting values a to elements of a monoid r, and the traversal combines these elements together.
bollu 2017-02-19 03:59:27
ah
lyxia 2017-02-19 03:59:43
bollu: (^..) gives the function (:)
bollu 2017-02-19 03:59:53
I see
bollu 2017-02-19 04:00:08
quick question, why is there no for_?
lyxia 2017-02-19 04:00:25
what for?
dramforever 2017-02-19 04:00:39
:t for_
lambdabot 2017-02-19 04:00:42
(Foldable t, Applicative f) => t a -> (a -> f b) -> f ()
dramforever 2017-02-19 04:00:51
bollu: What are you talking about :P
dramforever 2017-02-19 04:02:00
bollu: It's found in Data.Foldable. Tip: keep this as a bookmark: http://hackage.haskell.org/package/base-4.9.1.0/docs/doc-index-All.html
bollu 2017-02-19 04:02:34
ahh x
bollu 2017-02-19 04:02:37
ah thanks
bollu 2017-02-19 04:02:51
dramforever: I was looking in Data.Traversable xD
Welkin 2017-02-19 04:06:21
or you could use local hoogle, or search hayoo like I do
Eduard_Munteanu 2017-02-19 04:17:04
Somewhat offtopic: if A :> B and A :> C(A), are there any sound type systems which allow you to get a C(B) <: B for free?
Eduard_Munteanu 2017-02-19 04:17:23
(<: denotes subtyping)
Eduard_Munteanu 2017-02-19 04:18:54
(It's one of the things that bugs me about Java et. al)
NickHu 2017-02-19 04:18:55
Eduard_Munteanu: Is that not just covariance?
NickHu 2017-02-19 04:19:11
Oh, sorry, contravariance, didn't see the second was flipped
Eduard_Munteanu 2017-02-19 04:20:00
I mean it should be possible to rebase a class definition from one class to another, provided the latter is a subtype of the former.
Welkin 2017-02-19 04:22:19
there is no subtyping in haskell
Welkin 2017-02-19 04:22:42
which I see as a good thing
NickHu 2017-02-19 04:23:16
It's basically what fmap is for, no?
Welkin 2017-02-19 04:23:20
no convoluted inheritance trees to trace through
thatguy 2017-02-19 04:29:40
how do I make a data type for vectors of dimension n? I want to have some data type which takes some integer n and only lists of length n of the type a, but I don't know how to do that with lists
Welkin 2017-02-19 04:30:13
thatguy: you can't without dependent types
Rembane 2017-02-19 04:30:23
thatguy: Repa has something like that.
thatguy 2017-02-19 04:30:37
I want to do it on my own to undertand how I would do stuff like that
Welkin 2017-02-19 04:30:40
you might be able if you make your own list datatype that includes the length
thatguy 2017-02-19 04:31:08
in a big scope I want to implement some numeric procedure and for that I need vectors since it is about functions from R^n -> R^n
thatguy 2017-02-19 04:31:12
but somehow I don't know where to start
Tuplanolla 2017-02-19 04:31:56
Repa has static shapes, not static sizes, Rembane.
thatguy 2017-02-19 04:33:44
Welkin, yeah maybe I'll do that
thatguy 2017-02-19 04:33:50
thanks
Rembane 2017-02-19 04:39:41
Tuplanolla: Oh, good point. Thank you.
reactormonk 2017-02-19 04:43:27
What are my options for making ghci output more readable?
thatguy 2017-02-19 04:43:28
could I use something like array (1, n) for my problem?