-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
Suppose we have this base module:
module low (*)
fst a b :: (a, b) -> a
snd a b :: (a, b) -> b
const a b :: a -> b -> a
const a b = a
uncurry a b c :: (a -> b -> c) -> (a, b) -> c
uncurry fabc ab = fabc (fst ab) (snd ab)
And a higher module that imports it and provides definitions for fst
and snd
:
module high (foo)
import low
type Py => Int = "int"
source Py from "high.py" ("fst", "snd")
foo :: (Int, Int) -> Int
foo = uncurry const
Now when uncurry runs, here I want it to access the fst
and snd
definitions provided here. But currently it does not, since only the local scope in the module low
is searched for definitions.
This was the intended behavior. However, when I write the language-independent code of the base modules, it would be very useful to define new terms in the abstract.