Inconsistency between paper and library
- Dominant language
- Haskell
- Stars
- 77
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
Paper page 5
```haskell
analyzeAndRewriteFwdBody
:: ( CkpointMonad m -- Roll back speculative actions
, NonLocal n ) -- Extract non-local flow edges
=> FwdPass m n f -- Lattice, transfer, rewrite
-> [Label] -- Entry point(s)
-> Graph n C C -- Input graph
-> FactBase f -- Input fact(s)
-> m ( Graph n C C -- Result graph
, FactBase f ) -- ... and its facts
```
Again same but single line
```haskell
analyzeAndRewriteFwdBody :: ( CkpointMonad m, NonLocal n ) => FwdPass m n f -> [Label] -> Graph n C C -> FactBase f -> m (Graph n C C, FactBase f )
```
[library](https://github.com/haskell/hoopl/blob/df22cac9750e057fbd3509a6d4781ca625e0c304/src/Compiler/Hoopl/XUtil.hs#L39-L43)
```haskell
analyzeAndRewriteFwdBody :: forall m n f entries. (CheckpointMonad m, NonLocal n, LabelsPtr entries) => FwdPass m n f -> entries -> Body n -> FactBase f -> m (Body n, FactBase f)
```
`[Label]` is type compatible with `entries`. But `Graph n C C` and `Body` are not type compatible. It's not a problem with the code though, the test case also shows that the library works. The paper is mostly clear but it's just not exactly the same. Test case uses a [different function](https://github.com/haskell/hoopl/blob/master/testing/Test.hs#L54)
```haskell
analyzeAndRewriteFwd :: forall m n f e x entries. (CheckpointMonad m, NonLocal n, LabelsPtr entries) => FwdPass m n f -> MaybeC e entries -> Graph n e x -> Fact e f -> m (Graph n e x, FactBase f, MaybeO x f)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.