Skip to content

Setup doesn't work properly / parse error on input 'import' #167

@k-bx

Description

@k-bx

Hi. Not sure if I'm doing something wrong or not. I've created a very small repo where you can reproduce the error https://github.com/k-bx/docbug

The library code is as simple as:

module SomeLib where
-- $setup
-- let x = 1

import Data.Monoid

-- |
-- >>> add 1 1
-- 2
add :: Int -> Int -> Int
add x y = x + y

When I run stack test, I get:

$ stack test
docbug-0.1.0.0: test (suite: doctests)


src/SomeLib.hs:5:1: error: parse error on input ‘import’

Test suite failure for package docbug-0.1.0.0
    doctests:  exited with: ExitFailure 1
Logs printed to console

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions