Note
Work in progress.
A collection of type-based library search algorithms.
- 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
- 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}
- 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}
- 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**