summaryrefslogtreecommitdiff
path: root/tests/examplefiles/example.hs
blob: 764cab7750033ce1e71ec35b437e2e6bc315aaf3 (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
module ĈrazyThings where

import "base" Data.Char
import "base" Data.Char (isControl, isSpace)
import "base" Data.Char (isControl, --isSpace)
 isSpace)
import "base" Data.Char (isControl, -- isSpace)
 isSpace)

(-->) :: Num a => a -- signature
(-->) = 2 -- >implementation

--test comment
-- test comment

main :: IO ()
main = putStrLn "hello world"

gádd x y = x + y
ádd x y = x + y


data ĈrazyThings =
  Ĉar |
  House |
  Peár
    deriving (Show, Eq)

-- some char literals:

charl = ['"', 'a', '\ESC', '\'', ' ']

-- closed type families
type family Fam (a :: Type) = r :: Type where
  Fam Int = True
  Fam a = False

-- type literals
type IntChar = '[Int, Char]
type Falsy = 'False
type Falsy = '(10, 20, 30)