Transform ModuleString and Expression type synonyms into newtypes
This commit is contained in:
@@ -9,4 +9,4 @@ spec = do
|
||||
describe "db <- loadSymbolDb" $ do
|
||||
it "lookupSymbol' db \"head\" contains at least `Data.List'" $ do
|
||||
db <- runD loadSymbolDb
|
||||
lookupSym "head" db `shouldContain` ["Data.List"]
|
||||
lookupSym "head" db `shouldContain` [ModuleString "Data.List"]
|
||||
|
||||
@@ -34,17 +34,17 @@ spec = do
|
||||
describe "info" $ do
|
||||
it "works for non exported functions" $ do
|
||||
let tdir = "test/data/non-exported"
|
||||
res <- runD' tdir $ info "Fib.hs" "fib"
|
||||
res <- runD' tdir $ info "Fib.hs" $ Expression "fib"
|
||||
res `shouldSatisfy` ("fib :: Int -> Int" `isPrefixOf`)
|
||||
|
||||
it "works with a module using TemplateHaskell" $ do
|
||||
let tdir = "test/data/template-haskell"
|
||||
res <- runD' tdir $ info "Bar.hs" "foo"
|
||||
res <- runD' tdir $ info "Bar.hs" $ Expression "foo"
|
||||
res `shouldSatisfy` ("foo :: ExpQ" `isPrefixOf`)
|
||||
|
||||
it "works with a module that imports another module using TemplateHaskell" $ do
|
||||
let tdir = "test/data/template-haskell"
|
||||
res <- runD' tdir $ info "ImportsTH.hs" "bar"
|
||||
res <- runD' tdir $ info "ImportsTH.hs" $ Expression "bar"
|
||||
res `shouldSatisfy` ("bar :: [Char]" `isPrefixOf`)
|
||||
|
||||
getDistDir :: IO FilePath
|
||||
|
||||
Reference in New Issue
Block a user