.gitignore
Added Gopkg and updated README. This is v1.0.0
.travis.yml
Added Gopkg and updated README. This is v1.0.0
const.go
Consgen (#1)
constraint_test.go
Consgen (#1)
constraint.go
Added a Inferer interface to allow for types that can self-infer.
debug.go
DEBUG should be false when in master branch
env_test.go
Added NewScheme, which helps external packages create well, new schemes
env.go
Consgen (#1)
example_greenspun_test.go
Consgen (#1)
expression.go
Added a Inferer interface to allow for types that can self-infer.
functionType_test.go
Added a Cloner interface for FunctionType and Record
functionType.go
Added a Cloner interface for FunctionType and Record
Gopkg.lock
Added Gopkg and updated README. This is v1.0.0
Gopkg.toml
Added Gopkg and updated README. This is v1.0.0
hm_test.go
Added a Built-in RecordType to the library as I've been reimplementing the same thing over and over again
hm.go
Added a Cloner interface for FunctionType and Record
LICENCE
Consgen (#1)
perf_test.go
Consgen (#1)
perf.go
Added a Inferer interface to allow for types that can self-infer.
README.md
Added Gopkg and updated README. This is v1.0.0
release.go
Added more "for completeness" tests... updated README to use a better version of the coveralls badge
scheme_test.go
Added a Inferer interface to allow for types that can self-infer.
scheme.go
Perf update for record type
solver_test.go
Added a Built-in RecordType to the library as I've been reimplementing the same thing over and over again
solver.go
Consgen (#1)
substitutables_test.go
Added Contains for Types, making it easier to lookup stuff
substitutables.go
Added a Inferer interface to allow for types that can self-infer.
substitutions_test.go
Consgen (#1)
substitutions.go
Added a Inferer interface to allow for types that can self-infer.
test_test.go
Added a Inferer interface to allow for types that can self-infer.
type.go
Added a Cloner interface for FunctionType and Record
typeVariable_test.go
Consgen (#1)
typeVariable.go
Consgen (#1)
typeVarSet_test.go
Consgen (#1)
typeVarSet.go
Added a Inferer interface to allow for types that can self-infer.

hm

Package hm is a simple Hindley-Milner type inference system in Go. It provides the necessary data structures and functions for creating such a system.

Installation

This package is go-gettable: go get -u github.com/chewxy/hm

There are very few dependencies that this package uses. Therefore there isn't a need for vendoring tools. However, package hm DOES provide a Gopkg.toml and Gopkg.lock for any potential users of the dep tool.

Here is a listing of the dependencies of hm:

PackageUsed ForVitalityNotesLicence
errorsError wrappingCan do without, but this is by far the superior error solution out thereStable API for the past 6 monthserrors licence (MIT/BSD-like)
testify/assertTestingCan do without but will be a massive pain in the ass to testtestify licence (MIT/BSD-like)

Usage

TODO: Write this

Notes

This package is used by Gorgonia as part of the graph building process. It is also used by several other internal projects of this author, all sharing a similar theme of requiring a type system, which is why this was abstracted out.

Contributing

This library is developed using Github. Therefore the workflow is very github-centric.

Licence

Package hm is licenced under the MIT licence.