Skip to content

wasabi315/type-search-zoo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔍 type-search-zoo

Note

Work in progress.

A collection of type-based library search algorithms.

List of Algorithms

Rittri89

  • Type system: Hindley-Milner
  • Search flexibility:
    • Insensitive to currying/uncurrying and the argument order
    • Associative and commutative products with identity
> (x * y -> y) -> [x] -> y -> y
foldr : (a -> b -> b) -> b -> [a] -> b
foldl : (b -> a -> b) -> b -> [a] -> b

Lang78

  • Type system: Hindley-Milner
  • Search flexibility:
    • Insensitive to currying/uncurrying
    • Associative products with identity
    • Able to match types more general than the query type
> x -> x -> x
const : a -> b -> a
  by instantiating {a ← x, b ← x}

fst : a * b -> a
  by instantiating {a ← x, b ← x}

snd : a * b -> b
  by instantiating {a ← x, b ← x}

bimap : (a -> b) -> (c -> d) -> a * c -> b * d
  by instantiating {a ← x, b ← (), c ← (), d ← x}

Rittri90

  • Type system: Hindley-Milner
  • Search flexibility:
    • Insensitive to currying/uncurrying and the argument order
    • Associative and commutative products with identity
    • Able to match types more general than the query type
> (x * x -> x) -> [x] -> x -> x
const : a -> b -> a
  by instantiating {a ← x, b ← (x * x -> x) * [x]}

foldr : (a -> b -> b) -> b -> [a] -> b
  by instantiating {a ← x, b ← x}

foldl : (b -> a -> b) -> b -> [a] -> b
  by instantiating {a ← x, b ← x}

fst : a * b -> a
  by instantiating {a ← x, b ← (x * x -> x) * [x]}

snd : a * b -> b
  by instantiating {a ← (x * x -> x) * [x], b ← x}

bimap : (a -> b) -> (c -> d) -> a * c -> b * d
  by instantiating {a ← (x * x -> x) * [x], b ← (), c ← (), d ← x}

DiCosmo91

  • Type system: SystemF
  • Search flexibility:
    • Insensitive to currying/uncurrying and the argument order
    • Associative and commutative products with identity
> (forall y. (y * x -> y) -> y -> y) -> [x]
build : forall a. (forall b. (a -> b -> b) -> b -> b) -> [a]
> ((y * x -> y) -> y -> y) -> [x]
**yield no results**

About

A collection of type-based library search algorithms

Topics

Resources

License

Stars

Watchers

Forks