An implementation of a fragment of Heim & Kratzer (1998)'s NL semantics

I made a little attempt to give an implementation of some features of Heim & Kratzer (1998) using Haskell, which covers the semantic calculation of one-place predicates applied to entities and generalized quantifiers applied to (pairs of) one-place predicates.

Usage

Launch GHCi, load the source code below, and make your queries.

Examples:

Prelude> :l GQ.hs
Prelude> sleep Mary
False
Prelude> a student sleep
True

Source code

Shown below.