nitrix 2017-02-10 17:47:14
The closest that I'm aware is: data NonEmpty a = a :| [a]
nitrix 2017-02-10 17:47:36
(Whereas the `z` parameter is missing)
nitrix 2017-02-10 17:48:27
aarvar: Nothing prevents you from naming your little creation :P
aarvar 2017-02-10 17:48:45
nitrix: naming is too hard
aarvar 2017-02-10 17:49:30
EndList?
Lokathor 2017-02-10 17:52:12
DottedList :P
dmwit 2017-02-10 17:54:14
aarvar: ([a], z) seems even nicer
dmwit 2017-02-10 17:54:20
don't have to make it all the way to the end of the list to get the z
Lokathor 2017-02-10 17:56:21
you haskellers and your moon magic with types
Lokathor 2017-02-10 17:56:38
if it's not a void* I don't know why you'd want it!
nitrix 2017-02-10 17:57:24
haskellToC :: Haskell -> Void
nitrix 2017-02-10 17:57:42
New FFI proposal.
sleblanc 2017-02-10 17:57:56
CType c => c -> VoidP
Lokathor 2017-02-10 17:58:06
Ptr ()
sleblanc 2017-02-10 17:58:22
excellent
Lokathor 2017-02-10 17:58:34
that's what sdl2 uses
aarvar 2017-02-10 17:58:42
dmwit: sure, but then what about something like tails?
aarvar 2017-02-10 17:58:59
then you end up creating a bunch of new objects
dmwit 2017-02-10 18:00:08
v. cheap objects
aarvar 2017-02-10 18:00:13
though for what I'm doing it doesn't really matter, I was just curious if that existed
Lokathor 2017-02-10 18:00:50
aarvar, you're already programming in Haskell. GHC already ate up all of your RAM. Gotta just go with it
markasoftware 2017-02-10 18:06:11
why does ghc seem so much less efficient than other compilers for other langs?
Lokathor 2017-02-10 18:06:39
GHC is plenty efficient
aarvar 2017-02-10 18:06:49
markasoftware: try scalac
Lokathor 2017-02-10 18:06:58
you're just asking for a lot with all that lazyness stuff
markasoftware 2017-02-10 18:07:06
oh god
markasoftware 2017-02-10 18:07:15
i mean, the outputted code is ok
markasoftware 2017-02-10 18:07:20
but in terms of compilation time, ram usage, etc
Lokathor 2017-02-10 18:07:57
oh. plenty of optimizations that are needed and all that
Lokathor 2017-02-10 18:08:04
you should look at rust's compiles some time
timbod7 2017-02-10 18:08:07
markasoftware I find recent ghc performance frustrating. But the haskell compiler is doing more work that other compilers: more sophisticated type checking, more optimisation etc etc.
timbod7 2017-02-10 18:08:23
So it's hard to draw a comparison really.