Skip to content

Commit ca98d21

Browse files
committed
Initial commit
0 parents  commit ca98d21

File tree

5 files changed

+94
-0
lines changed

5 files changed

+94
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/dist

LICENSE

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Permission is hereby granted, free of charge, to any person obtaining a copy
2+
of this software and associated documentation files (the "Software"), to deal
3+
in the Software without restriction, including without limitation the rights
4+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5+
copies of the Software, and to permit persons to whom the Software is
6+
furnished to do so, subject to the following conditions:
7+
8+
The above copyright notice and this permission notice shall be included in
9+
all copies or substantial portions of the Software.
10+
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
17+
THE SOFTWARE.

Setup.hs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module Main ( main ) where
2+
3+
import Distribution.Simple
4+
5+
main :: IO ()
6+
main = defaultMain

hol.cabal

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: hol
2+
version: 1.0
3+
category: Logic
4+
synopsis: Higher order logic
5+
license: MIT
6+
license-file: LICENSE
7+
cabal-version: >= 1.8.0.2
8+
build-type: Simple
9+
author: Joe Leslie-Hurd <[email protected]>
10+
maintainer: Joe Leslie-Hurd <[email protected]>
11+
description:
12+
This package implements a higher order logic kernel.
13+
14+
Library
15+
build-depends:
16+
base >= 4.0 && < 5.0
17+
hs-source-dirs: src
18+
ghc-options: -Wall
19+
exposed-modules:
20+
HOL.Data

src/HOL/Data.hs

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{- |
2+
module: $Header$
3+
description: Mutually recursive datatypes of higher order logic types and terms
4+
license: MIT
5+
6+
maintainer: Joe Leslie-Hurd <[email protected]>
7+
stability: provisional
8+
portability: portable
9+
-}
10+
11+
module HOL.Data
12+
where
13+
14+
type Name = String
15+
16+
data Type = Type TypeData Integer
17+
18+
data TypeData =
19+
VarType TypeVar
20+
| OpType TypeOp [Type]
21+
22+
data TypeVar = TypeVar Name
23+
24+
data TypeOp = TypeOp Name TypeOpProv
25+
26+
data TypeOpProv =
27+
UndefTypeOpProv
28+
| DefTypeOpProv TypeOpDef
29+
30+
data TypeOpDef = TypeOpDef Term [TypeVar]
31+
32+
data Var = Var Name Type
33+
34+
data Term = Term TermData Type Integer
35+
36+
data TermData =
37+
ConstTerm Const Type
38+
| VarTerm Var
39+
| AppTerm Term Term
40+
| AbsTerm Var Term
41+
42+
data Const = Const Name ConstProv
43+
44+
data ConstProv =
45+
UndefConstProv
46+
| DefConstProv ConstDef
47+
| AbsConstProv TypeOp
48+
| RepConstProv TypeOp
49+
50+
data ConstDef = ConstDef Term

0 commit comments

Comments
 (0)