Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

Commit

Permalink
adding test cases for elisp.
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Apr 23, 2014
1 parent 3ea9873 commit 1fdf8b2
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test-elisp/inp.hs
@@ -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 changes: 28 additions & 0 deletions test-elisp/out.hs
@@ -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))

0 comments on commit 1fdf8b2

Please sign in to comment.