1
1
mirror of https://github.com/github/semantic.git synced 2024-12-18 20:31:55 +03:00
semantic/test/fixtures/haskell/corpus/expressions.B.hs

51 lines
743 B
Haskell
Raw Normal View History

g = a b
g = a b c
g = a b c d
g = Just b
g = Right b
g = Example a c d
g = ()
2018-06-12 20:47:48 +03:00
a = [2..]
a = [2,3..]
a = [2..9]
a = [2,3..18]
b = [x | x <- xs]
b = [(x, y) | x <- xs, y <- ys]
b = [ x | xs <- [ [(10,20),(30,40)], [(50,40),(30,20)] ], (30,x) <- xs ]
2018-06-12 20:47:48 +03:00
b = [(i,j) | i <- [1,2,3,4],
j <- [1..10] ]
b = [ [ (i,j) | i <- [2,4] ] | j <- [5..] ]
b = take 7 [ [ (i,j) | i <- [1,2] ] | j <- [1..] ]
b = (: a)
b = (:< a)
b = (b :)
b = (b :|)
2018-06-13 00:19:18 +03:00
b = h `i` j
b = Data.Just
parseJSON (JSON.Object s) = IncPK <$>
s .: "id" <*>
s .: "nullable_string" <*>
s .: "non_nullable_string" <*>
s .: "inserted_at"
g = do
b <- d =<< e
c <- f >>= h
2018-06-13 00:50:38 +03:00
g = \ x -> x
g = \ (Just a) -> a
g = \ x -> x : a : xs
g = \ g a b -> g <$> a <*> b