sol / doctest

An implementation of Python's doctest for Haskell
https://hackage.haskell.org/package/doctest
MIT License
372 stars 72 forks source link

Allow multiline QuickCheck properties. #188

Open kindaro opened 6 years ago

kindaro commented 6 years ago

Steps to reproduce:

Create a property that spans multiple lines, like this:

-- prop> :{
--      \x -> x == x
-- :}

Expected:

The property will parse and execute correctly, passing the test.

Actual:

### Failure in ... : expression `:{'

<interactive>:106:21: error: parse error on input ‘:’

<interactive>:107:3: error:
    • ‘doctest_prop’ is not in scope at a reify
    • In the untyped splice: $(polyQuickCheck (mkName "doctest_prop"))
Examples: 8  Tried: 8  Errors: 0  Failures: 1
kindaro commented 6 years ago

This is actually a duplicate of #131. I'm sorry. But at least it shows that there's interest.