monochrom 2017-03-01 10:45:50
It is just the pragmas (there are two) and reading the GHC user's guide.
user1872 2017-03-01 10:47:29
Great! I wasn't sure if I was missing something. thanks
EvanR 2017-03-01 11:07:42
is a thread doing a ByteString copy interruptible
dolio 2017-03-01 11:09:59
Doubt it.
dmwit 2017-03-01 11:11:12
EvanR: If it exists in the DSL, you can implement the out-of-DSL function on top. But not vice versa.
dmwit 2017-03-01 11:11:33
EvanR: (re: the question about getting the rest of input after a successful parse)
dolio 2017-03-01 11:12:40
Yeah, bytestring imports memcpy as an unsafe ccall, and uses that for copying things.
dolio 2017-03-01 11:12:55
So I think it can't be interrupted.
mtjmullen 2017-03-01 11:40:08
Does a Free Monad have a valid Semigroup instance?
mtjmullen 2017-03-01 11:40:28
The free package doesn't have an instance for it
fresheyeball 2017-03-01 11:42:03
I have a simple task, take two lists and make a list of tuples with a book for matches
fresheyeball 2017-03-01 11:42:20
something like this
fresheyeball 2017-03-01 11:42:36
tagMatches :: [a] -> [a] -> [(a, Bool)]
fresheyeball 2017-03-01 11:42:43
such that
glguy 2017-03-01 11:43:01
mtjmullen: Free has an Alternative instance, so you can wrap it with Data.Monoid.Alt and get a Semigroup instance of that
fresheyeball 2017-03-01 11:43:19
tagMatches [1,2,3] [2,4] = [(1,False),(2,True),(3,False)]
glguy 2017-03-01 11:43:32
or if we had the Data.Monoid.App (Applicative instead of Alternative) you could use that
fresheyeball 2017-03-01 11:43:50
what I want to avoid is inefficient code
Cale 2017-03-01 11:45:04
mtjmullen: An arbitrary monad applied to a semigroup can be given a semigroup instance with (<>) = liftM2 (<>)