ghcide/test/data/GotoHover.hs
Jacek Generowicz 4e8178dbcc Tests for issue #237 (#238)
* 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
2019-12-13 14:07:51 +01:00

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" ]