2
Here are some good remarks from people listening to the talk.
6
How will you distinguish between record projection and module projection
9
Good question. One option is to use a different syntax for record
10
projection. For instance, p!x.
14
We won't be able to satisfy all equations of Berry's majority function
15
definitionally in the core language, so if we do that in the full
16
language we are in trouble.
24
Possible solution: Match patterns left-to-right, as soon as there is an
25
inconclusive match the whole matching is inconclusive. Example:
30
With the standard approach we have
34
but instead we say that this doesn't reduce (since x is blocking the
35
pattern T in the first clause). With this approach order does matter! Are
36
there any problems? Example:
42
With left to right matching we still have f x 0 --> 1, but the
43
tranlation will yield(?)
46
f (s x) = \y -> f2 x y
54
That is pattern matching first on the first argument. So f x 0 will not
59
When lifting local definitions you might not want to abstract over all
60
variables in the context, but only those which are in scope. Example:
67
Abstracting over all variables gives the following:
69
lift_bar x y z true = true
70
lift_bar x y z false = z
72
foo x y z --> lift_bar x y z y
73
foo x' y z --> lift_bar x' y z y
75
So foo x y z != foo x' y z, even though foo never uses its first
76
argument. If we instead abstract only over things that are actually used
79
lift_bar z true = true
82
foo x y z --> lift_bar y z
83
foo x' y z --> lift_bar y z
87
Would it be possible to add rewriting rules for definitional equalities which
88
hold inside a module (where we know the values of abstract things) when
89
working outside the module?
97
push : A -> Stack A -> Stack A
99
pop : Stack A -> Maybe (Stack A)
101
pop (x::xs) = just xs
103
rewrite pop (push x s) == just s
105
The type of the rewrite should be checked without knowing the definitions
106
and the left-hand-side and the right-hand-side should be convertible when
107
knowing the definitions.
111
It would be nice to have a parameterised module containing all the local
112
definitions for each definition. This way you could actually refer to the
113
local functions by instantiating this module.
115
f : (x:A) -> (y:B) -> C
121
would mean something like
123
module f (x:A)(y:B) where
127
f : (x:A) -> (y:B) -> C
133
Open problem: How to handle definitions with multiple clauses?
135
vim: sts=2 sw=2 tw=75