mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-19 12:56:08 +00:00
added test that currently fails for locating things properly
This commit is contained in:
parent
35a6526af7
commit
6049811d61
8
Hspec.hs
8
Hspec.hs
@ -372,4 +372,12 @@ parseStringTests = describe "Parser" $ do
|
||||
Nothing
|
||||
Just 100))
|
||||
|] `is` Expression
|
||||
it "correctly locates parsed items" $ do
|
||||
let go = doGhc . parseString
|
||||
go [hereLit|
|
||||
first
|
||||
|
||||
second
|
||||
|] >>= (`shouldBe` [Located 1 (Expression "first"),
|
||||
Located 2 (Expression "second")])
|
||||
|
||||
|
@ -50,7 +50,7 @@ data CodeBlock
|
||||
deriving (Show, Eq)
|
||||
|
||||
-- | Store locations along with a value.
|
||||
data Located a = Located LineNumber a deriving Show
|
||||
data Located a = Located LineNumber a deriving (Eq, Show)
|
||||
|
||||
-- | Directive types. Each directive is associated with a string in the
|
||||
-- directive code block.
|
||||
|
Loading…
x
Reference in New Issue
Block a user