Skip to content

Commit

Permalink
MonadExc instance for option (#112)
Browse files Browse the repository at this point in the history
* CircleCI generated from template

* CI update OCaml

* MonadExc instance for option
  • Loading branch information
liyishuai committed May 2, 2021
1 parent 1549e74 commit 968fb49
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 12 deletions.
19 changes: 11 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file was generated from `meta.yml`, please do not edit manually.
# Follow the instructions on https://github.com/coq-community/templates to regenerate.

version: 2.1

jobs:
Expand Down Expand Up @@ -66,14 +69,14 @@ workflows:
name: "Coq 8.10"
coq: "coqorg/coq:8.10"
- build:
name: "Coq 8.11"
coq: "coqorg/coq:8.11"
name: "Coq 8.11-ocaml-4.11-flambda"
coq: "coqorg/coq:8.11-ocaml-4.11-flambda"
- build:
name: "Coq 8.12"
coq: "coqorg/coq:8.12"
name: "Coq 8.12-ocaml-4.11-flambda"
coq: "coqorg/coq:8.12-ocaml-4.11-flambda"
- build:
name: "Coq 8.13"
coq: "coqorg/coq:8.13"
name: "Coq 8.13-ocaml-4.11-flambda"
coq: "coqorg/coq:8.13-ocaml-4.11-flambda"
- build:
name: "Coq dev"
coq: "coqorg/coq:dev"
name: "Coq dev-ocaml-4.11-flambda"
coq: "coqorg/coq:dev-ocaml-4.11-flambda"
18 changes: 14 additions & 4 deletions meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,24 @@ tested_coq_opam_versions:
- version: '8.8'
- version: '8.9'
- version: '8.10'
- version: '8.11'
- version: '8.12'
- version: '8.13'
- version: 'dev'
- version: '8.11-ocaml-4.11-flambda'
- version: '8.12-ocaml-4.11-flambda'
- version: '8.13-ocaml-4.11-flambda'
- version: 'dev-ocaml-4.11-flambda'

make_target: theories
test_target: examples
namespace: ExtLib

circleci_after_script: |2-
- run:
name: Generate Coqdoc
command: |
make -j`nproc` html
tar cfz coqdoc.tgz html
- store_artifacts:
path: coqdoc.tgz
documentation: |
Ideas
-----
Expand Down
8 changes: 8 additions & 0 deletions theories/Data/Monads/OptionMonad.v
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ Global Instance Plus_option : MonadPlus option :=
end
}.

Global Instance Exception_option : MonadExc unit option :=
{ raise _ _ := None
; catch _ c h := match c with
| None => h tt
| Some x => Some x
end
}.

Section Trans.
Variable m : Type -> Type.

Expand Down

0 comments on commit 968fb49

Please sign in to comment.