You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Idris 1.2.0, and find that import ... as ... is not qualified, and still cause name confliction.
Here is my test code:
module TestNamespace
import Data.Vect as VdataTy=UNIT|ARRTyTydataElem: V.Vect n Ty -> Ty ->TypewhereHere: {ts : V.Vect n Ty} -> Elem (t::ts) t
There: {ts : V.Vect n Ty} -> Elem ts t -> Elem (t'::ts) t
-- Type checking .\namespace-issue.idr-- namespace-issue.idr:9:11-60:-- |-- 9 | There : {ts : V.Vect n Ty} -> Elem ts t -> Elem (t'::ts) t-- | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-- When checking type of There:-- Can't disambiguate name: TestNamespace.Elem, Data.Vect.Elem
I think we have to provide qualified importing. Consider the following situation: We have written down thousands of code and using some Identifier A, and one day, we need to import a new package P, and P also defined A. If there is no qualified importing, we have to change thousands of code to replace A into Main.A, just because we want to import another package.
The text was updated successfully, but these errors were encountered:
ahmadsalim
changed the title
"import qualified" is required
"import qualified" is desired
Jan 27, 2018
I'm using Idris 1.2.0, and find that
import ... as ...
is not qualified, and still cause name confliction.Here is my test code:
I think we have to provide qualified importing. Consider the following situation: We have written down thousands of code and using some Identifier
A
, and one day, we need to import a new packageP
, andP
also definedA
. If there is no qualified importing, we have to change thousands of code to replaceA
intoMain.A
, just because we want to import another package.The text was updated successfully, but these errors were encountered: