adding test cases for elisp.
This commit is contained in:
parent
3ea98737b1
commit
1fdf8b2cc1
21
test-elisp/inp.hs
Normal file
21
test-elisp/inp.hs
Normal file
@ -0,0 +1,21 @@
|
||||
module Main where
|
||||
|
||||
test1 :: Int
|
||||
|
||||
test2 :: a -> a -> Complex a
|
||||
test2 = (:+)
|
||||
|
||||
test25 :: NFData a => a
|
||||
test25 = undefined
|
||||
|
||||
test3 :: (b -> b -> c) -> (a -> b) -> a -> a -> c
|
||||
test3 = on
|
||||
|
||||
test4 = putStrLn "Bar"
|
||||
|
||||
test5 :: [t] -> ()
|
||||
test5 (_:_) = ()
|
||||
|
||||
-- hlint
|
||||
test6 :: [Integer] -> [Integer]
|
||||
test6 = map (+ 1) . map (* 2)
|
28
test-elisp/out.hs
Normal file
28
test-elisp/out.hs
Normal file
@ -0,0 +1,28 @@
|
||||
module Main where
|
||||
|
||||
import Control.DeepSeq (NFData)
|
||||
import Data.Complex (Complex((:+)))
|
||||
import Data.Function (on)
|
||||
|
||||
test1 :: Int
|
||||
test1 = undefined
|
||||
|
||||
test2 :: a -> a -> Complex a
|
||||
test2 = (:+)
|
||||
|
||||
test25 :: NFData a => a
|
||||
test25 = undefined
|
||||
|
||||
test3 :: (b -> b -> c) -> (a -> b) -> a -> a -> c
|
||||
test3 = on
|
||||
|
||||
test4 :: IO ()
|
||||
test4 = putStrLn "Bar"
|
||||
|
||||
test5 :: [t] -> ()
|
||||
test5 (_:_) = ()
|
||||
test5 _ = error "test5"
|
||||
|
||||
-- hlint
|
||||
test6 :: [Integer] -> [Integer]
|
||||
test6 = map ((+ 1) . (* 2))
|
Loading…
Reference in New Issue
Block a user