Skip to content
Open
Prev Previous commit
Next Next commit
Add tests for conflicting types with same name
  • Loading branch information
MonoidMusician committed Oct 27, 2022
commit 14711224b76361f82c8eff79f71d9b56997f139d
24 changes: 24 additions & 0 deletions tests/purs/failing/QualifiedErrorsUnification.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Error found:
in module Main
at tests/purs/failing/QualifiedErrorsUnification.purs:9:15 - 9:18 (line 9, column 15 - line 9, column 18)

Could not match type
 
 Data.List.Lazy.Types.List
 
with type
 
 List
 

while trying to match type List t0
with type List Unit
while checking that expression nil
has type List Unit
in value declaration wrongModule

where t0 is an unknown type

See https://github.com/purescript/documentation/blob/master/errors/TypesDoNotUnify.md for more information,
or to contribute content related to this error.

9 changes: 9 additions & 0 deletions tests/purs/failing/QualifiedErrorsUnification.purs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- @shouldFailWith TypesDoNotUnify
module Main where

import Prelude (Unit)
import Data.List.Lazy (nil)
import Data.List.Types (List)

wrongModule :: List Unit
wrongModule = nil
24 changes: 24 additions & 0 deletions tests/purs/failing/QualifiedErrorsUnificationLocal.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Error found:
in module Main
at tests/purs/failing/QualifiedErrorsUnificationLocal.purs:10:15 - 10:18 (line 10, column 15 - line 10, column 18)

Could not match type
 
 Data.List.Lazy.Types.List
 
with type
 
 List
 

while trying to match type List t0
with type List Unit
while checking that expression nil
has type List Unit
in value declaration wrongModule

where t0 is an unknown type

See https://github.com/purescript/documentation/blob/master/errors/TypesDoNotUnify.md for more information,
or to contribute content related to this error.

10 changes: 10 additions & 0 deletions tests/purs/failing/QualifiedErrorsUnificationLocal.purs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- @shouldFailWith TypesDoNotUnify
module Main where

import Prelude (Unit)
import Data.List.Lazy (nil)

data List (a :: Type)

wrongModule :: List Unit
wrongModule = nil
24 changes: 24 additions & 0 deletions tests/purs/failing/QualifiedErrorsUnificationReexport.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Error found:
in module Main
at tests/purs/failing/QualifiedErrorsUnificationReexport.purs:9:15 - 9:18 (line 9, column 15 - line 9, column 18)

Could not match type
 
 Data.List.Lazy.Types.List
 
with type
 
 Data.List.Types.List
 

while trying to match type List t0
with type List Unit
while checking that expression nil
has type List Unit
in value declaration wrongModule

where t0 is an unknown type

See https://github.com/purescript/documentation/blob/master/errors/TypesDoNotUnify.md for more information,
or to contribute content related to this error.

9 changes: 9 additions & 0 deletions tests/purs/failing/QualifiedErrorsUnificationReexport.purs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- @shouldFailWith TypesDoNotUnify
module Main where

import Prelude (Unit)
import Data.List.Lazy (nil)
import Data.List (List)

wrongModule :: List Unit
wrongModule = nil