summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts/ghci052.script
blob: c32d0fc0c20588563314aa5e0693e08919721243 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--Testing data type and constructor shadowing with functions
-- Very unsatisfactory error messages

data Planet = Mercury | Venus | Earth
let pn Mercury = "M" ; pn Venus = "V" ; pn Earth = "E"
pn Mercury
data Planet = Mercury | Venus | Mars
pn Mercury
pn Venus
pn Mars
pn Earth
let pn Mercury = "M" ; pn Venus = "V" ; pn Earth = "E" ; pn Mars = "M"