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
-----------------------------------------------------------------------------
-- |
-- Module : Language.C.Analysis
-- Copyright : (c) 2008 Benedikt Huber
-- License : BSD-style
-- Maintainer : benedikt.huber@gmail.com
-- Stability : alpha
-- Portability : ghc
--
-- Analysis of the AST.
--
-- Currently, we provide a monad for analysis and analyze declarations and types.
-- Especially note that there is no direct support for analyzing function bodies and
-- constant expressions.
--
-- /NOTE/ This is an experimental interface, and therefore the API will change in the
-- future.
--
-- DONE:
--
-- * Name analysis framework
--
-- * File-scope analysis
--
-- * Declaration analysis
--
-- TODO:
--
-- * Type checking expressions
--
-- * Constant expression evaluation (CEE)
--
-- * Typed representation of attributes (depends on CEE)
--
-- * Normalized representation of initializers
--
-- * Support for analyzing function bodies (depends on CEE)
--
-- * Normalizing expressions and statements
--
-- * Formal rules how to link back to the AST using NodeInfo fields
--
-- * Typed assembler representation
-----------------------------------------------------------------------------