Search Haskell Channel Logs

Saturday, January 28, 2017

#haskell channel featuring geekosaur, ph88, excelsiora,

excelsiora 2017-01-28 13:14:14
looks like I can get the compiler with this? https://hackage.haskell.org/package/Cabal-1.24.2.0/docs/Distribution-Simple-Compiler.html How would you idiomatically print the compiler name and version?
ph88 2017-01-28 13:15:32
is it possible to make a shorter syntax here? https://paste.fedoraproject.org/539127/48564889/ something like [BDI1, BDI2, .. and so on ?
geekosaur 2017-01-28 13:21:08
if you are looking for the .. syntax, you could derive Enum and maybe Bounded for whatever type has those constructors
ph88 2017-01-28 13:24:43
i don't know the .. syntax
ph88 2017-01-28 13:24:56
i just put .. there for et cetera
ph88 2017-01-28 13:25:47
oh actually i know how to do this
geekosaur 2017-01-28 13:27:14
derive Enum; map (<$> n93) [BDI1 .. BDI16]
ph88 2017-01-28 13:27:28
cool
geekosaur 2017-01-28 13:27:50
(note the spaces are required because it would misparse as a module name otherwise)
ph88 2017-01-28 13:27:54
i think Enum would be a bit confusing here, but it's good to know it exist !!