git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge branch 'master' into pure11
commit41d055f461d9758fc7ec0a1ca8900ac47da006e3 authorAndy Arvanitis <andyarvanitis@gmail.com> dateFri 6 Nov 2015, 20:47 (11 years ago) parent77a9c14648591f
65 files changed+1019−934
.travis.yml+3 CONTRIBUTING.md+1−1 LICENSE+631−464 examples/passing/FieldPuns.purs+8 license-generator/generate−47 license-generator/generate.hs+40 license-generator/tmp/.gitkeep psc-bundle/Main.hs+10−1 psci/Completion.hs+3−8 psci/PSCi.hs+7−8 psci/Parser.hs+2−7 psci/tests/Main.hs+3−4 purescript.cabal+6−4 src/Control/Monad/Logger.hs+3−5 src/Control/Monad/Supply.hs+3−4 src/Language/PureScript/AST/Declarations.hs+3−5 src/Language/PureScript/AST/SourcePos.hs+3−5 src/Language/PureScript/AST/Traversals.hs+58−67 src/Language/PureScript/Bundle.hs+19−18 src/Language/PureScript/CodeGen/JS.hs+3−4 src/Language/PureScript/CodeGen/JS/AST.hs+3−7 src/Language/PureScript/CodeGen/JS/Optimizer.hs+3−4 src/Language/PureScript/CodeGen/JS/Optimizer/Inliner.hs+3−5 src/Language/PureScript/Docs/ParseAndDesugar.hs+6−7 src/Language/PureScript/Docs/RenderedCode/Render.hs+3−6 src/Language/PureScript/Docs/RenderedCode/Types.hs+3−6 src/Language/PureScript/Docs/Types.hs+3−4 src/Language/PureScript/Errors.hs+3−9 src/Language/PureScript/Externs.hs+3−4 src/Language/PureScript/Kinds.hs+3−4 src/Language/PureScript/Linter.hs+3−4 src/Language/PureScript/Linter/Exhaustive.hs+3−4 src/Language/PureScript/Linter/Imports.hs+3−4 src/Language/PureScript/Make.hs+9−12 src/Language/PureScript/Parser/Declarations.hs+19−13 src/Language/PureScript/Parser/JS.hs+3−5 src/Language/PureScript/Parser/Kinds.hs+3−5 src/Language/PureScript/Pretty/JS.hs+6−8 src/Language/PureScript/Pretty/Values.hs−2 src/Language/PureScript/Publish.hs+6−8 src/Language/PureScript/Publish/ErrorsWarnings.hs+3−7 src/Language/PureScript/Renamer.hs+13−14 src/Language/PureScript/Sugar.hs+7−8 src/Language/PureScript/Sugar/BindingGroups.hs+3−5 src/Language/PureScript/Sugar/CaseDeclarations.hs+3−4 src/Language/PureScript/Sugar/DoNotation.hs+3−4 src/Language/PureScript/Sugar/Names.hs+7−9 src/Language/PureScript/Sugar/Names/Exports.hs+5−5 src/Language/PureScript/Sugar/Names/Imports.hs+8−8 src/Language/PureScript/Sugar/ObjectWildcards.hs+3−4 src/Language/PureScript/Sugar/Operators.hs+5−6 src/Language/PureScript/Sugar/TypeClasses.hs+5−6 src/Language/PureScript/Sugar/TypeClasses/Deriving.hs+4−5 src/Language/PureScript/Sugar/TypeDeclarations.hs+3−4 src/Language/PureScript/Traversals.hs+2−5 src/Language/PureScript/TypeChecker.hs+8−9 src/Language/PureScript/TypeChecker/Entailment.hs+5−10 src/Language/PureScript/TypeChecker/Kinds.hs+4−5 src/Language/PureScript/TypeChecker/Monad.hs+11−6 src/Language/PureScript/TypeChecker/Skolems.hs+3−5 src/Language/PureScript/TypeChecker/Synonyms.hs+3−4 src/Language/PureScript/TypeChecker/Types.hs+8−9 src/Language/PureScript/Types.hs+3−4 tests/Main.hs+3−7 tests/common/TestsSetup.hs+3−8
.travis.yml+3
@@ -24,6 +24,9 @@ matrix:
2424 - env: GHCVER=7.10.2 STACKAGE=nightly-2015-09-29
2525 compiler: ": #GHC 7.10.2 nightly-2015-09-29"
2626 addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
27+ - env: GHCVER=7.10.3
28+ compiler: ": #GHC 7.10.3"
29+ addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
2730before_install:
2831 - unset CC
2932 - export PATH="/opt/ghc/$GHCVER/bin:$PATH"
CONTRIBUTING.md+1−1
@@ -30,7 +30,7 @@ updated.
3030You can automate this (if you have bash):
3131
3232- get a copy of [cabal-dependency-licenses][]
33−- run at the command line: `./license/generate > LICENSE`
33+- run at the command line: `runhaskell license-generator/generate.hs > LICENSE`
3434
3535[cabal-dependency-licenses]: https://github.com/jaspervdj/cabal-dependency-licenses
3636
LICENSE+631−464
@@ -31,6 +31,7 @@ PureScript uses the following Haskell library packages. Their license files foll
3131 array
3232 attoparsec
3333 base
34+ base-compat
3435 binary
3536 blaze-builder
3637 bower-json
@@ -50,7 +51,9 @@ PureScript uses the following Haskell library packages. Their license files foll
5051 monad-control
5152 mtl
5253 nats
54+ old-locale
5355 optparse-applicative
56+ parallel
5457 parsec
5558 pattern-arrows
5659 pretty
@@ -63,6 +66,7 @@ PureScript uses the following Haskell library packages. Their license files foll
6366 split
6467 stm
6568 syb
69+ tagged
6670 template-haskell
6771 terminfo
6872 text
@@ -111,22 +115,22 @@ HUnit LICENSE file:
111115
112116 HUnit is Copyright (c) Dean Herington, 2002, all rights reserved,
113117 and is distributed as free software under the following license.
114−
118+
115119 Redistribution and use in source and binary forms, with or without
116120 modification, are permitted provided that the following conditions
117121 are met:
118−
122+
119123 - Redistributions of source code must retain the above copyright
120124 notice, this list of conditions, and the following disclaimer.
121−
125+
122126 - Redistributions in binary form must reproduce the above copyright
123127 notice, this list of conditions, and the following disclaimer in the
124128 documentation and/or other materials provided with the distribution.
125−
129+
126130 - The names of the copyright holders may not be used to endorse or
127131 promote products derived from this software without specific prior
128132 written permission.
129−
133+
130134 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY
131135 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
132136 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -142,24 +146,24 @@ HUnit LICENSE file:
142146aeson LICENSE file:
143147
144148 Copyright (c) 2011, MailRank, Inc.
145−
149+
146150 All rights reserved.
147−
151+
148152 Redistribution and use in source and binary forms, with or without
149153 modification, are permitted provided that the following conditions
150154 are met:
151−
155+
152156 1. Redistributions of source code must retain the above copyright
153157 notice, this list of conditions and the following disclaimer.
154−
158+
155159 2. Redistributions in binary form must reproduce the above copyright
156160 notice, this list of conditions and the following disclaimer in the
157161 documentation and/or other materials provided with the distribution.
158−
162+
159163 3. Neither the name of the author nor the names of his contributors
160164 may be used to endorse or promote products derived from this software
161165 without specific prior written permission.
162−
166+
163167 THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
164168 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
165169 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -175,7 +179,7 @@ aeson LICENSE file:
175179aeson-better-errors LICENSE file:
176180
177181 Copyright (c) 2015 Harry Garrood
178−
182+
179183 Permission is hereby granted, free of charge, to any person obtaining
180184 a copy of this software and associated documentation files (the
181185 "Software"), to deal in the Software without restriction, including
@@ -183,10 +187,10 @@ aeson-better-errors LICENSE file:
183187 distribute, sublicense, and/or sell copies of the Software, and to
184188 permit persons to whom the Software is furnished to do so, subject to
185189 the following conditions:
186−
190+
187191 The above copyright notice and this permission notice shall be included
188192 in all copies or substantial portions of the Software.
189−
193+
190194 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
191195 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
192196 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -199,10 +203,10 @@ ansi-terminal LICENSE file:
199203
200204 Copyright (c) 2008, Maximilian Bolingbroke
201205 All rights reserved.
202−
206+
203207 Redistribution and use in source and binary forms, with or without modification, are permitted
204208 provided that the following conditions are met:
205−
209+
206210 * Redistributions of source code must retain the above copyright notice, this list of
207211 conditions and the following disclaimer.
208212 * Redistributions in binary form must reproduce the above copyright notice, this list of
@@ -210,7 +214,7 @@ ansi-terminal LICENSE file:
210214 provided with the distribution.
211215 * Neither the name of Maximilian Bolingbroke nor the names of other contributors may be used to
212216 endorse or promote products derived from this software without specific prior written permission.
213−
217+
214218 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
215219 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
216220 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
@@ -223,19 +227,19 @@ ansi-terminal LICENSE file:
223227ansi-wl-pprint LICENSE file:
224228
225229 Copyright 2008, Daan Leijen and Max Bolingbroke. All rights reserved.
226−
230+
227231 Redistribution and use in source and binary forms, with or without
228232 modification, are permitted provided that the following conditions are
229233 met:
230−
234+
231235 * Redistributions of source code must retain the above copyright
232236 notice, this list of conditions and the following disclaimer.
233−
237+
234238 * Redistributions in binary form must reproduce the above copyright
235239 notice, this list of conditions and the following disclaimer in
236240 the documentation and/or other materials provided with the
237241 distribution.
238−
242+
239243 This software is provided by the copyright holders "as is" and any
240244 express or implied warranties, including, but not limited to, the
241245 implied warranties of merchantability and fitness for a particular
@@ -251,43 +255,43 @@ ansi-wl-pprint LICENSE file:
251255array LICENSE file:
252256
253257 This library (libraries/base) is derived from code from several
254− sources:
255−
258+ sources:
259+
256260 * Code from the GHC project which is largely (c) The University of
257261 Glasgow, and distributable under a BSD-style license (see below),
258−
262+
259263 * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
260264 and freely redistributable (but see the full license for
261265 restrictions).
262−
266+
263267 * Code from the Haskell Foreign Function Interface specification,
264268 which is (c) Manuel M. T. Chakravarty and freely redistributable
265269 (but see the full license for restrictions).
266−
270+
267271 The full text of these licenses is reproduced below. All of the
268272 licenses are BSD-style or compatible.
269−
273+
270274 -----------------------------------------------------------------------------
271−
275+
272276 The Glasgow Haskell Compiler License
273−
274− Copyright 2004, The University Court of the University of Glasgow.
277+
278+ Copyright 2004, The University Court of the University of Glasgow.
275279 All rights reserved.
276−
280+
277281 Redistribution and use in source and binary forms, with or without
278282 modification, are permitted provided that the following conditions are met:
279−
283+
280284 - Redistributions of source code must retain the above copyright notice,
281285 this list of conditions and the following disclaimer.
282−
286+
283287 - Redistributions in binary form must reproduce the above copyright notice,
284288 this list of conditions and the following disclaimer in the documentation
285289 and/or other materials provided with the distribution.
286−
290+
287291 - Neither name of the University nor the names of its contributors may be
288292 used to endorse or promote products derived from this software without
289− specific prior written permission.
290−
293+ specific prior written permission.
294+
291295 THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
292296 GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
293297 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
@@ -300,14 +304,14 @@ array LICENSE file:
300304 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301305 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
302306 DAMAGE.
303−
307+
304308 -----------------------------------------------------------------------------
305−
309+
306310 Code derived from the document "Report on the Programming Language
307311 Haskell 98", is distributed under the following license:
308−
312+
309313 Copyright (c) 2002 Simon Peyton Jones
310−
314+
311315 The authors intend this Report to belong to the entire Haskell
312316 community, and so we grant permission to copy and distribute it for
313317 any purpose, provided that it is reproduced in its entirety,
@@ -315,15 +319,15 @@ array LICENSE file:
315319 copied and distributed for any purpose, provided that the modified
316320 version is clearly presented as such, and that it does not claim to
317321 be a definition of the Haskell 98 Language.
318−
322+
319323 -----------------------------------------------------------------------------
320−
324+
321325 Code derived from the document "The Haskell 98 Foreign Function
322326 Interface, An Addendum to the Haskell 98 Report" is distributed under
323327 the following license:
324−
328+
325329 Copyright (c) 2002 Manuel M. T. Chakravarty
326−
330+
327331 The authors intend this Report to belong to the entire Haskell
328332 community, and so we grant permission to copy and distribute it for
329333 any purpose, provided that it is reproduced in its entirety,
@@ -331,30 +335,30 @@ array LICENSE file:
331335 copied and distributed for any purpose, provided that the modified
332336 version is clearly presented as such, and that it does not claim to
333337 be a definition of the Haskell 98 Foreign Function Interface.
334−
338+
335339 -----------------------------------------------------------------------------
336340
337341attoparsec LICENSE file:
338342
339343 Copyright (c) Lennart Kolmodin
340−
344+
341345 All rights reserved.
342−
346+
343347 Redistribution and use in source and binary forms, with or without
344348 modification, are permitted provided that the following conditions
345349 are met:
346−
350+
347351 1. Redistributions of source code must retain the above copyright
348352 notice, this list of conditions and the following disclaimer.
349−
353+
350354 2. Redistributions in binary form must reproduce the above copyright
351355 notice, this list of conditions and the following disclaimer in the
352356 documentation and/or other materials provided with the distribution.
353−
357+
354358 3. Neither the name of the author nor the names of his contributors
355359 may be used to endorse or promote products derived from this software
356360 without specific prior written permission.
357−
361+
358362 THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
359363 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
360364 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -370,43 +374,43 @@ attoparsec LICENSE file:
370374base LICENSE file:
371375
372376 This library (libraries/base) is derived from code from several
373− sources:
374−
377+ sources:
378+
375379 * Code from the GHC project which is largely (c) The University of
376380 Glasgow, and distributable under a BSD-style license (see below),
377−
381+
378382 * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
379383 and freely redistributable (but see the full license for
380384 restrictions).
381−
385+
382386 * Code from the Haskell Foreign Function Interface specification,
383387 which is (c) Manuel M. T. Chakravarty and freely redistributable
384388 (but see the full license for restrictions).
385−
389+
386390 The full text of these licenses is reproduced below. All of the
387391 licenses are BSD-style or compatible.
388−
392+
389393 -----------------------------------------------------------------------------
390−
394+
391395 The Glasgow Haskell Compiler License
392−
393− Copyright 2004, The University Court of the University of Glasgow.
396+
397+ Copyright 2004, The University Court of the University of Glasgow.
394398 All rights reserved.
395−
399+
396400 Redistribution and use in source and binary forms, with or without
397401 modification, are permitted provided that the following conditions are met:
398−
402+
399403 - Redistributions of source code must retain the above copyright notice,
400404 this list of conditions and the following disclaimer.
401−
405+
402406 - Redistributions in binary form must reproduce the above copyright notice,
403407 this list of conditions and the following disclaimer in the documentation
404408 and/or other materials provided with the distribution.
405−
409+
406410 - Neither name of the University nor the names of its contributors may be
407411 used to endorse or promote products derived from this software without
408− specific prior written permission.
409−
412+ specific prior written permission.
413+
410414 THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
411415 GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
412416 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
@@ -419,14 +423,14 @@ base LICENSE file:
419423 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
420424 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
421425 DAMAGE.
422−
426+
423427 -----------------------------------------------------------------------------
424−
428+
425429 Code derived from the document "Report on the Programming Language
426430 Haskell 98", is distributed under the following license:
427−
431+
428432 Copyright (c) 2002 Simon Peyton Jones
429−
433+
430434 The authors intend this Report to belong to the entire Haskell
431435 community, and so we grant permission to copy and distribute it for
432436 any purpose, provided that it is reproduced in its entirety,
@@ -434,15 +438,15 @@ base LICENSE file:
434438 copied and distributed for any purpose, provided that the modified
435439 version is clearly presented as such, and that it does not claim to
436440 be a definition of the Haskell 98 Language.
437−
441+
438442 -----------------------------------------------------------------------------
439−
443+
440444 Code derived from the document "The Haskell 98 Foreign Function
441445 Interface, An Addendum to the Haskell 98 Report" is distributed under
442446 the following license:
443−
447+
444448 Copyright (c) 2002 Manuel M. T. Chakravarty
445−
449+
446450 The authors intend this Report to belong to the entire Haskell
447451 community, and so we grant permission to copy and distribute it for
448452 any purpose, provided that it is reproduced in its entirety,
@@ -450,30 +454,52 @@ base LICENSE file:
450454 copied and distributed for any purpose, provided that the modified
451455 version is clearly presented as such, and that it does not claim to
452456 be a definition of the Haskell 98 Foreign Function Interface.
453−
457+
454458 -----------------------------------------------------------------------------
455459
460+base-compat LICENSE file:
461+
462+ Copyright (c) 2012-2015 Simon Hengel <sol@typeful.net> and Ryan Scott <ryan.gl.scott@ku.edu>
463+
464+ Permission is hereby granted, free of charge, to any person obtaining a copy
465+ of this software and associated documentation files (the "Software"), to deal
466+ in the Software without restriction, including without limitation the rights
467+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
468+ copies of the Software, and to permit persons to whom the Software is
469+ furnished to do so, subject to the following conditions:
470+
471+ The above copyright notice and this permission notice shall be included in
472+ all copies or substantial portions of the Software.
473+
474+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
475+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
476+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
477+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
478+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
479+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
480+ THE SOFTWARE.
481+
456482binary LICENSE file:
457483
458484 Copyright (c) Lennart Kolmodin
459−
485+
460486 All rights reserved.
461−
487+
462488 Redistribution and use in source and binary forms, with or without
463489 modification, are permitted provided that the following conditions
464490 are met:
465−
491+
466492 1. Redistributions of source code must retain the above copyright
467493 notice, this list of conditions and the following disclaimer.
468−
494+
469495 2. Redistributions in binary form must reproduce the above copyright
470496 notice, this list of conditions and the following disclaimer in the
471497 documentation and/or other materials provided with the distribution.
472−
498+
473499 3. Neither the name of the author nor the names of his contributors
474500 may be used to endorse or promote products derived from this software
475501 without specific prior written permission.
476−
502+
477503 THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
478504 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
479505 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -489,24 +515,24 @@ binary LICENSE file:
489515blaze-builder LICENSE file:
490516
491517 Copyright Jasper Van der Jeugt 2010, Simon Meier 2010 & 2011
492−
518+
493519 All rights reserved.
494−
520+
495521 Redistribution and use in source and binary forms, with or without
496522 modification, are permitted provided that the following conditions are met:
497−
523+
498524 * Redistributions of source code must retain the above copyright
499525 notice, this list of conditions and the following disclaimer.
500−
526+
501527 * Redistributions in binary form must reproduce the above
502528 copyright notice, this list of conditions and the following
503529 disclaimer in the documentation and/or other materials provided
504530 with the distribution.
505−
531+
506532 * Neither the name of Jasper Van der Jeugt nor the names of other
507533 contributors may be used to endorse or promote products derived
508534 from this software without specific prior written permission.
509−
535+
510536 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
511537 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
512538 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -522,7 +548,7 @@ blaze-builder LICENSE file:
522548bower-json LICENSE file:
523549
524550 Copyright (c) 2015 Harry Garrood
525−
551+
526552 Permission is hereby granted, free of charge, to any person obtaining
527553 a copy of this software and associated documentation files (the
528554 "Software"), to deal in the Software without restriction, including
@@ -530,10 +556,10 @@ bower-json LICENSE file:
530556 distribute, sublicense, and/or sell copies of the Software, and to
531557 permit persons to whom the Software is furnished to do so, subject to
532558 the following conditions:
533−
559+
534560 The above copyright notice and this permission notice shall be included
535561 in all copies or substantial portions of the Software.
536−
562+
537563 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
538564 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
539565 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -545,7 +571,7 @@ bower-json LICENSE file:
545571boxes LICENSE file:
546572
547573 Copyright (c) Brent Yorgey 2008
548−
574+
549575 Redistribution and use in source and binary forms, with or without
550576 modification, are permitted provided that the following conditions
551577 are met:
@@ -557,9 +583,9 @@ boxes LICENSE file:
557583 3. Neither the name of the author nor the names of other contributors
558584 may be used to endorse or promote products derived from this software
559585 without specific prior written permission.
560−
586+
561587 All other rights are reserved.
562−
588+
563589 THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND
564590 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
565591 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -578,9 +604,9 @@ bytestring LICENSE file:
578604 (c) Duncan Coutts 2006-2015
579605 (c) David Roundy 2003-2005
580606 (c) Simon Meier 2010-2011
581−
607+
582608 All rights reserved.
583−
609+
584610 Redistribution and use in source and binary forms, with or without
585611 modification, are permitted provided that the following conditions
586612 are met:
@@ -592,7 +618,7 @@ bytestring LICENSE file:
592618 3. Neither the name of the author nor the names of his contributors
593619 may be used to endorse or promote products derived from this software
594620 without specific prior written permission.
595−
621+
596622 THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
597623 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
598624 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -608,24 +634,24 @@ bytestring LICENSE file:
608634containers LICENSE file:
609635
610636 The Glasgow Haskell Compiler License
611−
637+
612638 Copyright 2004, The University Court of the University of Glasgow.
613639 All rights reserved.
614−
640+
615641 Redistribution and use in source and binary forms, with or without
616642 modification, are permitted provided that the following conditions are met:
617−
643+
618644 - Redistributions of source code must retain the above copyright notice,
619645 this list of conditions and the following disclaimer.
620−
646+
621647 - Redistributions in binary form must reproduce the above copyright notice,
622648 this list of conditions and the following disclaimer in the documentation
623649 and/or other materials provided with the distribution.
624−
650+
625651 - Neither name of the University nor the names of its contributors may be
626652 used to endorse or promote products derived from this software without
627653 specific prior written permission.
628−
654+
629655 THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
630656 GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
631657 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
@@ -644,28 +670,28 @@ deepseq LICENSE file:
644670 This library (deepseq) is derived from code from the GHC project which
645671 is largely (c) The University of Glasgow, and distributable under a
646672 BSD-style license (see below).
647−
673+
648674 -----------------------------------------------------------------------------
649−
675+
650676 The Glasgow Haskell Compiler License
651−
652− Copyright 2001-2009, The University Court of the University of Glasgow.
677+
678+ Copyright 2001-2009, The University Court of the University of Glasgow.
653679 All rights reserved.
654−
680+
655681 Redistribution and use in source and binary forms, with or without
656682 modification, are permitted provided that the following conditions are met:
657−
683+
658684 - Redistributions of source code must retain the above copyright notice,
659685 this list of conditions and the following disclaimer.
660−
686+
661687 - Redistributions in binary form must reproduce the above copyright notice,
662688 this list of conditions and the following disclaimer in the documentation
663689 and/or other materials provided with the distribution.
664−
690+
665691 - Neither name of the University nor the names of its contributors may be
666692 used to endorse or promote products derived from this software without
667− specific prior written permission.
668−
693+ specific prior written permission.
694+
669695 THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
670696 GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
671697 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
@@ -678,45 +704,45 @@ deepseq LICENSE file:
678704 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
679705 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
680706 DAMAGE.
681−
707+
682708 -----------------------------------------------------------------------------
683709
684710directory LICENSE file:
685711
686712 This library (libraries/base) is derived from code from two
687− sources:
688−
713+ sources:
714+
689715 * Code from the GHC project which is largely (c) The University of
690716 Glasgow, and distributable under a BSD-style license (see below),
691−
717+
692718 * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
693719 and freely redistributable (but see the full license for
694720 restrictions).
695−
721+
696722 The full text of these licenses is reproduced below. Both of the
697723 licenses are BSD-style or compatible.
698−
724+
699725 -----------------------------------------------------------------------------
700−
726+
701727 The Glasgow Haskell Compiler License
702−
703− Copyright 2004, The University Court of the University of Glasgow.
728+
729+ Copyright 2004, The University Court of the University of Glasgow.
704730 All rights reserved.
705−
731+
706732 Redistribution and use in source and binary forms, with or without
707733 modification, are permitted provided that the following conditions are met:
708−
734+
709735 - Redistributions of source code must retain the above copyright notice,
710736 this list of conditions and the following disclaimer.
711−
737+
712738 - Redistributions in binary form must reproduce the above copyright notice,
713739 this list of conditions and the following disclaimer in the documentation
714740 and/or other materials provided with the distribution.
715−
741+
716742 - Neither name of the University nor the names of its contributors may be
717743 used to endorse or promote products derived from this software without
718− specific prior written permission.
719−
744+ specific prior written permission.
745+
720746 THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
721747 GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
722748 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
@@ -729,14 +755,14 @@ directory LICENSE file:
729755 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
730756 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
731757 DAMAGE.
732−
758+
733759 -----------------------------------------------------------------------------
734−
760+
735761 Code derived from the document "Report on the Programming Language
736762 Haskell 98", is distributed under the following license:
737−
763+
738764 Copyright (c) 2002 Simon Peyton Jones
739−
765+
740766 The authors intend this Report to belong to the entire Haskell
741767 community, and so we grant permission to copy and distribute it for
742768 any purpose, provided that it is reproduced in its entirety,
@@ -744,31 +770,31 @@ directory LICENSE file:
744770 copied and distributed for any purpose, provided that the modified
745771 version is clearly presented as such, and that it does not claim to
746772 be a definition of the Haskell 98 Language.
747−
773+
748774 -----------------------------------------------------------------------------
749775
750776dlist LICENSE file:
751777
752778 Copyright (c) 2006-2009 Don Stewart, 2013-2014 Sean Leather
753−
779+
754780 All rights reserved.
755−
781+
756782 Redistribution and use in source and binary forms, with or without
757783 modification, are permitted provided that the following conditions are
758784 met:
759−
785+
760786 * Redistributions of source code must retain the above copyright
761787 notice, this list of conditions and the following disclaimer.
762−
788+
763789 * Redistributions in binary form must reproduce the above
764790 copyright notice, this list of conditions and the following
765791 disclaimer in the documentation and/or other materials provided
766792 with the distribution.
767−
793+
768794 * Neither the name of Don Stewart nor the names of other
769795 contributors may be used to endorse or promote products derived
770796 from this software without specific prior written permission.
771−
797+
772798 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
773799 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
774800 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -785,23 +811,23 @@ filepath LICENSE file:
785811
786812 Copyright Neil Mitchell 2005-2015.
787813 All rights reserved.
788−
814+
789815 Redistribution and use in source and binary forms, with or without
790816 modification, are permitted provided that the following conditions are
791817 met:
792−
818+
793819 * Redistributions of source code must retain the above copyright
794820 notice, this list of conditions and the following disclaimer.
795−
821+
796822 * Redistributions in binary form must reproduce the above
797823 copyright notice, this list of conditions and the following
798824 disclaimer in the documentation and/or other materials provided
799825 with the distribution.
800−
826+
801827 * Neither the name of Neil Mitchell nor the names of other
802828 contributors may be used to endorse or promote products derived
803829 from this software without specific prior written permission.
804−
830+
805831 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
806832 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
807833 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -817,39 +843,39 @@ filepath LICENSE file:
817843ghc-prim LICENSE file:
818844
819845 This library (libraries/ghc-prim) is derived from code from several
820− sources:
821−
846+ sources:
847+
822848 * Code from the GHC project which is largely (c) The University of
823849 Glasgow, and distributable under a BSD-style license (see below),
824−
850+
825851 * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
826852 and freely redistributable (but see the full license for
827853 restrictions).
828−
854+
829855 The full text of these licenses is reproduced below. All of the
830856 licenses are BSD-style or compatible.
831−
857+
832858 -----------------------------------------------------------------------------
833−
859+
834860 The Glasgow Haskell Compiler License
835−
836− Copyright 2004, The University Court of the University of Glasgow.
861+
862+ Copyright 2004, The University Court of the University of Glasgow.
837863 All rights reserved.
838−
864+
839865 Redistribution and use in source and binary forms, with or without
840866 modification, are permitted provided that the following conditions are met:
841−
867+
842868 - Redistributions of source code must retain the above copyright notice,
843869 this list of conditions and the following disclaimer.
844−
870+
845871 - Redistributions in binary form must reproduce the above copyright notice,
846872 this list of conditions and the following disclaimer in the documentation
847873 and/or other materials provided with the distribution.
848−
874+
849875 - Neither name of the University nor the names of its contributors may be
850876 used to endorse or promote products derived from this software without
851− specific prior written permission.
852−
877+ specific prior written permission.
878+
853879 THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
854880 GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
855881 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
@@ -862,14 +888,14 @@ ghc-prim LICENSE file:
862888 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
863889 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
864890 DAMAGE.
865−
891+
866892 -----------------------------------------------------------------------------
867−
893+
868894 Code derived from the document "Report on the Programming Language
869895 Haskell 98", is distributed under the following license:
870−
896+
871897 Copyright (c) 2002 Simon Peyton Jones
872−
898+
873899 The authors intend this Report to belong to the entire Haskell
874900 community, and so we grant permission to copy and distribute it for
875901 any purpose, provided that it is reproduced in its entirety,
@@ -877,29 +903,29 @@ ghc-prim LICENSE file:
877903 copied and distributed for any purpose, provided that the modified
878904 version is clearly presented as such, and that it does not claim to
879905 be a definition of the Haskell 98 Language.
880−
906+
881907
882908hashable LICENSE file:
883909
884910 Copyright Milan Straka 2010
885−
911+
886912 All rights reserved.
887−
913+
888914 Redistribution and use in source and binary forms, with or without
889915 modification, are permitted provided that the following conditions are met:
890−
916+
891917 * Redistributions of source code must retain the above copyright
892918 notice, this list of conditions and the following disclaimer.
893−
919+
894920 * Redistributions in binary form must reproduce the above
895921 copyright notice, this list of conditions and the following
896922 disclaimer in the documentation and/or other materials provided
897923 with the distribution.
898−
924+
899925 * Neither the name of Milan Straka nor the names of other
900926 contributors may be used to endorse or promote products derived
901927 from this software without specific prior written permission.
902−
928+
903929 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
904930 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
905931 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -916,17 +942,17 @@ haskeline LICENSE file:
916942
917943 Copyright 2007-2009, Judah Jacobson.
918944 All Rights Reserved.
919−
945+
920946 Redistribution and use in source and binary forms, with or without
921947 modification, are permitted provided that the following conditions are met:
922−
948+
923949 - Redistribution of source code must retain the above copyright notice,
924950 this list of conditions and the following disclaimer.
925−
951+
926952 - Redistribution in binary form must reproduce the above copyright notice,
927953 this list of conditions and the following disclaimer in the documentation
928954 and/or other materials provided with the distribution.
929−
955+
930956 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY
931957 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
932958 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -941,24 +967,24 @@ haskeline LICENSE file:
941967integer-gmp LICENSE file:
942968
943969 Copyright (c) 2014, Herbert Valerio Riedel
944−
970+
945971 All rights reserved.
946−
972+
947973 Redistribution and use in source and binary forms, with or without
948974 modification, are permitted provided that the following conditions are met:
949−
975+
950976 * Redistributions of source code must retain the above copyright
951977 notice, this list of conditions and the following disclaimer.
952−
978+
953979 * Redistributions in binary form must reproduce the above
954980 copyright notice, this list of conditions and the following
955981 disclaimer in the documentation and/or other materials provided
956982 with the distribution.
957−
983+
958984 * Neither the name of Herbert Valerio Riedel nor the names of other
959985 contributors may be used to endorse or promote products derived
960986 from this software without specific prior written permission.
961−
987+
962988 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
963989 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
964990 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -974,24 +1000,24 @@ integer-gmp LICENSE file:
9741000language-javascript LICENSE file:
9751001
9761002 Copyright (c)2010, Alan Zimmerman
977−
1003+
9781004 All rights reserved.
979−
1005+
9801006 Redistribution and use in source and binary forms, with or without
9811007 modification, are permitted provided that the following conditions are met:
982−
1008+
9831009 * Redistributions of source code must retain the above copyright
9841010 notice, this list of conditions and the following disclaimer.
985−
1011+
9861012 * Redistributions in binary form must reproduce the above
9871013 copyright notice, this list of conditions and the following
9881014 disclaimer in the documentation and/or other materials provided
9891015 with the distribution.
990−
1016+
9911017 * Neither the name of Alan Zimmerman nor the names of other
9921018 contributors may be used to endorse or promote products derived
9931019 from this software without specific prior written permission.
994−
1020+
9951021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9961022 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9971023 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -1008,22 +1034,22 @@ lifted-base LICENSE file:
10081034
10091035 Copyright © 2010-2012, Bas van Dijk, Anders Kaseorg
10101036 All rights reserved.
1011−
1037+
10121038 Redistribution and use in source and binary forms, with or without
10131039 modification, are permitted provided that the following conditions are
10141040 met:
1015−
1041+
10161042 • Redistributions of source code must retain the above copyright
10171043 notice, this list of conditions and the following disclaimer.
1018−
1044+
10191045 • Redistributions in binary form must reproduce the above copyright
10201046 notice, this list of conditions and the following disclaimer in the
10211047 documentation and/or other materials provided with the distribution.
1022−
1048+
10231049 • Neither the name of the author nor the names of other contributors
10241050 may be used to endorse or promote products derived from this
10251051 software without specific prior written permission.
1026−
1052+
10271053 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10281054 “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10291055 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -1040,22 +1066,22 @@ monad-control LICENSE file:
10401066
10411067 Copyright © 2010, Bas van Dijk, Anders Kaseorg
10421068 All rights reserved.
1043−
1069+
10441070 Redistribution and use in source and binary forms, with or without
10451071 modification, are permitted provided that the following conditions are
10461072 met:
1047−
1073+
10481074 • Redistributions of source code must retain the above copyright
10491075 notice, this list of conditions and the following disclaimer.
1050−
1076+
10511077 • Redistributions in binary form must reproduce the above copyright
10521078 notice, this list of conditions and the following disclaimer in the
10531079 documentation and/or other materials provided with the distribution.
1054−
1080+
10551081 • Neither the name of the author nor the names of other contributors
10561082 may be used to endorse or promote products derived from this
10571083 software without specific prior written permission.
1058−
1084+
10591085 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10601086 “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10611087 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -1071,24 +1097,24 @@ monad-control LICENSE file:
10711097mtl LICENSE file:
10721098
10731099 The Glasgow Haskell Compiler License
1074−
1100+
10751101 Copyright 2004, The University Court of the University of Glasgow.
10761102 All rights reserved.
1077−
1103+
10781104 Redistribution and use in source and binary forms, with or without
10791105 modification, are permitted provided that the following conditions are met:
1080−
1106+
10811107 - Redistributions of source code must retain the above copyright notice,
10821108 this list of conditions and the following disclaimer.
1083−
1109+
10841110 - Redistributions in binary form must reproduce the above copyright notice,
10851111 this list of conditions and the following disclaimer in the documentation
10861112 and/or other materials provided with the distribution.
1087−
1113+
10881114 - Neither name of the University nor the names of its contributors may be
10891115 used to endorse or promote products derived from this software without
10901116 specific prior written permission.
1091−
1117+
10921118 THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
10931119 GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
10941120 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
@@ -1105,24 +1131,24 @@ mtl LICENSE file:
11051131nats LICENSE file:
11061132
11071133 Copyright 2011-2014 Edward Kmett
1108−
1134+
11091135 All rights reserved.
1110−
1136+
11111137 Redistribution and use in source and binary forms, with or without
11121138 modification, are permitted provided that the following conditions
11131139 are met:
1114−
1140+
11151141 1. Redistributions of source code must retain the above copyright
11161142 notice, this list of conditions and the following disclaimer.
1117−
1143+
11181144 2. Redistributions in binary form must reproduce the above copyright
11191145 notice, this list of conditions and the following disclaimer in the
11201146 documentation and/or other materials provided with the distribution.
1121−
1147+
11221148 3. Neither the name of the author nor the names of his contributors
11231149 may be used to endorse or promote products derived from this software
11241150 without specific prior written permission.
1125−
1151+
11261152 THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
11271153 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
11281154 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -1135,52 +1161,160 @@ nats LICENSE file:
11351161 ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
11361162 POSSIBILITY OF SUCH DAMAGE.
11371163
1138−optparse-applicative LICENSE file:
1164+old-locale LICENSE file:
11391165
1140− Copyright (c) 2012, Paolo Capriotti
1141−
1166+ This library (libraries/base) is derived from code from two
1167+ sources:
1168+
1169+ * Code from the GHC project which is largely (c) The University of
1170+ Glasgow, and distributable under a BSD-style license (see below),
1171+
1172+ * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
1173+ and freely redistributable (but see the full license for
1174+ restrictions).
1175+
1176+ The full text of these licenses is reproduced below. Both of the
1177+ licenses are BSD-style or compatible.
1178+
1179+ -----------------------------------------------------------------------------
1180+
1181+ The Glasgow Haskell Compiler License
1182+
1183+ Copyright 2004, The University Court of the University of Glasgow.
11421184 All rights reserved.
1143−
1185+
11441186 Redistribution and use in source and binary forms, with or without
11451187 modification, are permitted provided that the following conditions are met:
1146−
1147− * Redistributions of source code must retain the above copyright
1148− notice, this list of conditions and the following disclaimer.
1149−
1150− * Redistributions in binary form must reproduce the above
1151− copyright notice, this list of conditions and the following
1152− disclaimer in the documentation and/or other materials provided
1153− with the distribution.
1154−
1155− * Neither the name of Paolo Capriotti nor the names of other
1156− contributors may be used to endorse or promote products derived
1157− from this software without specific prior written permission.
1158−
1159− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1160− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1161− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1162− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1163− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1164− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1165− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1166− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1167− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1168− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1169− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11701188
1171−parsec LICENSE file:
1189+ - Redistributions of source code must retain the above copyright notice,
1190+ this list of conditions and the following disclaimer.
11721191
1173− Copyright 1999-2000, Daan Leijen; 2007, Paolo Martini. All rights reserved.
1174−
1175− Redistribution and use in source and binary forms, with or without
1176− modification, are permitted provided that the following conditions are met:
1177−
1178− * Redistributions of source code must retain the above copyright notice,
1179− this list of conditions and the following disclaimer.
1180− * Redistributions in binary form must reproduce the above copyright
1192+ - Redistributions in binary form must reproduce the above copyright notice,
1193+ this list of conditions and the following disclaimer in the documentation
1194+ and/or other materials provided with the distribution.
1195+
1196+ - Neither name of the University nor the names of its contributors may be
1197+ used to endorse or promote products derived from this software without
1198+ specific prior written permission.
1199+
1200+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
1201+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1202+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
1203+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
1204+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
1205+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1206+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1207+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1208+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1209+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1210+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
1211+ DAMAGE.
1212+
1213+ -----------------------------------------------------------------------------
1214+
1215+ Code derived from the document "Report on the Programming Language
1216+ Haskell 98", is distributed under the following license:
1217+
1218+ Copyright (c) 2002 Simon Peyton Jones
1219+
1220+ The authors intend this Report to belong to the entire Haskell
1221+ community, and so we grant permission to copy and distribute it for
1222+ any purpose, provided that it is reproduced in its entirety,
1223+ including this Notice. Modified versions of this Report may also be
1224+ copied and distributed for any purpose, provided that the modified
1225+ version is clearly presented as such, and that it does not claim to
1226+ be a definition of the Haskell 98 Language.
1227+
1228+ -----------------------------------------------------------------------------
1229+
1230+optparse-applicative LICENSE file:
1231+
1232+ Copyright (c) 2012, Paolo Capriotti
1233+
1234+ All rights reserved.
1235+
1236+ Redistribution and use in source and binary forms, with or without
1237+ modification, are permitted provided that the following conditions are met:
1238+
1239+ * Redistributions of source code must retain the above copyright
1240+ notice, this list of conditions and the following disclaimer.
1241+
1242+ * Redistributions in binary form must reproduce the above
1243+ copyright notice, this list of conditions and the following
1244+ disclaimer in the documentation and/or other materials provided
1245+ with the distribution.
1246+
1247+ * Neither the name of Paolo Capriotti nor the names of other
1248+ contributors may be used to endorse or promote products derived
1249+ from this software without specific prior written permission.
1250+
1251+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1252+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1253+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1254+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1255+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1256+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1257+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1258+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1259+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1260+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1261+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1262+
1263+parallel LICENSE file:
1264+
1265+ This library (libraries/parallel) is derived from code from
1266+ the GHC project which is largely (c) The University of
1267+ Glasgow, and distributable under a BSD-style license (see below).
1268+
1269+ -----------------------------------------------------------------------------
1270+
1271+ The Glasgow Haskell Compiler License
1272+
1273+ Copyright 2004, The University Court of the University of Glasgow.
1274+ All rights reserved.
1275+
1276+ Redistribution and use in source and binary forms, with or without
1277+ modification, are permitted provided that the following conditions are met:
1278+
1279+ - Redistributions of source code must retain the above copyright notice,
1280+ this list of conditions and the following disclaimer.
1281+
1282+ - Redistributions in binary form must reproduce the above copyright notice,
1283+ this list of conditions and the following disclaimer in the documentation
1284+ and/or other materials provided with the distribution.
1285+
1286+ - Neither name of the University nor the names of its contributors may be
1287+ used to endorse or promote products derived from this software without
1288+ specific prior written permission.
1289+
1290+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
1291+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1292+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
1293+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
1294+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
1295+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1296+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1297+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1298+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1299+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1300+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
1301+ DAMAGE.
1302+
1303+ -----------------------------------------------------------------------------
1304+
1305+parsec LICENSE file:
1306+
1307+ Copyright 1999-2000, Daan Leijen; 2007, Paolo Martini. All rights reserved.
1308+
1309+ Redistribution and use in source and binary forms, with or without
1310+ modification, are permitted provided that the following conditions are met:
1311+
1312+ * Redistributions of source code must retain the above copyright notice,
1313+ this list of conditions and the following disclaimer.
1314+ * Redistributions in binary form must reproduce the above copyright
11811315 notice, this list of conditions and the following disclaimer in the
11821316 documentation and/or other materials provided with the distribution.
1183−
1317+
11841318 This software is provided by the copyright holders "as is" and any express or
11851319 implied warranties, including, but not limited to, the implied warranties of
11861320 merchantability and fitness for a particular purpose are disclaimed. In no
@@ -1195,19 +1329,19 @@ parsec LICENSE file:
11951329pattern-arrows LICENSE file:
11961330
11971331 The MIT License (MIT)
1198−
1332+
11991333 Copyright (c) 2013 Phil Freeman
1200−
1334+
12011335 Permission is hereby granted, free of charge, to any person obtaining a copy of
12021336 this software and associated documentation files (the "Software"), to deal in
12031337 the Software without restriction, including without limitation the rights to
12041338 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
12051339 the Software, and to permit persons to whom the Software is furnished to do so,
12061340 subject to the following conditions:
1207−
1341+
12081342 The above copyright notice and this permission notice shall be included in all
12091343 copies or substantial portions of the Software.
1210−
1344+
12111345 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12121346 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
12131347 FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
@@ -1220,28 +1354,28 @@ pretty LICENSE file:
12201354 This library (libraries/pretty) is derived from code from
12211355 the GHC project which is largely (c) The University of
12221356 Glasgow, and distributable under a BSD-style license (see below).
1223−
1357+
12241358 -----------------------------------------------------------------------------
1225−
1359+
12261360 The Glasgow Haskell Compiler License
1227−
1228− Copyright 2004, The University Court of the University of Glasgow.
1361+
1362+ Copyright 2004, The University Court of the University of Glasgow.
12291363 All rights reserved.
1230−
1364+
12311365 Redistribution and use in source and binary forms, with or without
12321366 modification, are permitted provided that the following conditions are met:
1233−
1367+
12341368 - Redistributions of source code must retain the above copyright notice,
12351369 this list of conditions and the following disclaimer.
1236−
1370+
12371371 - Redistributions in binary form must reproduce the above copyright notice,
12381372 this list of conditions and the following disclaimer in the documentation
12391373 and/or other materials provided with the distribution.
1240−
1374+
12411375 - Neither name of the University nor the names of its contributors may be
12421376 used to endorse or promote products derived from this software without
1243− specific prior written permission.
1244−
1377+ specific prior written permission.
1378+
12451379 THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
12461380 GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
12471381 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
@@ -1254,28 +1388,28 @@ pretty LICENSE file:
12541388 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
12551389 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
12561390 DAMAGE.
1257−
1391+
12581392 -----------------------------------------------------------------------------
12591393
12601394primitive LICENSE file:
12611395
12621396 Copyright (c) 2008-2009, Roman Leshchinskiy
12631397 All rights reserved.
1264−
1398+
12651399 Redistribution and use in source and binary forms, with or without
12661400 modification, are permitted provided that the following conditions are met:
1267−
1401+
12681402 - Redistributions of source code must retain the above copyright notice,
12691403 this list of conditions and the following disclaimer.
1270−
1404+
12711405 - Redistributions in binary form must reproduce the above copyright notice,
12721406 this list of conditions and the following disclaimer in the documentation
12731407 and/or other materials provided with the distribution.
1274−
1408+
12751409 - Neither name of the University nor the names of its contributors may be
12761410 used to endorse or promote products derived from this software without
1277− specific prior written permission.
1278−
1411+ specific prior written permission.
1412+
12791413 THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
12801414 GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
12811415 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
@@ -1288,44 +1422,44 @@ primitive LICENSE file:
12881422 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
12891423 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
12901424 DAMAGE.
1291−
1425+
12921426
12931427process LICENSE file:
12941428
12951429 This library (libraries/process) is derived from code from two
1296− sources:
1297−
1430+ sources:
1431+
12981432 * Code from the GHC project which is largely (c) The University of
12991433 Glasgow, and distributable under a BSD-style license (see below),
1300−
1434+
13011435 * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
13021436 and freely redistributable (but see the full license for
13031437 restrictions).
1304−
1438+
13051439 The full text of these licenses is reproduced below. Both of the
13061440 licenses are BSD-style or compatible.
1307−
1441+
13081442 -----------------------------------------------------------------------------
1309−
1443+
13101444 The Glasgow Haskell Compiler License
1311−
1312− Copyright 2004, The University Court of the University of Glasgow.
1445+
1446+ Copyright 2004, The University Court of the University of Glasgow.
13131447 All rights reserved.
1314−
1448+
13151449 Redistribution and use in source and binary forms, with or without
13161450 modification, are permitted provided that the following conditions are met:
1317−
1451+
13181452 - Redistributions of source code must retain the above copyright notice,
13191453 this list of conditions and the following disclaimer.
1320−
1454+
13211455 - Redistributions in binary form must reproduce the above copyright notice,
13221456 this list of conditions and the following disclaimer in the documentation
13231457 and/or other materials provided with the distribution.
1324−
1458+
13251459 - Neither name of the University nor the names of its contributors may be
13261460 used to endorse or promote products derived from this software without
1327− specific prior written permission.
1328−
1461+ specific prior written permission.
1462+
13291463 THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
13301464 GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
13311465 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
@@ -1338,14 +1472,14 @@ process LICENSE file:
13381472 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
13391473 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
13401474 DAMAGE.
1341−
1475+
13421476 -----------------------------------------------------------------------------
1343−
1477+
13441478 Code derived from the document "Report on the Programming Language
13451479 Haskell 98", is distributed under the following license:
1346−
1480+
13471481 Copyright (c) 2002 Simon Peyton Jones
1348−
1482+
13491483 The authors intend this Report to belong to the entire Haskell
13501484 community, and so we grant permission to copy and distribute it for
13511485 any purpose, provided that it is reproduced in its entirety,
@@ -1353,7 +1487,7 @@ process LICENSE file:
13531487 copied and distributed for any purpose, provided that the modified
13541488 version is clearly presented as such, and that it does not claim to
13551489 be a definition of the Haskell 98 Language.
1356−
1490+
13571491 -----------------------------------------------------------------------------
13581492
13591493rts LICENSE file:
@@ -1364,23 +1498,23 @@ safe LICENSE file:
13641498
13651499 Copyright Neil Mitchell 2007-2015.
13661500 All rights reserved.
1367−
1501+
13681502 Redistribution and use in source and binary forms, with or without
13691503 modification, are permitted provided that the following conditions are
13701504 met:
1371−
1505+
13721506 * Redistributions of source code must retain the above copyright
13731507 notice, this list of conditions and the following disclaimer.
1374−
1508+
13751509 * Redistributions in binary form must reproduce the above
13761510 copyright notice, this list of conditions and the following
13771511 disclaimer in the documentation and/or other materials provided
13781512 with the distribution.
1379−
1513+
13801514 * Neither the name of Neil Mitchell nor the names of other
13811515 contributors may be used to endorse or promote products derived
13821516 from this software without specific prior written permission.
1383−
1517+
13841518 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13851519 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13861520 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -1396,24 +1530,24 @@ safe LICENSE file:
13961530scientific LICENSE file:
13971531
13981532 Copyright (c) 2013, Bas van Dijk
1399−
1533+
14001534 All rights reserved.
1401−
1535+
14021536 Redistribution and use in source and binary forms, with or without
14031537 modification, are permitted provided that the following conditions are met:
1404−
1538+
14051539 * Redistributions of source code must retain the above copyright
14061540 notice, this list of conditions and the following disclaimer.
1407−
1541+
14081542 * Redistributions in binary form must reproduce the above
14091543 copyright notice, this list of conditions and the following
14101544 disclaimer in the documentation and/or other materials provided
14111545 with the distribution.
1412−
1546+
14131547 * Neither the name of Bas van Dijk nor the names of other
14141548 contributors may be used to endorse or promote products derived
14151549 from this software without specific prior written permission.
1416−
1550+
14171551 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14181552 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14191553 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -1429,20 +1563,20 @@ scientific LICENSE file:
14291563semigroups LICENSE file:
14301564
14311565 Copyright 2011-2015 Edward Kmett
1432−
1566+
14331567 All rights reserved.
1434−
1568+
14351569 Redistribution and use in source and binary forms, with or without
14361570 modification, are permitted provided that the following conditions
14371571 are met:
1438−
1572+
14391573 1. Redistributions of source code must retain the above copyright
14401574 notice, this list of conditions and the following disclaimer.
1441−
1575+
14421576 2. Redistributions in binary form must reproduce the above copyright
14431577 notice, this list of conditions and the following disclaimer in the
14441578 documentation and/or other materials provided with the distribution.
1445−
1579+
14461580 THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
14471581 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
14481582 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -1458,9 +1592,9 @@ semigroups LICENSE file:
14581592split LICENSE file:
14591593
14601594 Copyright (c) 2008 Brent Yorgey, Louis Wasserman
1461−
1595+
14621596 All rights reserved.
1463−
1597+
14641598 Redistribution and use in source and binary forms, with or without
14651599 modification, are permitted provided that the following conditions
14661600 are met:
@@ -1472,7 +1606,7 @@ split LICENSE file:
14721606 3. Neither the name of the author nor the names of other contributors
14731607 may be used to endorse or promote products derived from this software
14741608 without specific prior written permission.
1475−
1609+
14761610 THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND
14771611 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14781612 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -1488,24 +1622,24 @@ split LICENSE file:
14881622stm LICENSE file:
14891623
14901624 The Glasgow Haskell Compiler License
1491−
1492− Copyright 2004, The University Court of the University of Glasgow.
1625+
1626+ Copyright 2004, The University Court of the University of Glasgow.
14931627 All rights reserved.
1494−
1628+
14951629 Redistribution and use in source and binary forms, with or without
14961630 modification, are permitted provided that the following conditions are met:
1497−
1631+
14981632 - Redistributions of source code must retain the above copyright notice,
14991633 this list of conditions and the following disclaimer.
1500−
1634+
15011635 - Redistributions in binary form must reproduce the above copyright notice,
15021636 this list of conditions and the following disclaimer in the documentation
15031637 and/or other materials provided with the distribution.
1504−
1638+
15051639 - Neither name of the University nor the names of its contributors may be
15061640 used to endorse or promote products derived from this software without
1507− specific prior written permission.
1508−
1641+ specific prior written permission.
1642+
15091643 THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
15101644 GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
15111645 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
@@ -1521,112 +1655,145 @@ stm LICENSE file:
15211655
15221656syb LICENSE file:
15231657
1524− This library (libraries/syb) is derived from code from several
1525− sources:
1526−
1527− * Code from the GHC project which is largely (c) The University of
1528− Glasgow, and distributable under a BSD-style license (see below),
1529−
1530− * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
1531− and freely redistributable (but see the full license for
1532− restrictions).
1533−
1534− * Code from the Haskell Foreign Function Interface specification,
1535− which is (c) Manuel M. T. Chakravarty and freely redistributable
1536− (but see the full license for restrictions).
1537−
1538− The full text of these licenses is reproduced below. All of the
1539− licenses are BSD-style or compatible.
1540−
1541− -----------------------------------------------------------------------------
1542−
1543− The Glasgow Haskell Compiler License
1544−
1545− Copyright 2004, The University Court of the University of Glasgow.
1546− All rights reserved.
1547−
1548− Redistribution and use in source and binary forms, with or without
1549− modification, are permitted provided that the following conditions are met:
1550−
1551− - Redistributions of source code must retain the above copyright notice,
1552− this list of conditions and the following disclaimer.
1553−
1554− - Redistributions in binary form must reproduce the above copyright notice,
1555− this list of conditions and the following disclaimer in the documentation
1556− and/or other materials provided with the distribution.
1557−
1558− - Neither name of the University nor the names of its contributors may be
1559− used to endorse or promote products derived from this software without
1560− specific prior written permission.
1561−
1562− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
1563− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1564− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
1565− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
1566− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
1567− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1568− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1569− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1570− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1571− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1572− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
1573− DAMAGE.
1574−
1575− -----------------------------------------------------------------------------
1576−
1577− Code derived from the document "Report on the Programming Language
1578− Haskell 98", is distributed under the following license:
1579−
1580− Copyright (c) 2002 Simon Peyton Jones
1581−
1582− The authors intend this Report to belong to the entire Haskell
1583− community, and so we grant permission to copy and distribute it for
1584− any purpose, provided that it is reproduced in its entirety,
1585− including this Notice. Modified versions of this Report may also be
1586− copied and distributed for any purpose, provided that the modified
1587− version is clearly presented as such, and that it does not claim to
1588− be a definition of the Haskell 98 Language.
1589−
1590− -----------------------------------------------------------------------------
1591−
1592− Code derived from the document "The Haskell 98 Foreign Function
1593− Interface, An Addendum to the Haskell 98 Report" is distributed under
1594− the following license:
1595−
1596− Copyright (c) 2002 Manuel M. T. Chakravarty
1597−
1598− The authors intend this Report to belong to the entire Haskell
1599− community, and so we grant permission to copy and distribute it for
1600− any purpose, provided that it is reproduced in its entirety,
1601− including this Notice. Modified versions of this Report may also be
1602− copied and distributed for any purpose, provided that the modified
1603− version is clearly presented as such, and that it does not claim to
1604− be a definition of the Haskell 98 Foreign Function Interface.
1605−
1606− -----------------------------------------------------------------------------
1658+ This library (libraries/syb) is derived from code from several
1659+ sources:
1660+
1661+ * Code from the GHC project which is largely (c) The University of
1662+ Glasgow, and distributable under a BSD-style license (see below),
1663+
1664+ * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
1665+ and freely redistributable (but see the full license for
1666+ restrictions).
1667+
1668+ * Code from the Haskell Foreign Function Interface specification,
1669+ which is (c) Manuel M. T. Chakravarty and freely redistributable
1670+ (but see the full license for restrictions).
1671+
1672+ The full text of these licenses is reproduced below. All of the
1673+ licenses are BSD-style or compatible.
1674+
1675+ -----------------------------------------------------------------------------
1676+
1677+ The Glasgow Haskell Compiler License
1678+
1679+ Copyright 2004, The University Court of the University of Glasgow.
1680+ All rights reserved.
1681+
1682+ Redistribution and use in source and binary forms, with or without
1683+ modification, are permitted provided that the following conditions are met:
1684+
1685+ - Redistributions of source code must retain the above copyright notice,
1686+ this list of conditions and the following disclaimer.
1687+
1688+ - Redistributions in binary form must reproduce the above copyright notice,
1689+ this list of conditions and the following disclaimer in the documentation
1690+ and/or other materials provided with the distribution.
1691+
1692+ - Neither name of the University nor the names of its contributors may be
1693+ used to endorse or promote products derived from this software without
1694+ specific prior written permission.
1695+
1696+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
1697+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1698+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
1699+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
1700+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
1701+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1702+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1703+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1704+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1705+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1706+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
1707+ DAMAGE.
1708+
1709+ -----------------------------------------------------------------------------
1710+
1711+ Code derived from the document "Report on the Programming Language
1712+ Haskell 98", is distributed under the following license:
1713+
1714+ Copyright (c) 2002 Simon Peyton Jones
1715+
1716+ The authors intend this Report to belong to the entire Haskell
1717+ community, and so we grant permission to copy and distribute it for
1718+ any purpose, provided that it is reproduced in its entirety,
1719+ including this Notice. Modified versions of this Report may also be
1720+ copied and distributed for any purpose, provided that the modified
1721+ version is clearly presented as such, and that it does not claim to
1722+ be a definition of the Haskell 98 Language.
1723+
1724+ -----------------------------------------------------------------------------
1725+
1726+ Code derived from the document "The Haskell 98 Foreign Function
1727+ Interface, An Addendum to the Haskell 98 Report" is distributed under
1728+ the following license:
1729+
1730+ Copyright (c) 2002 Manuel M. T. Chakravarty
1731+
1732+ The authors intend this Report to belong to the entire Haskell
1733+ community, and so we grant permission to copy and distribute it for
1734+ any purpose, provided that it is reproduced in its entirety,
1735+ including this Notice. Modified versions of this Report may also be
1736+ copied and distributed for any purpose, provided that the modified
1737+ version is clearly presented as such, and that it does not claim to
1738+ be a definition of the Haskell 98 Foreign Function Interface.
1739+
1740+ -----------------------------------------------------------------------------
1741+
1742+tagged LICENSE file:
1743+
1744+ Copyright (c) 2009-2015 Edward Kmett
1745+ All rights reserved.
1746+
1747+ Redistribution and use in source and binary forms, with or without
1748+ modification, are permitted provided that the following conditions are
1749+ met:
1750+
1751+ * Redistributions of source code must retain the above copyright
1752+ notice, this list of conditions and the following disclaimer.
1753+
1754+ * Redistributions in binary form must reproduce the above
1755+ copyright notice, this list of conditions and the following
1756+ disclaimer in the documentation and/or other materials provided
1757+ with the distribution.
1758+
1759+ * Neither the name of Edward Kmett nor the names of other
1760+ contributors may be used to endorse or promote products derived
1761+ from this software without specific prior written permission.
1762+
1763+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1764+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1765+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1766+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1767+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1768+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1769+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1770+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1771+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1772+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1773+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16071774
16081775template-haskell LICENSE file:
16091776
1610−
1777+
16111778 The Glasgow Haskell Compiler License
1612−
1779+
16131780 Copyright 2002-2007, The University Court of the University of Glasgow.
16141781 All rights reserved.
1615−
1782+
16161783 Redistribution and use in source and binary forms, with or without
16171784 modification, are permitted provided that the following conditions are met:
1618−
1785+
16191786 - Redistributions of source code must retain the above copyright notice,
16201787 this list of conditions and the following disclaimer.
1621−
1788+
16221789 - Redistributions in binary form must reproduce the above copyright notice,
16231790 this list of conditions and the following disclaimer in the documentation
16241791 and/or other materials provided with the distribution.
1625−
1792+
16261793 - Neither name of the University nor the names of its contributors may be
16271794 used to endorse or promote products derived from this software without
16281795 specific prior written permission.
1629−
1796+
16301797 THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
16311798 GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
16321799 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
@@ -1639,23 +1806,23 @@ template-haskell LICENSE file:
16391806 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16401807 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
16411808 DAMAGE.
1642−
1809+
16431810
16441811terminfo LICENSE file:
16451812
16461813 Copyright 2007, Judah Jacobson.
16471814 All Rights Reserved.
1648−
1815+
16491816 Redistribution and use in source and binary forms, with or without
16501817 modification, are permitted provided that the following conditions are met:
1651−
1818+
16521819 - Redistribution of source code must retain the above copyright notice,
16531820 this list of conditions and the following disclamer.
1654−
1821+
16551822 - Redistribution in binary form must reproduce the above copyright notice,
16561823 this list of conditions and the following disclamer in the documentation
16571824 and/or other materials provided with the distribution.
1658−
1825+
16591826 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY
16601827 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16611828 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -1671,19 +1838,19 @@ text LICENSE file:
16711838
16721839 Copyright (c) 2008-2009, Tom Harper
16731840 All rights reserved.
1674−
1841+
16751842 Redistribution and use in source and binary forms, with or without
16761843 modification, are permitted provided that the following conditions
16771844 are met:
1678−
1845+
16791846 * Redistributions of source code must retain the above copyright
16801847 notice, this list of conditions and the following disclaimer.
1681−
1848+
16821849 * Redistributions in binary form must reproduce the above
16831850 copyright notice, this list of conditions and the following
16841851 disclaimer in the documentation and/or other materials provided
16851852 with the distribution.
1686−
1853+
16871854 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16881855 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16891856 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -1700,36 +1867,36 @@ time LICENSE file:
17001867
17011868 TimeLib is Copyright (c) Ashley Yakeley, 2004-2014. All rights reserved.
17021869 Certain sections are Copyright 2004, The University Court of the University of Glasgow. All rights reserved.
1703−
1870+
17041871 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1705−
1872+
17061873 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
1707−
1874+
17081875 - Neither name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
1709−
1876+
17101877 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17111878
17121879transformers LICENSE file:
17131880
17141881 The Glasgow Haskell Compiler License
1715−
1882+
17161883 Copyright 2004, The University Court of the University of Glasgow.
17171884 All rights reserved.
1718−
1885+
17191886 Redistribution and use in source and binary forms, with or without
17201887 modification, are permitted provided that the following conditions are met:
1721−
1888+
17221889 - Redistributions of source code must retain the above copyright notice,
17231890 this list of conditions and the following disclaimer.
1724−
1891+
17251892 - Redistributions in binary form must reproduce the above copyright notice,
17261893 this list of conditions and the following disclaimer in the documentation
17271894 and/or other materials provided with the distribution.
1728−
1895+
17291896 - Neither name of the University nor the names of its contributors may be
17301897 used to endorse or promote products derived from this software without
17311898 specific prior written permission.
1732−
1899+
17331900 THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
17341901 GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
17351902 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
@@ -1747,19 +1914,19 @@ transformers-base LICENSE file:
17471914
17481915 Copyright (c) 2011, Mikhail Vorozhtsov, Bas van Dijk
17491916 All rights reserved.
1750−
1751− Redistribution and use in source and binary forms, with or without
1917+
1918+ Redistribution and use in source and binary forms, with or without
17521919 modification, are permitted provided that the following conditions are met:
1753−
1754− - Redistributions of source code must retain the above copyright notice,
1920+
1921+ - Redistributions of source code must retain the above copyright notice,
17551922 this list of conditions and the following disclaimer.
1756− - Redistributions in binary form must reproduce the above copyright
1757− notice, this list of conditions and the following disclaimer in the
1923+ - Redistributions in binary form must reproduce the above copyright
1924+ notice, this list of conditions and the following disclaimer in the
17581925 documentation and/or other materials provided with the distribution.
1759− - Neither the names of the copyright owners nor the names of the
1760− contributors may be used to endorse or promote products derived
1926+ - Neither the names of the copyright owners nor the names of the
1927+ contributors may be used to endorse or promote products derived
17611928 from this software without specific prior written permission.
1762−
1929+
17631930 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17641931 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17651932 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -1771,29 +1938,29 @@ transformers-base LICENSE file:
17711938 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17721939 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17731940 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1774−
1941+
17751942
17761943transformers-compat LICENSE file:
17771944
17781945 Copyright 2012 Edward Kmett
1779−
1946+
17801947 All rights reserved.
1781−
1948+
17821949 Redistribution and use in source and binary forms, with or without
17831950 modification, are permitted provided that the following conditions
17841951 are met:
1785−
1952+
17861953 1. Redistributions of source code must retain the above copyright
17871954 notice, this list of conditions and the following disclaimer.
1788−
1955+
17891956 2. Redistributions in binary form must reproduce the above copyright
17901957 notice, this list of conditions and the following disclaimer in the
17911958 documentation and/or other materials provided with the distribution.
1792−
1959+
17931960 3. Neither the name of the author nor the names of his contributors
17941961 may be used to endorse or promote products derived from this software
17951962 without specific prior written permission.
1796−
1963+
17971964 THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
17981965 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17991966 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -1809,24 +1976,24 @@ transformers-compat LICENSE file:
18091976unix LICENSE file:
18101977
18111978 The Glasgow Haskell Compiler License
1812−
1813− Copyright 2004, The University Court of the University of Glasgow.
1979+
1980+ Copyright 2004, The University Court of the University of Glasgow.
18141981 All rights reserved.
1815−
1982+
18161983 Redistribution and use in source and binary forms, with or without
18171984 modification, are permitted provided that the following conditions are met:
1818−
1985+
18191986 - Redistributions of source code must retain the above copyright notice,
18201987 this list of conditions and the following disclaimer.
1821−
1988+
18221989 - Redistributions in binary form must reproduce the above copyright notice,
18231990 this list of conditions and the following disclaimer in the documentation
18241991 and/or other materials provided with the distribution.
1825−
1992+
18261993 - Neither name of the University nor the names of its contributors may be
18271994 used to endorse or promote products derived from this software without
1828− specific prior written permission.
1829−
1995+ specific prior written permission.
1996+
18301997 THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
18311998 GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
18321999 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
@@ -1843,24 +2010,24 @@ unix LICENSE file:
18432010unordered-containers LICENSE file:
18442011
18452012 Copyright (c) 2010, Johan Tibell
1846−
2013+
18472014 All rights reserved.
1848−
2015+
18492016 Redistribution and use in source and binary forms, with or without
18502017 modification, are permitted provided that the following conditions are met:
1851−
2018+
18522019 * Redistributions of source code must retain the above copyright
18532020 notice, this list of conditions and the following disclaimer.
1854−
2021+
18552022 * Redistributions in binary form must reproduce the above
18562023 copyright notice, this list of conditions and the following
18572024 disclaimer in the documentation and/or other materials provided
18582025 with the distribution.
1859−
2026+
18602027 * Neither the name of Johan Tibell nor the names of other
18612028 contributors may be used to endorse or promote products derived
18622029 from this software without specific prior written permission.
1863−
2030+
18642031 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18652032 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18662033 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -1904,21 +2071,21 @@ vector LICENSE file:
19042071
19052072 Copyright (c) 2008-2012, Roman Leshchinskiy
19062073 All rights reserved.
1907−
2074+
19082075 Redistribution and use in source and binary forms, with or without
19092076 modification, are permitted provided that the following conditions are met:
1910−
2077+
19112078 - Redistributions of source code must retain the above copyright notice,
19122079 this list of conditions and the following disclaimer.
1913−
2080+
19142081 - Redistributions in binary form must reproduce the above copyright notice,
19152082 this list of conditions and the following disclaimer in the documentation
19162083 and/or other materials provided with the distribution.
1917−
2084+
19182085 - Neither name of the University nor the names of its contributors may be
19192086 used to endorse or promote products derived from this software without
1920− specific prior written permission.
1921−
2087+ specific prior written permission.
2088+
19222089 THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
19232090 GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
19242091 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
@@ -1931,29 +2098,29 @@ vector LICENSE file:
19312098 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19322099 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
19332100 DAMAGE.
1934−
2101+
19352102
19362103void LICENSE file:
19372104
19382105 Copyright 2015 Edward Kmett
1939−
2106+
19402107 All rights reserved.
1941−
2108+
19422109 Redistribution and use in source and binary forms, with or without
19432110 modification, are permitted provided that the following conditions
19442111 are met:
1945−
2112+
19462113 1. Redistributions of source code must retain the above copyright
19472114 notice, this list of conditions and the following disclaimer.
1948−
2115+
19492116 2. Redistributions in binary form must reproduce the above copyright
19502117 notice, this list of conditions and the following disclaimer in the
19512118 documentation and/or other materials provided with the distribution.
1952−
2119+
19532120 3. Neither the name of the author nor the names of his contributors
19542121 may be used to endorse or promote products derived from this software
19552122 without specific prior written permission.
1956−
2123+
19572124 THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
19582125 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19592126 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
examples/passing/FieldPuns.pursnew file+8
@@ -0,0 +1,8 @@
1+module Main where
2+
3+import Prelude
4+import Control.Monad.Eff.Console
5+
6+greet { greeting, name } = log $ greeting <> ", " <> name <> "."
7+
8+main = greet { greeting: "Hello", name: "World" }
license-generator/generatedeleted−47
@@ -1,47 +0,0 @@
1−#!/bin/bash
2−# Generates the LICENSE file and prints it to standard output.
3−# Example use:
4−#
5−# ./license/generate > LICENSE
6−#
7−
8−set -e # exit on error
9−set -u # exit on undefined variable
10−set -o pipefail # propagate nonzero exit codes through pipelines
11−
12−export LC_CTYPE=C
13−export LANG=C
14−
15−if ! which cabal-dependency-licenses >/dev/null; then
16− echo "$0: the program 'cabal-dependency-licenses' is required." >&2
17− echo "$0: see Hackage: https://hackage.haskell.org/package/cabal-dependency-licenses" >&2
18− exit 1
19−fi
20−
21−echo_header() {
22− cat license-generator/header.txt
23−}
24−
25−echo_deps_names() {
26− cabal-dependency-licenses \
27− | grep '^- ' | sed 's/^..//' | gsort -h
28−}
29−
30−echo_deps_licenses() {
31− while read dep; do
32− echo "fetching LICENSE for: ${dep}" >&2
33− echo "${dep} LICENSE file:"
34− echo ""
35− curl --silent "https://hackage.haskell.org/package/${dep}/src/LICENSE" \
36− | sed 's/^/ /g' # indent by 2 characters
37− echo ""
38− done
39−}
40−
41−echo_deps_names > license-generator/tmp/deps.txt
42−
43−echo_header
44−echo ""
45−sed <license-generator/tmp/deps.txt 's/^/ /'
46−echo ""
47−echo_deps_licenses <license-generator/tmp/deps.txt
license-generator/generate.hsnew file+40
@@ -0,0 +1,40 @@
1+module Main (main) where
2+
3+import Control.Monad (forM_)
4+import Data.Char (isSpace)
5+import Data.List
6+import System.Process
7+import System.IO (hPutStrLn, stderr)
8+
9+echoHeader :: IO ()
10+echoHeader =
11+ readFile "license-generator/header.txt" >>= putStr
12+
13+depsNames :: IO [String]
14+depsNames = do
15+ i <- readProcess "cabal-dependency-licenses" [] ""
16+ return $ sort $ map (drop 2) $ filter startsWithDash $ lines i
17+ where
18+ startsWithDash ('-' : _) = True
19+ startsWithDash _ = False
20+
21+depsLicense :: String -> IO ()
22+depsLicense dep = do
23+ let licenseFile = if dep == "Glob" then "LICENSE.txt" else "LICENSE"
24+ hPutStrLn stderr dep
25+ license <- readProcess "curl" ["--silent", "https://hackage.haskell.org/package/" ++ dep ++ "/src/" ++ licenseFile] ""
26+ putStrLn $ dep ++ " LICENSE file:"
27+ putStrLn ""
28+ putStrLn $ f license
29+ where
30+ f = unlines . map trimEnd . map (" " ++) . lines
31+ trimEnd = reverse . dropWhile isSpace . reverse
32+
33+main :: IO ()
34+main = do
35+ deps <-depsNames
36+ echoHeader
37+ putStrLn ""
38+ forM_ deps $ \d -> putStr " " >> putStrLn d
39+ putStrLn ""
40+ forM_ deps depsLicense
license-generator/tmp/.gitkeepdeleted

