Bring test suite up to date
This commit is contained in:
6
test/data/annotations/With.hs
Normal file
6
test/data/annotations/With.hs
Normal file
@@ -0,0 +1,6 @@
|
||||
module Main where
|
||||
|
||||
{-# ANN module ["this", "can", "be", "anything"] #-}
|
||||
|
||||
main :: IO ()
|
||||
main = putStrLn "Hello world!"
|
||||
@@ -0,0 +1,4 @@
|
||||
name: Cabal
|
||||
version: 1.18.1.3
|
||||
id: Cabal-1.18.1.3-2b161c6bf77657aa17e1681d83cb051b
|
||||
exposed: True
|
||||
BIN
test/data/cabal-project/.cabal-sandbox/packages/00-index.tar
Normal file
BIN
test/data/cabal-project/.cabal-sandbox/packages/00-index.tar
Normal file
Binary file not shown.
5
test/data/cabal-project/Baz.hs
Normal file
5
test/data/cabal-project/Baz.hs
Normal file
@@ -0,0 +1,5 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
module Baz (baz) where
|
||||
import Foo (fooQ)
|
||||
|
||||
baz = [fooQ| foo bar baz |]
|
||||
9
test/data/cabal-project/Foo.hs
Normal file
9
test/data/cabal-project/Foo.hs
Normal file
@@ -0,0 +1,9 @@
|
||||
module Foo (foo, fooQ) where
|
||||
import Language.Haskell.TH
|
||||
import Language.Haskell.TH.Quote (QuasiQuoter(..))
|
||||
|
||||
foo :: ExpQ
|
||||
foo = stringE "foo"
|
||||
|
||||
fooQ :: QuasiQuoter
|
||||
fooQ = QuasiQuoter (litE . stringL) undefined undefined undefined
|
||||
8
test/data/cabal-project/Info.hs
Normal file
8
test/data/cabal-project/Info.hs
Normal file
@@ -0,0 +1,8 @@
|
||||
{-# LANGUAGE TemplateHaskell #-} -- for HscInterpreted
|
||||
|
||||
module Info () where
|
||||
|
||||
fib :: Int -> Int
|
||||
fib 0 = 0
|
||||
fib 1 = 1
|
||||
fib n = fib (n - 1) + fib (n - 2)
|
||||
3
test/data/cabal-project/Main.hs
Normal file
3
test/data/cabal-project/Main.hs
Normal file
@@ -0,0 +1,3 @@
|
||||
import Bar (bar)
|
||||
|
||||
main = putStrLn bar
|
||||
25
test/data/cabal-project/cabal.sandbox.config.in
Normal file
25
test/data/cabal-project/cabal.sandbox.config.in
Normal file
@@ -0,0 +1,25 @@
|
||||
-- This is a Cabal package environment file.
|
||||
-- THIS FILE IS AUTO-GENERATED. DO NOT EDIT DIRECTLY.
|
||||
-- Please create a 'cabal.config' file in the same directory
|
||||
-- if you want to change the default settings for this sandbox.
|
||||
|
||||
|
||||
local-repo: @CWD@/test/data/cabal-project/.cabal-sandbox/packages
|
||||
logs-dir: @CWD@/test/data/cabal-project/.cabal-sandbox/logs
|
||||
world-file: @CWD@/test/data/cabal-project/.cabal-sandbox/world
|
||||
user-install: False
|
||||
package-db: @CWD@/test/data/cabal-project/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d
|
||||
build-summary: @CWD@/test/data/cabal-project/.cabal-sandbox/logs/build.log
|
||||
|
||||
install-dirs
|
||||
prefix: @CWD@/test/data/cabal-project/.cabal-sandbox
|
||||
bindir: $prefix/bin
|
||||
libdir: $prefix/lib
|
||||
libsubdir: $arch-$os-$compiler/$pkgid
|
||||
libexecdir: $prefix/libexec
|
||||
datadir: $prefix/share
|
||||
datasubdir: $arch-$os-$compiler/$pkgid
|
||||
docdir: $datadir/doc/$arch-$os-$compiler/$pkgid
|
||||
htmldir: $docdir/html
|
||||
haddockdir: $htmldir
|
||||
sysconfdir: $prefix/etc
|
||||
67
test/data/cabal-project/cabalapi.cabal
Normal file
67
test/data/cabal-project/cabalapi.cabal
Normal file
@@ -0,0 +1,67 @@
|
||||
Name: ghc-mod
|
||||
Version: 1.11.3
|
||||
Author: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
Maintainer: Kazu Yamamoto <kazu@iij.ad.jp>
|
||||
License: BSD3
|
||||
License-File: LICENSE
|
||||
Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
|
||||
Synopsis: Happy Haskell programming on Emacs/Vim
|
||||
Description: This packages includes Elisp files
|
||||
and a Haskell command, "ghc-mod".
|
||||
"ghc*.el" enable completion of
|
||||
Haskell symbols on Emacs.
|
||||
Flymake is also integrated.
|
||||
"ghc-mod" is a backend of "ghc*.el".
|
||||
It lists up all installed modules
|
||||
or extracts names of functions, classes,
|
||||
and data declarations.
|
||||
To use "ghc-mod" on Vim,
|
||||
see <https://github.com/eagletmt/ghcmod-vim> or
|
||||
<https://github.com/scrooloose/syntastic>
|
||||
Category: Development
|
||||
Cabal-Version: >= 1.6
|
||||
Build-Type: Simple
|
||||
Data-Dir: elisp
|
||||
Data-Files: Makefile ghc.el ghc-func.el ghc-doc.el ghc-comp.el
|
||||
ghc-flymake.el ghc-command.el ghc-info.el
|
||||
ghc-ins-mod.el ghc-indent.el
|
||||
Executable ghc-mod
|
||||
Main-Is: GHCMod.hs
|
||||
Other-Modules: Browse
|
||||
CabalApi
|
||||
Cabal
|
||||
CabalDev
|
||||
Check
|
||||
ErrMsg
|
||||
Flag
|
||||
GHCApi
|
||||
GHCChoice
|
||||
Gap
|
||||
Info
|
||||
Lang
|
||||
Lint
|
||||
List
|
||||
Paths_ghc_mod
|
||||
Types
|
||||
GHC-Options: -Wall
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, Cabal >= 1.10
|
||||
, template-haskell
|
||||
|
||||
Test-Suite spec
|
||||
Main-Is: Spec.hs
|
||||
Hs-Source-Dirs: test, .
|
||||
Type: exitcode-stdio-1.0
|
||||
Other-Modules: Expectation
|
||||
BrowseSpec
|
||||
CabalApiSpec
|
||||
FlagSpec
|
||||
LangSpec
|
||||
LintSpec
|
||||
ListSpec
|
||||
Build-Depends: base >= 4.0 && < 5
|
||||
, Cabal >= 1.10
|
||||
|
||||
Source-Repository head
|
||||
Type: git
|
||||
Location: git://github.com/kazu-yamamoto/ghc-mod.git
|
||||
1
test/data/cabal-project/subdir1/subdir2/dummy
Normal file
1
test/data/cabal-project/subdir1/subdir2/dummy
Normal file
@@ -0,0 +1 @@
|
||||
dummy
|
||||
10
test/data/foreign-export/ForeignExport.hs
Normal file
10
test/data/foreign-export/ForeignExport.hs
Normal file
@@ -0,0 +1,10 @@
|
||||
{-# LANGUAGE ForeignFunctionInterface #-}
|
||||
|
||||
module ForeignExport where
|
||||
|
||||
import Foreign.C.Types
|
||||
|
||||
foreign export ccall foo :: CUInt
|
||||
|
||||
foo :: CUInt
|
||||
foo = 123
|
||||
11
test/data/ghc-mod-check/lib/Data/Foo.hs
Normal file
11
test/data/ghc-mod-check/lib/Data/Foo.hs
Normal file
@@ -0,0 +1,11 @@
|
||||
module Data.Foo where
|
||||
|
||||
foo :: Int
|
||||
foo = undefined
|
||||
|
||||
fibonacci :: Int -> Integer
|
||||
fibonacci n = fib 1 0 1
|
||||
where
|
||||
fib m x y
|
||||
| n == m = y
|
||||
| otherwise = fib (m+1) y (x + y)
|
||||
5
test/data/hlint/hlint.hs
Normal file
5
test/data/hlint/hlint.hs
Normal file
@@ -0,0 +1,5 @@
|
||||
module Hlist where
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
putStrLn "Hello, world!"
|
||||
4
test/data/home-module-graph/cpp/A.hs
Normal file
4
test/data/home-module-graph/cpp/A.hs
Normal file
@@ -0,0 +1,4 @@
|
||||
module A where
|
||||
import A1
|
||||
import A2
|
||||
import A3
|
||||
4
test/data/home-module-graph/cpp/A1.hs
Normal file
4
test/data/home-module-graph/cpp/A1.hs
Normal file
@@ -0,0 +1,4 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
module A1 where
|
||||
#elif
|
||||
import B
|
||||
1
test/data/home-module-graph/cpp/A2.hs
Normal file
1
test/data/home-module-graph/cpp/A2.hs
Normal file
@@ -0,0 +1 @@
|
||||
module A2 where
|
||||
2
test/data/home-module-graph/cpp/A3.hs
Normal file
2
test/data/home-module-graph/cpp/A3.hs
Normal file
@@ -0,0 +1,2 @@
|
||||
module A3 where
|
||||
import B
|
||||
1
test/data/home-module-graph/cpp/B.hs
Normal file
1
test/data/home-module-graph/cpp/B.hs
Normal file
@@ -0,0 +1 @@
|
||||
module B where
|
||||
2
test/data/home-module-graph/cycle/A.hs
Normal file
2
test/data/home-module-graph/cycle/A.hs
Normal file
@@ -0,0 +1,2 @@
|
||||
module A where
|
||||
import B
|
||||
2
test/data/home-module-graph/cycle/B.hs
Normal file
2
test/data/home-module-graph/cycle/B.hs
Normal file
@@ -0,0 +1,2 @@
|
||||
module B where
|
||||
import A
|
||||
4
test/data/home-module-graph/errors/A.hs
Normal file
4
test/data/home-module-graph/errors/A.hs
Normal file
@@ -0,0 +1,4 @@
|
||||
module A where
|
||||
import A1
|
||||
import A2
|
||||
import A3
|
||||
4
test/data/home-module-graph/errors/A1.hs
Normal file
4
test/data/home-module-graph/errors/A1.hs
Normal file
@@ -0,0 +1,4 @@
|
||||
module A1 where
|
||||
psogduapzsü9
|
||||
import B
|
||||
lxäö,vLMCks
|
||||
1
test/data/home-module-graph/errors/A2.hs
Normal file
1
test/data/home-module-graph/errors/A2.hs
Normal file
@@ -0,0 +1 @@
|
||||
module A2 where
|
||||
2
test/data/home-module-graph/errors/A3.hs
Normal file
2
test/data/home-module-graph/errors/A3.hs
Normal file
@@ -0,0 +1,2 @@
|
||||
module A3 where
|
||||
import B
|
||||
1
test/data/home-module-graph/errors/B.hs
Normal file
1
test/data/home-module-graph/errors/B.hs
Normal file
@@ -0,0 +1 @@
|
||||
module B where
|
||||
4
test/data/home-module-graph/indirect-update/A.hs
Normal file
4
test/data/home-module-graph/indirect-update/A.hs
Normal file
@@ -0,0 +1,4 @@
|
||||
module A where
|
||||
import A1
|
||||
import A2
|
||||
import A3
|
||||
2
test/data/home-module-graph/indirect-update/A1.hs
Normal file
2
test/data/home-module-graph/indirect-update/A1.hs
Normal file
@@ -0,0 +1,2 @@
|
||||
module A1 where
|
||||
import B
|
||||
1
test/data/home-module-graph/indirect-update/A2.hs
Normal file
1
test/data/home-module-graph/indirect-update/A2.hs
Normal file
@@ -0,0 +1 @@
|
||||
module A2 where
|
||||
2
test/data/home-module-graph/indirect-update/A3.hs
Normal file
2
test/data/home-module-graph/indirect-update/A3.hs
Normal file
@@ -0,0 +1,2 @@
|
||||
module A3 where
|
||||
import B
|
||||
1
test/data/home-module-graph/indirect-update/B.hs
Normal file
1
test/data/home-module-graph/indirect-update/B.hs
Normal file
@@ -0,0 +1 @@
|
||||
module B where
|
||||
1
test/data/home-module-graph/indirect-update/C.hs
Normal file
1
test/data/home-module-graph/indirect-update/C.hs
Normal file
@@ -0,0 +1 @@
|
||||
module C where
|
||||
4
test/data/home-module-graph/indirect/A.hs
Normal file
4
test/data/home-module-graph/indirect/A.hs
Normal file
@@ -0,0 +1,4 @@
|
||||
module A where
|
||||
import A1
|
||||
import A2
|
||||
import A3
|
||||
2
test/data/home-module-graph/indirect/A1.hs
Normal file
2
test/data/home-module-graph/indirect/A1.hs
Normal file
@@ -0,0 +1,2 @@
|
||||
module A1 where
|
||||
import B
|
||||
2
test/data/home-module-graph/indirect/A2.hs
Normal file
2
test/data/home-module-graph/indirect/A2.hs
Normal file
@@ -0,0 +1,2 @@
|
||||
module A2 where
|
||||
import C
|
||||
2
test/data/home-module-graph/indirect/A3.hs
Normal file
2
test/data/home-module-graph/indirect/A3.hs
Normal file
@@ -0,0 +1,2 @@
|
||||
module A3 where
|
||||
import B
|
||||
1
test/data/home-module-graph/indirect/B.hs
Normal file
1
test/data/home-module-graph/indirect/B.hs
Normal file
@@ -0,0 +1 @@
|
||||
module B where
|
||||
1
test/data/home-module-graph/indirect/C.hs
Normal file
1
test/data/home-module-graph/indirect/C.hs
Normal file
@@ -0,0 +1 @@
|
||||
module C where
|
||||
5
test/data/import-cycle/Mutual1.hs
Normal file
5
test/data/import-cycle/Mutual1.hs
Normal file
@@ -0,0 +1,5 @@
|
||||
{-# LANGUAGE TemplateHaskell #-} -- for HscInterpreted
|
||||
|
||||
module Mutual1 where
|
||||
|
||||
import Mutual2
|
||||
3
test/data/import-cycle/Mutual2.hs
Normal file
3
test/data/import-cycle/Mutual2.hs
Normal file
@@ -0,0 +1,3 @@
|
||||
module Mutual2 where
|
||||
|
||||
import Mutual1
|
||||
8
test/data/non-exported/Fib.hs
Normal file
8
test/data/non-exported/Fib.hs
Normal file
@@ -0,0 +1,8 @@
|
||||
{-# LANGUAGE TemplateHaskell #-} -- for HscInterpreted
|
||||
|
||||
module Fib () where
|
||||
|
||||
fib :: Int -> Int
|
||||
fib 0 = 0
|
||||
fib 1 = 1
|
||||
fib n = fib (n - 1) + fib (n - 2)
|
||||
6
test/data/quasi-quotes/FooQ.hs
Normal file
6
test/data/quasi-quotes/FooQ.hs
Normal file
@@ -0,0 +1,6 @@
|
||||
module FooQ (fooQ) where
|
||||
import Language.Haskell.TH
|
||||
import Language.Haskell.TH.Quote (QuasiQuoter(..))
|
||||
|
||||
fooQ :: QuasiQuoter
|
||||
fooQ = QuasiQuoter (litE . stringL) undefined undefined undefined
|
||||
6
test/data/quasi-quotes/QuasiQuotes.hs
Normal file
6
test/data/quasi-quotes/QuasiQuotes.hs
Normal file
@@ -0,0 +1,6 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
module QuasiQuotes where
|
||||
|
||||
import FooQ
|
||||
|
||||
bar = [fooQ| foo bar baz |]
|
||||
5
test/data/template-haskell/Bar.hs
Normal file
5
test/data/template-haskell/Bar.hs
Normal file
@@ -0,0 +1,5 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
module Bar (bar) where
|
||||
import Foo (foo)
|
||||
|
||||
bar = $foo ++ "bar"
|
||||
9
test/data/template-haskell/Foo.hs
Normal file
9
test/data/template-haskell/Foo.hs
Normal file
@@ -0,0 +1,9 @@
|
||||
module Foo (foo, fooQ) where
|
||||
import Language.Haskell.TH
|
||||
import Language.Haskell.TH.Quote (QuasiQuoter(..))
|
||||
|
||||
foo :: ExpQ
|
||||
foo = stringE "foo"
|
||||
|
||||
fooQ :: QuasiQuoter
|
||||
fooQ = QuasiQuoter (litE . stringL) undefined undefined undefined
|
||||
3
test/data/template-haskell/ImportsTH.hs
Normal file
3
test/data/template-haskell/ImportsTH.hs
Normal file
@@ -0,0 +1,3 @@
|
||||
import Bar (bar)
|
||||
|
||||
main = putStrLn bar
|
||||
Reference in New Issue
Block a user