Search Haskell Channel Logs

Thursday, February 23, 2017

#haskell channel featuring Welkin, robertkennedy, MarcelineVQ, monochrom, c_wraith, lordcirth,

robertkennedy 2017-02-23 14:08:16
Is there a way to have newtypes derive every class which is not a subclass of something? IE `newtype A typ = A typ hiding (Show)`
Cale 2017-02-23 14:10:07
No, any classes you want to derive have to be explicitly listed
Welkin 2017-02-23 14:12:57
EXPLICIT
MarcelineVQ 2017-02-23 14:13:10
gone wrong!
robertkennedy 2017-02-23 14:18:52
Is there a reason for that, or has it not been implemented?
c_wraith 2017-02-23 14:25:25
robertkennedy, a common reason for creating a newtype is to use *different* instances.
monochrom 2017-02-23 14:27:49
Semantics tends to go wrong when you add features of "'everything' except what I list"
robertkennedy 2017-02-23 14:27:55
Right, but if you only wanted different instances for certain classes, you (or, I) currently use GeneralizedNewTypeDeriving, and it's not clear why that is limited by my foresight
c_wraith 2017-02-23 14:28:29
with StandaloneDeriving, it's not limited by your foresight. :)
robertkennedy 2017-02-23 14:29:31
How so? Something like `deriving instance c a => c (A a)`?
monochrom 2017-02-23 14:29:55
The underlying phenomenon being: closed-world assumptions tend to break in an open world.
c_wraith 2017-02-23 14:30:27
no. I just mean you can notice an instance you'd like to GND is missing and add it with a single line.
robertkennedy 2017-02-23 14:32:19
Well you can add `C` by adding it to your deriving instance. But that leads to classes having like `newtype A a = A a deriving (Ord, IsString, Num, Integral)`
robertkennedy 2017-02-23 14:33:26
(where A's goal is to modify `ToJSON`, say)
robertkennedy 2017-02-23 14:34:25
And then in a week you add RealFrac, and in a month you think to add ToSwagger, but decide you don't want your module to depend on swagger
lordcirth 2017-02-23 14:36:08
Anyone seen http://www.lamdu.org/ ?
Zemyla 2017-02-23 14:43:22
Oh, fuck. I think I know why the setup isn't working.
Zemyla 2017-02-23 14:44:22
The configure script is fucking running ghc-pkg dump -global, but it requires dump --global (note the double dashes).