summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_compile/DumpSemis.hs
blob: 9f2f9629d8d26a742e43cdd7f91809811a0a235f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
module DumpSemis where

-- Make sure we get all the semicolons in statements
;;;;  ;;
import Data.List
; ; ;
import Data.Kind
   ; ;;
foo :: IO ()
foo = do
  do { ;;;; a }
  a
; ;;
bar :: IO ()
bar = do
  { ;  ;
    a ;;
    b
  }
 ; ;;  ;
baz :: IO ()
baz = do { ;; s ; s ; ; s ;; }
;
a = undefined
b = undefined
s = undefined
;
class LiftingMonad2  ((trans :: Type)) where
  proof :: trans -> Int
;
f :: ((Eq a, Ord a)) => a -> a
f x = x
;
     ;;x=let{;;;;;y=2;;z=3;;;;}in y;
;
fot x =
  case x of
   { ;;; -- leading
     0 -> 'a';  -- case 0
     1 -> 'b'   -- case 1
   ; 2 -> 'c' ; -- case 2
   ; 3 -> 'd'   -- case 3
          ;;;   -- case 4
   }
;