No changes to the content.

psc-bundle/Main.hs+10−1
@@ -48,6 +48,7 @@ data Options = Options
4848 , optionsEntryPoints :: [String]
4949 , optionsMainModule :: Maybe String
5050 , optionsNamespace :: String
51+ , optionsRequirePath :: Maybe FilePath
5152 } deriving Show
5253
5354-- | Given a filename, assuming it is in the correct place on disk, infer a ModuleIdentifier.
@@ -74,7 +75,7 @@ app Options{..} = do
7475
7576 let entryIds = (map (`ModuleIdentifier` Regular) optionsEntryPoints)
7677
77− bundle input entryIds optionsMainModule optionsNamespace
78+ bundle input entryIds optionsMainModule optionsNamespace optionsRequirePath
7879
7980-- | Command line options parser.
8081options :: Parser Options
@@ -83,6 +84,7 @@ options = Options <$> some inputFile
8384 <*> many entryPoint
8485 <*> optional mainModule
8586 <*> namespace
87+ <*> optional requirePath
8688 where
8789 inputFile :: Parser FilePath
8890 inputFile = strArgument $
@@ -113,6 +115,13 @@ options = Options <$> some inputFile
113115 <> Opts.value "PS"
114116 <> showDefault
115117 <> help "Specify the namespace that PureScript modules will be exported to when running in the browser."
118+
119+ requirePath :: Parser FilePath
120+ requirePath = strOption $
121+ short 'r'
122+ <> long "require-path"
123+ <> Opts.value ""
124+ <> help "The path prefix used in require() calls in the generated JavaScript"
116125
117126-- | Make it go.
118127main :: IO ()
psci/Completion.hs+3−8
@@ -1,19 +1,14 @@
1−{-# LANGUAGE CPP #-}
2−
31module Completion where
42
3+import Prelude ()
4+import Prelude.Compat
5+
56import Data.Maybe (mapMaybe)
67import Data.List (nub, nubBy, sortBy, isPrefixOf, stripPrefix)
78import Data.Char (isUpper)
89import Data.Function (on)
9−#if __GLASGOW_HASKELL__ < 710
10−import Data.Traversable (traverse)
11−#endif
1210
1311import Control.Arrow (second)
14−#if __GLASGOW_HASKELL__ < 710
15−import Control.Applicative ((<$>), (<*>))
16−#endif
1712import Control.Monad.Trans.Reader (asks, runReaderT, ReaderT)
1813import Control.Monad.Trans.State.Strict
1914
psci/PSCi.hs+7−8
@@ -17,15 +17,14 @@
1717{-# LANGUAGE GeneralizedNewtypeDeriving #-}
1818{-# LANGUAGE RecordWildCards #-}
1919{-# LANGUAGE TupleSections #-}
20−{-# LANGUAGE CPP #-}
2120
2221module PSCi where
2322
23+import Prelude ()
24+import Prelude.Compat
25+
2426import Data.Foldable (traverse_)
2527import Data.List (intercalate, nub, sort)
26−#if __GLASGOW_HASKELL__ < 710
27−import Data.Traversable (traverse)
28−#endif
2928import Data.Tuple (swap)
3029import Data.Version (showVersion)
3130import qualified Data.Map as M
@@ -507,7 +506,7 @@ loadUserConfig = onFirstFileMatching readCommands pathGetters
507506 if exists
508507 then do
509508 ls <- lines <$> readFile configFile
510− case mapM parseCommand ls of
509+ case traverse parseCommand ls of
511510 Left err -> print err >> exitFailure
512511 Right cs -> return $ Just cs
513512 else
@@ -524,8 +523,8 @@ consoleIsDefined = any ((== P.ModuleName (map P.ProperName [ "Control", "Monad",
524523loop :: PSCiOptions -> IO ()
525524loop PSCiOptions{..} = do
526525 config <- loadUserConfig
527− inputFiles <- concat <$> mapM glob psciInputFile
528− foreignFiles <- concat <$> mapM glob psciForeignInputFiles
526+ inputFiles <- concat <$> traverse glob psciInputFile
527+ foreignFiles <- concat <$> traverse glob psciForeignInputFiles
529528 modulesOrFirstError <- loadAllModules inputFiles
530529 case modulesOrFirstError of
531530 Left errs -> putStrLn (P.prettyPrintMultipleErrors False errs) >> exitFailure
@@ -540,7 +539,7 @@ loop PSCiOptions{..} = do
540539 Right foreigns ->
541540 flip evalStateT (PSCiState inputFiles [] modules foreigns [] psciInputNodeFlags) . runInputT (setComplete completion settings) $ do
542541 outputStrLn prologueMessage
543− traverse_ (mapM_ (runPSCI . handleCommand)) config
542+ traverse_ (traverse_ (runPSCI . handleCommand)) config
544543 modules' <- lift $ gets psciLoadedModules
545544 unless (consoleIsDefined (map snd modules')) . outputStrLn $ unlines
546545 [ "PSCi requires the purescript-console module to be installed."
psci/Parser.hs+2−7
@@ -13,21 +13,16 @@
1313--
1414-----------------------------------------------------------------------------
1515
16−{-# LANGUAGE CPP #-}
17−
1816module Parser
1917 ( parseCommand
2018 ) where
2119
22−import Prelude hiding (lex)
20+import Prelude ()
21+import Prelude.Compat hiding (lex)
2322
2423import Data.Char (isSpace)
2524import Data.List (intercalate)
2625
27−#if __GLASGOW_HASKELL__ < 710
28−import Control.Applicative hiding (many)
29−#endif
30−
3126import Text.Parsec hiding ((<|>))
3227
3328import qualified Language.PureScript as P
psci/tests/Main.hs+3−4
@@ -1,14 +1,13 @@
11{-# LANGUAGE RecordWildCards #-}
22{-# LANGUAGE TupleSections #-}
3−{-# LANGUAGE CPP #-}
43
54module Main where
65
6+import Prelude ()
7+import Prelude.Compat
8+
79import Control.Monad.Trans.State.Strict (runStateT)
810import Control.Monad (when, forM)
9−#if __GLASGOW_HASKELL__ < 710
10−import Control.Applicative
11−#endif
1211import Control.Monad.Writer.Strict (runWriterT)
1312import Control.Monad.Trans.Except (runExceptT)
1413
purescript.cabal+6−4
@@ -41,6 +41,7 @@ source-repository head
4141
4242library
4343 build-depends: base >=4.6 && <5,
44+ base-compat >=0.6.0,
4445 lifted-base >= 0.2.3 && < 0.2.4,
4546 monad-control >= 1.0.0.0 && < 1.1,
4647 transformers-base >= 0.4.0 && < 0.5,
@@ -69,7 +70,8 @@ library
6970 Glob >= 0.7 && < 0.8,
7071 process >= 1.2.0 && < 1.4,
7172 safe >= 0.3.9 && < 0.4,
72− semigroups >= 0.16.2 && < 0.18
73+ semigroups >= 0.16.2 && < 0.19,
74+ parallel >= 3.2 && < 3.3
7375
7476 exposed-modules: Language.PureScript
7577 Language.PureScript.AST
@@ -212,7 +214,7 @@ executable psci
212214 build-depends: base >=4 && <5, containers -any, directory -any, filepath -any,
213215 mtl -any, optparse-applicative >= 0.10.0, parsec -any,
214216 haskeline >= 0.7.0.0, purescript -any, transformers -any,
215− transformers-compat -any, process -any, time -any, Glob -any
217+ transformers-compat -any, process -any, time -any, Glob -any, base-compat >=0.6.0
216218
217219 main-is: Main.hs
218220 buildable: True
@@ -287,7 +289,7 @@ test-suite tests
287289 build-depends: base >=4 && <5, containers -any, directory -any,
288290 filepath -any, mtl -any, parsec -any, purescript -any,
289291 transformers -any, process -any, transformers-compat -any, time -any,
290− Glob -any
292+ Glob -any, base-compat >=0.6.0
291293 type: exitcode-stdio-1.0
292294 main-is: Main.hs
293295 other-modules: TestsSetup
@@ -299,7 +301,7 @@ test-suite psci-tests
299301 mtl -any, optparse-applicative >= 0.10.0, parsec -any,
300302 haskeline >= 0.7.0.0, purescript -any, transformers -any,
301303 transformers-compat -any, process -any, HUnit -any, time -any,
302− Glob -any
304+ Glob -any, base-compat >=0.6.0
303305 type: exitcode-stdio-1.0
304306 main-is: Main.hs
305307 other-modules: TestsSetup
src/Control/Monad/Logger.hs+3−5
@@ -12,19 +12,17 @@
1212--
1313-----------------------------------------------------------------------------
1414
15−{-# LANGUAGE CPP #-}
1615{-# LANGUAGE FlexibleInstances #-}
1716{-# LANGUAGE MultiParamTypeClasses #-}
1817{-# LANGUAGE TypeFamilies #-}
1918
2019module Control.Monad.Logger where
2120
21+import Prelude ()
22+import Prelude.Compat
23+
2224import Data.IORef
2325
24−#if __GLASGOW_HASKELL__ < 710
25−import Data.Monoid
26−import Control.Applicative
27−#endif
2826import Control.Monad (ap)
2927import Control.Monad.IO.Class
3028import Control.Monad.Writer.Class
src/Control/Monad/Supply.hs+3−4
@@ -14,15 +14,14 @@
1414-----------------------------------------------------------------------------
1515
1616{-# LANGUAGE GeneralizedNewtypeDeriving #-}
17−{-# LANGUAGE CPP #-}
1817
1918module Control.Monad.Supply where
2019
20+import Prelude ()
21+import Prelude.Compat
22+
2123import Data.Functor.Identity
2224
23−#if __GLASGOW_HASKELL__ < 710
24−import Control.Applicative
25−#endif
2625import Control.Monad.State
2726import Control.Monad.Error.Class (MonadError(..))
2827import Control.Monad.Reader
src/Language/PureScript/AST/Declarations.hs+3−5
@@ -15,10 +15,12 @@
1515{-# LANGUAGE DeriveDataTypeable #-}
1616{-# LANGUAGE ScopedTypeVariables #-}
1717{-# LANGUAGE TemplateHaskell #-}
18−{-# LANGUAGE CPP #-}
1918
2019module Language.PureScript.AST.Declarations where
2120
21+import Prelude ()
22+import Prelude.Compat
23+
2224import Data.Aeson.TH
2325
2426import qualified Data.Data as D
@@ -26,10 +28,6 @@ import qualified Data.Map as M
2628
2729import Control.Monad.Identity
2830
29−#if __GLASGOW_HASKELL__ < 710
30−import Control.Applicative
31−#endif
32−
3331import Language.PureScript.AST.Binders
3432import Language.PureScript.AST.Operators
3533import Language.PureScript.AST.SourcePos
src/Language/PureScript/AST/SourcePos.hs+3−5
@@ -12,7 +12,6 @@
1212--
1313-----------------------------------------------------------------------------
1414
15−{-# LANGUAGE CPP #-}
1615{-# LANGUAGE DeriveDataTypeable #-}
1716{-# LANGUAGE ScopedTypeVariables #-}
1817{-# LANGUAGE RecordWildCards #-}
@@ -20,14 +19,13 @@
2019
2120module Language.PureScript.AST.SourcePos where
2221
22+import Prelude ()
23+import Prelude.Compat
24+
2325import qualified Data.Data as D
2426import Data.Aeson ((.=), (.:))
2527import qualified Data.Aeson as A
2628
27−#if __GLASGOW_HASKELL__ < 710
28−import Control.Applicative
29−#endif
30−
3129-- |
3230-- Source position information
3331--
src/Language/PureScript/AST/Traversals.hs+58−67
@@ -12,21 +12,12 @@
1212--
1313-----------------------------------------------------------------------------
1414
15−{-# LANGUAGE CPP #-}
16−
1715module Language.PureScript.AST.Traversals where
1816
19−#if __GLASGOW_HASKELL__ < 710
20−import Data.Monoid (Monoid(..), mconcat)
21−#endif
22−import Data.Maybe (mapMaybe)
23−#if __GLASGOW_HASKELL__ < 710
24−import Data.Traversable (traverse)
25−#endif
17+import Prelude ()
18+import Prelude.Compat
2619
27−#if __GLASGOW_HASKELL__ < 710
28−import Control.Applicative
29−#endif
20+import Data.Maybe (mapMaybe)
3021import Control.Monad
3122import Control.Arrow ((***), (+++), second)
3223
@@ -101,10 +92,10 @@ everywhereOnValuesTopDownM :: (Functor m, Applicative m, Monad m) =>
10192 (Declaration -> m Declaration, Expr -> m Expr, Binder -> m Binder)
10293everywhereOnValuesTopDownM f g h = (f' <=< f, g' <=< g, h' <=< h)
10394 where
104− f' (DataBindingGroupDeclaration ds) = DataBindingGroupDeclaration <$> mapM (f' <=< f) ds
105− f' (ValueDeclaration name nameKind bs val) = ValueDeclaration name nameKind <$> mapM (h' <=< h) bs <*> eitherM (mapM (pairM (g' <=< g) (g' <=< g))) (g' <=< g) val
106− f' (BindingGroupDeclaration ds) = BindingGroupDeclaration <$> mapM (\(name, nameKind, val) -> (,,) name nameKind <$> (g val >>= g')) ds
107− f' (TypeClassDeclaration name args implies ds) = TypeClassDeclaration name args implies <$> mapM (f' <=< f) ds
95+ f' (DataBindingGroupDeclaration ds) = DataBindingGroupDeclaration <$> traverse (f' <=< f) ds
96+ f' (ValueDeclaration name nameKind bs val) = ValueDeclaration name nameKind <$> traverse (h' <=< h) bs <*> eitherM (traverse (pairM (g' <=< g) (g' <=< g))) (g' <=< g) val
97+ f' (BindingGroupDeclaration ds) = BindingGroupDeclaration <$> traverse (\(name, nameKind, val) -> (,,) name nameKind <$> (g val >>= g')) ds
98+ f' (TypeClassDeclaration name args implies ds) = TypeClassDeclaration name args implies <$> traverse (f' <=< f) ds
10899 f' (TypeInstanceDeclaration name cs className args ds) = TypeInstanceDeclaration name cs className args <$> traverseTypeInstanceBody (traverse (f' <=< f)) ds
109100 f' (PositionedDeclaration pos com d) = PositionedDeclaration pos com <$> (f d >>= f')
110101 f' other = f other
@@ -114,37 +105,37 @@ everywhereOnValuesTopDownM f g h = (f' <=< f, g' <=< g, h' <=< h)
114105 g' (Parens v) = Parens <$> (g v >>= g')
115106 g' (OperatorSection op (Left v)) = OperatorSection <$> (g op >>= g') <*> (Left <$> (g v >>= g'))
116107 g' (OperatorSection op (Right v)) = OperatorSection <$> (g op >>= g') <*> (Right <$> (g v >>= g'))
117− g' (ArrayLiteral vs) = ArrayLiteral <$> mapM (g' <=< g) vs
118− g' (ObjectLiteral vs) = ObjectLiteral <$> mapM (sndM (g' <=< g)) vs
119− g' (ObjectConstructor vs) = ObjectConstructor <$> mapM (sndM $ maybeM (g' <=< g)) vs
108+ g' (ArrayLiteral vs) = ArrayLiteral <$> traverse (g' <=< g) vs
109+ g' (ObjectLiteral vs) = ObjectLiteral <$> traverse (sndM (g' <=< g)) vs
110+ g' (ObjectConstructor vs) = ObjectConstructor <$> traverse (sndM $ maybeM (g' <=< g)) vs
120111 g' (TypeClassDictionaryConstructorApp name v) = TypeClassDictionaryConstructorApp name <$> (g v >>= g')
121112 g' (Accessor prop v) = Accessor prop <$> (g v >>= g')
122− g' (ObjectUpdate obj vs) = ObjectUpdate <$> (g obj >>= g') <*> mapM (sndM (g' <=< g)) vs
123− g' (ObjectUpdater obj vs) = ObjectUpdater <$> (maybeM g obj >>= maybeM g') <*> mapM (sndM $ maybeM (g' <=< g)) vs
113+ g' (ObjectUpdate obj vs) = ObjectUpdate <$> (g obj >>= g') <*> traverse (sndM (g' <=< g)) vs
114+ g' (ObjectUpdater obj vs) = ObjectUpdater <$> (maybeM g obj >>= maybeM g') <*> traverse (sndM $ maybeM (g' <=< g)) vs
124115 g' (Abs name v) = Abs name <$> (g v >>= g')
125116 g' (App v1 v2) = App <$> (g v1 >>= g') <*> (g v2 >>= g')
126117 g' (IfThenElse v1 v2 v3) = IfThenElse <$> (g v1 >>= g') <*> (g v2 >>= g') <*> (g v3 >>= g')
127− g' (Case vs alts) = Case <$> mapM (g' <=< g) vs <*> mapM handleCaseAlternative alts
118+ g' (Case vs alts) = Case <$> traverse (g' <=< g) vs <*> traverse handleCaseAlternative alts
128119 g' (TypedValue check v ty) = TypedValue check <$> (g v >>= g') <*> pure ty
129− g' (Let ds v) = Let <$> mapM (f' <=< f) ds <*> (g v >>= g')
130− g' (Do es) = Do <$> mapM handleDoNotationElement es
120+ g' (Let ds v) = Let <$> traverse (f' <=< f) ds <*> (g v >>= g')
121+ g' (Do es) = Do <$> traverse handleDoNotationElement es
131122 g' (PositionedValue pos com v) = PositionedValue pos com <$> (g v >>= g')
132123 g' other = g other
133124
134− h' (ConstructorBinder ctor bs) = ConstructorBinder ctor <$> mapM (h' <=< h) bs
135− h' (ObjectBinder bs) = ObjectBinder <$> mapM (sndM (h' <=< h)) bs
136− h' (ArrayBinder bs) = ArrayBinder <$> mapM (h' <=< h) bs
125+ h' (ConstructorBinder ctor bs) = ConstructorBinder ctor <$> traverse (h' <=< h) bs
126+ h' (ObjectBinder bs) = ObjectBinder <$> traverse (sndM (h' <=< h)) bs
127+ h' (ArrayBinder bs) = ArrayBinder <$> traverse (h' <=< h) bs
137128 h' (NamedBinder name b) = NamedBinder name <$> (h b >>= h')
138129 h' (PositionedBinder pos com b) = PositionedBinder pos com <$> (h b >>= h')
139130 h' (TypedBinder t b) = TypedBinder t <$> (h b >>= h')
140131 h' other = h other
141132
142− handleCaseAlternative (CaseAlternative bs val) = CaseAlternative <$> mapM (h' <=< h) bs
143− <*> eitherM (mapM (pairM (g' <=< g) (g' <=< g))) (g' <=< g) val
133+ handleCaseAlternative (CaseAlternative bs val) = CaseAlternative <$> traverse (h' <=< h) bs
134+ <*> eitherM (traverse (pairM (g' <=< g) (g' <=< g))) (g' <=< g) val
144135
145136 handleDoNotationElement (DoNotationValue v) = DoNotationValue <$> (g' <=< g) v
146137 handleDoNotationElement (DoNotationBind b v) = DoNotationBind <$> (h' <=< h) b <*> (g' <=< g) v
147− handleDoNotationElement (DoNotationLet ds) = DoNotationLet <$> mapM (f' <=< f) ds
138+ handleDoNotationElement (DoNotationLet ds) = DoNotationLet <$> traverse (f' <=< f) ds
148139 handleDoNotationElement (PositionedDoNotationElement pos com e) = PositionedDoNotationElement pos com <$> handleDoNotationElement e
149140
150141everywhereOnValuesM :: (Functor m, Applicative m, Monad m) =>
@@ -154,11 +145,11 @@ everywhereOnValuesM :: (Functor m, Applicative m, Monad m) =>
154145 (Declaration -> m Declaration, Expr -> m Expr, Binder -> m Binder)
155146everywhereOnValuesM f g h = (f', g', h')
156147 where
157− f' (DataBindingGroupDeclaration ds) = (DataBindingGroupDeclaration <$> mapM f' ds) >>= f
158− f' (ValueDeclaration name nameKind bs val) = (ValueDeclaration name nameKind <$> mapM h' bs <*> eitherM (mapM (pairM g' g')) g' val) >>= f
159− f' (BindingGroupDeclaration ds) = (BindingGroupDeclaration <$> mapM (\(name, nameKind, val) -> (,,) name nameKind <$> g' val) ds) >>= f
160− f' (TypeClassDeclaration name args implies ds) = (TypeClassDeclaration name args implies <$> mapM f' ds) >>= f
161− f' (TypeInstanceDeclaration name cs className args ds) = (TypeInstanceDeclaration name cs className args <$> traverseTypeInstanceBody (mapM f') ds) >>= f
148+ f' (DataBindingGroupDeclaration ds) = (DataBindingGroupDeclaration <$> traverse f' ds) >>= f
149+ f' (ValueDeclaration name nameKind bs val) = (ValueDeclaration name nameKind <$> traverse h' bs <*> eitherM (traverse (pairM g' g')) g' val) >>= f
150+ f' (BindingGroupDeclaration ds) = (BindingGroupDeclaration <$> traverse (\(name, nameKind, val) -> (,,) name nameKind <$> g' val) ds) >>= f
151+ f' (TypeClassDeclaration name args implies ds) = (TypeClassDeclaration name args implies <$> traverse f' ds) >>= f
152+ f' (TypeInstanceDeclaration name cs className args ds) = (TypeInstanceDeclaration name cs className args <$> traverseTypeInstanceBody (traverse f') ds) >>= f
162153 f' (PositionedDeclaration pos com d) = (PositionedDeclaration pos com <$> f' d) >>= f
163154 f' other = f other
164155
@@ -167,37 +158,37 @@ everywhereOnValuesM f g h = (f', g', h')
167158 g' (Parens v) = (Parens <$> g' v) >>= g
168159 g' (OperatorSection op (Left v)) = (OperatorSection <$> g' op <*> (Left <$> g' v)) >>= g
169160 g' (OperatorSection op (Right v)) = (OperatorSection <$> g' op <*> (Right <$> g' v)) >>= g
170− g' (ArrayLiteral vs) = (ArrayLiteral <$> mapM g' vs) >>= g
171− g' (ObjectLiteral vs) = (ObjectLiteral <$> mapM (sndM g') vs) >>= g
172− g' (ObjectConstructor vs) = (ObjectConstructor <$> mapM (sndM $ maybeM g') vs) >>= g
161+ g' (ArrayLiteral vs) = (ArrayLiteral <$> traverse g' vs) >>= g
162+ g' (ObjectLiteral vs) = (ObjectLiteral <$> traverse (sndM g') vs) >>= g
163+ g' (ObjectConstructor vs) = (ObjectConstructor <$> traverse (sndM $ maybeM g') vs) >>= g
173164 g' (TypeClassDictionaryConstructorApp name v) = (TypeClassDictionaryConstructorApp name <$> g' v) >>= g
174165 g' (Accessor prop v) = (Accessor prop <$> g' v) >>= g
175− g' (ObjectUpdate obj vs) = (ObjectUpdate <$> g' obj <*> mapM (sndM g') vs) >>= g
176− g' (ObjectUpdater obj vs) = (ObjectUpdater <$> maybeM g' obj <*> mapM (sndM $ maybeM g') vs) >>= g
166+ g' (ObjectUpdate obj vs) = (ObjectUpdate <$> g' obj <*> traverse (sndM g') vs) >>= g
167+ g' (ObjectUpdater obj vs) = (ObjectUpdater <$> maybeM g' obj <*> traverse (sndM $ maybeM g') vs) >>= g
177168 g' (Abs name v) = (Abs name <$> g' v) >>= g
178169 g' (App v1 v2) = (App <$> g' v1 <*> g' v2) >>= g
179170 g' (IfThenElse v1 v2 v3) = (IfThenElse <$> g' v1 <*> g' v2 <*> g' v3) >>= g
180− g' (Case vs alts) = (Case <$> mapM g' vs <*> mapM handleCaseAlternative alts) >>= g
171+ g' (Case vs alts) = (Case <$> traverse g' vs <*> traverse handleCaseAlternative alts) >>= g
181172 g' (TypedValue check v ty) = (TypedValue check <$> g' v <*> pure ty) >>= g
182− g' (Let ds v) = (Let <$> mapM f' ds <*> g' v) >>= g
183− g' (Do es) = (Do <$> mapM handleDoNotationElement es) >>= g
173+ g' (Let ds v) = (Let <$> traverse f' ds <*> g' v) >>= g
174+ g' (Do es) = (Do <$> traverse handleDoNotationElement es) >>= g
184175 g' (PositionedValue pos com v) = (PositionedValue pos com <$> g' v) >>= g
185176 g' other = g other
186177
187− h' (ConstructorBinder ctor bs) = (ConstructorBinder ctor <$> mapM h' bs) >>= h
188− h' (ObjectBinder bs) = (ObjectBinder <$> mapM (sndM h') bs) >>= h
189− h' (ArrayBinder bs) = (ArrayBinder <$> mapM h' bs) >>= h
178+ h' (ConstructorBinder ctor bs) = (ConstructorBinder ctor <$> traverse h' bs) >>= h
179+ h' (ObjectBinder bs) = (ObjectBinder <$> traverse (sndM h') bs) >>= h
180+ h' (ArrayBinder bs) = (ArrayBinder <$> traverse h' bs) >>= h
190181 h' (NamedBinder name b) = (NamedBinder name <$> h' b) >>= h
191182 h' (PositionedBinder pos com b) = (PositionedBinder pos com <$> h' b) >>= h
192183 h' (TypedBinder t b) = (TypedBinder t <$> h' b) >>= h
193184 h' other = h other
194185
195− handleCaseAlternative (CaseAlternative bs val) = CaseAlternative <$> mapM h' bs
196− <*> eitherM (mapM (pairM g' g')) g' val
186+ handleCaseAlternative (CaseAlternative bs val) = CaseAlternative <$> traverse h' bs
187+ <*> eitherM (traverse (pairM g' g')) g' val
197188
198189 handleDoNotationElement (DoNotationValue v) = DoNotationValue <$> g' v
199190 handleDoNotationElement (DoNotationBind b v) = DoNotationBind <$> h' b <*> g' v
200− handleDoNotationElement (DoNotationLet ds) = DoNotationLet <$> mapM f' ds
191+ handleDoNotationElement (DoNotationLet ds) = DoNotationLet <$> traverse f' ds
201192 handleDoNotationElement (PositionedDoNotationElement pos com e) = PositionedDoNotationElement pos com <$> handleDoNotationElement e
202193
203194everythingOnValues :: (r -> r -> r) ->
@@ -345,11 +336,11 @@ everywhereWithContextOnValuesM s0 f g h i j = (f'' s0, g'' s0, h'' s0, i'' s0, j
345336 where
346337 f'' s = uncurry f' <=< f s
347338
348− f' s (DataBindingGroupDeclaration ds) = DataBindingGroupDeclaration <$> mapM (f'' s) ds
349− f' s (ValueDeclaration name nameKind bs val) = ValueDeclaration name nameKind <$> mapM (h'' s) bs <*> eitherM (mapM (pairM (g'' s) (g'' s))) (g'' s) val
350− f' s (BindingGroupDeclaration ds) = BindingGroupDeclaration <$> mapM (thirdM (g'' s)) ds
351− f' s (TypeClassDeclaration name args implies ds) = TypeClassDeclaration name args implies <$> mapM (f'' s) ds
352− f' s (TypeInstanceDeclaration name cs className args ds) = TypeInstanceDeclaration name cs className args <$> traverseTypeInstanceBody (mapM (f'' s)) ds
339+ f' s (DataBindingGroupDeclaration ds) = DataBindingGroupDeclaration <$> traverse (f'' s) ds
340+ f' s (ValueDeclaration name nameKind bs val) = ValueDeclaration name nameKind <$> traverse (h'' s) bs <*> eitherM (traverse (pairM (g'' s) (g'' s))) (g'' s) val
341+ f' s (BindingGroupDeclaration ds) = BindingGroupDeclaration <$> traverse (thirdM (g'' s)) ds
342+ f' s (TypeClassDeclaration name args implies ds) = TypeClassDeclaration name args implies <$> traverse (f'' s) ds
343+ f' s (TypeInstanceDeclaration name cs className args ds) = TypeInstanceDeclaration name cs className args <$> traverseTypeInstanceBody (traverse (f'' s)) ds
353344 f' s (PositionedDeclaration pos com d1) = PositionedDeclaration pos com <$> f'' s d1
354345 f' _ other = return other
355346
@@ -360,28 +351,28 @@ everywhereWithContextOnValuesM s0 f g h i j = (f'' s0, g'' s0, h'' s0, i'' s0, j
360351 g' s (Parens v) = Parens <$> g'' s v
361352 g' s (OperatorSection op (Left v)) = OperatorSection <$> g'' s op <*> (Left <$> g'' s v)
362353 g' s (OperatorSection op (Right v)) = OperatorSection <$> g'' s op <*> (Right <$> g'' s v)
363− g' s (ArrayLiteral vs) = ArrayLiteral <$> mapM (g'' s) vs
364− g' s (ObjectLiteral vs) = ObjectLiteral <$> mapM (sndM (g'' s)) vs
365− g' s (ObjectConstructor vs) = ObjectConstructor <$> mapM (sndM $ maybeM (g'' s)) vs
354+ g' s (ArrayLiteral vs) = ArrayLiteral <$> traverse (g'' s) vs
355+ g' s (ObjectLiteral vs) = ObjectLiteral <$> traverse (sndM (g'' s)) vs
356+ g' s (ObjectConstructor vs) = ObjectConstructor <$> traverse (sndM $ maybeM (g'' s)) vs
366357 g' s (TypeClassDictionaryConstructorApp name v) = TypeClassDictionaryConstructorApp name <$> g'' s v
367358 g' s (Accessor prop v) = Accessor prop <$> g'' s v
368− g' s (ObjectUpdate obj vs) = ObjectUpdate <$> g'' s obj <*> mapM (sndM (g'' s)) vs
369− g' s (ObjectUpdater obj vs) = ObjectUpdater <$> maybeM (g'' s) obj <*> mapM (sndM $ maybeM (g'' s)) vs
359+ g' s (ObjectUpdate obj vs) = ObjectUpdate <$> g'' s obj <*> traverse (sndM (g'' s)) vs
360+ g' s (ObjectUpdater obj vs) = ObjectUpdater <$> maybeM (g'' s) obj <*> traverse (sndM $ maybeM (g'' s)) vs
370361 g' s (Abs name v) = Abs name <$> g'' s v
371362 g' s (App v1 v2) = App <$> g'' s v1 <*> g'' s v2
372363 g' s (IfThenElse v1 v2 v3) = IfThenElse <$> g'' s v1 <*> g'' s v2 <*> g'' s v3
373− g' s (Case vs alts) = Case <$> mapM (g'' s) vs <*> mapM (i'' s) alts
364+ g' s (Case vs alts) = Case <$> traverse (g'' s) vs <*> traverse (i'' s) alts
374365 g' s (TypedValue check v ty) = TypedValue check <$> g'' s v <*> pure ty
375− g' s (Let ds v) = Let <$> mapM (f'' s) ds <*> g'' s v
376− g' s (Do es) = Do <$> mapM (j'' s) es
366+ g' s (Let ds v) = Let <$> traverse (f'' s) ds <*> g'' s v
367+ g' s (Do es) = Do <$> traverse (j'' s) es
377368 g' s (PositionedValue pos com v) = PositionedValue pos com <$> g'' s v
378369 g' _ other = return other
379370
380371 h'' s = uncurry h' <=< h s
381372
382− h' s (ConstructorBinder ctor bs) = ConstructorBinder ctor <$> mapM (h'' s) bs
383− h' s (ObjectBinder bs) = ObjectBinder <$> mapM (sndM (h'' s)) bs
384− h' s (ArrayBinder bs) = ArrayBinder <$> mapM (h'' s) bs
373+ h' s (ConstructorBinder ctor bs) = ConstructorBinder ctor <$> traverse (h'' s) bs
374+ h' s (ObjectBinder bs) = ObjectBinder <$> traverse (sndM (h'' s)) bs
375+ h' s (ArrayBinder bs) = ArrayBinder <$> traverse (h'' s) bs
385376 h' s (NamedBinder name b) = NamedBinder name <$> h'' s b
386377 h' s (PositionedBinder pos com b) = PositionedBinder pos com <$> h'' s b
387378 h' s (TypedBinder t b) = TypedBinder t <$> h'' s b
@@ -389,13 +380,13 @@ everywhereWithContextOnValuesM s0 f g h i j = (f'' s0, g'' s0, h'' s0, i'' s0, j
389380
390381 i'' s = uncurry i' <=< i s
391382
392− i' s (CaseAlternative bs val) = CaseAlternative <$> mapM (h'' s) bs <*> eitherM (mapM (pairM (g'' s) (g'' s))) (g'' s) val
383+ i' s (CaseAlternative bs val) = CaseAlternative <$> traverse (h'' s) bs <*> eitherM (traverse (pairM (g'' s) (g'' s))) (g'' s) val
393384
394385 j'' s = uncurry j' <=< j s
395386
396387 j' s (DoNotationValue v) = DoNotationValue <$> g'' s v
397388 j' s (DoNotationBind b v) = DoNotationBind <$> h'' s b <*> g'' s v
398− j' s (DoNotationLet ds) = DoNotationLet <$> mapM (f'' s) ds
389+ j' s (DoNotationLet ds) = DoNotationLet <$> traverse (f'' s) ds
399390 j' s (PositionedDoNotationElement pos com e1) = PositionedDoNotationElement pos com <$> j'' s e1
400391
401392accumTypes :: (Monoid r) => (Type -> r) -> (Declaration -> r, Expr -> r, Binder -> r, CaseAlternative -> r, DoNotationElement -> r)
src/Language/PureScript/Bundle.hs+19−18
@@ -20,7 +20,6 @@
2020{-# LANGUAGE ScopedTypeVariables #-}
2121{-# LANGUAGE TupleSections #-}
2222{-# LANGUAGE RecordWildCards #-}
23−{-# LANGUAGE CPP #-}
2423
2524module Language.PureScript.Bundle (
2625 bundle
@@ -31,17 +30,17 @@ module Language.PureScript.Bundle (
3130 , printErrorMessage
3231) where
3332
34−import Data.List (nub)
35−import Data.Maybe (mapMaybe, catMaybes)
33+import Prelude ()
34+import Prelude.Compat
35+
36+import Data.List (nub, stripPrefix)
37+import Data.Maybe (mapMaybe, catMaybes, fromMaybe)
3638import Data.Generics (everything, everywhere, mkQ, mkT)
3739import Data.Graph
3840import Data.Version (showVersion)
3941
4042import qualified Data.Set as S
4143
42−#if __GLASGOW_HASKELL__ < 710
43−import Control.Applicative
44−#endif
4544import Control.Monad
4645import Control.Monad.Error.Class
4746import Language.JavaScript.Parser
@@ -139,12 +138,13 @@ node (NN n) = n
139138node (NT n _ _) = n
140139
141140-- | Calculate the ModuleIdentifier which a require(...) statement imports.
142−checkImportPath :: String -> ModuleIdentifier -> S.Set String -> Maybe ModuleIdentifier
143−checkImportPath "./foreign" m _ =
141+checkImportPath :: Maybe FilePath -> String -> ModuleIdentifier -> S.Set String -> Maybe ModuleIdentifier
142+checkImportPath _ "./foreign" m _ =
144143 Just (ModuleIdentifier (moduleName m) Foreign)
145−checkImportPath name _ names
146− | name `S.member` names = Just (ModuleIdentifier name Regular)
147−checkImportPath _ _ _ = Nothing
144+checkImportPath requirePath name _ names
145+ | Just name' <- stripPrefix (fromMaybe "" requirePath) name
146+ , name' `S.member` names = Just (ModuleIdentifier name' Regular)
147+checkImportPath _ _ _ _ = Nothing
148148
149149-- | Compute the dependencies of all elements in a module, and add them to the tree.
150150--
@@ -210,9 +210,9 @@ withDeps (Module modulePath es) = Module modulePath (map expandDeps es)
210210--
211211-- Each type of module element is matched using pattern guards, and everything else is bundled into the
212212-- Other constructor.
213−toModule :: forall m. (Applicative m, MonadError ErrorMessage m) => S.Set String -> ModuleIdentifier -> JSNode -> m Module
214−toModule mids mid top
215− | JSSourceElementsTop ns <- node top = Module mid <$> mapM toModuleElement ns
213+toModule :: forall m. (Applicative m, MonadError ErrorMessage m) => Maybe FilePath -> S.Set String -> ModuleIdentifier -> JSNode -> m Module
214+toModule requirePath mids mid top
215+ | JSSourceElementsTop ns <- node top = Module mid <$> traverse toModuleElement ns
216216 | otherwise = err InvalidTopLevel
217217 where
218218 err = throwError . ErrorInModule mid
@@ -227,7 +227,7 @@ toModule mids mid top
227227 , JSIdentifier "require" <- node req
228228 , JSArguments _ [ impS ] _ <- node impP
229229 , JSStringLiteral _ importPath <- node impS
230− , Just importPath' <- checkImportPath importPath mid mids
230+ , Just importPath' <- checkImportPath requirePath importPath mid mids
231231 = pure (Require n importName importPath')
232232 toModuleElement n
233233 | JSVariables var [ varIntro ] _ <- node n
@@ -262,7 +262,7 @@ toModule mids mid top
262262 , JSOperator eq <- node op
263263 , JSLiteral "=" <- node eq
264264 , JSObjectLiteral _ props _ <- node obj
265− = ExportsList <$> mapM toExport (filter (not . isSeparator) (map node props))
265+ = ExportsList <$> traverse toExport (filter (not . isSeparator) (map node props))
266266 where
267267 toExport :: Node -> m (ExportType, String, JSNode, [Key])
268268 toExport (JSPropertyNameandValue name _ [val] ) =
@@ -536,15 +536,16 @@ bundle :: forall m. (Applicative m, MonadError ErrorMessage m)
536536 -> [ModuleIdentifier] -- ^ Entry points. These module identifiers are used as the roots for dead-code elimination
537537 -> Maybe String -- ^ An optional main module.
538538 -> String -- ^ The namespace (e.g. PS).
539+ -> Maybe FilePath -- ^ The require path prefix
539540 -> m String
540−bundle inputStrs entryPoints mainModule namespace = do
541+bundle inputStrs entryPoints mainModule namespace requirePath = do
541542 input <- forM inputStrs $ \(ident, js) -> do
542543 ast <- either (throwError . ErrorInModule ident . UnableToParseModule) pure $ parse js (moduleName ident)
543544 return (ident, ast)
544545
545546 let mids = S.fromList (map (moduleName . fst) input)
546547
547− modules <- mapM (fmap withDeps . uncurry (toModule mids)) input
548+ modules <- traverse (fmap withDeps . uncurry (toModule requirePath mids)) input
548549
549550 let compiled = compile modules entryPoints
550551 sorted = sortModules (filter (not . isModuleEmpty) compiled)
src/Language/PureScript/CodeGen/JS.hs+3−4
@@ -17,7 +17,6 @@
1717{-# LANGUAGE ViewPatterns #-}
1818{-# LANGUAGE FlexibleContexts #-}
1919{-# LANGUAGE ScopedTypeVariables #-}
20−{-# LANGUAGE CPP #-}
2120
2221module Language.PureScript.CodeGen.JS
2322 ( module AST
@@ -26,13 +25,13 @@ module Language.PureScript.CodeGen.JS
2625 , mainCall
2726 ) where
2827
28+import Prelude ()
29+import Prelude.Compat
30+
2931import Data.List ((\\), delete, intersect)
3032import Data.Maybe (isNothing)
3133import qualified Data.Traversable as T (traverse)
3234
33−#if __GLASGOW_HASKELL__ < 710
34−import Control.Applicative
35−#endif
3635import Control.Arrow ((&&&))
3736import Control.Monad (replicateM, forM)
3837import Control.Monad.Reader (MonadReader, asks)
src/Language/PureScript/CodeGen/JS/AST.hs+3−7
@@ -14,18 +14,14 @@
1414-----------------------------------------------------------------------------
1515
1616{-# LANGUAGE DeriveDataTypeable #-}
17−{-# LANGUAGE CPP #-}
1817
1918module Language.PureScript.CodeGen.JS.AST where
2019
21−#if __GLASGOW_HASKELL__ < 710
22−import Control.Applicative (Applicative, (<$>), (<*>))
23−#endif
20+import Prelude ()
21+import Prelude.Compat
22+
2423import Control.Monad.Identity
2524import Data.Data
26−#if __GLASGOW_HASKELL__ < 710
27−import Data.Traversable (traverse)
28−#endif
2925
3026import Language.PureScript.Comments
3127import Language.PureScript.Traversals
src/Language/PureScript/CodeGen/JS/Optimizer.hs+3−4
@@ -32,15 +32,14 @@
3232-----------------------------------------------------------------------------
3333
3434{-# LANGUAGE FlexibleContexts #-}
35−{-# LANGUAGE CPP #-}
3635
3736module Language.PureScript.CodeGen.JS.Optimizer (
3837 optimize
3938) where
4039
41−#if __GLASGOW_HASKELL__ < 710
42−import Control.Applicative (Applicative)
43−#endif
40+import Prelude ()
41+import Prelude.Compat
42+
4443import Control.Monad.Reader (MonadReader, ask, asks)
4544import Control.Monad.Supply.Class (MonadSupply)
4645
src/Language/PureScript/CodeGen/JS/Optimizer/Inliner.hs+3−5
@@ -13,8 +13,6 @@
1313--
1414-----------------------------------------------------------------------------
1515
16−{-# LANGUAGE CPP #-}
17−
1816module Language.PureScript.CodeGen.JS.Optimizer.Inliner (
1917 inlineVariables,
2018 inlineValues,
@@ -26,9 +24,9 @@ module Language.PureScript.CodeGen.JS.Optimizer.Inliner (
2624 evaluateIifes
2725) where
2826
29−#if __GLASGOW_HASKELL__ < 710
30−import Control.Applicative (Applicative)
31−#endif
27+import Prelude ()
28+import Prelude.Compat
29+
3230import Control.Monad.Supply.Class (MonadSupply, freshName)
3331import Data.Maybe (fromMaybe)
3432
src/Language/PureScript/Docs/ParseAndDesugar.hs+6−7
@@ -1,17 +1,16 @@
11{-# LANGUAGE TupleSections #-}
2−{-# LANGUAGE CPP #-}
32
43module Language.PureScript.Docs.ParseAndDesugar
54 ( parseAndDesugar
65 , ParseDesugarError(..)
76 ) where
87
8+import Prelude ()
9+import Prelude.Compat
10+
911import qualified Data.Map as M
1012import Control.Arrow (first)
1113import Control.Monad
12−#if __GLASGOW_HASKELL__ < 710
13−import Control.Applicative
14−#endif
1514
1615import Control.Monad.Trans.Except
1716import Control.Monad.Writer.Strict (runWriterT)
@@ -53,8 +52,8 @@ parseAndDesugar ::
5352 -> ([Bookmark] -> [P.Module] -> IO a)
5453 -> IO (Either ParseDesugarError a)
5554parseAndDesugar inputFiles depsFiles callback = do
56− inputFiles' <- mapM (parseAs Local) inputFiles
57− depsFiles' <- mapM (\(pkgName, f) -> parseAs (FromDep pkgName) f) depsFiles
55+ inputFiles' <- traverse (parseAs Local) inputFiles
56+ depsFiles' <- traverse (\(pkgName, f) -> parseAs (FromDep pkgName) f) depsFiles
5857
5958 runExceptT $ do
6059 ms <- parseFiles (inputFiles' ++ depsFiles')
@@ -122,7 +121,7 @@ desugar :: [P.Module] -> Either P.MultipleErrors [P.Module]
122121desugar = P.evalSupplyT 0 . desugar'
123122 where
124123 desugar' :: [P.Module] -> P.SupplyT (Either P.MultipleErrors) [P.Module]
125− desugar' = mapM P.desugarDoModule >=> P.desugarCasesModule >=> ignoreWarnings . P.desugarImports []
124+ desugar' = traverse P.desugarDoModule >=> P.desugarCasesModule >=> ignoreWarnings . P.desugarImports []
126125 ignoreWarnings m = liftM fst (runWriterT m)
127126
128127parseFile :: FilePath -> IO (FilePath, String)
src/Language/PureScript/Docs/RenderedCode/Render.hs+3−6
@@ -1,5 +1,3 @@
1−{-# LANGUAGE CPP #-}
2−
31-- | Functions for producing RenderedCode values from PureScript Type values.
42
53module Language.PureScript.Docs.RenderedCode.Render (
@@ -11,12 +9,11 @@ module Language.PureScript.Docs.RenderedCode.Render (
119 defaultRenderTypeOptions,
1210 renderTypeWithOptions
1311) where
12+
13+import Prelude ()
14+import Prelude.Compat
1415
15−#if __GLASGOW_HASKELL__ < 710
16−import Data.Monoid ((<>), mconcat, mempty)
17−#else
1816import Data.Monoid ((<>))
19−#endif
2017import Data.Maybe (fromMaybe)
2118
2219import Control.Arrow ((<+>))
src/Language/PureScript/Docs/RenderedCode/Types.hs+3−6
@@ -1,6 +1,5 @@
11{-# LANGUAGE GeneralizedNewtypeDeriving #-}
22{-# LANGUAGE OverloadedStrings #-}
3−{-# LANGUAGE CPP #-}
43
54-- | Data types and functions for representing a simplified form of PureScript
65-- code, intended for use in e.g. HTML documentation.
@@ -31,11 +30,9 @@ module Language.PureScript.Docs.RenderedCode.Types
3130 , keywordWhere
3231 ) where
3332
34−#if __GLASGOW_HASKELL__ < 710
35−import Control.Applicative ((<$>), (<*>), (*>), pure)
36−import Data.Foldable
37−import Data.Monoid
38−#endif
33+import Prelude ()
34+import Prelude.Compat
35+
3936import qualified Data.Aeson as A
4037import Data.Aeson.BetterErrors
4138import Control.Monad.Error.Class (MonadError(..))
src/Language/PureScript/Docs/Types.hs+3−4
@@ -2,7 +2,6 @@
22{-# LANGUAGE OverloadedStrings #-}
33{-# LANGUAGE TupleSections #-}
44{-# LANGUAGE RankNTypes #-}
5−{-# LANGUAGE CPP #-}
65
76module Language.PureScript.Docs.Types
87 ( module Language.PureScript.Docs.Types
@@ -10,10 +9,10 @@ module Language.PureScript.Docs.Types
109 )
1110 where
1211
12+import Prelude ()
13+import Prelude.Compat
14+
1315import Control.Arrow (first, (***))
14−#if __GLASGOW_HASKELL__ < 710
15−import Control.Applicative ((<$>), (<$), (<*>), pure)
16−#endif
1716import Control.Monad (when)
1817import Data.Maybe (mapMaybe)
1918import Data.Version
src/Language/PureScript/Errors.hs+3−9
@@ -15,19 +15,16 @@
1515{-# LANGUAGE GeneralizedNewtypeDeriving #-}
1616{-# LANGUAGE FlexibleContexts #-}
1717{-# LANGUAGE MultiParamTypeClasses #-}
18−{-# LANGUAGE CPP #-}
1918
2019module Language.PureScript.Errors where
2120
21+import Prelude ()
22+import Prelude.Compat
23+
2224import Data.Either (lefts, rights)
2325import Data.List (intercalate, transpose, nub, nubBy)
2426import Data.Function (on)
25−#if __GLASGOW_HASKELL__ < 710
26−import Data.Foldable (fold, foldMap)
27−import Data.Traversable (traverse)
28−#else
2927import Data.Foldable (fold)
30−#endif
3128
3229import qualified Data.Map as M
3330
@@ -35,9 +32,6 @@ import Control.Monad
3532import Control.Monad.Unify
3633import Control.Monad.Writer
3734import Control.Monad.Error.Class (MonadError(..))
38−#if __GLASGOW_HASKELL__ < 710
39−import Control.Applicative ((<$>), (<*>), Applicative, pure)
40−#endif
4135import Control.Monad.Trans.State.Lazy
4236import Control.Arrow(first)
4337
src/Language/PureScript/Externs.hs+3−4
@@ -13,7 +13,6 @@
1313--
1414-----------------------------------------------------------------------------
1515
16−{-# LANGUAGE CPP #-}
1716{-# LANGUAGE RecordWildCards #-}
1817{-# LANGUAGE PatternGuards #-}
1918{-# LANGUAGE TemplateHaskell #-}
@@ -27,13 +26,13 @@ module Language.PureScript.Externs
2726 , applyExternsFileToEnvironment
2827 ) where
2928
29+import Prelude ()
30+import Prelude.Compat
31+
3032import Data.List (find, foldl')
3133import Data.Maybe (mapMaybe, maybeToList, fromMaybe)
3234import Data.Foldable (fold)
3335import Data.Version (showVersion)
34−#if __GLASGOW_HASKELL__ < 710
35−import Data.Monoid
36−#endif
3736import Data.Aeson.TH
3837
3938import qualified Data.Map as M
src/Language/PureScript/Kinds.hs+3−4
@@ -14,16 +14,15 @@
1414
1515{-# LANGUAGE DeriveDataTypeable #-}
1616{-# LANGUAGE TemplateHaskell #-}
17−{-# LANGUAGE CPP #-}
1817
1918module Language.PureScript.Kinds where
2019
20+import Prelude ()
21+import Prelude.Compat
22+
2123import Data.Data
2224import qualified Data.Aeson.TH as A
2325
24−#if __GLASGOW_HASKELL__ < 710
25−import Control.Applicative
26−#endif
2726import Control.Monad.Unify (Unknown)
2827
2928-- |
src/Language/PureScript/Linter.hs+3−4
@@ -15,19 +15,18 @@
1515{-# LANGUAGE GeneralizedNewtypeDeriving #-}
1616{-# LANGUAGE FlexibleContexts #-}
1717{-# LANGUAGE ScopedTypeVariables #-}
18−{-# LANGUAGE CPP #-}
1918
2019module Language.PureScript.Linter (lint, module L) where
2120
21+import Prelude ()
22+import Prelude.Compat
23+
2224import Data.List (mapAccumL, nub, (\\))
2325import Data.Maybe (mapMaybe)
2426import Data.Monoid
2527
2628import qualified Data.Set as S
2729
28−#if __GLASGOW_HASKELL__ < 710
29−import Control.Applicative
30−#endif
3130import Control.Monad.Writer.Class
3231
3332import Language.PureScript.Crash
src/Language/PureScript/Linter/Exhaustive.hs+3−4
@@ -18,20 +18,19 @@
1818
1919{-# LANGUAGE FlexibleContexts #-}
2020{-# LANGUAGE ScopedTypeVariables #-}
21−{-# LANGUAGE CPP #-}
2221
2322module Language.PureScript.Linter.Exhaustive
2423 ( checkExhaustive
2524 , checkExhaustiveModule
2625 ) where
2726
27+import Prelude ()
28+import Prelude.Compat
29+
2830import qualified Data.Map as M
2931import Data.Maybe (fromMaybe)
3032import Data.List (foldl', sortBy, nub)
3133import Data.Function (on)
32−#if __GLASGOW_HASKELL__ < 710
33−import Data.Traversable (sequenceA)
34−#endif
3534
3635import Control.Monad (unless)
3736import Control.Applicative
src/Language/PureScript/Linter/Imports.hs+3−4
@@ -1,18 +1,17 @@
11{-# LANGUAGE ScopedTypeVariables #-}
22{-# LANGUAGE FlexibleContexts #-}
3−{-# LANGUAGE CPP #-}
43
54module Language.PureScript.Linter.Imports (findUnusedImports, Name(..), UsedImports()) where
65
6+import Prelude ()
7+import Prelude.Compat
8+
79import qualified Data.Map as M
810import Data.Maybe (mapMaybe)
911import Data.List ((\\), find)
1012import Control.Monad.Error.Class (MonadError(..))
1113import Control.Monad.Writer.Class
1214import Control.Monad(unless,when)
13−#if __GLASGOW_HASKELL__ < 710
14−import Control.Applicative
15−#endif
1615import Data.Foldable (forM_)
1716
1817import Language.PureScript.AST.Declarations
src/Language/PureScript/Make.hs+9−12
@@ -21,7 +21,6 @@
2121{-# LANGUAGE ScopedTypeVariables #-}
2222{-# LANGUAGE MultiParamTypeClasses #-}
2323{-# LANGUAGE TypeFamilies #-}
24−{-# LANGUAGE CPP #-}
2524
2625module Language.PureScript.Make
2726 (
@@ -38,14 +37,16 @@ module Language.PureScript.Make
3837 , buildMakeActions
3938 ) where
4039
41−#if __GLASGOW_HASKELL__ < 710
42−import Control.Applicative
43−#endif
44−import Control.Monad
40+import Prelude ()
41+import Prelude.Compat
42+
43+import Control.Monad hiding (sequence)
4544import Control.Monad.Error.Class (MonadError(..))
4645import Control.Monad.Writer.Class (MonadWriter(..))
46+import Control.Monad.Trans.Class (MonadTrans(..))
4747import Control.Monad.Trans.Except
48−import Control.Monad.Reader
48+import Control.Monad.IO.Class
49+import Control.Monad.Reader (MonadReader(..), ReaderT(..))
4950import Control.Monad.Logger
5051import Control.Monad.Supply
5152import Control.Monad.Base (MonadBase(..))
@@ -58,10 +59,6 @@ import Data.Maybe (fromMaybe, catMaybes)
5859import Data.Time.Clock
5960import Data.String (fromString)
6061import Data.Foldable (for_)
61−#if __GLASGOW_HASKELL__ < 710
62−import Data.Monoid (mempty, mconcat)
63−import Data.Traversable (traverse)
64−#endif
6562import Data.Traversable (for)
6663import Data.Version (showVersion)
6764import Data.Aeson (encode, decode)
@@ -207,12 +204,12 @@ make MakeActions{..} ms = do
207204 -- We need to wait for dependencies to be built, before checking if the current
208205 -- module should be rebuilt, so the first thing to do is to wait on the
209206 -- MVars for the module's dependencies.
210− mexterns <- fmap unzip . sequence <$> mapM (readMVar . fst . fromMaybe (internalError "make: no barrier") . flip lookup barriers) deps
207+ mexterns <- fmap unzip . sequence <$> traverse (readMVar . fst . fromMaybe (internalError "make: no barrier") . flip lookup barriers) deps
211208
212209 case mexterns of
213210 Just (_, externs) -> do
214211 outputTimestamp <- getOutputTimestamp moduleName
215− dependencyTimestamp <- maximumMaybe <$> mapM (fmap shouldExist . getOutputTimestamp) deps
212+ dependencyTimestamp <- maximumMaybe <$> traverse (fmap shouldExist . getOutputTimestamp) deps
216213 inputTimestamp <- getInputTimestamp moduleName
217214
218215 let shouldRebuild = case (inputTimestamp, dependencyTimestamp, outputTimestamp) of
src/Language/PureScript/Parser/Declarations.hs+19−13
@@ -37,6 +37,7 @@ import Data.Maybe (fromMaybe)
3737import Control.Applicative
3838import Control.Arrow ((+++))
3939import Control.Monad.Error.Class (MonadError(..))
40+import Control.Parallel.Strategies (withStrategy, parList, rseq)
4041
4142import Language.PureScript.AST
4243import Language.PureScript.Comments
@@ -274,23 +275,26 @@ parseModule = do
274275 let ss = SourceSpan (P.sourceName start) (toSourcePos start) (toSourcePos end)
275276 return $ Module ss comments name decls exports
276277
277−-- |
278−-- Parse a collection of modules
279−--
278+-- | Parse a collection of modules in parallel
280279parseModulesFromFiles :: forall m k. (MonadError MultipleErrors m, Functor m) =>
281280 (k -> FilePath) -> [(k, String)] -> m [(k, Module)]
282281parseModulesFromFiles toFilePath input = do
283− modules <- parU input $ \(k, content) -> do
282+ modules <- flip parU id $ map wrapError $ inParallel $ flip map input $ \(k, content) -> do
284283 let filename = toFilePath k
285− ts <- wrapError $ lex filename content
286− ms <- wrapError $ runTokenParser filename parseModules ts
284+ ts <- lex filename content
285+ ms <- runTokenParser filename parseModules ts
287286 return (k, ms)
288287 return $ collect modules
289288 where
290− wrapError :: Either P.ParseError a -> m a
291− wrapError = either (throwError . MultipleErrors . pure . toPositionedError) return
292289 collect :: [(k, [v])] -> [(k, v)]
293290 collect vss = [ (k, v) | (k, vs) <- vss, v <- vs ]
291+ wrapError :: Either P.ParseError a -> m a
292+ wrapError = either (throwError . MultipleErrors . pure . toPositionedError) return
293+ -- It is enough to force each parse result to WHNF, since success or failure can't be
294+ -- determined until the end of the file, so this effectively distributes parsing of each file
295+ -- to a different spark.
296+ inParallel :: [Either P.ParseError (k, [Module])] -> [Either P.ParseError (k, [Module])]
297+ inParallel = withStrategy (parList rseq)
294298
295299toPositionedError :: P.ParseError -> ErrorMessage
296300toPositionedError perr = ErrorMessage [ PositionedError (SourceSpan name start end) ] (ErrorParsingModule perr)
@@ -513,11 +517,13 @@ parseNullBinder :: TokenParser Binder
513517parseNullBinder = underscore *> return NullBinder
514518
515519parseIdentifierAndBinder :: TokenParser (String, Binder)
516−parseIdentifierAndBinder = do
517− name <- lname <|> stringLiteral
518− C.indented *> (equals <|> colon)
519− binder <- C.indented *> parseBinder
520− return (name, binder)
520+parseIdentifierAndBinder =
521+ do name <- lname
522+ b <- P.option (VarBinder (Ident name)) rest
523+ return (name, b)
524+ <|> (,) <$> stringLiteral <*> rest
525+ where
526+ rest = C.indented *> (equals <|> colon) *> C.indented *> parseBinder
521527
522528-- |
523529-- Parse a binder
src/Language/PureScript/Parser/JS.hs+3−5
@@ -13,16 +13,15 @@
1313-----------------------------------------------------------------------------
1414
1515{-# LANGUAGE FlexibleContexts #-}
16−{-# LANGUAGE CPP #-}
1716
1817module Language.PureScript.Parser.JS
1918 ( ForeignJS()
2019 , parseForeignModulesFromFiles
2120 ) where
2221
23−#if __GLASGOW_HASKELL__ < 710
24−import Control.Applicative ((*>), (<*))
25−#endif
22+import Prelude ()
23+import Prelude.Compat hiding (lex)
24+
2625import Control.Monad (forM_, when, msum)
2726import Control.Monad.Error.Class (MonadError(..))
2827import Control.Monad.Writer.Class (MonadWriter(..))
@@ -32,7 +31,6 @@ import Language.PureScript.Errors
3231import Language.PureScript.Names
3332import Language.PureScript.Parser.Common
3433import Language.PureScript.Parser.Lexer
35−import Prelude hiding (lex)
3634import qualified Data.Map as M
3735import qualified Text.Parsec as PS
3836
src/Language/PureScript/Parser/Kinds.hs+3−5
@@ -13,18 +13,16 @@
1313--
1414-----------------------------------------------------------------------------
1515
16−{-# LANGUAGE CPP #-}
17−
1816module Language.PureScript.Parser.Kinds (
1917 parseKind
2018) where
2119
20+import Prelude ()
21+import Prelude.Compat
22+
2223import Language.PureScript.Kinds
2324import Language.PureScript.Parser.Common
2425import Language.PureScript.Parser.Lexer
25−#if __GLASGOW_HASKELL__ < 710
26−import Control.Applicative
27−#endif
2826import qualified Text.Parsec as P
2927import qualified Text.Parsec.Expr as P
3028
src/Language/PureScript/Pretty/JS.hs+6−8
@@ -13,20 +13,18 @@
1313--
1414-----------------------------------------------------------------------------
1515
16−{-# LANGUAGE CPP #-}
17−
1816module Language.PureScript.Pretty.JS (
1917 prettyPrintJS
2018) where
2119
22−import Data.List
20+import Prelude ()
21+import Prelude.Compat
22+
23+import Data.List hiding (concat, concatMap)
2324import Data.Maybe (fromMaybe)
2425
25−#if __GLASGOW_HASKELL__ < 710
26−import Control.Applicative
27−#endif
2826import Control.Arrow ((<+>))
29−import Control.Monad.State
27+import Control.Monad.State hiding (sequence)
3028import Control.PatternArrows
3129import qualified Control.Arrow as A
3230
@@ -199,7 +197,7 @@ app :: Pattern PrinterState JS (String, JS)
199197app = mkPattern' match
200198 where
201199 match (JSApp val args) = do
202− jss <- mapM prettyPrintJS' args
200+ jss <- traverse prettyPrintJS' args
203201 return (intercalate ", " jss, val)
204202 match _ = mzero
205203
src/Language/PureScript/Pretty/Values.hs−2
@@ -13,8 +13,6 @@
1313--
1414-----------------------------------------------------------------------------
1515
16−{-# LANGUAGE CPP #-}
17−
1816module Language.PureScript.Pretty.Values (
1917 prettyPrintValue,
2018 prettyPrintBinder,
src/Language/PureScript/Publish.hs+6−8
@@ -2,7 +2,6 @@
22{-# LANGUAGE RecordWildCards #-}
33{-# LANGUAGE TupleSections #-}
44{-# LANGUAGE GeneralizedNewtypeDeriving #-}
5−{-# LANGUAGE CPP #-}
65
76module Language.PureScript.Publish
87 ( preparePackage
@@ -19,7 +18,8 @@ module Language.PureScript.Publish
1918 , getResolvedDependencies
2019 ) where
2120
22−import Prelude hiding (userError)
21+import Prelude ()
22+import Prelude.Compat hiding (userError)
2323
2424import Data.Maybe
2525import Data.Char (isSpace)
@@ -28,15 +28,13 @@ import Data.List.Split (splitOn)
2828import Data.List.NonEmpty (NonEmpty(..))
2929import Data.Version
3030import Data.Function (on)
31+import Data.Foldable (traverse_)
3132import Safe (headMay)
3233import Data.Aeson.BetterErrors
3334import qualified Data.Text as T
3435import qualified Data.Text.Lazy as TL
3536import qualified Data.Text.Lazy.Encoding as TL
3637
37−#if __GLASGOW_HASKELL__ < 710
38−import Control.Applicative
39−#endif
4038import Control.Category ((>>>))
4139import Control.Arrow ((***))
4240import Control.Exception (catch, try)
@@ -304,7 +302,7 @@ asDependencyStatus = do
304302
305303warnUndeclared :: [PackageName] -> [PackageName] -> PrepareM ()
306304warnUndeclared declared actual =
307− mapM_ (warn . UndeclaredDependency) (actual \\ declared)
305+ traverse_ (warn . UndeclaredDependency) (actual \\ declared)
308306
309307handleDeps ::
310308 [(PackageName, DependencyStatus)] -> PrepareM [(PackageName, Version)]
@@ -314,8 +312,8 @@ handleDeps deps = do
314312 (x:xs) ->
315313 userError (MissingDependencies (x :| xs))
316314 [] -> do
317− mapM_ (warn . NoResolvedVersion) noVersion
318− withVersions <- catMaybes <$> mapM tryExtractVersion' installed
315+ traverse_ (warn . NoResolvedVersion) noVersion
316+ withVersions <- catMaybes <$> traverse tryExtractVersion' installed
319317 filterM (liftIO . isPureScript . bowerDir . fst) withVersions
320318
321319 where
src/Language/PureScript/Publish/ErrorsWarnings.hs+3−7
@@ -1,6 +1,5 @@
11{-# LANGUAGE OverloadedStrings #-}
22{-# LANGUAGE RecordWildCards #-}
3−{-# LANGUAGE CPP #-}
43
54module Language.PureScript.Publish.ErrorsWarnings
65 ( PackageError(..)
@@ -16,16 +15,13 @@ module Language.PureScript.Publish.ErrorsWarnings
1615 , renderWarnings
1716 ) where
1817
19−#if __GLASGOW_HASKELL__ < 710
20−import Control.Applicative ((<$>))
21−#endif
18+import Prelude ()
19+import Prelude.Compat
20+
2221import Data.Aeson.BetterErrors
2322import Data.Version
2423import Data.Maybe
2524import Data.Monoid
26−#if __GLASGOW_HASKELL__ < 710
27−import Data.Foldable (foldMap)
28−#endif
2925import Data.List (intersperse, intercalate)
3026import Data.List.NonEmpty (NonEmpty(..))
3127import qualified Data.List.NonEmpty as NonEmpty
src/Language/PureScript/Renamer.hs+13−14
@@ -16,13 +16,12 @@
1616
1717{-# LANGUAGE FlexibleContexts #-}
1818{-# LANGUAGE ScopedTypeVariables #-}
19−{-# LANGUAGE CPP #-}
2019
2120module Language.PureScript.Renamer (renameInModules) where
2221
23−#if __GLASGOW_HASKELL__ < 710
24−import Control.Applicative
25−#endif
22+import Prelude ()
23+import Prelude.Compat
24+
2625import Control.Monad.State
2726
2827import Data.List (find)
@@ -135,8 +134,8 @@ renameInDecl isTopLevel (NonRec name val) = do
135134 name' <- if isTopLevel then return name else updateScope name
136135 NonRec name' <$> renameInValue val
137136renameInDecl isTopLevel (Rec ds) = do
138− ds' <- mapM updateNames ds
139− Rec <$> mapM updateValues ds'
137+ ds' <- traverse updateNames ds
138+ Rec <$> traverse updateValues ds'
140139 where
141140 updateNames :: (Ident, Expr Ann) -> Rename (Ident, Expr Ann)
142141 updateNames (name, val) = do
@@ -155,7 +154,7 @@ renameInValue c@(Constructor{}) = return c
155154renameInValue (Accessor ann prop v) =
156155 Accessor ann prop <$> renameInValue v
157156renameInValue (ObjectUpdate ann obj vs) =
158− ObjectUpdate ann <$> renameInValue obj <*> mapM (\(name, v) -> (,) name <$> renameInValue v) vs
157+ ObjectUpdate ann <$> renameInValue obj <*> traverse (\(name, v) -> (,) name <$> renameInValue v) vs
159158renameInValue e@(Abs (_, _, _, Just IsTypeClassConstructor) _ _) = return e
160159renameInValue (Abs ann name v) =
161160 newScope $ Abs ann <$> updateScope name <*> renameInValue v
@@ -165,16 +164,16 @@ renameInValue (Var ann (Qualified Nothing name)) =
165164 Var ann . Qualified Nothing <$> lookupIdent name
166165renameInValue v@(Var{}) = return v
167166renameInValue (Case ann vs alts) =
168− newScope $ Case ann <$> mapM renameInValue vs <*> mapM renameInCaseAlternative alts
167+ newScope $ Case ann <$> traverse renameInValue vs <*> traverse renameInCaseAlternative alts
169168renameInValue (Let ann ds v) =
170− newScope $ Let ann <$> mapM (renameInDecl False) ds <*> renameInValue v
169+ newScope $ Let ann <$> traverse (renameInDecl False) ds <*> renameInValue v
171170
172171-- |
173172-- Renames within literals.
174173--
175174renameInLiteral :: (a -> Rename a) -> Literal a -> Rename (Literal a)
176−renameInLiteral rename (ArrayLiteral bs) = ArrayLiteral <$> mapM rename bs
177−renameInLiteral rename (ObjectLiteral bs) = ObjectLiteral <$> mapM (sndM rename) bs
175+renameInLiteral rename (ArrayLiteral bs) = ArrayLiteral <$> traverse rename bs
176+renameInLiteral rename (ObjectLiteral bs) = ObjectLiteral <$> traverse (sndM rename) bs
178177renameInLiteral _ l = return l
179178
180179-- |
@@ -182,8 +181,8 @@ renameInLiteral _ l = return l
182181--
183182renameInCaseAlternative :: CaseAlternative Ann -> Rename (CaseAlternative Ann)
184183renameInCaseAlternative (CaseAlternative bs v) = newScope $
185− CaseAlternative <$> mapM renameInBinder bs
186− <*> eitherM (mapM (pairM renameInValue renameInValue)) renameInValue v
184+ CaseAlternative <$> traverse renameInBinder bs
185+ <*> eitherM (traverse (pairM renameInValue renameInValue)) renameInValue v
187186
188187-- |
189188-- Renames within binders.
@@ -195,6 +194,6 @@ renameInBinder (LiteralBinder ann b) =
195194renameInBinder (VarBinder ann name) =
196195 VarBinder ann <$> updateScope name
197196renameInBinder (ConstructorBinder ann tctor dctor bs) =
198− ConstructorBinder ann tctor dctor <$> mapM renameInBinder bs
197+ ConstructorBinder ann tctor dctor <$> traverse renameInBinder bs
199198renameInBinder (NamedBinder ann name b) =
200199 NamedBinder ann <$> updateScope name <*> renameInBinder b
src/Language/PureScript/Sugar.hs+7−8
@@ -14,15 +14,14 @@
1414-----------------------------------------------------------------------------
1515
1616{-# LANGUAGE FlexibleContexts #-}
17−{-# LANGUAGE CPP #-}
1817
1918module Language.PureScript.Sugar (desugar, module S) where
2019
20+import Prelude ()
21+import Prelude.Compat
22+
2123import Control.Monad
2224import Control.Category ((>>>))
23−#if __GLASGOW_HASKELL__ < 710
24−import Control.Applicative
25−#endif
2625import Control.Monad.Error.Class (MonadError())
2726import Control.Monad.Writer.Class (MonadWriter())
2827import Control.Monad.Supply.Class
@@ -67,13 +66,13 @@ import Language.PureScript.Sugar.TypeDeclarations as S
6766desugar :: (Applicative m, MonadSupply m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => [ExternsFile] -> [Module] -> m [Module]
6867desugar externs =
6968 map removeSignedLiterals
70− >>> mapM desugarObjectConstructors
71− >=> mapM desugarOperatorSections
72− >=> mapM desugarDoModule
69+ >>> traverse desugarObjectConstructors
70+ >=> traverse desugarOperatorSections
71+ >=> traverse desugarDoModule
7372 >=> desugarCasesModule
7473 >=> desugarTypeDeclarationsModule
7574 >=> desugarImports externs
7675 >=> rebracket externs
77− >=> mapM deriveInstances
76+ >=> traverse deriveInstances
7877 >=> desugarTypeClasses externs
7978 >=> createBindingGroupsModule
src/Language/PureScript/Sugar/BindingGroups.hs+3−5
@@ -15,7 +15,6 @@
1515-----------------------------------------------------------------------------
1616
1717{-# LANGUAGE FlexibleContexts #-}
18−{-# LANGUAGE CPP #-}
1918{-# LANGUAGE ScopedTypeVariables #-}
2019
2120module Language.PureScript.Sugar.BindingGroups (
@@ -25,13 +24,12 @@ module Language.PureScript.Sugar.BindingGroups (
2524 collapseBindingGroupsModule
2625) where
2726
27+import Prelude ()
28+import Prelude.Compat
29+
2830import Data.Graph
2931import Data.List (nub, intersect)
3032import Data.Maybe (isJust, mapMaybe)
31−#if __GLASGOW_HASKELL__ < 710
32−import Data.Foldable (foldMap)
33−import Control.Applicative
34−#endif
3533import Control.Monad ((<=<))
3634import Control.Monad.Error.Class (MonadError(..))
3735
src/Language/PureScript/Sugar/CaseDeclarations.hs+3−4
@@ -16,20 +16,19 @@
1616
1717{-# LANGUAGE FlexibleContexts #-}
1818{-# LANGUAGE ScopedTypeVariables #-}
19−{-# LANGUAGE CPP #-}
2019
2120module Language.PureScript.Sugar.CaseDeclarations (
2221 desugarCases,
2322 desugarCasesModule
2423) where
2524
25+import Prelude ()
26+import Prelude.Compat
27+
2628import Language.PureScript.Crash
2729import Data.Maybe (catMaybes)
2830import Data.List (nub, groupBy)
2931
30−#if __GLASGOW_HASKELL__ < 710
31−import Control.Applicative
32−#endif
3332import Control.Monad ((<=<), forM, replicateM, join, unless)
3433import Control.Monad.Error.Class (MonadError(..))
3534import Control.Monad.Supply.Class
src/Language/PureScript/Sugar/DoNotation.hs+3−4
@@ -16,12 +16,14 @@
1616
1717{-# LANGUAGE FlexibleContexts #-}
1818{-# LANGUAGE ScopedTypeVariables #-}
19−{-# LANGUAGE CPP #-}
2019
2120module Language.PureScript.Sugar.DoNotation (
2221 desugarDoModule
2322) where
2423
24+import Prelude ()
25+import Prelude.Compat
26+
2527import Language.PureScript.Crash
2628import Language.PureScript.Names
2729import Language.PureScript.AST
@@ -29,9 +31,6 @@ import Language.PureScript.Errors
2931
3032import qualified Language.PureScript.Constants as C
3133
32−#if __GLASGOW_HASKELL__ < 710
33−import Control.Applicative
34−#endif
3534import Control.Monad.Error.Class (MonadError(..))
3635import Control.Monad.Supply.Class
3736
src/Language/PureScript/Sugar/Names.hs+7−9
@@ -11,20 +11,18 @@
1111--
1212-----------------------------------------------------------------------------
1313
14−{-# LANGUAGE CPP #-}
1514{-# LANGUAGE FlexibleContexts #-}
1615{-# LANGUAGE RecordWildCards #-}
1716{-# LANGUAGE ScopedTypeVariables #-}
1817
1918module Language.PureScript.Sugar.Names (desugarImports) where
2019
20+import Prelude ()
21+import Prelude.Compat
22+
2123import Data.List (find, nub)
2224import Data.Maybe (fromMaybe, mapMaybe)
2325
24−#if __GLASGOW_HASKELL__ < 710
25−import Data.Monoid (mempty)
26−import Control.Applicative (Applicative(..), (<$>), (<*>))
27−#endif
2826import Control.Monad
2927import Control.Monad.Error.Class (MonadError(..))
3028import Control.Monad.Writer (MonadWriter(..), censor)
@@ -52,7 +50,7 @@ desugarImports :: forall m. (Applicative m, MonadError MultipleErrors m, MonadWr
5250desugarImports externs modules = do
5351 env <- silence $ foldM externsEnv primEnv externs
5452 env' <- foldM updateEnv env modules
55− mapM (renameInModule' env') modules
53+ traverse (renameInModule' env') modules
5654 where
5755 silence :: m a -> m a
5856 silence = censor (const mempty)
@@ -161,13 +159,13 @@ renameInModule env imports (Module ss coms mn decls exps) =
161159 updateDecl (_, bound) d@(PositionedDeclaration pos _ _) =
162160 return ((Just pos, bound), d)
163161 updateDecl (pos, bound) (DataDeclaration dtype name args dctors) =
164− (,) (pos, bound) <$> (DataDeclaration dtype name args <$> mapM (sndM (mapM (updateTypesEverywhere pos))) dctors)
162+ (,) (pos, bound) <$> (DataDeclaration dtype name args <$> traverse (sndM (traverse (updateTypesEverywhere pos))) dctors)
165163 updateDecl (pos, bound) (TypeSynonymDeclaration name ps ty) =
166164 (,) (pos, bound) <$> (TypeSynonymDeclaration name ps <$> updateTypesEverywhere pos ty)
167165 updateDecl (pos, bound) (TypeClassDeclaration className args implies ds) =
168166 (,) (pos, bound) <$> (TypeClassDeclaration className args <$> updateConstraints pos implies <*> pure ds)
169167 updateDecl (pos, bound) (TypeInstanceDeclaration name cs cn ts ds) =
170− (,) (pos, bound) <$> (TypeInstanceDeclaration name <$> updateConstraints pos cs <*> updateClassName cn pos <*> mapM (updateTypesEverywhere pos) ts <*> pure ds)
168+ (,) (pos, bound) <$> (TypeInstanceDeclaration name <$> updateConstraints pos cs <*> updateClassName cn pos <*> traverse (updateTypesEverywhere pos) ts <*> pure ds)
171169 updateDecl (pos, bound) (TypeDeclaration name ty) =
172170 (,) (pos, bound) <$> (TypeDeclaration name <$> updateTypesEverywhere pos ty)
173171 updateDecl (pos, bound) (ExternDeclaration name ty) =
@@ -225,7 +223,7 @@ renameInModule env imports (Module ss coms mn decls exps) =
225223 updateType t = return t
226224
227225 updateConstraints :: Maybe SourceSpan -> [Constraint] -> m [Constraint]
228− updateConstraints pos = mapM (\(name, ts) -> (,) <$> updateClassName name pos <*> mapM (updateTypesEverywhere pos) ts)
226+ updateConstraints pos = traverse (\(name, ts) -> (,) <$> updateClassName name pos <*> traverse (updateTypesEverywhere pos) ts)
229227
230228 updateTypeName :: Qualified ProperName -> Maybe SourceSpan -> m (Qualified ProperName)
231229 updateTypeName = update UnknownType (importedTypes imports) (resolveType . exportedTypes) IsProperName
src/Language/PureScript/Sugar/Names/Exports.hs+5−5
@@ -11,7 +11,6 @@
1111--
1212-----------------------------------------------------------------------------
1313
14−{-# LANGUAGE CPP #-}
1514{-# LANGUAGE FlexibleContexts #-}
1615{-# LANGUAGE RankNTypes #-}
1716{-# LANGUAGE ScopedTypeVariables #-}
@@ -22,12 +21,13 @@ module Language.PureScript.Sugar.Names.Exports
2221 , resolveExports
2322 ) where
2423
24+import Prelude ()
25+import Prelude.Compat
26+
2527import Data.List (find, intersect)
2628import Data.Maybe (fromMaybe, mapMaybe)
29+import Data.Foldable (traverse_)
2730
28−#if __GLASGOW_HASKELL__ < 710
29−import Control.Applicative (Applicative(..), (<$>))
30−#endif
3131import Control.Monad
3232import Control.Monad.Error.Class (MonadError(..))
3333
@@ -197,7 +197,7 @@ filterModule mn exps refs = do
197197 Nothing -> throwError . errorMessage . UnknownExportType $ name
198198 Just ((_, dcons), _) -> do
199199 let expDcons' = fromMaybe dcons expDcons
200− mapM_ (checkDcon name dcons) expDcons'
200+ traverse_ (checkDcon name dcons) expDcons'
201201 return $ ((name, expDcons'), mn) : result
202202 filterTypes _ result _ = return result
203203
src/Language/PureScript/Sugar/Names/Imports.hs+8−8
@@ -11,7 +11,6 @@
1111--
1212-----------------------------------------------------------------------------
1313
14−{-# LANGUAGE CPP #-}
1514{-# LANGUAGE FlexibleContexts #-}
1615{-# LANGUAGE ScopedTypeVariables #-}
1716{-# LANGUAGE TupleSections #-}
@@ -22,13 +21,14 @@ module Language.PureScript.Sugar.Names.Imports
2221 , findImports
2322 ) where
2423
24+import Prelude ()
25+import Prelude.Compat
26+
2527import Data.List (find)
2628import Data.Maybe (fromMaybe, isNothing)
29+import Data.Foldable (traverse_)
2730
2831import Control.Arrow (first)
29−#if __GLASGOW_HASKELL__ < 710
30−import Control.Applicative (Applicative(..), (<$>))
31−#endif
3232import Control.Monad
3333import Control.Monad.Error.Class (MonadError(..))
3434import Control.Monad.Writer (MonadWriter(..), censor)
@@ -57,7 +57,7 @@ findImports = foldM (go Nothing) M.empty
5757
5858 -- Ensure that classes don't appear in an `import X hiding (...)`
5959 checkImportRefType :: ImportDeclarationType -> m ()
60− checkImportRefType (Hiding refs) = mapM_ checkImportRef refs
60+ checkImportRefType (Hiding refs) = traverse_ checkImportRef refs
6161 checkImportRefType _ = return ()
6262 checkImportRef :: DeclarationRef -> m ()
6363 checkImportRef (ModuleRef name) = throwError . errorMessage $ ImportHidingModule name
@@ -105,7 +105,7 @@ resolveImport currentModule importModule exps imps impQual =
105105
106106 -- Check that a 'DeclarationRef' refers to an importable symbol
107107 checkRefs :: [DeclarationRef] -> m ()
108− checkRefs = mapM_ check
108+ checkRefs = traverse_ check
109109 where
110110 check (PositionedDeclarationRef pos _ r) =
111111 rethrowWithPosition pos $ check r
@@ -114,7 +114,7 @@ resolveImport currentModule importModule exps imps impQual =
114114 check (TypeRef name dctors) = do
115115 checkImportExists UnknownImportType ((fst . fst) `map` exportedTypes exps) name
116116 let allDctors = fst `map` allExportedDataConstructors name
117− maybe (return ()) (mapM_ $ checkDctorExists name allDctors) dctors
117+ maybe (return ()) (traverse_ $ checkDctorExists name allDctors) dctors
118118 check (TypeClassRef name) =
119119 checkImportExists UnknownImportTypeClass (fst `map` exportedTypeClasses exps) name
120120 --check (ModuleRef name) =
@@ -168,7 +168,7 @@ resolveImport currentModule importModule exps imps impQual =
168168 exportedDctors = allExportedDataConstructors name
169169 dctorNames :: [ProperName]
170170 dctorNames = fst `map` exportedDctors
171− maybe (return ()) (mapM_ $ checkDctorExists name dctorNames) dctors
171+ maybe (return ()) (traverse_ $ checkDctorExists name dctorNames) dctors
172172 when (null dctorNames && isNothing dctors) . tell . errorMessage $ MisleadingEmptyTypeImport importModule name
173173 dctors' <- foldM (\m -> updateImports m runProperName exportedDctors) (importedDataConstructors imp) (fromMaybe dctorNames dctors)
174174 return $ imp { importedTypes = types', importedDataConstructors = dctors' }
src/Language/PureScript/Sugar/ObjectWildcards.hs+3−4
@@ -14,15 +14,14 @@
1414
1515{-# LANGUAGE FlexibleContexts #-}
1616{-# LANGUAGE ScopedTypeVariables #-}
17−{-# LANGUAGE CPP #-}
1817
1918module Language.PureScript.Sugar.ObjectWildcards (
2019 desugarObjectConstructors
2120) where
2221
23−#if __GLASGOW_HASKELL__ < 710
24−import Control.Applicative
25−#endif
22+import Prelude ()
23+import Prelude.Compat
24+
2625import Control.Arrow (second)
2726import Control.Monad.Error.Class (MonadError(..))
2827import Control.Monad.Supply.Class
src/Language/PureScript/Sugar/Operators.hs+5−6
@@ -21,7 +21,6 @@
2121{-# LANGUAGE FlexibleContexts #-}
2222{-# LANGUAGE ScopedTypeVariables #-}
2323{-# LANGUAGE RecordWildCards #-}
24−{-# LANGUAGE CPP #-}
2524
2625module Language.PureScript.Sugar.Operators (
2726 rebracket,
@@ -29,15 +28,15 @@ module Language.PureScript.Sugar.Operators (
2928 desugarOperatorSections
3029) where
3130
31+import Prelude ()
32+import Prelude.Compat
33+
3234import Language.PureScript.Crash
3335import Language.PureScript.AST
3436import Language.PureScript.Errors
3537import Language.PureScript.Names
3638import Language.PureScript.Externs
3739
38−#if __GLASGOW_HASKELL__ < 710
39−import Control.Applicative
40−#endif
4140import Control.Monad.State
4241import Control.Monad.Error.Class (MonadError(..))
4342import Control.Monad.Supply.Class
@@ -60,7 +59,7 @@ rebracket externs ms = do
6059 let fixities = concatMap externsFixities externs ++ concatMap collectFixities ms
6160 ensureNoDuplicates $ map (\(i, pos, _) -> (i, pos)) fixities
6261 let opTable = customOperatorTable $ map (\(i, _, f) -> (i, f)) fixities
63− mapM (rebracketModule opTable) ms
62+ traverse (rebracketModule opTable) ms
6463
6564removeSignedLiterals :: Module -> Module
6665removeSignedLiterals (Module ss coms mn ds exts) = Module ss coms mn (map f' ds) exts
@@ -164,7 +163,7 @@ matchOp op = do
164163 guard $ ident == op
165164
166165desugarOperatorSections :: forall m. (Applicative m, MonadSupply m, MonadError MultipleErrors m) => Module -> m Module
167−desugarOperatorSections (Module ss coms mn ds exts) = Module ss coms mn <$> mapM goDecl ds <*> pure exts
166+desugarOperatorSections (Module ss coms mn ds exts) = Module ss coms mn <$> traverse goDecl ds <*> pure exts
168167 where
169168
170169 goDecl :: Declaration -> m Declaration
src/Language/PureScript/Sugar/TypeClasses.hs+5−6
@@ -16,7 +16,6 @@
1616
1717{-# LANGUAGE FlexibleContexts #-}
1818{-# LANGUAGE RecordWildCards #-}
19−{-# LANGUAGE CPP #-}
2019
2120module Language.PureScript.Sugar.TypeClasses
2221 ( desugarTypeClasses
@@ -24,6 +23,9 @@ module Language.PureScript.Sugar.TypeClasses
2423 , superClassDictionaryNames
2524 ) where
2625
26+import Prelude ()
27+import Prelude.Compat
28+
2729import Language.PureScript.Crash
2830import Language.PureScript.AST hiding (isExported)
2931import Language.PureScript.Environment
@@ -37,9 +39,6 @@ import Language.PureScript.Types
3739
3840import qualified Language.PureScript.Constants as C
3941
40−#if __GLASGOW_HASKELL__ < 710
41−import Control.Applicative
42−#endif
4342import Control.Arrow (first, second)
4443import Control.Monad.Error.Class (MonadError(..))
4544import Control.Monad.State
@@ -57,7 +56,7 @@ type Desugar = StateT MemberMap
5756-- instance dictionary expressions.
5857--
5958desugarTypeClasses :: (Functor m, Applicative m, MonadSupply m, MonadError MultipleErrors m) => [ExternsFile] -> [Module] -> m [Module]
60−desugarTypeClasses externs = flip evalStateT initialState . mapM desugarModule
59+desugarTypeClasses externs = flip evalStateT initialState . traverse desugarModule
6160 where
6261 initialState :: MemberMap
6362 initialState = M.fromList (externs >>= \ExternsFile{..} -> mapMaybe (fromExternsDecl efModuleName) efDeclarations)
@@ -262,7 +261,7 @@ typeInstanceDictionaryDeclaration name mn deps className tys decls =
262261 let memberTypes = map (second (replaceAllTypeVars (zip (map fst args) tys))) instanceTys
263262
264263 -- Create values for the type instance members
265− members <- zip (map typeClassMemberName decls) <$> mapM (memberToValue memberTypes) decls
264+ members <- zip (map typeClassMemberName decls) <$> traverse (memberToValue memberTypes) decls
266265
267266 -- Create the type of the dictionary
268267 -- The type is an object type, but depending on type instance dependencies, may be constrained.
src/Language/PureScript/Sugar/TypeClasses/Deriving.hs+4−5
@@ -19,19 +19,18 @@
1919{-# LANGUAGE PatternGuards #-}
2020{-# LANGUAGE RankNTypes #-}
2121{-# LANGUAGE ScopedTypeVariables #-}
22−{-# LANGUAGE CPP #-}
2322
2423module Language.PureScript.Sugar.TypeClasses.Deriving (
2524 deriveInstances
2625) where
2726
28−import Data.List
27+import Prelude ()
28+import Prelude.Compat
29+
30+import Data.List (foldl', find, sortBy)
2931import Data.Maybe (fromMaybe)
3032import Data.Ord (comparing)
3133
32−#if __GLASGOW_HASKELL__ < 710
33−import Control.Applicative
34−#endif
3534import Control.Monad (replicateM)
3635import Control.Monad.Supply.Class (MonadSupply, freshName)
3736import Control.Monad.Error.Class (MonadError(..))
src/Language/PureScript/Sugar/TypeDeclarations.hs+3−4
@@ -16,15 +16,14 @@
1616
1717{-# LANGUAGE FlexibleContexts #-}
1818{-# LANGUAGE ScopedTypeVariables #-}
19−{-# LANGUAGE CPP #-}
2019
2120module Language.PureScript.Sugar.TypeDeclarations (
2221 desugarTypeDeclarationsModule
2322) where
2423
25−#if __GLASGOW_HASKELL__ < 710
26−import Control.Applicative
27−#endif
24+import Prelude ()
25+import Prelude.Compat
26+
2827import Control.Monad (forM)
2928import Control.Monad.Error.Class (MonadError(..))
3029
src/Language/PureScript/Traversals.hs+2−5
@@ -12,13 +12,10 @@
1212--
1313-----------------------------------------------------------------------------
1414
15−{-# LANGUAGE CPP #-}
16−
1715module Language.PureScript.Traversals where
1816
19−#if __GLASGOW_HASKELL__ < 710
20−import Control.Applicative
21−#endif
17+import Prelude ()
18+import Prelude.Compat
2219
2320fstM :: (Functor f) => (a -> f c) -> (a, b) -> f (c, b)
2421fstM f (a, b) = flip (,) b <$> f a
src/Language/PureScript/TypeChecker.hs+8−9
@@ -14,13 +14,15 @@
1414-----------------------------------------------------------------------------
1515
1616{-# LANGUAGE FlexibleInstances #-}
17−{-# LANGUAGE CPP #-}
1817
1918module Language.PureScript.TypeChecker (
2019 module T,
2120 typeCheckModule
2221) where
2322
23+import Prelude ()
24+import Prelude.Compat
25+
2426import Language.PureScript.TypeChecker.Monad as T
2527import Language.PureScript.TypeChecker.Kinds as T
2628import Language.PureScript.TypeChecker.Types as T
@@ -28,13 +30,10 @@ import Language.PureScript.TypeChecker.Synonyms as T
2830
2931import Data.Maybe
3032import Data.List (nub, (\\), sort, group)
31−import Data.Foldable (for_)
33+import Data.Foldable (for_, traverse_)
3234
3335import qualified Data.Map as M
3436
35−#if __GLASGOW_HASKELL__ < 710
36−import Control.Applicative ((<$>), (<*))
37−#endif
3837import Control.Monad.State
3938import Control.Monad.Error.Class (MonadError(..))
4039
@@ -58,7 +57,7 @@ addDataType moduleName dtype name args dctors ctorKind = do
5857addDataConstructor :: ModuleName -> DataDeclType -> ProperName -> [String] -> ProperName -> [Type] -> Check ()
5958addDataConstructor moduleName dtype name args dctor tys = do
6059 env <- getEnv
61− mapM_ checkTypeSynonyms tys
60+ traverse_ checkTypeSynonyms tys
6261 let retTy = foldl TypeApp (TypeConstructor (Qualified (Just moduleName) name)) (map TypeVar args)
6362 let dctorTy = foldr function retTy tys
6463 let polyType = mkForAll args dctorTy
@@ -134,7 +133,7 @@ checkTypeSynonyms = void . replaceAllTypeSynonyms
134133-- * Process module imports
135134--
136135typeCheckAll :: ModuleName -> [DeclarationRef] -> [Declaration] -> Check [Declaration]
137−typeCheckAll moduleName _ ds = mapM go ds <* mapM_ checkOrphanFixities ds
136+typeCheckAll moduleName _ ds = traverse go ds <* traverse_ checkOrphanFixities ds
138137 where
139138 go :: Declaration -> Check Declaration
140139 go (DataDeclaration dtype name args dctors) = do
@@ -218,8 +217,8 @@ typeCheckAll moduleName _ ds = mapM go ds <* mapM_ checkOrphanFixities ds
218217 addTypeClass moduleName pn args implies tys
219218 return d
220219 go (d@(TypeInstanceDeclaration dictName deps className tys body)) = rethrow (addHint (ErrorInInstance className tys)) $ do
221− mapM_ (checkTypeClassInstance moduleName) tys
222− forM_ deps $ mapM_ (checkTypeClassInstance moduleName) . snd
220+ traverse_ (checkTypeClassInstance moduleName) tys
221+ forM_ deps $ traverse_ (checkTypeClassInstance moduleName) . snd
223222 checkOrphanInstance dictName className tys
224223 _ <- traverseTypeInstanceBody checkInstanceMembers body
225224 let dict = TypeClassDictionaryInScope (Qualified (Just moduleName) dictName) [] className tys (Just deps)
src/Language/PureScript/TypeChecker/Entailment.hs+5−10
@@ -13,23 +13,18 @@
1313--
1414-----------------------------------------------------------------------------
1515
16−{-# LANGUAGE CPP #-}
17−
1816module Language.PureScript.TypeChecker.Entailment (
1917 entails
2018) where
2119
20+import Prelude ()
21+import Prelude.Compat
22+
2223import Data.Function (on)
23−import Data.List
24+import Data.List (minimumBy, sortBy, groupBy)
2425import Data.Maybe (maybeToList, mapMaybe)
25−#if __GLASGOW_HASKELL__ < 710
26−import Data.Foldable (foldMap)
27−#endif
2826import qualified Data.Map as M
2927
30−#if __GLASGOW_HASKELL__ < 710
31−import Control.Applicative
32−#endif
3328import Control.Arrow (Arrow(..))
3429import Control.Monad.State
3530import Control.Monad.Error.Class (MonadError(..))
@@ -112,7 +107,7 @@ entails moduleName context = solve
112107 solveSubgoals :: [(String, Type)] -> Maybe [Constraint] -> Check (Maybe [DictionaryValue])
113108 solveSubgoals _ Nothing = return Nothing
114109 solveSubgoals subst (Just subgoals) = do
115− dict <- mapM (uncurry (go (work + 1)) . second (map (replaceAllTypeVars subst))) subgoals
110+ dict <- traverse (uncurry (go (work + 1)) . second (map (replaceAllTypeVars subst))) subgoals
116111 return $ Just dict
117112
118113 -- Make a dictionary from subgoal dictionaries by applying the correct function
src/Language/PureScript/TypeChecker/Kinds.hs+4−5
@@ -17,7 +17,6 @@
1717{-# LANGUAGE MultiParamTypeClasses #-}
1818{-# LANGUAGE FlexibleInstances #-}
1919{-# LANGUAGE TupleSections #-}
20−{-# LANGUAGE CPP #-}
2120
2221module Language.PureScript.TypeChecker.Kinds (
2322 kindOf,
@@ -26,15 +25,15 @@ module Language.PureScript.TypeChecker.Kinds (
2625 kindsOfAll
2726) where
2827
28+import Prelude ()
29+import Prelude.Compat
30+
2931import Data.Maybe (fromMaybe)
3032
3133import qualified Data.HashMap.Strict as H
3234import qualified Data.Map as M
3335
3436import Control.Arrow (second)
35−#if __GLASGOW_HASKELL__ < 710
36−import Control.Applicative
37−#endif
3837import Control.Monad
3938import Control.Monad.Error.Class (MonadError(..))
4039import Control.Monad.State
@@ -141,7 +140,7 @@ kindsOfAll moduleName syns tys = fmap tidyUp . liftUnify $ do
141140--
142141solveTypes :: Bool -> [Type] -> [Kind] -> Kind -> UnifyT Kind Check Kind
143142solveTypes isData ts kargs tyCon = do
144− ks <- mapM (fmap fst . infer) ts
143+ ks <- traverse (fmap fst . infer) ts
145144 when isData $ do
146145 tyCon =?= foldr FunKind Star kargs
147146 forM_ ks $ \k -> k =?= Star
src/Language/PureScript/TypeChecker/Monad.hs+11−6
@@ -19,16 +19,16 @@
1919{-# LANGUAGE MultiParamTypeClasses #-}
2020{-# LANGUAGE FlexibleContexts #-}
2121{-# LANGUAGE GADTs #-}
22−{-# LANGUAGE CPP #-}
2322
2423module Language.PureScript.TypeChecker.Monad where
2524
25+import Prelude ()
26+import Prelude.Compat
27+
2628import Data.Maybe
29+import Data.Foldable (for_)
2730import qualified Data.Map as M
2831
29−#if __GLASGOW_HASKELL__ < 710
30−import Control.Applicative
31−#endif
3232import Control.Monad.State
3333import Control.Monad.Unify
3434import Control.Monad.Writer.Strict
@@ -67,8 +67,13 @@ bindTypes newNames action = do
6767-- |
6868-- Temporarily bind a collection of names to types
6969--
70−withScopedTypeVars :: (Functor m, MonadState CheckState m) => ModuleName -> [(String, Kind)] -> m a -> m a
71−withScopedTypeVars mn ks = bindTypes (M.fromList (map (\(name, k) -> (Qualified (Just mn) (ProperName name), (k, ScopedTypeVar))) ks))
70+withScopedTypeVars :: (Functor m, Applicative m, MonadState CheckState m, MonadWriter MultipleErrors m) => ModuleName -> [(String, Kind)] -> m a -> m a
71+withScopedTypeVars mn ks ma = do
72+ orig <- get
73+ for_ ks $ \(name, _) ->
74+ when (Qualified (Just mn) (ProperName name) `M.member` types (checkEnv orig)) $
75+ tell . errorMessage $ ShadowedTypeVar name
76+ bindTypes (M.fromList (map (\(name, k) -> (Qualified (Just mn) (ProperName name), (k, ScopedTypeVar))) ks)) ma
7277
7378-- |
7479-- Temporarily make a collection of type class dictionaries available
src/Language/PureScript/TypeChecker/Skolems.hs+3−5
@@ -13,8 +13,6 @@
1313--
1414-----------------------------------------------------------------------------
1515
16−{-# LANGUAGE CPP #-}
17−
1816module Language.PureScript.TypeChecker.Skolems (
1917 newSkolemConstant,
2018 introduceSkolemScope,
@@ -24,12 +22,12 @@ module Language.PureScript.TypeChecker.Skolems (
2422 skolemEscapeCheck
2523) where
2624
25+import Prelude ()
26+import Prelude.Compat
27+
2728import Data.List (nub, (\\))
2829import Data.Monoid
2930
30−#if __GLASGOW_HASKELL__ < 710
31−import Control.Applicative
32−#endif
3331import Control.Monad.Error.Class (MonadError(..))
3432import Control.Monad.Unify
3533
src/Language/PureScript/TypeChecker/Synonyms.hs+3−4
@@ -17,18 +17,17 @@
1717{-# LANGUAGE MultiParamTypeClasses #-}
1818{-# LANGUAGE PatternGuards #-}
1919{-# LANGUAGE GADTs #-}
20−{-# LANGUAGE CPP #-}
2120
2221module Language.PureScript.TypeChecker.Synonyms (
2322 replaceAllTypeSynonyms
2423) where
2524
25+import Prelude ()
26+import Prelude.Compat
27+
2628import Data.Maybe (fromMaybe)
2729import qualified Data.Map as M
2830
29−#if __GLASGOW_HASKELL__ < 710
30−import Control.Applicative
31−#endif
3231import Control.Monad.Error.Class (MonadError(..))
3332import Control.Monad.State
3433
src/Language/PureScript/TypeChecker/Types.hs+8−9
@@ -16,7 +16,6 @@
1616{-# LANGUAGE FlexibleContexts #-}
1717{-# LANGUAGE MultiParamTypeClasses #-}
1818{-# LANGUAGE OverloadedStrings #-}
19−{-# LANGUAGE CPP #-}
2019
2120module Language.PureScript.TypeChecker.Types (
2221 typesOf
@@ -38,14 +37,14 @@ module Language.PureScript.TypeChecker.Types (
3837 Check a function of a given type returns a value of another type when applied to its arguments
3938-}
4039
40+import Prelude ()
41+import Prelude.Compat
42+
4143import Data.Either (lefts, rights)
42−import Data.List
44+import Data.List (transpose, nub, (\\), partition, delete)
4345import Data.Maybe (fromMaybe)
4446import qualified Data.Map as M
4547
46−#if __GLASGOW_HASKELL__ < 710
47−import Control.Applicative
48−#endif
4948import Control.Monad
5049import Control.Monad.State
5150import Control.Monad.Unify
@@ -213,20 +212,20 @@ infer' v@(StringLiteral _) = return $ TypedValue True v tyString
213212infer' v@(CharLiteral _) = return $ TypedValue True v tyChar
214213infer' v@(BooleanLiteral _) = return $ TypedValue True v tyBoolean
215214infer' (ArrayLiteral vals) = do
216− ts <- mapM infer vals
215+ ts <- traverse infer vals
217216 els <- fresh
218217 forM_ ts $ \(TypedValue _ _ t) -> els =?= t
219218 return $ TypedValue True (ArrayLiteral ts) (TypeApp tyArray els)
220219infer' (ObjectLiteral ps) = do
221220 ensureNoDuplicateProperties ps
222− ts <- mapM (infer . snd) ps
221+ ts <- traverse (infer . snd) ps
223222 let fields = zipWith (\name (TypedValue _ _ t) -> (name, t)) (map fst ps) ts
224223 ty = TypeApp tyObject $ rowFromList (fields, REmpty)
225224 return $ TypedValue True (ObjectLiteral (zip (map fst ps) ts)) ty
226225infer' (ObjectUpdate o ps) = do
227226 ensureNoDuplicateProperties ps
228227 row <- fresh
229− newVals <- zipWith (\(name, _) t -> (name, t)) ps <$> mapM (infer . snd) ps
228+ newVals <- zipWith (\(name, _) t -> (name, t)) ps <$> traverse (infer . snd) ps
230229 let newTys = map (\(name, TypedValue _ _ ty) -> (name, ty)) newVals
231230 oldTys <- zip (map fst ps) <$> replicateM (length ps) fresh
232231 let oldTy = TypeApp tyObject $ rowFromList (oldTys, row)
@@ -365,7 +364,7 @@ inferBinder val (ObjectBinder props) = do
365364 return $ m1 `M.union` m2
366365inferBinder val (ArrayBinder binders) = do
367366 el <- fresh
368− m1 <- M.unions <$> mapM (inferBinder el) binders
367+ m1 <- M.unions <$> traverse (inferBinder el) binders
369368 val =?= TypeApp tyArray el
370369 return m1
371370inferBinder val (NamedBinder name binder) = do
src/Language/PureScript/Types.hs+3−4
@@ -16,10 +16,12 @@
1616{-# LANGUAGE DeriveDataTypeable #-}
1717{-# LANGUAGE GeneralizedNewtypeDeriving #-}
1818{-# LANGUAGE TemplateHaskell #-}
19−{-# LANGUAGE CPP #-}
2019
2120module Language.PureScript.Types where
2221
22+import Prelude ()
23+import Prelude.Compat
24+
2325import Data.Data
2426import Data.List (nub)
2527import Data.Maybe (fromMaybe)
@@ -28,9 +30,6 @@ import qualified Data.Aeson.TH as A
2830
2931import Control.Monad.Unify
3032import Control.Arrow (second)
31−#if __GLASGOW_HASKELL__ < 710
32−import Control.Applicative
33−#endif
3433import Control.Monad ((<=<))
3534
3635import Language.PureScript.Names
tests/Main.hs+3−7
@@ -16,7 +16,6 @@
1616{-# LANGUAGE TupleSections #-}
1717{-# LANGUAGE GeneralizedNewtypeDeriving #-}
1818{-# LANGUAGE FlexibleInstances #-}
19−{-# LANGUAGE CPP #-}
2019
2120-- Failing tests can specify the kind of error that should be thrown with a
2221-- @shouldFailWith declaration. For example:
@@ -35,6 +34,9 @@
3534
3635module Main (main) where
3736
37+import Prelude ()
38+import Prelude.Compat
39+
3840import qualified Language.PureScript as P
3941import qualified Language.PureScript.CodeGen.JS as J
4042import qualified Language.PureScript.CoreFn as CF
@@ -42,18 +44,12 @@ import qualified Language.PureScript.CoreFn as CF
4244import Data.Char (isSpace)
4345import Data.Maybe (mapMaybe, fromMaybe)
4446import Data.List (isSuffixOf, sort, stripPrefix)
45−#if __GLASGOW_HASKELL__ < 710
46−import Data.Traversable (traverse)
47−#endif
4847import Data.Time.Clock (UTCTime())
4948
5049import qualified Data.Map as M
5150
5251import Control.Monad
5352import Control.Monad.IO.Class (liftIO)
54−#if __GLASGOW_HASKELL__ < 710
55−import Control.Applicative
56−#endif
5753import Control.Arrow ((>>>))
5854
5955import Control.Monad.Reader
tests/common/TestsSetup.hs+3−8
@@ -10,18 +10,13 @@
1010-- |
1111--
1212-----------------------------------------------------------------------------
13−
14−{-# LANGUAGE CPP #-}
15−
1613module TestsSetup where
1714
18−import Data.Maybe (fromMaybe)
15+import Prelude ()
16+import Prelude.Compat
1917
20−#if __GLASGOW_HASKELL__ < 710
21−import Control.Applicative
22−#endif
18+import Data.Maybe (fromMaybe)
2319import Control.Monad
24−
2520import Control.Monad.Trans.Maybe
2621
2722import System.Process