<commit_before>TODO
====

Reflect-Imports
---------------

The crux is the `[(ModName, BareSpec)]` that is passed into `makeRTEnv`

* type BareSpec      = Spec (Located BareType) LocSymbol

* How is it CREATED?
  - `Interface.processModule` calls `hsSpecificationP` to scrape BareSpec from file.

```haskell
processModule = do
  ...
  (modName, bareSpec) <- either throw return $ hsSpecificationP (moduleName mod) specComments specQuotes
  let specEnv'         = extendModuleEnv specEnv mod (modName, noTerm bareSpec)
```

* How shall we SAVE it so the next MODULE can get it?

* Does it include THIS module? (yes?)

toGhcSpec --> makeGhcSpec

Interface.hs

* toGhcSpec ... tgtSpec ... impSpecs


need to pull

1. `makeHaskellInlines`
2. `makeHaskellMeasures`
3. `makeHaskellBounds`

HEREHEREHEREHEREHERE `CHOP2`

1. rewrite `makeMeasureDefinition` (and makeHaskellMeasures) so it returns a
   `Measure (Located BareType) LocSymbol` (or whatever is in BareSpec in
   the `measures` field)

2. tuck that result into the measures field of `mySpec` which is `mappend`-ed

3. then the plan `makeMeasureSpec` should take care of the rest.

   i.e. don't need the `hmeas` call below.

    * rewrite `makeHaskellMeasures` and `makeMeasureDefinition` so it returns<commit_msg>see TODO<commit_after>TODO
====

Reflect-Imports
---------------

The crux is the `[(ModName, BareSpec)]` that is passed into `makeRTEnv`

* type BareSpec      = Spec (Located BareType) LocSymbol

* How is it CREATED?
  - `Interface.processModule` calls `hsSpecificationP` to scrape BareSpec from file.

```haskell
processModule = do
  ...
  (modName, bareSpec) <- either throw return $ hsSpecificationP (moduleName mod) specComments specQuotes
  let specEnv'         = extendModuleEnv specEnv mod (modName, noTerm bareSpec)
```

* How shall we SAVE it so the next MODULE can get it?

* Does it include THIS module? (yes?)

toGhcSpec --> makeGhcSpec

Interface.hs

* toGhcSpec ... tgtSpec ... impSpecs


need to pull

1. `makeHaskellInlines`
2. `makeHaskellMeasures`
3. `makeHaskellBounds`

HEREHEREHEREHEREHERE `CHOP2`
--> 

1. harden code so missing .bspec does not crash things.
2. why is measure stuff not working... sigh. `stack exec -- liquid tests/todo/ReflectLib1.hs`


1. rewrite `makeMeasureDefinition` (and makeHaskellMeasures) so it returns a
   `Measure (Located BareType) LocSymbol` (or whatever is in BareSpec in
   the `measures` field)

2. tuck that result into the measures field of `mySpec` which is `mappend`-ed

3. then the plan `makeMeasureSpec` should take care of the rest.

   i.e. don't need the `hmeas` call below.

    * rewrite `makeHaskellMeasures` and `makeMeasureDefinition` so it returns
{'fraction_non_alphanumeric': 0.10416666666666667, 'fraction_numerical': 0.006324404761904762, 'mean_word_length': 3.7508833922261484, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1818456', 'n_tokens_mistral': 906, 'n_tokens_neox': 875, 'n_words': 316}