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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
{-# LANGUAGE ParallelListComp #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MagicHash, NoImplicitPrelude, TypeFamilies, UnboxedTuples #-}
module RdrNames where
import Data.Monoid
-- ---------------------------------------------------------------------
-- | 'type' qcname {% amms (mkTypeImpExp (sLL $1 $> (unLoc $2)))
-- [mj AnnType $1,mj AnnVal $2] }
-- Tested in DataFamilies.hs
-- ---------------------------------------------------------------------
-- | '(' qconsym ')' {% ams (sLL $1 $> (unLoc $2))
-- [mo $1,mj AnnVal $2,mc $3] }
ff = (RdrNames.:::) 0 1
-- ---------------------------------------------------------------------
-- | '(' consym ')' {% ams (sLL $1 $> (unLoc $2))
-- [mo $1,mj AnnVal $2,mc $3] }
data FF = ( ::: ) Int Int
-- ---------------------------------------------------------------------
-- | '`' conid '`' {% ams (sLL $1 $> (unLoc $2))
-- [mj AnnBackquote $1,mj AnnVal $2
-- ,mj AnnBackquote $3] }
data GG = GG Int Int
gg = 0 ` GG ` 1
-- ---------------------------------------------------------------------
-- | '`' varid '`' {% ams (sLL $1 $> (unLoc $2))
-- [mj AnnBackquote $1,mj AnnVal $2
-- ,mj AnnBackquote $3] }
vv = "a" ` mappend ` "b"
-- ---------------------------------------------------------------------
-- | '`' qvarid '`' {% ams (sLL $1 $> (unLoc $2))
-- [mj AnnBackquote $1,mj AnnVal $2
-- ,mj AnnBackquote $3] }
vvq = "a" ` Data.Monoid.mappend ` "b"
-- ---------------------------------------------------------------------
-- | '(' ')' {% ams (sLL $1 $> $ getRdrName unitTyCon)
-- [mo $1,mc $2] }
-- Tested in Vect.hs
-- ---------------------------------------------------------------------
-- | '(#' '#)' {% ams (sLL $1 $> $ getRdrName unboxedUnitTyCon)
-- [mo $1,mc $2] }
-- Tested in Vect.hs
-- ---------------------------------------------------------------------
-- | '(' commas ')' {% ams (sLL $1 $> $ getRdrName (tupleTyCon BoxedTuple
-- (snd $2 + 1)))
-- (mo $1:mc $3:(mcommas (fst $2))) }
ng :: (, , ,) Int Int Int Int
ng = undefined
-- ---------------------------------------------------------------------
-- | '(#' commas '#)' {% ams (sLL $1 $> $ getRdrName (tupleTyCon UnboxedTuple
-- (snd $2 + 1)))
-- (mo $1:mc $3:(mcommas (fst $2))) }
-- Tested in Unboxed.hs
-- ---------------------------------------------------------------------
-- | '(' '->' ')' {% ams (sLL $1 $> $ getRdrName funTyCon)
-- [mo $1,mj AnnRarrow $2,mc $3] }
ft :: (->) a b
ft = undefined
fp :: ( -> ) a b
fp = undefined
type family F a :: * -> * -> *
type instance F Int = (->)
type instance F Char = ( , )
-- ---------------------------------------------------------------------
-- | '[' ']' {% ams (sLL $1 $> $ listTyCon_RDR) [mo $1,mc $2] }
lt :: [] a
lt = undefined
-- ---------------------------------------------------------------------
-- ---------------------------------------------------------------------
-- | '(' '~#' ')' {% ams (sLL $1 $> $ getRdrName eqPrimTyCon)
-- [mo $1,mj AnnTildehsh $2,mc $3] }
-- primitive type?
-- Refl Int :: ~# * Int Int
-- Refl Maybe :: ~# (* -> *) Maybe Maybe
-- | A data constructor used to box up all unlifted equalities
--
-- The type constructor is special in that GHC pretends that it
-- has kind (? -> ? -> Fact) rather than (* -> * -> *)
data (~) a b = Eq# ((~#) a b)
data ( ~ ) a b = Eq# (( ~# ) a b)
data Coercible a b = MkCoercible ((~#) a b)
-- ---------------------------------------------------------------------
-- | '(' qtyconsym ')' {% ams (sLL $1 $> (unLoc $2))
-- [mo $1,mj AnnVal $2,mc $3] }
-- TBD
-- ---------------------------------------------------------------------
-- | '(' '~' ')' {% ams (sLL $1 $> $ eqTyCon_RDR)
-- [mo $1,mj AnnTilde $2,mc $3] }
-- ---------------------------------------------------------------------
-- tyvarop : '`' tyvarid '`' {% ams (sLL $1 $> (unLoc $2))
-- [mj AnnBackquote $1,mj AnnVal $2
-- ,mj AnnBackquote $3] }
-- ---------------------------------------------------------------------
{- From #haskell-emacs
gracjan> did you know that this is legal haskell:
<gracjan> (+ 1) ` fmap {- -} ` [1,2,3]
-}
xxx = (+ 1) ` fmap {- -} ` [1,2,3]
|