mirror of
https://github.com/haskell/ghcide.git
synced 2024-12-12 13:13:22 +03:00
4e8178dbcc
* Add tests for issue #237 * Tell hlint to ignore test sample code * Add test showing similar problem in listcomps * Identify implementation necessary for test to pass
35 lines
743 B
Haskell
35 lines
743 B
Haskell
{- HLINT ignore -}
|
|
module Testing ( module Testing )where
|
|
import Data.Text (Text, pack)
|
|
data TypeConstructor = DataConstructor
|
|
{ fff :: Text
|
|
, ggg :: Int }
|
|
aaa :: TypeConstructor
|
|
aaa = DataConstructor
|
|
{ fff = ""
|
|
, ggg = 0
|
|
}
|
|
bbb :: TypeConstructor
|
|
bbb = DataConstructor "" 0
|
|
ccc :: (Text, Int)
|
|
ccc = (fff bbb, ggg aaa)
|
|
ddd :: Num a => a -> a -> a
|
|
ddd vv ww = vv +! ww
|
|
a +! b = a - b
|
|
hhh (Just a) (><) = a >< a
|
|
iii a b = a `b` a
|
|
jjj s = pack $ s <> s
|
|
class Class a where
|
|
method :: a -> Int
|
|
instance Class Int where
|
|
method = succ
|
|
kkk :: Class a => Int -> a -> Int
|
|
kkk n c = n + method c
|
|
|
|
doBind :: Maybe ()
|
|
doBind = do unwrapped <- Just ()
|
|
return unwrapped
|
|
|
|
listCompBind :: [Char]
|
|
listCompBind = [ succ c | c <- "abc" ]
|