monochrom 2017-02-01 10:47:11
It must be such a beautiful misunderstanding that Data.Constraint.Nat gives you gcd of natural transformations.
noan 2017-02-01 10:48:17
with my cabal file I can define as many executables as I wish, right? just providing a different entry point? Ie. if I have a database migration task I can effectively define it as an executable?
monochrom 2017-02-01 10:49:02
Yes. Make sure you give your executables different names.
ph88 2017-02-01 10:50:45
Could anyone look at the error i'm getting on line 59 ?? https://paste.fedoraproject.org/542617/85746148/ I'm trying to work with Generics and it's working a little bit but when i have a type with a variable it seems to break down and i don't understand why because it says no instance for (PrettyPrint ContextClause) but this instance should be there due to deriving Generic
lpaste 2017-02-01 10:51:40
glguy pasted "two executables, one file" at http://lpaste.net/351932
glguy 2017-02-01 10:51:52
monochrom: I found myself wondering if they'd need to be in separate files
monochrom 2017-02-01 10:53:36
That's neat. But I have a bit of theoretical worry (but not practical) about using ghc-options to achieve this.
glguy 2017-02-01 10:54:19
I tried using the main-is: field, but that one required a filename
glguy 2017-02-01 10:54:32
This is more "can I" than "should I"
monochrom 2017-02-01 10:54:39
Yeah cabal doesn't have a provision for this.
monochrom 2017-02-01 11:02:14
There's a fan of baldrick!
jophish 2017-02-01 11:05:41
chrisdone: Is descriptive maintained still?
zipper 2017-02-01 11:11:14
Hey I have a problem, emacs/cabal repl is looking only for packages installed using cabal on my linux and not finding them
zipper 2017-02-01 11:11:48
Compared to OSX where it seems to find them by me adding the /bin of my packages
ertes 2017-02-01 11:12:09
zipper: packages or executables?
zipper 2017-02-01 11:12:25
ertes: I meant executables
zipper 2017-02-01 11:12:31
I see an issue there
zipper 2017-02-01 11:12:38
I specified only/bin
ertes 2017-02-01 11:13:22
zipper: in what cases do you need it to find your executables? still working on structured-haskell-mode?
zipper 2017-02-01 11:14:22
ertes: No strucutred haskell mode installed
zipper 2017-02-01 11:14:44
but now cabbal repl complains that packages are not installed and cabal configure has not been ran
zipper 2017-02-01 11:14:49
*cabal repl
zipper 2017-02-01 11:15:09
This setup works fine on OSX though
noobsy 2017-02-01 11:18:47
hi guys, I'm having a little trouble understanding something
noobsy 2017-02-01 11:19:07
I have a list of strings. There is a function rulesFromSentence:: [String] -> [GrammarRule]
ph88 2017-02-01 11:19:08
what's that ?
noobsy 2017-02-01 11:19:26
I am making a function rulesFromText :: [String] -> [GrammarRule] that takes in a list of strings
noobsy 2017-02-01 11:19:33
and runs rulesFromSentence on each string in the list
noobsy 2017-02-01 11:19:37
however I keep coming across an error
noobsy 2017-02-01 11:19:49
hold on
ph88 2017-02-01 11:19:54
maybe you want to paste that error in a pastebin along with your code
noobsy 2017-02-01 11:20:02
yes
noobsy 2017-02-01 11:20:03
I will
noobsy 2017-02-01 11:20:04
just a sec
ertes 2017-02-01 11:20:31
noobsy: map rulesFromSentence :: [[String]] -> [[GrammarRule]] -- like this?
noobsy 2017-02-01 11:21:27
http://pastebin.com/ynDJYg1P
noobsy 2017-02-01 11:21:29
this is my code
ph88 2017-02-01 11:22:01
noobsy, if you run rulesFromSentence on "each string" then that means the function should take a String, but you just told us it takes [String]
noobsy 2017-02-01 11:22:07
http://pastebin.com/geJCWWPB
ertes 2017-02-01 11:22:19
noobsy: could you paste to lpaste.net or gist.github.com instead? pastebin.com messes up the formatting horribly
noobsy 2017-02-01 11:22:27
alright
noobsy 2017-02-01 11:22:55
http://lpaste.net/351941
monochrom 2017-02-01 11:23:01
Also it would be nice to have everything on the same page.
monochrom 2017-02-01 11:23:35
You probably want ++ instead of :
ertes 2017-02-01 11:23:37
noobsy: on line 12 what's the type of 'r'?
noobsy 2017-02-01 11:23:53
http://lpaste.net/351943
noobsy 2017-02-01 11:24:14
wouldn't "r" be the first string in the list of strings?
noobsy 2017-02-01 11:24:20
or am I thinking this wrong
ertes 2017-02-01 11:24:31
noobsy: correct
ertes 2017-02-01 11:24:33
r :: String
noobsy 2017-02-01 11:24:42
would I have to enclose that in brackets then?
ertes 2017-02-01 11:24:42
rulesFromSentence r -- so can this be correct?
noobsy 2017-02-01 11:24:46
so [r]?
ertes 2017-02-01 11:25:00
if that's what you want… rulesFromSentence wants a list of strings in any case
ertes 2017-02-01 11:25:27
the next problem is: its result, let's call it ys, is [GrammarRule]
noobsy 2017-02-01 11:25:41
ok
ertes 2017-02-01 11:25:45
ys : _ -- prepends a list of grammar rules to a list of lists of grammar rules
ertes 2017-02-01 11:26:16
so right now your result type of rulesFromText is [[GrammarRule]], not [GrammarRule]
noobsy 2017-02-01 11:26:29
but rulesFromSentence [s] would return [GrammarRule], yes?
ertes 2017-02-01 11:26:35
yes
ertes 2017-02-01 11:26:44
(:) :: a -> [a] -> [a]
ertes 2017-02-01 11:26:49
in this case a = [GrammarRule]
noobsy 2017-02-01 11:26:54
but then why would there be a problem with rulesFromText [rest]?
ertes 2017-02-01 11:27:19
so you're using (:) with the following type: [GrammarRule] -> [[GrammarRule]] -> [[GrammarRule]]
ertes 2017-02-01 11:27:24
my guess is that what you want is (++)
ertes 2017-02-01 11:27:46
(++) :: [a] -> [a] -> [a] -- which you can use as: [GrammarRule] -> [GrammarRule] -> [GrammarRule]
noobsy 2017-02-01 11:28:41
ah
zipper 2017-02-01 11:32:01
Might anyone know why emacs is doing this despite me setting the haskell process to ghci http://lpaste.net/2776126247200096256
ertes 2017-02-01 11:32:03
noobsy: i suspect that you have a bug on line 6, too
zipper 2017-02-01 11:33:28
like so: http://lpaste.net/6520522282526310400
ertes 2017-02-01 11:34:18
zipper: that looks fragile… doesn't haskell-mode's stack support work for you?
zipper 2017-02-01 11:34:47
ertes: idk, should it work just out the box?
zipper 2017-02-01 11:34:51
Doesn't seem to
fuzzyhorns 2017-02-01 11:35:09
newb query: what do yall do when infix operators clash? like i have 'Data.Graph.Inductive.Graph.&' and 'Control.Lens.&' in the same file
ertes 2017-02-01 11:35:21
zipper: i haven't used it myself, but it shows up as one of the possible process types in customize
zipper 2017-02-01 11:35:48
ertes: Where is this?
ertes 2017-02-01 11:36:00
zipper: in fact with default settings it should detect stack projects when it sees a stack.yaml as far as i know
ertes 2017-02-01 11:36:30
fuzzyhorns: you can qualify operators: import Control.Lens as L
ertes 2017-02-01 11:36:37
x L.& f
ertes 2017-02-01 11:37:06
zipper: M-x customize-variable RET haskell-process-type RET
fuzzyhorns 2017-02-01 11:37:11
erg: mm, so convention is just very short qualifiers? ok
ertes 2017-02-01 11:38:01
fuzzyhorns: i don't think there is any common convention
monochrom 2017-02-01 11:38:25
@quote monochrom heart
lambdabot 2017-02-01 11:38:25
monochrom says: if you don't try to write a new OS at 20, you have no heart. if you try to write a new OS at 40, you have no brain.
monochrom 2017-02-01 11:38:31
err not that one
ertes 2017-02-01 11:38:41
hehe
ph88 2017-02-01 11:38:48
fuzzyhorns, import qualified Control.Lens as L might also be useful
monochrom 2017-02-01 11:38:55
@quote monochrom go*.heart
lambdabot 2017-02-01 11:38:56
No quotes match. Abort, Retry, Panic?
monochrom 2017-02-01 11:39:02
@quote monochrom go.*heart
lambdabot 2017-02-01 11:39:02
monochrom says: best practice haskell is "go with your heart"
ertes 2017-02-01 11:39:42
fuzzyhorns: short qualifiers are a convention themselves though
ertes 2017-02-01 11:39:44
:t M.insert
lambdabot 2017-02-01 11:39:47
Ord k => k -> a -> M.Map k a -> M.Map k a
fuzzyhorns 2017-02-01 11:40:13
yah, this seems reasonable to me :)
fuzzyhorns 2017-02-01 11:40:20
thanks for humoring my very simple question
zipper 2017-02-01 11:41:01
ertes: In my set of completions I see only haskell-process-cabal and no other like ghci
zipper 2017-02-01 11:41:09
ertes: Should that be the case
zipper 2017-02-01 11:41:19
I mean haskell-process-ghci
ertes 2017-02-01 11:41:40
zipper: nope… do you have a recent enough haskell-mode? mine is from MELPA
monochrom 2017-02-01 11:42:09
Ah but there is MELPA and then there is MELPA-stable :)
zipper 2017-02-01 11:42:23
hmmm I should
ertes 2017-02-01 11:42:32
mine is from whatever nixpkgs.emacsPackagesNg corresponds to =)
ertes 2017-02-01 11:42:57
nix-repl> emacsPackagesNg.haskell-mode.name
ertes 2017-02-01 11:42:57
"emacs-haskell-mode-16.1"
zipper 2017-02-01 11:43:14
ertes: haskell-mode-20170116.407
zipper 2017-02-01 11:43:16
hmmm
ertes 2017-02-01 11:43:22
sounds newer
ertes 2017-02-01 11:43:28
or at least new enough
zipper 2017-02-01 11:43:51
Let me specify only melpa as a source
ertes 2017-02-01 11:44:16
zipper: just to be safe: do you use (package-initialize)?
ertes 2017-02-01 11:44:38
in your .emacs
zipper 2017-02-01 11:44:53
ertes: hmmm I'm not sure
zipper 2017-02-01 11:45:04
Let me check