================================================================================
comment: line
================================================================================

--
-- a
--
-- a

--------------------------------------------------------------------------------

(haskell
  (comment))

================================================================================
comment: multi
================================================================================

{- a
   a
   - a
-}
f = a
{-a-}

--------------------------------------------------------------------------------

(haskell
  (comment)
  (declarations
    (bind
      (variable)
      (match
        (variable)))
    (comment)))

================================================================================
comment: hash inside
================================================================================

{- #comment -}

--------------------------------------------------------------------------------

(haskell
  (comment))

================================================================================
comment: newline termination
================================================================================

--

--------------------------------------------------------------------------------

(haskell
  (comment))

================================================================================
comment: nested
================================================================================

{- comment
{- nested
-}
}
a =

-}

a = a

--------------------------------------------------------------------------------

(haskell
  (comment)
  (declarations
    (bind
      (variable)
      (match
        (variable)))))

================================================================================
comment: unicode symbol
================================================================================

-- ∀

{- ∀ -}

--------------------------------------------------------------------------------

(haskell
  (comment)
  (comment))

================================================================================
comment: repeated minus before multiline end
================================================================================

module A where

{- --}

{-
a
-----}

--------------------------------------------------------------------------------

(haskell
  (header
    (module
      (module_id)))
  (comment)
  (comment))

================================================================================
comment: double brace before nested begin
================================================================================

module A where

{- {{- -} -}

--------------------------------------------------------------------------------

(haskell
  (header
    (module
      (module_id)))
  (comment))

================================================================================
comment: terminated by eof
================================================================================

a = a

{-

a

aaa

--------------------------------------------------------------------------------

(haskell
  (declarations
    (bind
      (variable)
      (match
        (variable)))
    (comment)))

================================================================================
comment: end of line
================================================================================

a = a -- a

--------------------------------------------------------------------------------

(haskell
  (declarations
    (bind
      (variable)
      (match
        (variable)))
    (comment)))

================================================================================
comment: escaped heralds
================================================================================

{-
{\-
-\}
-}

--------------------------------------------------------------------------------

(haskell
  (comment))

================================================================================
comment: multiple braces
================================================================================

{-
{{{{{
}}}}}
-}

--------------------------------------------------------------------------------

(haskell
  (comment))

================================================================================
comment: symop char after first space
================================================================================

a = a -- > a

a = a
  -- > a

--------------------------------------------------------------------------------

(haskell
  (declarations
    (bind
      (variable)
      (match
        (variable)))
    (comment)
    (bind
      (variable)
      (match
        (variable)))
    (comment)))

================================================================================
comment: haddock
================================================================================

data A =
  A
  A -- ^ a
  A {- ^ a -}

-- | a
-- a
a = a

{- | a
-}
data A

--------------------------------------------------------------------------------

(haskell
  (declarations
    (data_type
      (name)
      (data_constructors
        (data_constructor
          (prefix
            (constructor)
            (name)
            (haddock)
            (name)))))
    (haddock)
    (haddock)
    (bind
      (variable)
      (match
        (variable)))
    (haddock)
    (data_type
      (name))))
