Skip to content

Commit 6f0847d

Browse files
Merge pull request #4536 from JacquesCarette/wiki-gool-gproc
Updated GOOL-GProc overview
2 parents 43ee982 + c584cac commit 6f0847d

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

wiki/GOOL-GProc Overview.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
## File Structure
22
- `drasil-gool` exposes two modules: `GOOL.hs` and `GProc.hs`. `GOOL.hs` exports everything that is strictly OO as well as everything that is common between OO and procedural. Likewise, `GProc.hs` exports everything that is strictly procedural as well as everything that is common between OO and procedural.
3-
- `Drasil/GOOl` currently contains everything GOOL/GProc related. This may change as our restructuring continues, but is the current way things are.
3+
- `drasil-gool/lib/Drasil` is split into three folders to reflect its contents:
4+
- `/Shared/` contains the "imperative core" shared by GOOL and GProc.
5+
- `/GOOL` contains the OO-only code used exclusively by GOOL.
6+
- `/GProc/` contains the procedural-only code used exclusively by GProc.
7+
- Because each of the above folders contains the same types of files, it is esiest to talk about them together:
48
- `InterfaceCommon.hs`, `InterfaceGOOL.hs`, and `InterfaceProc.hs` define the main external interface, essentially the 'syntax' of GOOL/GProc. This consists of a bunch of typeclasses as well as some smart constructors. The typeclasses for each file are wrapped up in the `SharedProg`, `OOProg`, and `ProcProg` typeclasses, respectively.
59
- `RendererClassesCommon.hs`, `RendererClassesOO.hs`, and `RendererClassesProc.hs` define an internal interface for rendering `Doc`s. The typeclasses of each file are wrapped up in `CommonRenderSym`, `OORenderSym`, and `ProcRenderSym`, respectively.
610
- `CodeInfoOO.hs` and `CodeInfoProc.hs` are preprocessors which give the actual language renderers some extra information. They implement `OOProg` and `ProcProg` respectively, but not `OORenderSym` or `ProcRenderSym`.
@@ -10,10 +14,10 @@
1014
- `AST.hs` defines what information is kept about various GOOL/GProc constructs. Examples include the type of a value and the name of a variable. This is helpful for when you are given a value and need to know something about it.
1115
- `State.hs` gives the `GOOLState`, which keeps track of everything that needs to be kept track of in GOOL/GProc. For example. the AST needs to be kept in the `GOOLState` so that we can get information back out of GOOL/GProc constructs later.
1216
- There are a few others that you might come across, but these are the main ones.
13-
- `Drasil/GOOL/LanguageRenderer` contains the language renderers, as well as modules containing function implementations that are common between multiple renderers.
14-
- `LanguagePolymorphic.hs` contains function implementations that are shared between all renderers.
15-
- `CLike.hs` contains function implementations for features that follow the 'classic C-like' structure.
16-
- `CommonPseudoOO.hs` contains function implementations where not all languages use that implementation, but there's no other pattern between them.
17-
- `AbstractProc.hs` contains function implementations that are only used by procedural languages.
18-
- `Macros.hs` gives implementations for functions that are just syntactic sugar - e.g. in Java, C#, and C++, a `listSlice` translates to a `for`-loop.
19-
- `Constructors.hs` gives more technical helper functions that have to do with creating values.
17+
- `Drasil/GOOL/LanguageRenderer` contains the language renderers, as well as modules containing function implementations that are common between multiple renderers.
18+
- `LanguagePolymorphic.hs` contains function implementations that are shared between all renderers.
19+
- `CLike.hs` contains function implementations for features that follow the 'classic C-like' structure.
20+
- `CommonPseudoOO.hs` contains function implementations where not all languages use that implementation, but there's no other pattern between them.
21+
- `AbstractProc.hs` contains function implementations that are only used by procedural languages.
22+
- `Macros.hs` gives implementations for functions that are just syntactic sugar - e.g. in Java, C#, and C++, a `listSlice` translates to a `for`-loop.
23+
- `Constructors.hs` gives more technical helper functions that have to do with creating values.

0 commit comments

Comments
 (0)