ph88 2017-01-29 02:46:30
since NonEmpty implement Functor does that mean i can use the some and many combinators on it ?
epta 2017-01-29 02:47:07
what does 'stack install' do? Does it install a package user-wise or does it make it available for a specific project environment only?
ph88 2017-01-29 02:48:13
epta, it downloads and installs the package to a cache, and then if your project needs this package it will use that exact one form the cache
ph88 2017-01-29 02:48:36
so that you don't have to download the exact same package for different projects
epta 2017-01-29 02:50:35
ph88: I mean, if some excutable is installed via 'stack install', is it presented in $PATH for every shell session?
MarcelineVQ 2017-01-29 02:51:18
only if .local/bin is on your path since that's where stack install places installed binaries
ph88 2017-01-29 02:51:40
and only when you are not a project directory (so you use the global project)
MarcelineVQ 2017-01-29 02:52:48
stack install will place executables in ~/.local/bin if you're in a project directory too
ph88 2017-01-29 02:53:08
oh ok ^^
ph88 2017-01-29 02:53:33
wow ghc is mega slow now
ph88 2017-01-29 02:53:54
15minutes for 4K loc is that normal ?
ertes 2017-01-29 02:55:32
ph88: that's a bit much, but of course it depends on what you have in those 4K
MarcelineVQ 2017-01-29 02:55:42
dunno, never had 4k loc, but given that ghc itself only takes me at most 20 minutes to build, probably not. are you building with -O2 ?
ph88 2017-01-29 02:55:58
no, i'm just doing reload in ghci
ertes 2017-01-29 02:56:10
ph88: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/sooner.html
ph88 2017-01-29 02:56:23
hi ertes
MarcelineVQ 2017-01-29 02:56:33
I see, is this 4k in one file? consider splitting it up so that it can choose not to rebuild things that don't change
ertes 2017-01-29 02:56:35
helo =)
ertes 2017-01-29 02:58:21
in the case of GHCi splitting by itself shouldn't even help (it always reloads all modules that aren't compiled), but it does help, because GHC can generally cope better with smaller modules
Tuplanolla 2017-01-29 02:58:32
If you have several modules, try `-fobject-code`, which is not mentioned there in the user guide, ph88.
ertes 2017-01-29 02:58:52
also beware of the many caveats of -fobject-code =)
ph88 2017-01-29 03:00:05
well htop shows ghci is taking only 28% of my memory .. so it would be ok to use some more
systadmin 2017-01-29 03:02:34
hi
ph88 2017-01-29 03:03:22
hi systadmin
ertes 2017-01-29 03:04:51
ph88: you can use 'some' and 'many' on any Alternative functor, not on any Functor
ertes 2017-01-29 03:05:39
> many (pure 'a') :: NonEmpty Char
lambdabot 2017-01-29 03:05:42
error:
lambdabot 2017-01-29 03:05:42
• Expected a type, but ''NonEmpty Char' has kind 'NonEmptyList a0'
lambdabot 2017-01-29 03:05:42
• In an expression type signature: NonEmpty Char
ertes 2017-01-29 03:06:16
@let import qualified Data.List.NonEmpty as Ln
lambdabot 2017-01-29 03:06:18
Defined.
ertes 2017-01-29 03:06:22
> many (pure 'a') :: Ln.NonEmpty Char
lambdabot 2017-01-29 03:06:24
error:
lambdabot 2017-01-29 03:06:24
• Couldn't match type '[Char]' with 'Char'
lambdabot 2017-01-29 03:06:24
Expected type: Ln.NonEmpty Char
ertes 2017-01-29 03:06:38
> many (pure 'a') :: Ln.NonEmpty [Char]
lambdabot 2017-01-29 03:06:40
error:
lambdabot 2017-01-29 03:06:40
• No instance for (Alternative Ln.NonEmpty)
lambdabot 2017-01-29 03:06:40
arising from a use of 'many'
ertes 2017-01-29 03:06:46
oh, of course
ph88 2017-01-29 03:06:49
many on NonEmpty doesn't make sense actually :/
ph88 2017-01-29 03:06:59
i see NonEmpty has a function some1 that will be good enough
ertes 2017-01-29 03:07:18
i would expect it to cycle anyway
ertes 2017-01-29 03:07:26
> many "a"
lambdabot 2017-01-29 03:07:32
mueval-core: Time limit exceeded
ph88 2017-01-29 03:07:35
:P
ertes 2017-01-29 03:07:35
or loop, i guess
ertes 2017-01-29 03:07:54
> head (some "a")
ph88 2017-01-29 03:07:58
i think i will move the source code from my laptop to my pc
lambdabot 2017-01-29 03:08:00
mueval-core: Time limit exceeded
ph88 2017-01-29 03:08:20
this makes me want to buy one of those new intel processors :/
ph88 2017-01-29 03:08:29
i7 7700k or w/e
ertes 2017-01-29 03:08:55
ph88: splitting your module will be more effective
ph88 2017-01-29 03:09:05
i like to contain the grammar into one file
excelsiora 2017-01-29 03:15:53
so how do you print the compiler info?
excelsiora 2017-01-29 03:17:22
import qualified Distribution.Compiler as DC
excelsiora 2017-01-29 03:18:04
print DC.CompilerInfo
excelsiora 2017-01-29 03:18:42
no instance - so this is the type I want, but I want to get the instance for the GHCI session or program.
int-e 2017-01-29 03:18:48
excelsiora: is any of that missing from ghc --info?
excelsiora 2017-01-29 03:19:42
I don't know. I just want to print it from ghci.
ph88 2017-01-29 03:21:54
if i want to make a project with several parts (modules i guess) is it useful to put them in separate git repo's as well ?
ph88 2017-01-29 03:22:11
basically i want to make a command line utility that is an front-end for several functionality
excelsiora 2017-01-29 03:25:58
I presume ghci and any given compiler knows its own name and version, correct?
excelsiora 2017-01-29 03:26:10
How do I print this?
excelsiora 2017-01-29 03:26:42
in Python, it's import sys; print(sys.version)
Theophane 2017-01-29 03:27:13
excelsiora: wait a sec
Tuplanolla 2017-01-29 03:28:46
Is there `:show version`?
Theophane 2017-01-29 03:29:06
Tuplanolla: System.Info.compilerVersion
Theophane 2017-01-29 03:29:14
(import System.Info first)
excelsiora 2017-01-29 03:37:19
Theophane: thanks that gets me closer
Theophane 2017-01-29 03:37:44
you've also got System.Info.compilerName
Theophane 2017-01-29 03:37:56
and you're welcome :)
excelsiora 2017-01-29 03:42:41
Theophane: how do I get the compilerVersion into a nice human readable string
excelsiora 2017-01-29 03:42:58
I'm trying to do: print(arch ++ os ++ compilerName ++ compilerVersion)
excelsiora 2017-01-29 03:43:15
(is this style ok?)
Theophane 2017-01-29 03:43:19
excelsiora: :doc showVersion
Theophane 2017-01-29 03:43:21
;)
excelsiora 2017-01-29 03:43:57
unknown command :doc