-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [WIP] Work on commutative monoid solver * Fix shunting * Factor out term lens and more * Fix a parser bug * Commut monoid normalisation tactic mostly done * Commut monoid solver done * Eliminate dead code
- Loading branch information
Showing
33 changed files
with
1,643 additions
and
774 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Control.Monad.IOEither | ||
|
||
public export | ||
(>>=) : IO (Either e a) -> (a -> IO (Either e b)) -> IO (Either e b) | ||
(f >>= g) = Prelude.do | ||
case !f of | ||
Left e => io_pure (Left e) | ||
Right x => g x | ||
|
||
public export | ||
pure : a -> IO (Either e a) | ||
pure x = io_pure (Right x) |
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
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,18 @@ | ||
module Nova.Core.Util | ||
|
||
import Data.List1 | ||
|
||
import Nova.Core.Language | ||
|
||
public export | ||
funTy : Typ -> Typ -> Typ | ||
funTy a b = PiTy "_" a (ContextSubstElim b Wk) | ||
|
||
public export | ||
funTyN1 : List1 Typ -> Typ | ||
funTyN1 (t ::: []) = t | ||
funTyN1 (t ::: o :: os) = funTy t (funTyN1 (o ::: os)) | ||
|
||
public export | ||
prodTy : Typ -> Typ -> Typ | ||
prodTy a b = SigmaTy "_" a (ContextSubstElim b Wk) |
Oops, something went wrong.