-
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 #777 from explorable-viz/maybeJoin
Drop `BoolAlg` and explicit dom/codom on `GaloisConnection`. Add `Category` instance.
- Loading branch information
Showing
19 changed files
with
105 additions
and
1,839 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,25 +1,24 @@ | ||
module Desug where | ||
|
||
import Desugarable (desug, desugBwd) | ||
import Prelude | ||
|
||
import Control.Monad.Error.Class (class MonadError) | ||
import Desugarable (desug, desugBwd) | ||
import Effect.Exception (Error) | ||
import Expr (Expr) | ||
import GaloisConnection (GaloisConnection) | ||
import Lattice (Raw, class BoundedJoinSemilattice) | ||
import GaloisConnection (GaloisConnection(..)) | ||
import Lattice (class BoundedJoinSemilattice, Raw) | ||
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) | ||
-> m (GaloisConnection (S.Expr a) (Expr a)) | ||
desugGC s0 = do | ||
let | ||
fwd s = successful $ desug s | ||
bwd e = desugBwd e s0 | ||
pure { fwd, bwd } | ||
pure $ GC { fwd, bwd } |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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.