File: LetExprSemi.hs

package info (click to toggle)
haskell-ghc-exactprint 1.7.1.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,044 kB
  • sloc: haskell: 32,076; makefile: 7
file content (64 lines) | stat: -rw-r--r-- 1,441 bytes parent folder | download | duplicates (3)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{-# LANGUAGE PatternSynonyms #-}
{-# Language DeriveFoldable #-}
{-# LANGUAGE Safe #-}
{-# options_ghc -w #-}

-- | A simple let expression, to ensure the layout is detected
-- With some haddock in the top
{- And a normal
   multiline comment too -}
  module {- brah -}  LetExprSemi    ( foo -- foo does ..
                                    , bar -- bar does ..
                                    , Baz () -- baz does ..
                                 , Ba   ( ..),Ca(Cc,Cd)   ,
                                     bbb ,  aaa
                                  , module  Data.List
                                    , pattern  Bar
                                    )
    where
{
import Data.List
-- A comment in the middle
; import {-# SOURCE #-} BootImport ( Foo(..) ) ;
import {-# SOURCE  #-} safe   qualified  BootImport   as    BI
;;; import qualified Data.Map as {- blah -}  Foo.Map;

import Control.Monad  (   )  ;
import Data.Word (Word8);
import Data.Tree hiding  (  drawTree   ) ;

  ; import qualified Data.Maybe as M hiding    ( maybe  , isJust  )
;

-- comment
foo = let x = 1
          y = 2
      in x + y
;
bar = 3;
bbb x
 | x == 1 = ()
 | otherwise = ()

;
aaa [] _    = 0;
aaa x  _unk = 1
;
x `ccc` 1 = x + 1;
x `ccc` y = x + y
;
x !@# y = x + y
;
data Baz = Baz1 | Baz2
;
data Ba = Ba | Bb
;
data Ca = Cc | Cd
;
pattern Foo a <- RealFoo a ;
pattern Bar a <- RealBar a
;
data Thing = RealFoo Thing | RealBar Int
}