-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
mercury.scroll
142 lines (118 loc) · 5.98 KB
/
mercury.scroll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
import ../code/conceptPage.scroll
id mercury
name Mercury
appeared 1995
creators Zoltan Somogyi
tags pl
website http://www.mercurylang.org
isOpenSource true
compilesTo c
fileExtensions m
fileType text
wordRank 4418
documentation https://mercurylang.org/documentation/documentation.html
rosettaCode http://www.rosettacode.org/wiki/Category:Mercury
centralPackageRepositoryCount 0
country Australia
originCommunity University of Melbourne
subreddit https://www.reddit.com/r/mercury
memberCount
2022 348
leachim6 Mercury
filepath m/Mercury.m
fileExtensions m
example
:- module hello.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
main(!IO) :-
io.write_string("Hello World\n", !IO).
lineCommentToken %
printToken io.write_string
stringToken "
hasLineComments true
% A comment
hasComments true
% A comment
hasPrintDebugging true
hasSemanticIndentation false
hasStrings true
"Hello world"
wikipedia https://en.wikipedia.org/wiki/Mercury_(programming_language)
example
:- module fib.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
:- import_module int.
:- func fib(int) = int.
fib(N) = (if N =< 2 then 1 else fib(N - 1) + fib(N - 2)).
main(!IO) :-
io.write_string("fib(10) = ", !IO),
io.write_int(fib(10), !IO),
io.nl(!IO).
% Could instead use io.format("fib(10) = %d\n", [i(fib(10))], !IO).
related autocode mercurial ia-32 arm unix linux solaris freebsd android prolog hope haskell c java csharp erlang assembly-language cil vim-editor emacs-editor eclipse-editor curry alice standard-ml oz visual-prolog
summary Mercury is a functional logic programming language made for real-world uses. The first version was developed at the University of Melbourne, Computer Science department, by Fergus Henderson, Thomas Conway, and Zoltan Somogyi, under Somogyi's supervision, and released on April 8, 1995. Mercury is a purely declarative logic programming language. It is related to both Prolog and Haskell. It features a strong, static, polymorphic type system, and a strong mode and determinism system. The official implementation, the Melbourne Mercury Compiler, is available for most Unix and Unix-like platforms, including Linux, macOS, and for Windows (32bits only).
pageId 19726
dailyPageViews 74
created 2001
backlinksCount 83
revisionCount 260
appeared 1995
fileExtensions m
hopl https://hopl.info/showlanguage.prx?exp=2226
tiobe Mercury
domainName mercurylang.org
registered 2011
awisRank
2022 7653616
githubBigQuery Mercury
repos 646
users 594
linguistGrammarRepo https://github.com/sebgod/mercury-tmlanguage
firstCommit 2014
lastCommit 2015
committerCount 1
commitCount 31
sampleCount 10
example
% "Hello World" in Mercury.
% This source file is hereby placed in the public domain. -fjh (the author).
:- module hello.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
main(!IO) :-
io.write_string("Hello, world\n", !IO).
isbndb 0
githubLanguage Mercury
fileExtensions m moo
trendingProjectsCount 0
type programming
interpreters mmi
aceMode prolog
tmScope source.mercury
repos 715
semanticScholar 16
year|title|doi|citations|influentialCitations|authors|paperId
1997|Termination Analysis for Mercury|10.1007/BFb0032740|54|5|Chris Speirs and Z. Somogyi and H. Søndergaard|afd089a38347a3178697994b632d3e6784aeda36
1999|Binding-Time Analysis for Mercury|10.1007/978-3-540-25951-0_7|48|0|W. Vanhoof and M. Bruynooghe and M. Leuschel|5bd60c5d80b234b49725517c2b10772b10ea6a84
1995|Code Generation for Mercury|10.7551/mitpress/4301.003.0029|28|4|T. Conway and F. Henderson and Z. Somogyi|4495652c540b6eb9d882094e2ee27e4db4238a28
2001|Practical Aspects for a Working Compile Time Garbage Collection System for Mercury|10.1007/3-540-45635-X_15|23|3|Nancy Mazur and Peter Ross and Gerda Janssens and M. Bruynooghe|ff30b7100bb6ef27513cabbe174ae3a29a192715
2000|Type classes in Mercury|10.1109/ACSC.2000.824391|20|1|D. Jeffery and F. Henderson and Z. Somogyi|c90f163e576bc4119d3b8a48c3be6ffbe815822e
2002|Compiling Mercury to High-Level C Code|10.1007/3-540-45937-5_15|16|1|F. Henderson and Z. Somogyi|5a7db270bdc56ffb9100f6e4ced19789e176e37d
2017|Advanced Stochastic Petri Net Modeling with the Mercury Scripting Language|10.1145/3150928.3150959|16|1|Danilo Oliveira and Rúbens de Souza Matos Júnior and J. Dantas and João Ferreira and B. Silva and G. Callou and P. Maciel and A. Brinkmann|2f67f3aa94cae7cb1244c7bd2dbf5d9c1ece3456
2000|A Module Based Analysis for Memory Reuse in Mercury|10.1007/3-540-44957-4_84|15|0|Nancy Mazur and Gerda Janssens and M. Bruynooghe|966db383f6ccc53e32ffc6a91b01d289ae7c7988
2003|Use of an Integrated Mercury Food Web Model for Ecological Risk Assessment|10.1081/ESE-120021120|13|0|J. G. Hunter and J. Burger and K. Cooper|e22703dd3f7cf52216853149b4ee4934335ad65b
2000|Binding-Time Analysis by Constraint Solving. A Modular and Higher-Order Approach for Mercury|10.1007/3-540-44404-1_25|12|0|W. Vanhoof|d89ec979c59b1e0c9164a8479f018d10944e48f6
2006|Adding Constraint Solving to Mercury|10.1007/11603023_9|12|0|Ralph Becket and M. G. D. L. Banda and K. Marriott and Z. Somogyi and Peter James Stuckey and M. Wallace|88c71f5bdc9af4a3bc29b2de8ddba0e7a0bb666f
2008|Runtime support for region-based memory management in Mercury|10.1145/1375634.1375644|8|0|Quan Phan and Z. Somogyi and Gerda Janssens|d3f72cc56eb31c33daaaeeb7a3a4bbc322d64685
2007|Static Region Analysis for Mercury|10.1007/978-3-540-74610-2_22|7|0|Quan Phan and Gerda Janssens|0b125fbd478c191fe9cb4a53c2f0575f9c86a506
2007|Inductive Mercury Programming|10.1007/978-3-540-73847-3_23|2|0|B. Fisher and J. Cussens|f8d6f78ad98b6d3df1bd1bcad46020442b109d52
1999|Binding-Time Analysis for Mercury|10.7551/mitpress/4304.003.0042|1|0|D. D. Schreye|fd1f327efbfde4efe8219025b0a0481c93f8b1b2
2011|Automatic Parallelism in Mercury|10.4230/LIPIcs.ICLP.2011.251|1|0|P. Bone|9fca42be3c532df8a750821255b2869a27b1da41