Marek Sapota
Marek Sapota

Reputation: 20591

Type checker libraries

I'm witting a compiler and I'm searching for a library that could do type checking for me. So far I didn't find anything useful=/ Does anyone know good type checking libraries? I'm using Haskell, but I'll consider any other language if the library is good=)

Upvotes: 2

Views: 721

Answers (3)

stephen tetley
stephen tetley

Reputation: 4493

There might be libraries to help with bits of the type checker especially if you do really want a type checker and not type inference. For instance, there have been libraries embedding logic programming in Haskell - at 10,000 feet it seems a good bit easier to write a type checker using logic programming than functional programming (for example Chameleon mentioned by shapr above is based on the CHR language embedded in Haskell).

That said, embedded logic programming in Haskell is a big step with probably little documentation if you've never written a type checker before. Similarly attribute grammars (i.e. UUAG) are a pleasant formalism supplying quite a bit of the machinery you would need to write yourself, but they might put you it a place with few signposts if you've never used one previously.

Unless you've written a type checker before, maybe it is better not to worry about libraries and work through the process from scratch. The "Typing Haskell in Haskell" paper by Mark P. Jones is probably as good a start point as any.

Upvotes: 3

John L
John L

Reputation: 28097

I found several type checkers on hackage, including dedukti, hybrid, and lambdacube, possibly one of these would work?

Upvotes: 0

shapr
shapr

Reputation: 1671

Maybe Martin Sulzmann's Chameleon would be helpful?

Upvotes: 1

Related Questions