Search Haskell Channel Logs

Saturday, March 4, 2017

#haskell channel featuring glguy, Hafydd_, Zemyla, monochrom, Squarism, byorgey,

Squarism 2017-03-04 12:50:26
what am i doing wrong here : http://lpaste.net/353220
glguy 2017-03-04 12:51:09
You're using createGameServerInstance as a record selector
glguy 2017-03-04 12:54:57
Squarism: To understand why that's an issue, consider what type createGameServerInstance would need to have to exist
Squarism 2017-03-04 12:58:18
glguy, well atm they could be anything
glguy 2017-03-04 12:58:44
I mean actually try to write the type
glguy 2017-03-04 12:59:01
like createGameServerInstance :: GameLauncher -> ?
Hafydd_ 2017-03-04 13:01:40
class GameServerInstanceCreatorFactory where
Squarism 2017-03-04 13:03:18
createGameServerInstance :: forall m1 m2 . IO (GameServerInstance m1 m2) ?
Squarism 2017-03-04 13:04:26
i know im on thin ice here, but im trying to learn
byorgey 2017-03-04 13:16:57
Squarism: the problem is that GameLauncher existentially hides the types m1 and m2. Once you put an IO (GameServerInstance m1 m2) inside a GameLauncher, you can never get it back out, because you don't know what the types m1 and m2 are anymore
glguy 2017-03-04 13:17:28
Squarism: That's a close guess, but it would mean that the user createGameServerInstance got to pick m1 and m2
glguy 2017-03-04 13:18:34
similar to how the user of 'id :: a -> a' get to pick a
glguy 2017-03-04 13:18:45
id :: forall a. a -> a
glguy 2017-03-04 13:18:58
the forall is implicit in Haskell type signatures
Squarism 2017-03-04 13:20:07
glguy, ok. i get that idea.
Squarism 2017-03-04 13:20:25
byorgey, hmm.. trying to digest what you said
Squarism 2017-03-04 13:23:23
glguy, yes. Well i dont want the user of that function to decide that no.
Squarism 2017-03-04 13:27:15
woho. I got it to compile
abhiroop 2017-03-04 13:27:39
When working with Haskell STM, I know it initializes a thread local transaction log
Squarism 2017-03-04 13:27:41
pattern matching gl
abhiroop 2017-03-04 13:27:58
Can anybody tell me what data structure is this transaction log?
abhiroop 2017-03-04 13:28:15
I was trying to look for the code here : http://hackage.haskell.org/package/base-4.9.1.0/docs/src/GHC.Conc.Sync.html#atomically
abhiroop 2017-03-04 13:28:25
but couldn't find much
glguy 2017-03-04 13:28:52
Squarism: GOod work!
monochrom 2017-03-04 13:32:01
abhiroop: It may be in the source code of the runtime system instead.
hexagoxel 2017-03-04 13:35:18
is a double-continuation ever a solution? :S
monochrom 2017-03-04 13:36:23
It may comfort you to know that Cont cannot be a MonadFix instance.
Guest55569 2017-03-04 13:39:43
anyone know why I'd be getting "YAML parse exception at line 0, column 0: control characters not allowed" in stack.yaml?
Zemyla 2017-03-04 13:40:02
You know, I think I've figured out how to turn unstableSort in Data.Sequence into a stable sort.
monochrom 2017-03-04 13:40:25
You have control characters at line 0, column 0. The beginning. Use a hex editor to examine. Editors lie.
Guest55569 2017-03-04 13:40:30
e.g. using the example configuration of GHCJS + stack
Guest55569 2017-03-04 13:40:33
ok, thanks
monochrom 2017-03-04 13:40:35
Trust only hex editors.