+
Skip to content

Morloc definitions should be able to use future implementations #41

@arendsee

Description

@arendsee

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载