-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #774 from explorable-viz/desug-gc
Desug gc
- Loading branch information
Showing
6 changed files
with
123 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module Desug where | ||
|
||
import Desugarable (desug, desugBwd) | ||
import Prelude | ||
import Control.Monad.Error.Class (class MonadError) | ||
import Effect.Exception (Error) | ||
import Expr (Expr) | ||
import GaloisConnection (GaloisConnection) | ||
import Lattice (Raw, class BoundedJoinSemilattice) | ||
import SExpr (Expr) as S | ||
import Util (successful) | ||
|
||
type DesugGaloisConnection a = GaloisConnection (S.Expr a) (Expr a) () | ||
|
||
desugGC | ||
:: forall a m | ||
. MonadError Error m | ||
=> BoundedJoinSemilattice a | ||
=> Raw S.Expr | ||
-> m (DesugGaloisConnection a) | ||
desugGC s0 = do | ||
let | ||
fwd s = successful $ desug s | ||
bwd e = desugBwd e s0 | ||
pure { fwd, bwd } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.