Search Haskell Channel Logs

Thursday, February 23, 2017

#haskell channel featuring kadoban, Tuplanolla, mlev, geekosaur, hexagoxel, marekw2143, and 8 others.

mlev 2017-02-23 08:46:35
hexagonal: What would a simple instantiation of <*> be for Foo in that case? I.e. f <*> a = ...
mlev 2017-02-23 08:46:56
Sorry, meant hexagoxel*
hexagoxel 2017-02-23 08:47:30
mlev: just inline `r` even if you need to write `field*` twice that way.
mlev 2017-02-23 08:49:05
hexagoxel: I'm a bit of a newbie, what would that line of code look like with inlining r?
hexagoxel 2017-02-23 08:49:46
Foo (field1 f $ field1 a) (field2 f $ field2 a)
mlev 2017-02-23 08:52:38
hexagoxel: Great, thank you very much!
marekw2143 2017-02-23 08:55:06
hi, here: https://bitbucket.org/chessRepo/c7/src/bc2e6456b98520afc7b7122398b75c93de770403/main.hs?at=master&fileviewer=file-view-default#main.hs-81
marekw2143 2017-02-23 08:55:21
I'm getting following error: main.hs:81:11: parse error on input '='
marekw2143 2017-02-23 08:55:30
could somebody tell me what's wrong ?
hexagoxel 2017-02-23 08:56:08
:t (/=)
lambdabot 2017-02-23 08:56:13
Eq a => a -> a -> Bool
hexagoxel 2017-02-23 08:56:21
:t (!=)
kadoban 2017-02-23 08:56:22
marekw2143: == ?
lambdabot 2017-02-23 08:56:24
error:
lambdabot 2017-02-23 08:56:24
• Variable not in scope: !=
lambdabot 2017-02-23 08:56:24
• Perhaps you meant one of these:
marekw2143 2017-02-23 08:56:30
oh, ok
marekw2143 2017-02-23 08:56:35
kadoban, thanks
kadoban 2017-02-23 08:57:15
Anytime. By the way you can use a 'case' there, not that it really matters.
marekw2143 2017-02-23 09:00:42
it seems that monads are not the strongest "value" of the Haskell language
marekw2143 2017-02-23 09:00:51
but the type system
geekosaur 2017-02-23 09:01:39
define "strongest"
mnoonan 2017-02-23 09:01:45
I can't speak for everybody, but the type system and immutability together keep me more honest.
geekosaur 2017-02-23 09:02:18
personally I'd say Cont is the one that really shows its strength... name another language in which call/cc doesn't need runtime hooks
geekosaur 2017-02-23 09:02:39
or other language suport
marekw2143 2017-02-23 09:03:28
geekosaur, well, feature which has greater impact of writing maintenable code
marekw2143 2017-02-23 09:03:34
*greatest
geekosaur 2017-02-23 09:03:51
that certainly rules Cont out :p
marekw2143 2017-02-23 09:04:07
Cont ?
kadoban 2017-02-23 09:04:30
It's a specific Monad that's quite ... powerful and a bit crazy.
marekw2143 2017-02-23 09:04:54
it's related to "reactive programming " ?
kadoban 2017-02-23 09:06:46
Not really. I don't know it well enough to summarize it well I bet, never quite used it for anything practical.
Tuplanolla 2017-02-23 09:07:06
"Functional go-to".
geekosaur 2017-02-23 09:08:26
a great way to confuse people
lloydy 2017-02-23 09:08:50
Hi. Can anyone offer help with an issue I have installing Haskell Platform please?
Akii 2017-02-23 09:12:52
lloydy: just ask ^^
lloydy 2017-02-23 09:14:59
I have installed Haskell Platform on Win 10 and when I try to run WinGHCi I get an error saying There is no disk in drive D. It cannot be cancelled or continued other than through Task Manager. I've tried un/reinstalling in several different ways; same thing. Google says others have had same issue and some have got round it by installing through PowerShell. I know nothing about this. Would be
lloydy 2017-02-23 09:14:59
grateful for guidance with PowerShell or other suggestions for getting Haskell to work on Windows.
kuribas 2017-02-23 09:35:06
When linking, does ghc include all the functions in a module, or just the ones that are used?
monochrom 2017-02-23 09:35:19
Usually all of a module.
kuribas 2017-02-23 09:35:28
Wouldn't that lead to bloat?
monochrom 2017-02-23 09:36:00
-split-objs can help
kuribas 2017-02-23 09:38:07
For example, if I specialize to several usefull types (for example Double and Float), it would always include those.
monochrom 2017-02-23 09:38:20
Yes.
jpl 2017-02-23 09:38:25
Cabal question: Is there any way to compile just a single file in a project?
kuribas 2017-02-23 09:38:40
monochrom: ok, I'll look at -split-objs
kuribas 2017-02-23 09:39:38
monochrom: well, about compilation time, I could do this only for production binaries.
monochrom 2017-02-23 09:41:41
-split-objs has to be applied early. That is, suppose I am writing an exe and I want to use your library. Then I have to have compiled your library with -split-objs in the first place. It is not for compiling or linking my exe.
monochrom 2017-02-23 09:42:52
IIRC libraries that come with GHC were already built with -split-objs. But it is not a cabal default.
johnw 2017-02-23 09:43:58
dolio: http://newartisans.com/2017/02/a-case-of-reflection/
kuribas 2017-02-23 09:44:34
monochrom: or I could use INLINABLE ...