blob: 0d0394eb39b2393e3f2183c82c920dbfe6439008 (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
Is import:
import Data.Maybe: True
import qualified Data.Maybe: True
import Data.Maybe (isJust): True
add a b = a+b: False
data Foo = Foo String: False
deriving instance Show Foo: False
{-# WARNING Foo "Just a warning" #-}: False
{-# ANN foo (Just "Hello") #-}: False
{-# RULES "map/map" forall f g xs. map f (map g xs) = map (f.g) xs #-}: False
class HasString a where
update :: a -> (String -> String) -> a
upcase :: a -> a
upcase x = update x (fmap toUpper)
content :: a -> String
default content :: Show a => a -> String
content = show: False
instance HasString Foo where
update (Foo s) f = Foo (f s)
content (Foo s) = s: False
add a b: False
let foo = add a b: False
x <- foo y: False
5 + 8: False
a <-: False
2 +: False
@#: False
Is declaration:
import Data.Maybe: False
import qualified Data.Maybe: False
import Data.Maybe (isJust): False
add a b = a+b: True
data Foo = Foo String: True
deriving instance Show Foo: True
{-# WARNING Foo "Just a warning" #-}: True
{-# ANN foo (Just "Hello") #-}: True
{-# RULES "map/map" forall f g xs. map f (map g xs) = map (f.g) xs #-}: True
class HasString a where
update :: a -> (String -> String) -> a
upcase :: a -> a
upcase x = update x (fmap toUpper)
content :: a -> String
default content :: Show a => a -> String
content = show: True
instance HasString Foo where
update (Foo s) f = Foo (f s)
content (Foo s) = s: True
add a b: False
let foo = add a b: False
x <- foo y: False
5 + 8: False
a <-: False
2 +: False
@#: False
Is statement:
import Data.Maybe: False
import qualified Data.Maybe: False
import Data.Maybe (isJust): False
add a b = a+b: False
data Foo = Foo String: False
deriving instance Show Foo: False
{-# WARNING Foo "Just a warning" #-}: False
{-# ANN foo (Just "Hello") #-}: False
{-# RULES "map/map" forall f g xs. map f (map g xs) = map (f.g) xs #-}: False
class HasString a where
update :: a -> (String -> String) -> a
upcase :: a -> a
upcase x = update x (fmap toUpper)
content :: a -> String
default content :: Show a => a -> String
content = show: False
instance HasString Foo where
update (Foo s) f = Foo (f s)
content (Foo s) = s: False
add a b: True
let foo = add a b: True
x <- foo y: True
5 + 8: True
a <-: False
2 +: False
@#: False
|