ghc-mod browse should take care of sandboxes

This commit is contained in:
Kohei Suzuki
2013-09-27 12:25:41 +09:00
parent 67166a4d75
commit 136e09e704
3 changed files with 14 additions and 8 deletions

View File

@@ -8,14 +8,17 @@ spec :: Spec
spec = do
describe "browseModule" $ do
it "lists up symbols in the module" $ do
syms <- lines <$> browseModule defaultOptions "Data.Map"
cradle <- findCradle
syms <- lines <$> browseModule defaultOptions cradle "Data.Map"
syms `shouldContain` ["differenceWithKey"]
describe "browseModule -d" $ do
it "lists up symbols with type info in the module" $ do
syms <- lines <$> browseModule defaultOptions { detailed = True } "Data.Either"
cradle <- findCradle
syms <- lines <$> browseModule defaultOptions { detailed = True } cradle "Data.Either"
syms `shouldContain` ["either :: (a -> c) -> (b -> c) -> Either a b -> c"]
it "lists up data constructors with type info in the module" $ do
syms <- lines <$> browseModule defaultOptions { detailed = True} "Data.Either"
cradle <- findCradle
syms <- lines <$> browseModule defaultOptions { detailed = True} cradle "Data.Either"
syms `shouldContain` ["Left :: a -> Either a b"]