projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use family and instance keyword to identify indexed types
[ghc-hetmet.git]
/
compiler
/
parser
/
Lexer.x
diff --git
a/compiler/parser/Lexer.x
b/compiler/parser/Lexer.x
index
8ef2071
..
fdbaeef
100644
(file)
--- a/
compiler/parser/Lexer.x
+++ b/
compiler/parser/Lexer.x
@@
-376,6
+376,8
@@
data Token
| ITccallconv
| ITdotnet
| ITmdo
| ITccallconv
| ITdotnet
| ITmdo
+ | ITiso
+ | ITfamily
-- Pragmas
| ITinline_prag Bool -- True <=> INLINE, False <=> NOINLINE
-- Pragmas
| ITinline_prag Bool -- True <=> INLINE, False <=> NOINLINE
@@
-499,6
+501,8
@@
isSpecial ITunsafe = True
isSpecial ITccallconv = True
isSpecial ITstdcallconv = True
isSpecial ITmdo = True
isSpecial ITccallconv = True
isSpecial ITstdcallconv = True
isSpecial ITmdo = True
+isSpecial ITiso = True
+isSpecial ITfamily = True
isSpecial _ = False
-- the bitmap provided as the third component indicates whether the
isSpecial _ = False
-- the bitmap provided as the third component indicates whether the
@@
-539,6
+543,8
@@
reservedWordsFM = listToUFM $
( "forall", ITforall, bit tvBit),
( "mdo", ITmdo, bit glaExtsBit),
( "forall", ITforall, bit tvBit),
( "mdo", ITmdo, bit glaExtsBit),
+ ( "iso", ITiso, bit glaExtsBit),
+ ( "family", ITfamily, bit glaExtsBit),
( "foreign", ITforeign, bit ffiBit),
( "export", ITexport, bit ffiBit),
( "foreign", ITforeign, bit ffiBit),
( "export", ITexport, bit ffiBit),
@@
-588,6
+594,9
@@
reservedSymsFM = listToUFM $
,("→", ITrarrow, bit glaExtsBit)
,("←", ITlarrow, bit glaExtsBit)
,("⋯", ITdotdot, bit glaExtsBit)
,("→", ITrarrow, bit glaExtsBit)
,("←", ITlarrow, bit glaExtsBit)
,("⋯", ITdotdot, bit glaExtsBit)
+ -- ToDo: ideally, → and ∷ should be "specials", so that they cannot
+ -- form part of a large operator. This would let us have a better
+ -- syntax for kinds: ɑ∷*→* would be a legal kind signature. (maybe).
#endif
]
#endif
]