k0001 / di

Easy and powerful typeful logging without monad towers, in Haskell.
26 stars 5 forks source link

df1: do not preprocess Key, Value and Message text #39

Closed nmattia closed 6 years ago

nmattia commented 6 years ago

Fixes #38

Note: Key, Value and Message are newtypes so I am not sure it's worth inlining the (smart) constructors. I see you inlined the accessors as well so there's probably a reason.

k0001 commented 6 years ago

Thanks!

I am not sure about the INLINE. I suppose it doesn't hurt to leave it, though.

nmattia commented 6 years ago

@k0001 I've got a test failure:

Left ... log_message = Message " \\)`"}
Right ... log_message = Message "\\)`"})
      Use --quickcheck-replay=129355 to reproduce.

Maybe that's the reason why you stripped the spaces? Looks like you might have to encode them or fix the parsing somehow

k0001 commented 6 years ago

I think the test is just checking that whitespace is trimmed. I'll look into it tomorrow, I am on my phone now and can't see the test code in detail.

k0001 commented 6 years ago

Oh, I see. Whitespace in the Message is causing parsing problems. Hmm. I think your diagnosis was correct.