#group expression/basic


#test var
func = x

describe "infix op" $ do
#test 1
func = x + x

#test long
func =
  mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj
    + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj

#test long keep linemode 1
func =
  mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj
    + mweroiuxlskdfjlksj
    + mweroiuxlskdfjlksj

#test long keep linemode 2
func =
  mweroiuxlskdfjlksj
    + mweroiuxlskdfjlksj
    + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj

#test literals
func = 1
func = "abc"
func = 1.1e5
func = 'x'
func = 981409823458910394810928414192837123987123987123

#test lambda
func = \x -> abc

describe "app" $ do
#test 1
func = klajsdas klajsdas klajsdas

#test 2
func = lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd
  lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd
  lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd

#test 3
func = lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd lakjsdlajsdljas
                                                     lakjsdlajsdljas
                                                     lakjsdlajsdljas

###
#group expression.basic.sections
###

#test left
func = (1 +)

#test right
func = (+ 1)

#test left inf
func = (1 `abc`)

#test right inf
func = (`abc` 1)

###
#group tuples
###

#test pair
func = (abc, def)

#test pair section left
func = (abc, )

#test pair section right
func = (, abc)

#test quintuple section long
myTupleSection =
  ( verylaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaargefirstelement
  ,
  , verylaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaargethirdelement
  ,
  )

#test 2
func =
  ( lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd
  , lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd
  )

#test comment-after-then
foo = if True
  then
      -- iiiiii
    "a                                                                         "
  else
    "b                                                                         "

#test comment-after-if-else-do
func = if cond
  then pure 42
  else do
    -- test
    abc

#test nonempty-case-short
func = case x of
  False -> False
  True  -> True

#test nonempty-case-long
func =
  case
      lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd
        lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd
    of
      False -> False
      True  -> True

#test nonempty-case-long-do
func = do
  case
      lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd
        lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd
    of
      False -> False
      True  -> True

#test empty-case-short
func = case x of {}

#test empty-case-long
func =
  case
      lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd
        lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd
    of {}

#test empty-case-long-do
func = do
  case
      lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd
        lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd
    of {}
