typeof: Small script for inferring types

[ bsd3, development, program ] [ Propose Tags ]

A script to infer and insert type declarations in Haskell source, callable from your editor. Bindings exist to emacs and vim.

[Skip to Readme]


Automatic Flags

Choose the new smaller, split-up base package.


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS] 0.1, 0.1.1, 0.1.2
Dependencies base (<5), process [details]
License BSD-3-Clause
Author Don Stewart
Maintainer Don Stewart, Kangyuan Niu
Category Development
Uploaded by KangyuanNiu at 2011-05-04T23:27:17Z
Distributions NixOS:0.1.2
Reverse Dependencies 1 direct, 0 indirect [details]
Executables typeof
Downloads 2383 total (12 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2016-12-28 [all 7 reports]

Readme for typeof-0.1.2

[back to package description]
typeof: a script for inserting Haskell types in source code

== Building ==

    runhaskell Setup.lhs configure
    runhaskell Setup.lhs build
    runhaskell Setup.lhs install

== Use ==

The script accepts two inputs:
   command line argument 1: the file name to look in.
   stdin:                   the line containing the top level type
                                    declaration who's type you

the output is the type declaration for the value you requested, which
can be spliced back in to your source file.


You can run the script from vim directly by adding the following to your
.vimrc file:
    :map ty yy:.!typeof -fbang-patterns %^Mp

Now, when you position your cursor over a top level declaration,


will insert the type declaration on the line above the one the cursor is


In emacs add the following to your .emacs.el file:

(global-set-key (kbd "C-c t")
    (lambda () (interactive)
            (move-beginning-of-line nil)

Then you can use C-c t to run insert the type declaration.

== Author ==

Don Stewart
Fri Dec 15 18:02:39 EST 2006