An LF type checker in Haskell