The exference package

[ Tags: bsd3, language, library ] [ Propose Tags ]

Type inference takes an expression and tells you its type. This process can be inversed: We recursively create random expression trees while checking that they -so far- match a given input type. At each step we do the backwards step of the inference algorithm step. If you are lucky, this search yields one or more expressions.

Djinn is a similar tool that guarantees to always terminate. But the cost of that property is that Djinn does not properly handle polymorphic queries - and those are the interesting ones, really :)

Exference supports type classes, handles undeclared types well (Foo -> Foo yields id for unknown Foo), does _not_ check kinds, can pattern-match on newtypes, supports RankNTypes.

Exference reads an environment of function types, data types, type classes and instances. The user can add to this environment, but keep in mind that each addition enlarges the search space.

Properties

Versions 1.6.0.0
Dependencies base (>=4.7.0.2 && <5), base-orphans (>=0.5.1 && <0.6), bifunctors (>=5.4.1 && <5.5), containers (>=0.5.0.0 && <0.6), data-pprint (>=0.2.4), deepseq (>=1.3.0.1 && <1.5), deepseq-generics (>=0.1.1.2 && <0.3), directory (==1.2.*), either (==4.4.*), exference, hashable (>=1.2.4.0 && <1.3), haskell-src-exts (>=1.17.1 && <1.18), hood (==0.3.*), lens (>=4.12 && <4.15), mmorph (>=1.0.4 && <1.1), mtl (>=2.1 && <2.3), multistate (>=0.6.2 && <0.8), parsec (>=3.1.11 && <3.2), pqueue (>=1.3.1 && <1.4), pretty (==1.1.*), process (>=1.2.3.0 && <1.5), safe (>=0.3.10 && <0.4), split (>=0.2.3.1 && <0.3), template-haskell (>=2.8.0.0 && <2.12.0.0), transformers (>=0.3 && <0.6), unordered-containers (>=0.2.5 && <0.3), vector (>=0.11 && <0.13.0.0) [details]
License BSD3
Author Lennart Spitzner
Maintainer Lennart Spitzner <hexagoxel@hexagoxel.de>
Category Language
Home page https://github.com/lspitzner/exference
Bug tracker https://github.com/lspitzner/exference/issues
Source repository head: git clone git@github.com:lspitzner/exference.git
Uploaded Mon Feb 13 15:41:03 UTC 2017 by lspitzner
Updated Tue Aug 1 21:49:06 UTC 2017 by lspitzner to revision 4
Distributions NixOS:1.6.0.0
Executables exference
Downloads 82 total (7 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2017-02-13 [all 3 reports]
Hackage Matrix CI

Modules

  • Flags_exference
  • Language
    • Haskell
      • Language.Haskell.Exference
        • Language.Haskell.Exference.BindingsFromHaskellSrc
        • Language.Haskell.Exference.ClassEnvFromHaskellSrc
        • Language.Haskell.Exference.Core
          • Language.Haskell.Exference.Core.ExferenceStats
          • Language.Haskell.Exference.Core.Expression
          • Language.Haskell.Exference.Core.ExpressionSimplify
          • Language.Haskell.Exference.Core.FunctionBinding
          • Language.Haskell.Exference.Core.SearchTree
          • Language.Haskell.Exference.Core.TypeUtils
          • Language.Haskell.Exference.Core.Types
        • Language.Haskell.Exference.EnvironmentParser
        • Language.Haskell.Exference.ExpressionToHaskellSrc
        • Language.Haskell.Exference.FunctionDecl
        • Language.Haskell.Exference.SimpleDict
        • Language.Haskell.Exference.TypeDeclsFromHaskellSrc
        • Language.Haskell.Exference.TypeFromHaskellSrc
  • Paths_exference

Flags

NameDescriptionDefaultType
build-executables

build the executables, not just the library

EnabledManual
linknodes

nodes keep a reference to the precessor node, allowing returning the path thad lead to a solution.

DisabledManual
buildsearchtree

use dirty hacks to create the search tree that can be observed afterwards. needs link-nodes flag.

DisabledManual
exference-devDisabledManual

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

Downloads

Maintainer's Corner

For package maintainers and hackage trustees