git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
766 files changed+2699−44489
since splitsnapshots
unifiedsplit
.gitignore+3 .travis.yml−86 CONTRIBUTING.md−38 CONTRIBUTORS.md−93 ChangeLog.md+3 INSTALL.md−56 LICENSE+20−5257 README-go.md+48 README.md+32−20 Setup.hs−4 app/Main.hs+250 appveyor.yml−54 appveyor/cache-buster.txt−8 bundle/.gitignore−4 bundle/README−25 bundle/build.sh−65 core-tests/.gitignore−3 core-tests/bower.json−60 core-tests/test-everything.sh−33 core-tests/tests/GenericDeriving.purs−30 core-tests/tests/Main.purs−9 default.nix+23 examples/.gitignore−1 examples/docs/bower.json−20 examples/docs/bower_components/purescript-prelude/src/Prelude.purs−8 examples/docs/src/Clash.purs−4 examples/docs/src/Clash1.purs−3 examples/docs/src/Clash1a.purs−9 examples/docs/src/Clash2.purs−3 examples/docs/src/Clash2a.purs−9 examples/docs/src/ConstrainedArgument.purs−9 examples/docs/src/DocComments.purs−11 examples/docs/src/DuplicateNames.purs−9 examples/docs/src/Example.purs−7 examples/docs/src/Example2.purs−7 examples/docs/src/ExplicitTypeSignatures.purs−18 examples/docs/src/ImportedTwice.purs−13 examples/docs/src/ImportedTwiceA.purs−8 examples/docs/src/ImportedTwiceB.purs−4 examples/docs/src/MultiVirtual.purs−6 examples/docs/src/MultiVirtual1.purs−4 examples/docs/src/MultiVirtual2.purs−9 examples/docs/src/MultiVirtual3.purs−4 examples/docs/src/NewOperators.purs−5 examples/docs/src/NewOperators2.purs−6 examples/docs/src/NotAllCtors.purs−5 examples/docs/src/ReExportedTypeClass.purs−5 examples/docs/src/SolitaryTypeClassMember.purs−6 examples/docs/src/SomeTypeClass.purs−5 examples/docs/src/Transitive1.purs−5 examples/docs/src/Transitive2.purs−5 examples/docs/src/Transitive3.purs−4 examples/docs/src/TypeClassWithFunDeps.purs−5 examples/docs/src/TypeClassWithoutMembers.purs−5 examples/docs/src/TypeClassWithoutMembersIntermediate.purs−5 examples/docs/src/TypeOpAliases.purs−18 examples/docs/src/UTF8.purs−7 examples/docs/src/Virtual.purs−5 examples/failing/1071.purs−8 examples/failing/1169.purs−12 examples/failing/1175.purs−11 examples/failing/1310.purs−18 examples/failing/1570.purs−6 examples/failing/1733.purs−6 examples/failing/1733/Thingy.purs−4 examples/failing/1825.purs−9 examples/failing/1881.purs−6 examples/failing/2128-class.purs−5 examples/failing/2128-instance.purs−8 examples/failing/2378.purs−6 examples/failing/2378/Lib.purs−3 examples/failing/2379.purs−6 examples/failing/2379/Lib.purs−9 examples/failing/2434.purs−5 examples/failing/365.purs−14 examples/failing/438.purs−15 examples/failing/881.purs−13 examples/failing/AnonArgument1.purs−5 examples/failing/AnonArgument2.purs−7 examples/failing/AnonArgument3.purs−5 examples/failing/ArgLengthMismatch.purs−7 examples/failing/ArrayType.purs−14 examples/failing/Arrays.purs−6 examples/failing/CannotDeriveNewtypeForData.purs−8 examples/failing/CaseBinderLengthsDiffer.purs−6 examples/failing/CaseDoesNotMatchAllConstructorArgs.purs−15 examples/failing/ConflictingExports.purs−6 examples/failing/ConflictingExports/A.purs−4 examples/failing/ConflictingExports/B.purs−4 examples/failing/ConflictingImports.purs−9 examples/failing/ConflictingImports/A.purs−4 examples/failing/ConflictingImports/B.purs−4 examples/failing/ConflictingImports2.purs−10 examples/failing/ConflictingImports2/A.purs−4 examples/failing/ConflictingImports2/B.purs−4 examples/failing/ConflictingQualifiedImports.purs−7 examples/failing/ConflictingQualifiedImports/A.purs−4 examples/failing/ConflictingQualifiedImports/B.purs−4 examples/failing/ConflictingQualifiedImports2.purs−5 examples/failing/ConflictingQualifiedImports2/A.purs−4 examples/failing/ConflictingQualifiedImports2/B.purs−4 examples/failing/ConstraintFailure.purs−13 examples/failing/ConstraintInference.purs−10 examples/failing/DctorOperatorAliasExport.purs−6 examples/failing/DeclConflictClassCtor.purs−6 examples/failing/DeclConflictClassSynonym.purs−8 examples/failing/DeclConflictClassType.purs−6 examples/failing/DeclConflictCtorClass.purs−6 examples/failing/DeclConflictCtorCtor.purs−6 examples/failing/DeclConflictSynonymClass.purs−8 examples/failing/DeclConflictSynonymType.purs−8 examples/failing/DeclConflictTypeClass.purs−6 examples/failing/DeclConflictTypeSynonym.purs−8 examples/failing/DeclConflictTypeType.purs−6 examples/failing/DiffKindsSameName.purs−15 examples/failing/DiffKindsSameName/LibA.purs−4 examples/failing/DiffKindsSameName/LibB.purs−6 examples/failing/Do.purs−12 examples/failing/DoNotSuggestComposition.purs−13 examples/failing/DoNotSuggestComposition2.purs−7 examples/failing/DuplicateDeclarationsInLet.purs−12 examples/failing/DuplicateModule.purs−2 examples/failing/DuplicateModule/M1.purs−1 examples/failing/DuplicateProperties1.purs−12 examples/failing/DuplicateProperties2.purs−12 examples/failing/DuplicateTypeVars.purs−6 examples/failing/Eff.purs−13 examples/failing/EmptyCase.purs−4 examples/failing/EmptyClass.purs−7 examples/failing/EmptyDo.purs−6 examples/failing/ExportConflictClass.purs−5 examples/failing/ExportConflictClass/A.purs−3 examples/failing/ExportConflictClass/B.purs−3 examples/failing/ExportConflictCtor.purs−5 examples/failing/ExportConflictCtor/A.purs−3 examples/failing/ExportConflictCtor/B.purs−3 examples/failing/ExportConflictType.purs−5 examples/failing/ExportConflictType/A.purs−3 examples/failing/ExportConflictType/B.purs−3 examples/failing/ExportConflictTypeOp.purs−5 examples/failing/ExportConflictTypeOp/A.purs−5 examples/failing/ExportConflictTypeOp/B.purs−5 examples/failing/ExportConflictValue.purs−5 examples/failing/ExportConflictValue/A.purs−4 examples/failing/ExportConflictValue/B.purs−4 examples/failing/ExportConflictValueOp.purs−5 examples/failing/ExportConflictValueOp/A.purs−6 examples/failing/ExportConflictValueOp/B.purs−6 examples/failing/ExportExplicit.purs−8 examples/failing/ExportExplicit1.purs−12 examples/failing/ExportExplicit1/M1.purs−3 examples/failing/ExportExplicit2.purs−8 examples/failing/ExportExplicit3.purs−10 examples/failing/ExportExplicit3/M1.purs−4 examples/failing/ExtraRecordField.purs−9 examples/failing/Foldable.purs−17 examples/failing/Generalization1.purs−11 examples/failing/Generalization2.purs−8 examples/failing/ImportExplicit.purs−4 examples/failing/ImportExplicit/M1.purs−3 examples/failing/ImportExplicit2.purs−4 examples/failing/ImportExplicit2/M1.purs−3 examples/failing/ImportHidingModule.purs−4 examples/failing/ImportHidingModule/A.purs−2 examples/failing/ImportHidingModule/B.purs−3 examples/failing/ImportModule.purs−4 examples/failing/ImportModule/M2.purs−3 examples/failing/InfiniteKind.purs−5 examples/failing/InfiniteType.purs−5 examples/failing/InstanceExport.purs−7 examples/failing/InstanceExport/InstanceExport.purs−11 examples/failing/IntOutOfRange.purs−6 examples/failing/InvalidOperatorInBinder.purs−12 examples/failing/KindError.purs−6 examples/failing/KindStar.purs−8 examples/failing/LeadingZeros1.purs−6 examples/failing/LeadingZeros2.purs−6 examples/failing/Let.purs−6 examples/failing/MPTCs.purs−10 examples/failing/MissingClassExport.purs−7 examples/failing/MissingClassMemberExport.purs−7 examples/failing/MissingRecordField.purs−10 examples/failing/MultipleErrors.purs−13 examples/failing/MultipleErrors2.purs−9 examples/failing/MultipleTypeOpFixities.purs−9 examples/failing/MultipleValueOpFixities.purs−9 examples/failing/MutRec.purs−9 examples/failing/MutRec2.purs−6 examples/failing/NewtypeInstance.purs−8 examples/failing/NewtypeInstance2.purs−8 examples/failing/NewtypeInstance3.purs−8 examples/failing/NewtypeInstance4.purs−8 examples/failing/NewtypeInstance5.purs−8 examples/failing/NewtypeInstance6.purs−8 examples/failing/NewtypeMultiArgs.purs−6 examples/failing/NewtypeMultiCtor.purs−6 examples/failing/NonWildcardNewtypeInstance.purs−8 examples/failing/NullaryAbs.purs−6 examples/failing/Object.purs−8 examples/failing/OperatorAliasNoExport.purs−7 examples/failing/OperatorSections.purs−7 examples/failing/OrphanInstance.purs−7 examples/failing/OrphanInstance/Class.purs−4 examples/failing/OrphanTypeDecl.purs−4 examples/failing/OverlappingArguments.purs−6 examples/failing/OverlappingBinders.purs−9 examples/failing/OverlappingVars.purs−14 examples/failing/ProgrammableTypeErrors.purs−16 examples/failing/ProgrammableTypeErrorsTypeString.purs−18 examples/failing/Rank2Types.purs−8 examples/failing/RequiredHiddenType.purs−9 examples/failing/Reserved.purs−7 examples/failing/RowConstructors1.purs−9 examples/failing/RowConstructors2.purs−9 examples/failing/RowConstructors3.purs−9 examples/failing/RowInInstanceNotDetermined0.purs−9 examples/failing/RowInInstanceNotDetermined1.purs−9 examples/failing/RowInInstanceNotDetermined2.purs−9 examples/failing/SkolemEscape.purs−8 examples/failing/SkolemEscape2.purs−10 examples/failing/SuggestComposition.purs−7 examples/failing/Superclasses1.purs−14 examples/failing/Superclasses2.purs−13 examples/failing/Superclasses3.purs−8 examples/failing/Superclasses5.purs−26 examples/failing/TopLevelCaseNoArgs.purs−8 examples/failing/TransitiveDctorExport.purs−5 examples/failing/TransitiveSynonymExport.purs−5 examples/failing/TypeClassInstances.purs−11 examples/failing/TypeClasses2.purs−9 examples/failing/TypeError.purs−6 examples/failing/TypeOperatorAliasNoExport.purs−6 examples/failing/TypeSynonyms.purs−8 examples/failing/TypeSynonyms2.purs−12 examples/failing/TypeSynonyms3.purs−12 examples/failing/TypeSynonyms4.purs−11 examples/failing/TypeSynonyms5.purs−6 examples/failing/TypeWildcards1.purs−7 examples/failing/TypeWildcards2.purs−7 examples/failing/TypeWildcards3.purs−9 examples/failing/TypedBinders.purs−10 examples/failing/TypedBinders2.purs−9 examples/failing/TypedBinders3.purs−13 examples/failing/TypedHole.purs−9 examples/failing/UnderscoreModuleName.purs−6 examples/failing/UnknownType.purs−7 examples/passing/1185.purs−15 examples/passing/1335.purs−14 examples/passing/1570.purs−8 examples/passing/1664.purs−16 examples/passing/1697.purs−25 examples/passing/1807.purs−14 examples/passing/1881.purs−19 examples/passing/1991.purs−22 examples/passing/2018.purs−12 examples/passing/2018/A.purs−7 examples/passing/2018/B.purs−3 examples/passing/2049.purs−14 examples/passing/2138.purs−7 examples/passing/2138/Lib.purs−3 examples/passing/2172.js−5 examples/passing/2172.purs−10 examples/passing/2252.purs−15 examples/passing/2378.purs−9 examples/passing/2438.purs−8 examples/passing/652.purs−18 examples/passing/810.purs−14 examples/passing/862.purs−8 examples/passing/922.purs−20 examples/passing/Applicative.purs−16 examples/passing/ArrayType.purs−12 examples/passing/Auto.purs−16 examples/passing/AutoPrelude.purs−11 examples/passing/AutoPrelude2.purs−10 examples/passing/BindersInFunctions.purs−16 examples/passing/BindingGroups.purs−11 examples/passing/BlockString.purs−9 examples/passing/CaseInDo.purs−21 examples/passing/CaseInputWildcard.purs−18 examples/passing/CaseMultipleExpressions.purs−21 examples/passing/CaseStatement.purs−22 examples/passing/CheckFunction.purs−8 examples/passing/CheckSynonymBug.purs−13 examples/passing/CheckTypeClass.purs−18 examples/passing/Church.purs−18 examples/passing/ClassRefSyntax.purs−9 examples/passing/ClassRefSyntax/Lib.purs−4 examples/passing/Collatz.purs−21 examples/passing/Comparisons.purs−15 examples/passing/Conditional.purs−9 examples/passing/Console.purs−15 examples/passing/ConstraintInference.purs−10 examples/passing/ConstraintParsingIssue.purs−9 examples/passing/ContextSimplification.purs−15 examples/passing/DataAndType.purs−10 examples/passing/DctorName.purs−33 examples/passing/DctorOperatorAlias.purs−34 examples/passing/DctorOperatorAlias/List.purs−5 examples/passing/DeepArrayBinder.purs−17 examples/passing/DeepCase.purs−15 examples/passing/DeriveNewtype.purs−27 examples/passing/Deriving.purs−34 examples/passing/Do.purs−68 examples/passing/Dollar.purs−16 examples/passing/Eff.purs−26 examples/passing/EmptyDataDecls.purs−20 examples/passing/EmptyRow.purs−11 examples/passing/EmptyTypeClass.purs−11 examples/passing/EntailsKindedType.purs−11 examples/passing/EqOrd.purs−18 examples/passing/ExplicitImportReExport.purs−11 examples/passing/ExplicitImportReExport/Bar.purs−3 examples/passing/ExplicitImportReExport/Foo.purs−4 examples/passing/ExplicitOperatorSections.purs−15 examples/passing/ExportExplicit.purs−10 examples/passing/ExportExplicit/M1.purs−10 examples/passing/ExportExplicit2.purs−8 examples/passing/ExportExplicit2/M1.purs−7 examples/passing/ExportedInstanceDeclarations.purs−45 examples/passing/ExtendedInfixOperators.purs−17 examples/passing/Fib.purs−18 examples/passing/FieldConsPuns.purs−13 examples/passing/FieldPuns.purs−10 examples/passing/FinalTagless.purs−25 examples/passing/ForeignKind.purs−10 examples/passing/ForeignKind/Lib.purs−60 examples/passing/FunWithFunDeps.js−32 examples/passing/FunWithFunDeps.purs−41 examples/passing/FunctionScope.purs−13 examples/passing/FunctionalDependencies.purs−21 examples/passing/Functions.purs−12 examples/passing/Functions2.purs−13 examples/passing/Generalization1.purs−11 examples/passing/GenericsRep.purs−53 examples/passing/Guards.purs−30 examples/passing/HasOwnProperty.purs−5 examples/passing/HoistError.purs−12 examples/passing/IfThenElseMaybe.purs−12 examples/passing/IfWildcard.purs−19 examples/passing/ImplicitEmptyImport.purs−9 examples/passing/Import.purs−6 examples/passing/Import/M1.purs−8 examples/passing/Import/M2.purs−6 examples/passing/ImportExplicit.purs−10 examples/passing/ImportExplicit/M1.purs−4 examples/passing/ImportHiding.purs−19 examples/passing/ImportQualified.purs−8 examples/passing/ImportQualified/M1.purs−3 examples/passing/InferRecFunWithConstrainedArgument.purs−11 examples/passing/InstanceBeforeClass.purs−12 examples/passing/IntAndChar.purs−19 examples/passing/JSReserved.purs−13 examples/passing/KindedType.purs−34 examples/passing/LargeSumType.purs−35 examples/passing/Let.purs−58 examples/passing/Let2.purs−20 examples/passing/LetInInstance.purs−15 examples/passing/LiberalTypeSynonyms.purs−22 examples/passing/MPTCs.purs−21 examples/passing/Match.purs−10 examples/passing/Module.purs−7 examples/passing/Module/M1.purs−14 examples/passing/Module/M2.purs−10 examples/passing/ModuleDeps.purs−6 examples/passing/ModuleDeps/M1.purs−5 examples/passing/ModuleDeps/M2.purs−5 examples/passing/ModuleDeps/M3.purs−3 examples/passing/ModuleExport.purs−8 examples/passing/ModuleExport/A.purs−3 examples/passing/ModuleExportDupes.purs−11 examples/passing/ModuleExportDupes/A.purs−3 examples/passing/ModuleExportDupes/B.purs−3 examples/passing/ModuleExportDupes/C.purs−4 examples/passing/ModuleExportExcluded.purs−11 examples/passing/ModuleExportExcluded/A.purs−6 examples/passing/ModuleExportQualified.purs−9 examples/passing/ModuleExportQualified/A.purs−3 examples/passing/ModuleExportSelf.purs−11 examples/passing/ModuleExportSelf/A.purs−5 examples/passing/Monad.purs−32 examples/passing/MonadState.purs−63 examples/passing/MultiArgFunctions.purs−27 examples/passing/MutRec.purs−20 examples/passing/MutRec2.purs−20 examples/passing/MutRec3.purs−20 examples/passing/NakedConstraint.purs−10 examples/passing/NamedPatterns.purs−10 examples/passing/NegativeBinder.purs−10 examples/passing/NegativeIntInRange.purs−9 examples/passing/Nested.purs−10 examples/passing/NestedTypeSynonyms.purs−12 examples/passing/NestedWhere.purs−13 examples/passing/Newtype.purs−23 examples/passing/NewtypeClass.purs−39 examples/passing/NewtypeEff.purs−29 examples/passing/NewtypeInstance.purs−41 examples/passing/NewtypeWithRecordUpdate.purs−16 examples/passing/NonConflictingExports.purs−10 examples/passing/NonConflictingExports/A.purs−4 examples/passing/NumberLiterals.purs−39 examples/passing/ObjectGetter.purs−14 examples/passing/ObjectSynonym.purs−16 examples/passing/ObjectUpdate.purs−23 examples/passing/ObjectUpdate2.purs−18 examples/passing/ObjectUpdater.purs−26 examples/passing/ObjectWildcards.purs−20 examples/passing/Objects.purs−36 examples/passing/OneConstructor.purs−10 examples/passing/OperatorAlias.purs−11 examples/passing/OperatorAliasElsewhere.purs−9 examples/passing/OperatorAliasElsewhere/Def.purs−4 examples/passing/OperatorAssociativity.purs−25 examples/passing/OperatorInlining.purs−48 examples/passing/OperatorSections.purs−18 examples/passing/Operators.purs−91 examples/passing/Operators/Other.purs−7 examples/passing/OptimizerBug.purs−10 examples/passing/OptionalQualified.purs−12 examples/passing/OverlappingInstances.purs−17 examples/passing/OverlappingInstances2.purs−27 examples/passing/OverlappingInstances3.purs−20 examples/passing/ParensInTypedBinder.purs−20 examples/passing/PartialFunction.purs−11 examples/passing/Patterns.purs−23 examples/passing/PendingConflictingImports.purs−8 examples/passing/PendingConflictingImports/A.purs−4 examples/passing/PendingConflictingImports/B.purs−4 examples/passing/PendingConflictingImports2.purs−10 examples/passing/PendingConflictingImports2/A.purs−4 examples/passing/Person.purs−12 examples/passing/PrimedTypeName.purs−20 examples/passing/QualifiedNames.purs−11 examples/passing/QualifiedNames/Either.purs−5 examples/passing/QualifiedQualifiedImports.purs−6 examples/passing/Rank2Data.purs−30 examples/passing/Rank2Object.purs−11 examples/passing/Rank2TypeSynonym.purs−17 examples/passing/Rank2Types.purs−12 examples/passing/ReExportQualified.purs−7 examples/passing/ReExportQualified/A.purs−3 examples/passing/ReExportQualified/B.purs−3 examples/passing/ReExportQualified/C.purs−4 examples/passing/RebindableSyntax.purs−43 examples/passing/Recursion.purs−11 examples/passing/RedefinedFixity.purs−6 examples/passing/RedefinedFixity/M1.purs−6 examples/passing/RedefinedFixity/M2.purs−5 examples/passing/RedefinedFixity/M3.purs−6 examples/passing/ReservedWords.purs−19 examples/passing/ResolvableScopeConflict.purs−13 examples/passing/ResolvableScopeConflict/A.purs−4 examples/passing/ResolvableScopeConflict/B.purs−7 examples/passing/ResolvableScopeConflict2.purs−15 examples/passing/ResolvableScopeConflict2/A.purs−7 examples/passing/ResolvableScopeConflict3.purs−9 examples/passing/ResolvableScopeConflict3/A.purs−4 examples/passing/RowConstructors.purs−43 examples/passing/RowInInstanceHeadDetermined.purs−40 examples/passing/RowPolyInstanceContext.purs−23 examples/passing/RowsInInstanceContext.purs−25 examples/passing/RuntimeScopeIssue.purs−22 examples/passing/ScopedTypeVariables.purs−37 examples/passing/Sequence.purs−16 examples/passing/SequenceDesugared.purs−38 examples/passing/ShadowedModuleName.purs−8 examples/passing/ShadowedModuleName/Test.purs−6 examples/passing/ShadowedName.purs−11 examples/passing/ShadowedRename.purs−14 examples/passing/ShadowedTCO.purs−21 examples/passing/ShadowedTCOLet.purs−15 examples/passing/SignedNumericLiterals.purs−18 examples/passing/SolvingAppendSymbol.purs−32 examples/passing/SolvingCompareSymbol.purs−30 examples/passing/SolvingIsSymbol.purs−13 examples/passing/SolvingIsSymbol/Lib.purs−10 examples/passing/Stream.purs−26 examples/passing/StringEscapes.purs−26 examples/passing/Superclasses1.purs−23 examples/passing/Superclasses3.purs−41 examples/passing/TCO.purs−20 examples/passing/TCOCase.purs−13 examples/passing/TailCall.purs−20 examples/passing/Tick.purs−8 examples/passing/TopLevelCase.purs−19 examples/passing/TransitiveImport.purs−9 examples/passing/TransitiveImport/Middle.purs−5 examples/passing/TransitiveImport/Test.purs−9 examples/passing/TypeClassMemberOrderChange.purs−16 examples/passing/TypeClasses.purs−71 examples/passing/TypeClassesInOrder.purs−12 examples/passing/TypeClassesWithOverlappingTypeVariables.purs−12 examples/passing/TypeDecl.purs−13 examples/passing/TypeOperators.purs−20 examples/passing/TypeOperators/A.purs−22 examples/passing/TypeSynonymInData.purs−12 examples/passing/TypeSynonyms.purs−28 examples/passing/TypeWildcards.purs−16 examples/passing/TypeWildcardsRecordExtension.purs−9 examples/passing/TypeWithoutParens.purs−12 examples/passing/TypeWithoutParens/Lib.purs−4 examples/passing/TypedBinders.purs−68 examples/passing/TypedWhere.purs−18 examples/passing/UTF8Sourcefile.purs−8 examples/passing/UnderscoreIdent.purs−13 examples/passing/UnicodeIdentifier.purs−7 examples/passing/UnicodeOperators.purs−22 examples/passing/UnicodeType.purs−22 examples/passing/UnifyInTypeInstanceLookup.purs−25 examples/passing/Unit.purs−8 examples/passing/UnknownInTypeClassLookup.purs−15 examples/passing/UntupledConstraints.purs−17 examples/passing/Where.purs−49 examples/passing/WildcardInInstance.purs−23 examples/passing/WildcardType.purs−12 examples/passing/iota.purs−11 examples/passing/s.purs−8 examples/warning/2140.purs−5 examples/warning/2383.purs−12 examples/warning/2411.purs−15 examples/warning/DuplicateExportRef.purs−30 examples/warning/DuplicateImport.purs−10 examples/warning/DuplicateImportRef.purs−18 examples/warning/DuplicateSelectiveImport.purs−10 examples/warning/HidingImport.purs−9 examples/warning/ImplicitImport.purs−9 examples/warning/ImplicitQualifiedImport.purs−11 examples/warning/MissingTypeDeclaration.purs−4 examples/warning/OverlappingInstances.purs−17 examples/warning/OverlappingPattern.purs−15 examples/warning/ScopeShadowing.purs−13 examples/warning/ShadowedTypeVar.purs−5 examples/warning/UnnecessaryFFIModule.js−1 examples/warning/UnnecessaryFFIModule.purs−5 examples/warning/UnusedDctorExplicitImport.purs−8 examples/warning/UnusedDctorImportAll.purs−7 examples/warning/UnusedDctorImportExplicit.purs−7 examples/warning/UnusedExplicitImport.purs−8 examples/warning/UnusedExplicitImportTypeOp.purs−9 examples/warning/UnusedExplicitImportTypeOp/Lib.purs−8 examples/warning/UnusedExplicitImportValOp.purs−8 examples/warning/UnusedFFIImplementations.js−2 examples/warning/UnusedFFIImplementations.purs−4 examples/warning/UnusedImport.purs−14 examples/warning/UnusedTypeVar.purs−5 examples/warning/WildcardInferredType.purs−23 hierarchy/Main.hs−119 license-generator/generate.hs−172 license-generator/header.txt−15 logo.png make_release_notes−2 package.yaml+86 psc-bundle/Main.hs−147 psc-bundle/README.md−18 psc-docs/Ctags.hs−13 psc-docs/Etags.hs−13 psc-docs/Main.hs−253 psc-docs/Tags.hs−21 psc-ide-client/Main.hs−48 psc-ide-server/Main.hs−179 psc-ide-server/PROTOCOL.md−568 psc-ide-server/README.md−47 psc-package/Main.hs−302 psc-package/README.md−99 psc-publish/Main.hs−54 psc/Main.hs−182 psci/Main.hs−377 psci/static/index.html−10 psci/static/index.js−63 psgo.cabal+145 purescript.cabal−567 src/CodeGen/IL.hs+321 src/CodeGen/IL/Common.hs+196 src/CodeGen/IL/Optimizer.hs+81 src/CodeGen/IL/Optimizer/Common.hs+18 src/CodeGen/IL/Optimizer/Inliner.hs+435 src/CodeGen/IL/Optimizer/MagicDo.hs+146 src/CodeGen/IL/Optimizer/TCO.hs+141 src/CodeGen/IL/Printer.hs+527 src/Control/Monad/Logger.hs−59 src/Control/Monad/Supply.hs−33 src/Control/Monad/Supply/Class.hs−36 src/Language/PureScript.hs−36 src/Language/PureScript/AST.hs−14 src/Language/PureScript/AST/Binders.hs−83 src/Language/PureScript/AST/Declarations.hs−697 src/Language/PureScript/AST/Exported.hs−155 src/Language/PureScript/AST/Literals.hs−38 src/Language/PureScript/AST/Operators.hs−51 src/Language/PureScript/AST/SourcePos.hs−81 src/Language/PureScript/AST/Traversals.hs−638 src/Language/PureScript/Bundle.hs−710 src/Language/PureScript/CodeGen.hs−8 src/Language/PureScript/CodeGen/JS.hs−451 src/Language/PureScript/CodeGen/JS/AST.hs−405 src/Language/PureScript/CodeGen/JS/Common.hs−237 src/Language/PureScript/CodeGen/JS/Optimizer.hs−73 src/Language/PureScript/CodeGen/JS/Optimizer/Blocks.hs−32 src/Language/PureScript/CodeGen/JS/Optimizer/Common.hs−84 src/Language/PureScript/CodeGen/JS/Optimizer/Inliner.hs−377 src/Language/PureScript/CodeGen/JS/Optimizer/MagicDo.hs−136 src/Language/PureScript/CodeGen/JS/Optimizer/TCO.hs−121 src/Language/PureScript/CodeGen/JS/Optimizer/Unused.hs−35 src/Language/PureScript/Comments.hs−18 src/Language/PureScript/Constants.hs−443 src/Language/PureScript/CoreFn.hs−15 src/Language/PureScript/CoreFn/Ann.hs−25 src/Language/PureScript/CoreFn/Binders.hs−42 src/Language/PureScript/CoreFn/Desugar.hs−278 src/Language/PureScript/CoreFn/Expr.hs−122 src/Language/PureScript/CoreFn/Meta.hs−42 src/Language/PureScript/CoreFn/Module.hs−22 src/Language/PureScript/CoreFn/ToJSON.hs−118 src/Language/PureScript/CoreFn/Traversals.hs−77 src/Language/PureScript/Crash.hs−11 src/Language/PureScript/Docs.hs−15 src/Language/PureScript/Docs/AsMarkdown.hs−140 src/Language/PureScript/Docs/Convert.hs−203 src/Language/PureScript/Docs/Convert/ReExports.hs−535 src/Language/PureScript/Docs/Convert/Single.hs−204 src/Language/PureScript/Docs/ParseAndBookmark.hs−97 src/Language/PureScript/Docs/Prim.hs−244 src/Language/PureScript/Docs/Render.hs−162 src/Language/PureScript/Docs/RenderedCode.hs−8 src/Language/PureScript/Docs/RenderedCode/Render.hs−213 src/Language/PureScript/Docs/RenderedCode/Types.hs−206 src/Language/PureScript/Docs/Types.hs−645 src/Language/PureScript/Docs/Utils/MonoidExtras.hs−9 src/Language/PureScript/Environment.hs−371 src/Language/PureScript/Errors.hs−1331 src/Language/PureScript/Errors/JSON.hs−76 src/Language/PureScript/Externs.hs−238 src/Language/PureScript/Ide.hs−193 src/Language/PureScript/Ide/CaseSplit.hs−148 src/Language/PureScript/Ide/Command.hs−160 src/Language/PureScript/Ide/Completion.hs−30 src/Language/PureScript/Ide/Conversions.hs−29 src/Language/PureScript/Ide/Error.hs−53 src/Language/PureScript/Ide/Externs.hs−149 src/Language/PureScript/Ide/Filter.hs−91 src/Language/PureScript/Ide/Imports.hs−331 src/Language/PureScript/Ide/Logging.hs−37 src/Language/PureScript/Ide/Matcher.hs−123 src/Language/PureScript/Ide/Pursuit.hs−73 src/Language/PureScript/Ide/Rebuild.hs−160 src/Language/PureScript/Ide/Reexports.hs−110 src/Language/PureScript/Ide/SourceFile.hs−126 src/Language/PureScript/Ide/State.hs−262 src/Language/PureScript/Ide/Types.hs−306 src/Language/PureScript/Ide/Util.hs−116 src/Language/PureScript/Ide/Watcher.hs−53 src/Language/PureScript/Interactive.hs−290 src/Language/PureScript/Interactive/Completion.hs−223 src/Language/PureScript/Interactive/Directive.hs−103 src/Language/PureScript/Interactive/IO.hs−34 src/Language/PureScript/Interactive/Message.hs−56 src/Language/PureScript/Interactive/Module.hs−99 src/Language/PureScript/Interactive/Parser.hs−125 src/Language/PureScript/Interactive/Printer.hs−131 src/Language/PureScript/Interactive/Types.hs−128 src/Language/PureScript/Kinds.hs−44 src/Language/PureScript/Linter.hs−103 src/Language/PureScript/Linter/Exhaustive.hs−348 src/Language/PureScript/Linter/Imports.hs−365 src/Language/PureScript/Make.hs−478 src/Language/PureScript/ModuleDependencies.hs−100 src/Language/PureScript/Names.hs−213 src/Language/PureScript/Options.hs−42 src/Language/PureScript/Parser.hs−23 src/Language/PureScript/Parser/Common.hs−162 src/Language/PureScript/Parser/Declarations.hs−592 src/Language/PureScript/Parser/Kinds.hs−40 src/Language/PureScript/Parser/Lexer.hs−611 src/Language/PureScript/Parser/State.hs−18 src/Language/PureScript/Parser/Types.hs−128 src/Language/PureScript/Pretty.hs−17 src/Language/PureScript/Pretty/Common.hs−167 src/Language/PureScript/Pretty/JS.hs−315 src/Language/PureScript/Pretty/Kinds.hs−55 src/Language/PureScript/Pretty/Types.hs−188 src/Language/PureScript/Pretty/Values.hs−197 src/Language/PureScript/Publish.hs−412 src/Language/PureScript/Publish/BoxesHelpers.hs−44 src/Language/PureScript/Publish/ErrorsWarnings.hs−428 src/Language/PureScript/Publish/Utils.hs−41 src/Language/PureScript/Renamer.hs−193 src/Language/PureScript/Sugar.hs−67 src/Language/PureScript/Sugar/BindingGroups.hs−222 src/Language/PureScript/Sugar/CaseDeclarations.hs−188 src/Language/PureScript/Sugar/DoNotation.hs−63 src/Language/PureScript/Sugar/Names.hs−367 src/Language/PureScript/Sugar/Names/Common.hs−68 src/Language/PureScript/Sugar/Names/Env.hs−425 src/Language/PureScript/Sugar/Names/Exports.hs−322 src/Language/PureScript/Sugar/Names/Imports.hs−243 src/Language/PureScript/Sugar/ObjectWildcards.hs−100 src/Language/PureScript/Sugar/Operators.hs−415 src/Language/PureScript/Sugar/Operators/Binders.hs−26 src/Language/PureScript/Sugar/Operators/Common.hs−79 src/Language/PureScript/Sugar/Operators/Expr.hs−46 src/Language/PureScript/Sugar/Operators/Types.hs−27 src/Language/PureScript/Sugar/TypeClasses.hs−334 src/Language/PureScript/Sugar/TypeClasses/Deriving.hs−704 src/Language/PureScript/Sugar/TypeDeclarations.hs−63 src/Language/PureScript/Traversals.hs−27 src/Language/PureScript/TypeChecker.hs−457 src/Language/PureScript/TypeChecker/Entailment.hs−486 src/Language/PureScript/TypeChecker/Kinds.hs−265 src/Language/PureScript/TypeChecker/Monad.hs−304 src/Language/PureScript/TypeChecker/Rows.hs−53 src/Language/PureScript/TypeChecker/Skolems.hs−128 src/Language/PureScript/TypeChecker/Subsumption.hs−145 src/Language/PureScript/TypeChecker/Synonyms.hs−47 src/Language/PureScript/TypeChecker/TypeSearch.hs−90 src/Language/PureScript/TypeChecker/Types.hs−779 src/Language/PureScript/TypeChecker/Unify.hs−189 src/Language/PureScript/TypeClassDictionaries.hs−29 src/Language/PureScript/Types.hs−325 src/System/IO/UTF8.hs−24 src/Tests.hs+141 stack-ghc-8.0.yaml−7 stack.nix+23 stack.yaml+23−2 support/ffi-loader.go+30 support/go.mod.ffi-loader+2 support/go.mod.output+2 support/go.mod.working+1 test/Spec.hs+2 tests/Language/PureScript/Ide/FilterSpec.hs−52 tests/Language/PureScript/Ide/Imports/IntegrationSpec.hs−83 tests/Language/PureScript/Ide/ImportsSpec.hs−173 tests/Language/PureScript/Ide/Integration.hs−273 tests/Language/PureScript/Ide/MatcherSpec.hs−49 tests/Language/PureScript/Ide/RebuildSpec.hs−57 tests/Language/PureScript/Ide/ReexportsSpec.hs−63 tests/Language/PureScript/Ide/SourceFile/IntegrationSpec.hs−41 tests/Language/PureScript/Ide/SourceFileSpec.hs−54 tests/Language/PureScript/Ide/StateSpec.hs−51 tests/Main.hs−46 tests/PscIdeSpec.hs−1 tests/TestCompiler.hs−309 tests/TestDocs.hs−370 tests/TestPrimDocs.hs−30 tests/TestPscIde.hs−15 tests/TestPscPublish.hs−70 tests/TestPsci.hs−138 tests/TestUtils.hs−148 tests/support/.gitignore−2 tests/support/bower.json−17 tests/support/package.json−8 tests/support/psci/Sample.purs tests/support/pscide/.gitignore−7 tests/support/pscide/src/ImportsSpec.purs−3 tests/support/pscide/src/ImportsSpec1.purs−32 tests/support/pscide/src/MatcherSpec.purs−7 tests/support/pscide/src/RebuildSpecDep.purs−3 tests/support/pscide/src/RebuildSpecSingleModule.fail−3 tests/support/pscide/src/RebuildSpecSingleModule.purs−4 tests/support/pscide/src/RebuildSpecWithDeps.purs−5 tests/support/pscide/src/RebuildSpecWithForeign.js−1 tests/support/pscide/src/RebuildSpecWithForeign.purs−3 tests/support/pscide/src/RebuildSpecWithHiddenIdent.purs−6 tests/support/pscide/src/RebuildSpecWithMissingForeign.fail−3 tests/support/pscide/src/SourceFileSpec.purs−10 tests/support/setup-win.cmd−3 travis/build.sh−59 travis/convert-os-name.sh−14
.gitignore+3
@@ -14,7 +14,10 @@ bower_components/
1414node_modules
1515tmp/
1616.stack-work/
17+stack.yaml.lock
1718output
1819examples/docs/docs/
1920core-tests/full-core-docs.md
2021.psc-ide-port
22+.vscode/
23+result
.travis.ymldeleted−86
@@ -1,86 +0,0 @@
1−language: c
2−dist: trusty # because of perf issues
3−sudo: required
4−matrix:
5− include:
6− # The 'compiler' key is a hack to get Travis to use different caches for
7− # each job in a build, in order to avoid the separate jobs stomping on each
8− # other's caches. See https://github.com/travis-ci/travis-ci/issues/4393
9− #
10− # We use trusty boxes because they seem to be a bit faster.
11− - compiler: cc-linux-lts-normal
12− os: linux
13− dist: trusty
14− sudo: required
15− env: BUILD_TYPE=normal DEPLOY=true
16−
17− # - compiler: cc-linux-nightly-normal
18− # os: linux
19− # dist: trusty
20− # sudo: required
21− # env: BUILD_TYPE=normal STACKAGE_NIGHTLY=true
22− # allow_failures: true
23−
24− - compiler: cc-linux-ghc8.0-normal
25− os: linux
26− dist: trusty
27− sudo: required
28− env: BUILD_TYPE=normal STACK_YAML=stack-ghc-8.0.yaml
29−
30− - compiler: cc-linux-lts-sdist
31− os: linux
32− dist: trusty
33− sudo: required
34− env: BUILD_TYPE=sdist COVERAGE=true
35−
36− - compiler: cc-linux-lts-haddock
37− os: linux
38− dist: trusty
39− sudo: required
40− env: BUILD_TYPE=haddock
41−
42− - compiler: cc-osx-lts-normal
43− os: osx
44− env: BUILD_TYPE=normal DEPLOY=true
45−
46− - compiler: cc-osx-lts-sdist
47− os: osx
48− env: BUILD_TYPE=sdist
49−addons:
50− apt:
51− packages:
52− - libgmp-dev
53−cache:
54− directories:
55− - $HOME/.local/bin
56− - $HOME/.stack
57−install:
58−- | # Install stack.
59− if test ! -f "$HOME/.local/bin/stack"
60− then
61− URL="https://www.stackage.org/stack/$TRAVIS_OS_NAME-x86_64"
62− curl --location "$URL" > stack.tar.gz
63− gunzip stack.tar.gz
64− tar -x -f stack.tar --strip-components 1
65− mkdir -p "$HOME/.local/bin"
66− mv stack "$HOME/.local/bin/"
67− fi
68−- npm install -g bower # for psc-docs / psc-publish tests
69−# Fix the CC environment variable, because Travis changes it
70−- export CC=gcc
71−- export OS_NAME=$(./travis/convert-os-name.sh)
72−script:
73−- travis/build.sh
74−before_deploy:
75−- ./bundle/build.sh $OS_NAME
76−deploy:
77− provider: releases
78− api_key: $RELEASE_KEY
79− file:
80− - bundle/$OS_NAME.tar.gz
81− - bundle/$OS_NAME.sha
82− skip_cleanup: true
83− on:
84− all_branches: true
85− tags: true
86− condition: "$DEPLOY = true"
CONTRIBUTING.mddeleted−38
@@ -1,38 +0,0 @@
1−An introductory overview of the compiler is available [here](https://www.youtube.com/watch?v=Y3P1dxqwFiE).
2−
3−Pull requests are encouraged.
4−
5−## Finding Issues to Work On
6−
7−If you would like to contribute, please consider the issues in the current milestone first. If you are a new contributor, you may want to have a go at the ["easy" issues](https://github.com/purescript/purescript/labels/easy) to get started.
8−
9−## Pull Requests
10−
11−Please follow the following guidelines:
12−
13−- Add at least a test to `examples/passing/` and possibly to `examples/failing`.
14−- Build the binaries and libs with `stack build`
15−- Run the test suite with `stack test`. You will need `npm`, `bower` and `node` on your PATH to run the tests.
16−- Build the core libraries by running the script in `core-tests`.
17−
18−## Code Review
19−
20−To prevent core libraries from getting broken, every change must be reviewed. A pull request will be merged as long as one other team member has verified the changes.
21−
22−## Adding Dependencies
23−
24−Because the PureScript compiler is distributed in binary form, we include
25−the licenses of all dependencies, including transitive ones, in the LICENSE
26−file. Therefore, whenever the dependencies change, the LICENSE file should be
27−updated.
28−
29−This can be automated; see the `license-generator/generate.hs` file.
30−
31−## Writing Issues
32−
33−- If the issue is actually a question, please consider asking on Reddit, Stack Overflow or IRC first.
34−- Please include a minimal, repeatable test case with any bug report.
35−
36−## Copyright and Licensing
37−
38−For any code change, please append a copyright and licensing notice to the [CONTRIBUTORS.md](CONTRIBUTORS.md) file.
CONTRIBUTORS.mddeleted−93
@@ -1,93 +0,0 @@
1−## Contributors
2−
3−This file lists the contributors to the PureScript compiler project, and the terms under which their code is licensed.
4−
5−### Individuals
6−
7−- [@5outh](https://github.com/5outh) (Benjamin Kovach) - My existing contributions and all future contributions until further notice are Copyright Benjamin Kovach, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
8−- [@andreypopp](https://github.com/andreypopp) (Andrey Popp) My existing contributions and all future contributions until further notice are Copyright Andrey Popp, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
9−- [@andyarvanitis](https://github.com/andyarvanitis) (Andy Arvanitis) My existing contributions and all future contributions until further notice are Copyright Andy Arvanitis, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
10−- [@anthok88](https://github.com/anthoq88) - My existing contributions and all future contributions until further notice are Copyright anthoq88, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license
11−- [@ardumont](https://github.com/ardumont) (Antoine R. Dumont) My existing contributions and all future contributions until further notice are Copyright Antoine R. Dumont, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
12−- [@aspidites](https://github.com/aspidites) (Edwin Marshall) My existing contributions and all future contributions until further notice are Copyright Edwin Marshall, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
13−- [@bagl](https://github.com/bagl) (Petr Vapenka) My existing contributions and all future contributions until further notice are Copyright Petr Vapenka, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
14−- [@balajirrao](https://github.com/balajirrao) (Balaji Rao) - My existing contributions and all future contributions until further notice are Copyright Balaji Rao, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
15−- [@bergmark](https://github.com/bergmark) (Adam Bergmark) - My existing contributions and all future contributions until further notice are Copyright Adam Bergmark, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
16−- [@bmjames](https://github.com/bmjames) (Ben James) My existing contributions and all future contributions until further notice are Copyright Ben James, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
17−- [@Bogdanp](https://github.com/Bogdanp) (Bogdan Paul Popa) My existing contributions and all future contributions until further notice are Copyright Bogdan Paul Popa, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
18−- [@bsermons](https://github.com/bsermons) (Brian Sermons) My existing contributions and all future contributions until further notice are Copyright Brian Sermons, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
19−- [@cdepillabout](https://github.com/cdepillabout) (Dennis Gosnell) My existing contributions and all future contributions until further notice are Copyright Dennis Gosnell, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
20−- [@charleso](https://github.com/charleso) (Charles O'Farrell) My existing contributions to the PureScript compiler and all future contributions to the PureScript compiler until further notice, are Copyright Charles O'Farrell, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
21−- [@chrisdone](https://github.com/chrisdone) (Chris Done) - My existing contributions and all future contributions until further notice are Copyright Chris Done, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
22−- [@chrissmoak](https://github.com/chrissmoak) (Chris Smoak) My existing contributions to the PureScript compiler and all future contributions to the PureScript compiler until further notice, are Copyright Chris Smoak, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
23−- [@codedmart](https://github.com/codedmart) (Brandon Martin) My existing contributions and all future contributions until further notice are Copyright Brandon Martin, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
24−- [@davidchambers](https://github.com/davidchambers) (David Chambers) My existing contributions and all future contributions until further notice are Copyright David Chambers, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
25−- [@DavidLindbom](https://github.com/DavidLindbom) (David Lindbom) My existing contributions and all future contributions until further notice are Copyright David Lindbom, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
26−- [@dckc](https://github.com/dckc) (Dan Connolly) My existing contributions and all future contributions until further notice are Copyright Dan Connolly, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
27−- [@dylex](https://github.com/dylex) (Dylan Simon) My existing and all future contributions to the PureScript compiler until further notice are Copyright Dylan Simon, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
28−- [@eamelink](https://github.com/eamelink) (Erik Bakker) - My existing contributions and all future contributions until further notice are Copyright Erik Bakker, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
29−- [@epost](https://github.com/epost) (Erik Post) - My existing contributions and all future contributions until further notice are Copyright Erik Post, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license
30−- [@erdeszt](https://github.com/erdeszt) (Tibor Erdesz) My existing contributions and all future contributions until further notice are Copyright Tibor Erdesz, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
31−- [@etrepum](https://github.com/etrepum) (Bob Ippolito) My existing contributions and all future contributions until further notice are Copyright Bob Ippolito, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
32−- [@faineance](https://github.com/faineance) My existing contributions and all future contributions until further notice are Copyright faineance, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
33−- [@felixSchl](https://github.com/felixSchl) (Felix Schlitter) My existing contributions and all future contributions until further notice are Copyright Felix Schlitter, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
34−- [@FrigoEU](https://github.com/FrigoEU) (Simon Van Casteren) My existing contributions and all future contributions until further notice are Copyright Simon Van Casteren, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
35−- [@garyb](https://github.com/garyb) (Gary Burgess) My existing contributions and all future contributions until further notice are Copyright Gary Burgess, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
36−- [@hdgarrood](https://github.com/hdgarrood) (Harry Garrood) My existing contributions and all future contributions until further notice are Copyright Harry Garrood, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
37−- [@ianbollinger](https://github.com/ianbollinger) (Ian D. Bollinger) My existing contributions and all future contributions until further notice are Copyright Ian D. Bollinger, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
38−- [@ilovezfs](https://github.com/ilovezfs) - My existing contributions and all future contributions until further notice are Copyright ilovezfs, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license
39−- [@izgzhen](https://github.com/izgzhen) (Zhen Zhang) My existing contributions and all future contributions until further notice are Copyright Zhen Zhang, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
40−- [@jacereda](https://github.com/jacereda) (Jorge Acereda) My existing contributions and all future contributions until further notice are Copyright Jorge Acereda, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
41−- [@japesinator](https://github.com/japesinator) (JP Smith) My existing contributions and all future contributions until further notice are Copyright JP Smith, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
42−- [@joneshf](https://github.com/joneshf) (Hardy Jones) - My existing contributions and all future contributions until further notice are Copyright Hardy Jones, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
43−- [@kika](https://github.com/kika) (Kirill Pertsev) - My existing contributions and all future contributions until further notice are Copyright Kirill Pertsev, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
44−- [@kRITZCREEK](https://github.com/kRITZCREEK) (Christoph Hegemann) - My existing contributions and all future contributions until further notice are Copyright Christoph Hegemann, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
45−- [@L8D](https://github.com/L8D) (Tenor Biel) My existing contributions and all future contributions until further notice are Copyright Tenor Biel, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
46−- [@leighman](http://github.com/leighman) (Jack Leigh) My existing contributions and all future contributions until further notice are Copyright Jack Leigh, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
47−- [@LiamGoodacre](https://github.com/LiamGoodacre) (Liam Goodacre) My existing contributions and all future contributions until further notice are Copyright Liam Goodacre, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
48−- [@lukerandall](https://github.com/lukerandall) (Luke Randall) My existing contributions and all future contributions until further notice are Copyright Luke Randall, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
49−- [@mgmeier](https://github.com/mgmeier) (Michael Karg) My existing contributions and all future contributions until further notice are Copyright Michael Gilliland, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
50−- [@michaelficarra](https://github.com/michaelficarra) (Michael Ficarra) My existing contributions and all future contributions until further notice are Copyright Michael Ficarra, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
51−- [@MichaelXavier](https://github.com/MichaelXavier) (Michael Xavier) - My existing contributions and all future contributions until further notice are Copyright Michael Xavier, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
52−- [@mjgpy3](https://github.com/mjgpy3) (Michael Gilliland) My existing contributions and all future contributions until further notice are Copyright Michael Gilliland, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
53−- [@mpietrzak](https://github.com/mpietrzak) (Maciej Pietrzak) My existing contributions and all future contributions until further notice are Copyright Maciej Pietrzak, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
54−- [@mrhania](https://github.com/mrhania) (Łukasz Hanuszczak) - My existing contributions and all future contributions until further notice are Copyright Łukasz Hanuszczak, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
55−- [@nagisa](https://github.com/nagisa) I hereby release my [only contribution](https://github.com/purescript/purescript/commit/80287a5d0de619862d3b4cda9c1ee276d18fdcd8) into public domain.
56−- [@natefaubion](https://github.com/natefaubion) (Nathan Faubion) My existing contributions and all future contributions until further notice are Copyright Nathan Faubion, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
57−- [@nicodelpiano](https://github.com/nicodelpiano) (Nicolas Del Piano) My existing contributions and all future contributions until further notice are Copyright Nicolas Del Piano, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
58−- [@nullobject](https://github.com/nullobject) (Josh Bassett) My existing contributions and all future contributions until further notice are Copyright Josh Bassett, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
59−- [@nwolverson](https://github.com/nwolverson) (Nicholas Wolverson) My existing contributions and all future contributions until further notice are Copyright Nicholas Wolverson, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
60−- [@osa1](https://github.com/osa1) (Ömer Sinan Ağacan) - My existing contributions and all future contributions until further notice are Copyright Ömer Sinan Ağacan, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
61−- [@paf31](https://github.com/paf31) (Phil Freeman) My existing contributions and all future contributions until further notice are Copyright Phil Freeman, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
62−- [@passy](https://github.com/passy) (Pascal Hartig) My existing contributions and all future contributions until further notice are Copyright Pascal Hartig, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
63−- [@paulyoung](https://github.com/paulyoung) (Paul Young) My existing contributions and all future contributions until further notice are Copyright Paul Young, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
64−- [@pelotom](https://github.com/pelotom) (Thomas Crockett) My existing contributions and all future contributions until further notice are Copyright Thomas Crockett, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
65−- [@phadej](https://github.com/phadej) (Oleg Grenrus) My existing contributions and all future contributions until further notice are Copyright Oleg Grenrus, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
66−- [@phiggins](https://github.com/phiggins) (Pete Higgins) My existing contributions and all future contributions until further notice are Copyright Pete Higgins, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
67−- [@philopon](https://github.com/philopon) (Hirotomo Moriwaki) - My existing contributions and all future contributions until further notice are Copyright Hirotomo Moriwaki, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
68−- [@pseudonom](https://github.com/pseudonom) (Eric Easley) My existing contributions and all future contributions until further notice are Copyright Eric Easley, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
69−- [@puffnfresh](https://github.com/puffnfresh) (Brian McKenna) All contributions I made during June 2015 were during employment at [SlamData, Inc.](#companies) who owns the copyright. I assign copyright of all my personal contributions before June 2015 to the owners of the PureScript compiler.
70−- [@rightfold](https://github.com/rightfold) (rightfold) My existing contributions and all future contributions until further notice are Copyright rightfold, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](https://opensource.org/licenses/MIT).
71−- [@robdaemon](https://github.com/robdaemon) (Robert Roland) My existing contributions and all future contributions until further notice are Copyright Robert Roland, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
72−- [@RossMeikleham](https://github.com/RossMeikleham) (Ross Meikleham) My existing contributions and all future contributions until further notice are Copyright Ross Meikleham, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
73−- [@rvion](https://github.com/rvion) (Rémi Vion) My existing contributions and all future contributions until further notice are Copyright Rémi Vion, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
74−- [@sebastiaanvisser](https://github.com/sebastiaanvisser) (Sebastiaan Visser) - My existing contributions and all future contributions until further notice are Copyright Sebastiaan Visser, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
75−- [@senju](https://github.com/senju) - My existing contributions and all future contributions until further notice are Copyright senju, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
76−- [@sharkdp](https://github.com/sharkdp) (David Peter) My existing contributions and all future contributions until further notice are Copyright David Peter, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
77−- [@soupi](https://github.com/soupi) (Gil Mizrahi) My existing contributions and all future contributions until further notice are Copyright Gil Mizrahi, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
78−- [@sztupi](https://github.com/sztupi) (Attila Sztupak) My existing contributions and all future contributions until further notice are Copyright Attila Sztupak, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
79−- [@taku0](https://github.com/taku0) - My existing contributions and all future contributions until further notice are Copyright taku0, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
80−- [@tfausak](https://github.com/tfausak) (Taylor Fausak) My existing contributions and all future contributions until further notice are Copyright Taylor Fausak, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
81−- [@tmcgilchrist](https://github.com/tmcgilchrist) (Tim McGilchrist) My existing contributions and all future contributions until further notice are Copyright Tim McGilchrist, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
82−- [@trofi](https://github.com/trofi) (Sergei Trofimovich) My existing contributions and all future contributions until further notice are Copyright Sergei Trofimovich, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
83−- [@utkarshkukreti](https://github.com/utkarshkukreti) (Utkarsh Kukreti) My existing contributions and all future contributions until further notice are Copyright Utkarsh Kukreti, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
84−- [@vkorablin](https://github.com/vkorablin) (Vladimir Korablin) - My existing contributions and all future contributions until further notice are Copyright Vladimir Korablin, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
85−- [@zudov](https://github.com/zudov) (Konstantin Zudov) My existing contributions and all future contributions until further notice are Copyright Konstantin Zudov, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
86−- [@brandonhamilton](https://github.com/brandonhamilton) (Brandon Hamilton) My existing contributions and all future contributions until further notice are Copyright Brandon Hamilton, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
87−- [@bbqbaron](https://github.com/bbqbaron) (Eric Loren) My existing contributions and all future contributions until further notice are Copyright Eric Loren, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
88−- [@RyanGlScott](https://github.com/RyanGlScott) (Ryan Scott) My existing contributions and all future contributions until further notice are Copyright Ryan Scott, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
89−- [@seungha-kim](https://github.com/seungha-kim) (Seungha Kim) My existing contributions and all future contributions until further notice are Copyright Seungha Kim, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
90−
91−### Companies
92−
93−- [@slamdata](https://github.com/slamdata) (SlamData, Inc.) Speaking on behalf of SlamData for SlamData employees, our existing contributions and all future contributions to the PureScript compiler are, until further notice, Copyright SlamData Inc., and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT). - @jdegoes
ChangeLog.mdnew file+3
@@ -0,0 +1,3 @@
1+# Changelog for pscpp
2+
3+## Unreleased changes
INSTALL.mddeleted−56
@@ -1,56 +0,0 @@
1−# Installation information
2−
3−If you are having difficulty installing the PureScript compiler, feel free to
4−ask for help! A good place is the #purescript IRC channel on Freenode, or
5−alternatively Stack Overflow.
6−
7−## Using prebuilt binaries
8−
9−The prebuilt binaries are compiled with GHC 7.10.3, and therefore they should
10−run on any operating system supported by GHC 7.10.3, such as:
11−
12−* Windows 2000 or later,
13−* OS X 10.7 or later,
14−* Linux ??? (we're not sure what the minimum version is).
15−
16−This list is not exhaustive. If your OS is too old or not listed, or if the
17−binaries fail to run, you may be able to install the compiler by building it
18−from source; see below.
19−
20−It's probably safe to assume that other prebuilt distributions (eg, Homebrew,
21−Chocolatey, AUR, npm) use the same binaries, and therefore have the same
22−requirements.
23−
24−## Compiling from source
25−
26−GHC 7.10.1 or newer is required to compile from source. The easiest way is to
27−use stack:
28−
29−```
30−$ stack update
31−$ stack unpack purescript
32−$ cd purescript-x.y.z # (replace x.y.z with whichever version you just downloaded)
33−$ stack install
34−```
35−
36−This will then copy the compiler and utilities into `~/.local/bin`.
37−
38−
39−If you don't have stack installed, there are install instructions
40−[here](https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md).
41−
42−If you don't have ghc installed, stack will prompt you to run `stack setup`
43−which will install ghc for you.
44−
45−## The "curses" library
46−
47−`psci` depends on the `curses` library (via the Haskell package `terminfo`). If
48−you are having difficulty running the compiler, it may be because the `curses`
49−library is missing.
50−
51−On Linux, you will probably need to install `ncurses` manually. On Ubuntu, for
52−example, this can be done by running:
53−
54−```
55−$ sudo apt-get install libncurses5-dev
56−```
LICENSE+20−5257
@@ -1,5267 +1,30 @@
1−Copyright (c) 2013-16 Phil Freeman, (c) 2014-2016 Gary Burgess, and other
2−contributors
3−All rights reserved.
4−
5−Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6−
7−1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8−
9−2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
10−
11−3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
12−
13−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 HOLDER 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.
14−
15−PureScript uses the following Haskell library packages. Their license files follow.
16−
17− Glob
18− SHA
19− StateVar
20− adjunctions
21− aeson
22− aeson-better-errors
23− aeson-pretty
24− ansi-terminal
25− ansi-wl-pprint
26− appar
27− array
28− asn1-encoding
29− asn1-parse
30− asn1-types
31− async
32− attoparsec
33− auto-update
34− base
35− base-compat
36− base-orphans
37− base64-bytestring
38− bifunctors
39− binary
40− blaze-builder
41− blaze-html
42− blaze-markup
43− bower-json
44− boxes
45− byteable
46− byteorder
47− bytestring
48− bytestring-builder
49− case-insensitive
50− cereal
51− clock
52− cmdargs
53− comonad
54− conduit
55− conduit-extra
56− connection
57− containers
58− contravariant
59− cookie
60− cryptonite
61− data-default-class
62− data-ordlist
63− deepseq
64− directory
65− distributive
66− dlist
67− easy-file
68− edit-distance
69− entropy
70− exceptions
71− fail
72− fast-logger
73− file-embed
74− filepath
75− foldl
76− free
77− fsnotify
78− ghc-prim
79− hashable
80− haskeline
81− hex
82− hinotify
83− hostname
84− hourglass
85− http-client
86− http-client-tls
87− http-date
88− http-types
89− http2
90− integer-gmp
91− iproute
92− kan-extensions
93− language-javascript
94− lens
95− lifted-base
96− managed
97− memory
98− mime-types
99− mmorph
100− monad-control
101− monad-logger
102− monad-loops
103− mtl
104− mwc-random
105− network
106− network-uri
107− old-locale
108− old-time
109− optional-args
110− optparse-applicative
111− parallel
112− parsec
113− pattern-arrows
114− pem
115− pipes
116− pipes-http
117− prelude-extras
118− primitive
119− process
120− profunctors
121− protolude
122− psqueues
123− random
124− reflection
125− regex-base
126− regex-tdfa
127− resourcet
128− safe
129− scientific
130− semigroupoids
131− semigroups
132− simple-sendfile
133− socks
134− sourcemap
135− spdx
136− split
137− stm
138− stm-chans
139− streaming-commons
140− stringsearch
141− syb
142− system-fileio
143− system-filepath
144− tagged
145− template-haskell
146− temporary
147− terminfo
148− text
149− time
150− tls
151− transformers
152− transformers-base
153− transformers-compat
154− turtle
155− unix
156− unix-compat
157− unix-time
158− unordered-containers
159− utf8-string
160− vault
161− vector
162− void
163− wai
164− wai-app-static
165− wai-extra
166− wai-logger
167− wai-websockets
168− warp
169− websockets
170− word8
171− x509
172− x509-store
173− x509-system
174− x509-validation
175− zlib
176−
177−Glob LICENSE file:
178−
179− The code in Glob is released under the license below. Copyrights to parts of
180− the code are held by whoever wrote the code in question: see CREDITS.txt for a
181− list of authors.
182−
183− Copyright (c) 2008-2016 <authors>
184− All rights reserved.
185−
186− Redistribution and use in source and binary forms, with or without
187− modification, are permitted provided that the following conditions are met:
188− * Redistributions of source code must retain the above copyright
189− notice, this list of conditions and the following disclaimer.
190− * Redistributions in binary form must reproduce the above copyright
191− notice, this list of conditions and the following disclaimer in the
192− documentation and/or other materials provided with the distribution.
193− * Neither the name of the project nor the names of its contributors may be
194− used to endorse or promote products derived from this software without
195− specific prior written permission.
196−
197− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
198− WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
199− MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
200− EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
201− INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
202− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
203− PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
204− LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
205− OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
206− ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
207−
208−SHA LICENSE file:
209−
210− Copyright (c) 2008, Galois, Inc.
211− All rights reserved.
212−
213− Redistribution and use in source and binary forms, with or without
214− modification, are permitted provided that the following conditions
215− are met:
216−
217− * Redistributions of source code must retain the above copyright
218− notice, this list of conditions and the following disclaimer.
219− * Redistributions in binary form must reproduce the above copyright
220− notice, this list of conditions and the following disclaimer in
221− the documentation and/or other materials provided with the
222− distribution.
223− * Neither the name of the Galois, Inc. nor the names of its
224− contributors may be used to endorse or promote products derived
225− from this software without specific prior written permission.
226−
227− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
228− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
229− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
230− FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
231− COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
232− INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
233− BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
234− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
235− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
236− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
237− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
238− POSSIBILITY OF SUCH DAMAGE.
239−
240−StateVar LICENSE file:
241−
242− Copyright (c) 2014-2015, Edward Kmett
243− Copyright (c) 2009-2016, Sven Panne
244− All rights reserved.
245−
246− Redistribution and use in source and binary forms, with or without
247− modification, are permitted provided that the following conditions are met:
248−
249− 1. Redistributions of source code must retain the above copyright notice,
250− this list of conditions and the following disclaimer.
251−
252− 2. Redistributions in binary form must reproduce the above copyright
253− notice, this list of conditions and the following disclaimer in the
254− documentation and/or other materials provided with the distribution.
255−
256− 3. Neither the name of the author nor the names of its contributors may be
257− used to endorse or promote products derived from this software without
258− specific prior written permission.
259−
260− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
261− AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
262− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
263− ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
264− LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
265− CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
266− SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
267− INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
268− CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
269− ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
270− POSSIBILITY OF SUCH DAMAGE.
271−
272−adjunctions LICENSE file:
273−
274− Copyright 2011-2014 Edward Kmett
275−
276− All rights reserved.
277−
278− Redistribution and use in source and binary forms, with or without
279− modification, are permitted provided that the following conditions
280− are met:
281−
282− 1. Redistributions of source code must retain the above copyright
283− notice, this list of conditions and the following disclaimer.
284−
285− 2. Redistributions in binary form must reproduce the above copyright
286− notice, this list of conditions and the following disclaimer in the
287− documentation and/or other materials provided with the distribution.
288−
289− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
290− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
291− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
292− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
293− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
294− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
295− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
296− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
297− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
298− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
299− POSSIBILITY OF SUCH DAMAGE.
300−
301−aeson LICENSE file:
302−
303− Copyright (c) 2011, MailRank, Inc.
304−
305− All rights reserved.
306−
307− Redistribution and use in source and binary forms, with or without
308− modification, are permitted provided that the following conditions
309− are met:
310−
311− 1. Redistributions of source code must retain the above copyright
312− notice, this list of conditions and the following disclaimer.
313−
314− 2. Redistributions in binary form must reproduce the above copyright
315− notice, this list of conditions and the following disclaimer in the
316− documentation and/or other materials provided with the distribution.
317−
318− 3. Neither the name of the author nor the names of his contributors
319− may be used to endorse or promote products derived from this software
320− without specific prior written permission.
321−
322− THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
323− OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
324− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
325− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
326− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
327− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
328− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
329− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
330− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
331− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
332− POSSIBILITY OF SUCH DAMAGE.
333−
334−aeson-better-errors LICENSE file:
335−
336− Copyright (c) 2015 Harry Garrood
337−
338− Permission is hereby granted, free of charge, to any person obtaining
339− a copy of this software and associated documentation files (the
340− "Software"), to deal in the Software without restriction, including
341− without limitation the rights to use, copy, modify, merge, publish,
342− distribute, sublicense, and/or sell copies of the Software, and to
343− permit persons to whom the Software is furnished to do so, subject to
344− the following conditions:
345−
346− The above copyright notice and this permission notice shall be included
347− in all copies or substantial portions of the Software.
348−
349− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
350− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
351− MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
352− IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
353− CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
354− TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
355− SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
356−
357−aeson-pretty LICENSE file:
358−
359− Copyright (c)2011, Falko Peters
360−
361− All rights reserved.
362−
363− Redistribution and use in source and binary forms, with or without
364− modification, are permitted provided that the following conditions are met:
365−
366− * Redistributions of source code must retain the above copyright
367− notice, this list of conditions and the following disclaimer.
368−
369− * Redistributions in binary form must reproduce the above
370− copyright notice, this list of conditions and the following
371− disclaimer in the documentation and/or other materials provided
372− with the distribution.
373−
374− * Neither the name of Falko Peters nor the names of other
375− contributors may be used to endorse or promote products derived
376− from this software without specific prior written permission.
377−
378− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
379− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
380− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
381− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
382− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
383− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
384− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
385− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
386− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
387− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
388− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
389−
390−ansi-terminal LICENSE file:
391−
392− Copyright (c) 2008, Maximilian Bolingbroke
393− All rights reserved.
394−
395− Redistribution and use in source and binary forms, with or without modification, are permitted
396− provided that the following conditions are met:
397−
398− * Redistributions of source code must retain the above copyright notice, this list of
399− conditions and the following disclaimer.
400− * Redistributions in binary form must reproduce the above copyright notice, this list of
401− conditions and the following disclaimer in the documentation and/or other materials
402− provided with the distribution.
403− * Neither the name of Maximilian Bolingbroke nor the names of other contributors may be used to
404− endorse or promote products derived from this software without specific prior written permission.
405−
406− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
407− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
408− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
409− CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
410− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
411− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
412− IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
413− OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
414−
415−ansi-wl-pprint LICENSE file:
416−
417− Copyright 2008, Daan Leijen and Max Bolingbroke. All rights reserved.
418−
419− Redistribution and use in source and binary forms, with or without
420− modification, are permitted provided that the following conditions are
421− met:
422−
423− * Redistributions of source code must retain the above copyright
424− notice, this list of conditions and the following disclaimer.
425−
426− * Redistributions in binary form must reproduce the above copyright
427− notice, this list of conditions and the following disclaimer in
428− the documentation and/or other materials provided with the
429− distribution.
430−
431− This software is provided by the copyright holders "as is" and any
432− express or implied warranties, including, but not limited to, the
433− implied warranties of merchantability and fitness for a particular
434− purpose are disclaimed. In no event shall the copyright holders be
435− liable for any direct, indirect, incidental, special, exemplary, or
436− consequential damages (including, but not limited to, procurement of
437− substitute goods or services; loss of use, data, or profits; or
438− business interruption) however caused and on any theory of liability,
439− whether in contract, strict liability, or tort (including negligence
440− or otherwise) arising in any way out of the use of this software, even
441− if advised of the possibility of such damage.
442−
443−appar LICENSE file:
444−
445− Copyright (c) 2009, IIJ Innovation Institute Inc.
446− All rights reserved.
447−
448− Redistribution and use in source and binary forms, with or without
449− modification, are permitted provided that the following conditions
450− are met:
451−
452− * Redistributions of source code must retain the above copyright
453− notice, this list of conditions and the following disclaimer.
454− * Redistributions in binary form must reproduce the above copyright
455− notice, this list of conditions and the following disclaimer in
456− the documentation and/or other materials provided with the
457− distribution.
458− * Neither the name of the copyright holders nor the names of its
459− contributors may be used to endorse or promote products derived
460− from this software without specific prior written permission.
461−
462− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
463− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
464− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
465− FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
466− COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
467− INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
468− BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
469− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
470− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
471− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
472− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
473− POSSIBILITY OF SUCH DAMAGE.
474−
475−array LICENSE file:
476−
477− This library (libraries/base) is derived from code from several
478− sources:
479−
480− * Code from the GHC project which is largely (c) The University of
481− Glasgow, and distributable under a BSD-style license (see below),
482−
483− * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
484− and freely redistributable (but see the full license for
485− restrictions).
486−
487− * Code from the Haskell Foreign Function Interface specification,
488− which is (c) Manuel M. T. Chakravarty and freely redistributable
489− (but see the full license for restrictions).
490−
491− The full text of these licenses is reproduced below. All of the
492− licenses are BSD-style or compatible.
493−
494− -----------------------------------------------------------------------------
495−
496− The Glasgow Haskell Compiler License
497−
498− Copyright 2004, The University Court of the University of Glasgow.
499− All rights reserved.
500−
501− Redistribution and use in source and binary forms, with or without
502− modification, are permitted provided that the following conditions are met:
503−
504− - Redistributions of source code must retain the above copyright notice,
505− this list of conditions and the following disclaimer.
506−
507− - Redistributions in binary form must reproduce the above copyright notice,
508− this list of conditions and the following disclaimer in the documentation
509− and/or other materials provided with the distribution.
510−
511− - Neither name of the University nor the names of its contributors may be
512− used to endorse or promote products derived from this software without
513− specific prior written permission.
514−
515− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
516− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
517− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
518− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
519− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
520− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
521− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
522− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
523− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
524− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
525− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
526− DAMAGE.
527−
528− -----------------------------------------------------------------------------
529−
530− Code derived from the document "Report on the Programming Language
531− Haskell 98", is distributed under the following license:
532−
533− Copyright (c) 2002 Simon Peyton Jones
534−
535− The authors intend this Report to belong to the entire Haskell
536− community, and so we grant permission to copy and distribute it for
537− any purpose, provided that it is reproduced in its entirety,
538− including this Notice. Modified versions of this Report may also be
539− copied and distributed for any purpose, provided that the modified
540− version is clearly presented as such, and that it does not claim to
541− be a definition of the Haskell 98 Language.
542−
543− -----------------------------------------------------------------------------
544−
545− Code derived from the document "The Haskell 98 Foreign Function
546− Interface, An Addendum to the Haskell 98 Report" is distributed under
547− the following license:
548−
549− Copyright (c) 2002 Manuel M. T. Chakravarty
550−
551− The authors intend this Report to belong to the entire Haskell
552− community, and so we grant permission to copy and distribute it for
553− any purpose, provided that it is reproduced in its entirety,
554− including this Notice. Modified versions of this Report may also be
555− copied and distributed for any purpose, provided that the modified
556− version is clearly presented as such, and that it does not claim to
557− be a definition of the Haskell 98 Foreign Function Interface.
558−
559− -----------------------------------------------------------------------------
560−
561−asn1-encoding LICENSE file:
562−
563− Copyright (c) 2010-2013 Vincent Hanquez <vincent@snarc.org>
564−
565− All rights reserved.
566−
567− Redistribution and use in source and binary forms, with or without
568− modification, are permitted provided that the following conditions
569− are met:
570− 1. Redistributions of source code must retain the above copyright
571− notice, this list of conditions and the following disclaimer.
572− 2. Redistributions in binary form must reproduce the above copyright
573− notice, this list of conditions and the following disclaimer in the
574− documentation and/or other materials provided with the distribution.
575− 3. Neither the name of the author nor the names of his contributors
576− may be used to endorse or promote products derived from this software
577− without specific prior written permission.
578−
579− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
580− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
581− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
582− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
583− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
584− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
585− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
586− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
587− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
588− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
589− SUCH DAMAGE.
590−
591−asn1-parse LICENSE file:
592−
593− Copyright (c) 2010-2013 Vincent Hanquez <vincent@snarc.org>
594−
595− All rights reserved.
596−
597− Redistribution and use in source and binary forms, with or without
598− modification, are permitted provided that the following conditions
599− are met:
600− 1. Redistributions of source code must retain the above copyright
601− notice, this list of conditions and the following disclaimer.
602− 2. Redistributions in binary form must reproduce the above copyright
603− notice, this list of conditions and the following disclaimer in the
604− documentation and/or other materials provided with the distribution.
605− 3. Neither the name of the author nor the names of his contributors
606− may be used to endorse or promote products derived from this software
607− without specific prior written permission.
608−
609− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
610− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
611− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
612− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
613− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
614− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
615− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
616− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
617− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
618− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
619− SUCH DAMAGE.
620−
621−asn1-types LICENSE file:
622−
623− Copyright (c) 2010-2013 Vincent Hanquez <vincent@snarc.org>
624−
625− All rights reserved.
626−
627− Redistribution and use in source and binary forms, with or without
628− modification, are permitted provided that the following conditions
629− are met:
630− 1. Redistributions of source code must retain the above copyright
631− notice, this list of conditions and the following disclaimer.
632− 2. Redistributions in binary form must reproduce the above copyright
633− notice, this list of conditions and the following disclaimer in the
634− documentation and/or other materials provided with the distribution.
635− 3. Neither the name of the author nor the names of his contributors
636− may be used to endorse or promote products derived from this software
637− without specific prior written permission.
638−
639− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
640− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
641− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
642− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
643− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
644− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
645− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
646− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
647− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
648− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
649− SUCH DAMAGE.
650−
651−async LICENSE file:
652−
653− Copyright (c) 2012, Simon Marlow
654−
655− All rights reserved.
656−
657− Redistribution and use in source and binary forms, with or without
658− modification, are permitted provided that the following conditions are met:
659−
660− * Redistributions of source code must retain the above copyright
661− notice, this list of conditions and the following disclaimer.
662−
663− * Redistributions in binary form must reproduce the above
664− copyright notice, this list of conditions and the following
665− disclaimer in the documentation and/or other materials provided
666− with the distribution.
667−
668− * Neither the name of Simon Marlow nor the names of other
669− contributors may be used to endorse or promote products derived
670− from this software without specific prior written permission.
671−
672− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
673− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
674− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
675− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
676− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
677− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
678− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
679− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
680− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
681− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
682− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
683−
684−attoparsec LICENSE file:
685−
686− Copyright (c) Lennart Kolmodin
687−
688− All rights reserved.
689−
690− Redistribution and use in source and binary forms, with or without
691− modification, are permitted provided that the following conditions
692− are met:
693−
694− 1. Redistributions of source code must retain the above copyright
695− notice, this list of conditions and the following disclaimer.
696−
697− 2. Redistributions in binary form must reproduce the above copyright
698− notice, this list of conditions and the following disclaimer in the
699− documentation and/or other materials provided with the distribution.
700−
701− 3. Neither the name of the author nor the names of his contributors
702− may be used to endorse or promote products derived from this software
703− without specific prior written permission.
704−
705− THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
706− OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
707− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
708− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
709− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
710− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
711− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
712− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
713− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
714− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
715− POSSIBILITY OF SUCH DAMAGE.
716−
717−auto-update LICENSE file:
718−
719− Copyright (c) 2014 Michael Snoyman
720−
721− Permission is hereby granted, free of charge, to any person obtaining
722− a copy of this software and associated documentation files (the
723− "Software"), to deal in the Software without restriction, including
724− without limitation the rights to use, copy, modify, merge, publish,
725− distribute, sublicense, and/or sell copies of the Software, and to
726− permit persons to whom the Software is furnished to do so, subject to
727− the following conditions:
728−
729− The above copyright notice and this permission notice shall be included
730− in all copies or substantial portions of the Software.
731−
732− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
733− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
734− MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
735− IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
736− CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
737− TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
738− SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
739−
740−base LICENSE file:
741−
742− This library (libraries/base) is derived from code from several
743− sources:
744−
745− * Code from the GHC project which is largely (c) The University of
746− Glasgow, and distributable under a BSD-style license (see below),
747−
748− * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
749− and freely redistributable (but see the full license for
750− restrictions).
751−
752− * Code from the Haskell Foreign Function Interface specification,
753− which is (c) Manuel M. T. Chakravarty and freely redistributable
754− (but see the full license for restrictions).
755−
756− The full text of these licenses is reproduced below. All of the
757− licenses are BSD-style or compatible.
758−
759− -----------------------------------------------------------------------------
760−
761− The Glasgow Haskell Compiler License
762−
763− Copyright 2004, The University Court of the University of Glasgow.
764− All rights reserved.
765−
766− Redistribution and use in source and binary forms, with or without
767− modification, are permitted provided that the following conditions are met:
768−
769− - Redistributions of source code must retain the above copyright notice,
770− this list of conditions and the following disclaimer.
771−
772− - Redistributions in binary form must reproduce the above copyright notice,
773− this list of conditions and the following disclaimer in the documentation
774− and/or other materials provided with the distribution.
775−
776− - Neither name of the University nor the names of its contributors may be
777− used to endorse or promote products derived from this software without
778− specific prior written permission.
779−
780− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
781− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
782− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
783− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
784− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
785− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
786− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
787− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
788− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
789− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
790− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
791− DAMAGE.
792−
793− -----------------------------------------------------------------------------
794−
795− Code derived from the document "Report on the Programming Language
796− Haskell 98", is distributed under the following license:
797−
798− Copyright (c) 2002 Simon Peyton Jones
799−
800− The authors intend this Report to belong to the entire Haskell
801− community, and so we grant permission to copy and distribute it for
802− any purpose, provided that it is reproduced in its entirety,
803− including this Notice. Modified versions of this Report may also be
804− copied and distributed for any purpose, provided that the modified
805− version is clearly presented as such, and that it does not claim to
806− be a definition of the Haskell 98 Language.
807−
808− -----------------------------------------------------------------------------
809−
810− Code derived from the document "The Haskell 98 Foreign Function
811− Interface, An Addendum to the Haskell 98 Report" is distributed under
812− the following license:
813−
814− Copyright (c) 2002 Manuel M. T. Chakravarty
815−
816− The authors intend this Report to belong to the entire Haskell
817− community, and so we grant permission to copy and distribute it for
818− any purpose, provided that it is reproduced in its entirety,
819− including this Notice. Modified versions of this Report may also be
820− copied and distributed for any purpose, provided that the modified
821− version is clearly presented as such, and that it does not claim to
822− be a definition of the Haskell 98 Foreign Function Interface.
823−
824− -----------------------------------------------------------------------------
825−
826−base-compat LICENSE file:
827−
828− Copyright (c) 2012-2016 Simon Hengel <sol@typeful.net> and Ryan Scott <ryan.gl.scott@gmail.com>
829−
830− Permission is hereby granted, free of charge, to any person obtaining a copy
831− of this software and associated documentation files (the "Software"), to deal
832− in the Software without restriction, including without limitation the rights
833− to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
834− copies of the Software, and to permit persons to whom the Software is
835− furnished to do so, subject to the following conditions:
836−
837− The above copyright notice and this permission notice shall be included in
838− all copies or substantial portions of the Software.
839−
840− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
841− IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
842− FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
843− AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
844− LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
845− OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
846− THE SOFTWARE.
847−
848−base-orphans LICENSE file:
849−
850− Copyright (c) 2015-2016 Simon Hengel <sol@typeful.net>, João Cristóvão <jmacristovao@gmail.com>, Ryan Scott <ryan.gl.scott@gmail.com>
851−
852− Permission is hereby granted, free of charge, to any person obtaining
853− a copy of this software and associated documentation files (the
854− "Software"), to deal in the Software without restriction, including
855− without limitation the rights to use, copy, modify, merge, publish,
856− distribute, sublicense, and/or sell copies of the Software, and to
857− permit persons to whom the Software is furnished to do so, subject to
858− the following conditions:
859−
860− The above copyright notice and this permission notice shall be included
861− in all copies or substantial portions of the Software.
862−
863− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
864− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
865− MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
866− IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
867− CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
868− TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
869− SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
870−
871−base64-bytestring LICENSE file:
872−
873− Copyright (c) 2010 Bryan O'Sullivan <bos@serpentine.com>
874−
875− All rights reserved.
876−
877− Redistribution and use in source and binary forms, with or without
878− modification, are permitted provided that the following conditions
879− are met:
880−
881− 1. Redistributions of source code must retain the above copyright
882− notice, this list of conditions and the following disclaimer.
883−
884− 2. Redistributions in binary form must reproduce the above copyright
885− notice, this list of conditions and the following disclaimer in the
886− documentation and/or other materials provided with the distribution.
887−
888− 3. Neither the name of the author nor the names of his contributors
889− may be used to endorse or promote products derived from this software
890− without specific prior written permission.
891−
892− THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
893− OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
894− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
895− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
896− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
897− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
898− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
899− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
900− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
901− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
902− POSSIBILITY OF SUCH DAMAGE.
903−
904−bifunctors LICENSE file:
905−
906− Copyright 2008-2016 Edward Kmett
907−
908− All rights reserved.
909−
910− Redistribution and use in source and binary forms, with or without
911− modification, are permitted provided that the following conditions
912− are met:
913−
914− 1. Redistributions of source code must retain the above copyright
915− notice, this list of conditions and the following disclaimer.
916−
917− 2. Redistributions in binary form must reproduce the above copyright
918− notice, this list of conditions and the following disclaimer in the
919− documentation and/or other materials provided with the distribution.
920−
921− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
922− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
923− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
924− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
925− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
926− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
927− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
928− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
929− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
930− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
931− POSSIBILITY OF SUCH DAMAGE.
932−
933−binary LICENSE file:
934−
935− Copyright (c) Lennart Kolmodin
936−
937− All rights reserved.
938−
939− Redistribution and use in source and binary forms, with or without
940− modification, are permitted provided that the following conditions
941− are met:
942−
943− 1. Redistributions of source code must retain the above copyright
944− notice, this list of conditions and the following disclaimer.
945−
946− 2. Redistributions in binary form must reproduce the above copyright
947− notice, this list of conditions and the following disclaimer in the
948− documentation and/or other materials provided with the distribution.
949−
950− 3. Neither the name of the author nor the names of his contributors
951− may be used to endorse or promote products derived from this software
952− without specific prior written permission.
953−
954− THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
955− OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
956− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
957− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
958− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
959− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
960− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
961− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
962− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
963− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
964− POSSIBILITY OF SUCH DAMAGE.
965−
966−blaze-builder LICENSE file:
967−
968− Copyright Jasper Van der Jeugt 2010, Simon Meier 2010 & 2011
969−
970− All rights reserved.
971−
972− Redistribution and use in source and binary forms, with or without
973− modification, are permitted provided that the following conditions are met:
974−
975− * Redistributions of source code must retain the above copyright
976− notice, this list of conditions and the following disclaimer.
977−
978− * Redistributions in binary form must reproduce the above
979− copyright notice, this list of conditions and the following
980− disclaimer in the documentation and/or other materials provided
981− with the distribution.
982−
983− * Neither the name of Jasper Van der Jeugt nor the names of other
984− contributors may be used to endorse or promote products derived
985− from this software without specific prior written permission.
986−
987− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
988− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
989− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
990− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
991− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
992− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
993− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
994− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
995− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
996− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
997− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
998−
999−blaze-html LICENSE file:
1000−
1001− Copyright Jasper Van der Jeugt 2010
1002−
1003− All rights reserved.
1004−
1005− Redistribution and use in source and binary forms, with or without
1006− modification, are permitted provided that the following conditions are met:
1007−
1008− * Redistributions of source code must retain the above copyright
1009− notice, this list of conditions and the following disclaimer.
1010−
1011− * Redistributions in binary form must reproduce the above
1012− copyright notice, this list of conditions and the following
1013− disclaimer in the documentation and/or other materials provided
1014− with the distribution.
1015−
1016− * Neither the name of Jasper Van der Jeugt nor the names of other
1017− contributors may be used to endorse or promote products derived
1018− from this software without specific prior written permission.
1019−
1020− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1021− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1022− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1023− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1024− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1025− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1026− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1027− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1028− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1029− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1030− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1031−
1032−blaze-markup LICENSE file:
1033−
1034− Copyright Jasper Van der Jeugt 2010
1035−
1036− All rights reserved.
1037−
1038− Redistribution and use in source and binary forms, with or without
1039− modification, are permitted provided that the following conditions are met:
1040−
1041− * Redistributions of source code must retain the above copyright
1042− notice, this list of conditions and the following disclaimer.
1043−
1044− * Redistributions in binary form must reproduce the above
1045− copyright notice, this list of conditions and the following
1046− disclaimer in the documentation and/or other materials provided
1047− with the distribution.
1048−
1049− * Neither the name of Jasper Van der Jeugt nor the names of other
1050− contributors may be used to endorse or promote products derived
1051− from this software without specific prior written permission.
1052−
1053− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1054− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1055− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1056− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1057− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1058− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1059− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1060− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1061− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1062− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1063− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1064−
1065−bower-json LICENSE file:
1066−
1067− Copyright (c) 2015 Harry Garrood
1068−
1069− Permission is hereby granted, free of charge, to any person obtaining
1070− a copy of this software and associated documentation files (the
1071− "Software"), to deal in the Software without restriction, including
1072− without limitation the rights to use, copy, modify, merge, publish,
1073− distribute, sublicense, and/or sell copies of the Software, and to
1074− permit persons to whom the Software is furnished to do so, subject to
1075− the following conditions:
1076−
1077− The above copyright notice and this permission notice shall be included
1078− in all copies or substantial portions of the Software.
1079−
1080− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1081− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1082− MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1083− IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
1084− CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
1085− TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
1086− SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1087−
1088−boxes LICENSE file:
1089−
1090− Copyright (c) Brent Yorgey 2008
1091−
1092− Redistribution and use in source and binary forms, with or without
1093− modification, are permitted provided that the following conditions
1094− are met:
1095− 1. Redistributions of source code must retain the above copyright
1096− notice, this list of conditions and the following disclaimer.
1097− 2. Redistributions in binary form must reproduce the above copyright
1098− notice, this list of conditions and the following disclaimer in the
1099− documentation and/or other materials provided with the distribution.
1100− 3. Neither the name of the author nor the names of other contributors
1101− may be used to endorse or promote products derived from this software
1102− without specific prior written permission.
1103−
1104− All other rights are reserved.
1105−
1106− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND
1107− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1108− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1109− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
1110− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1111− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1112− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1113− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1114− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1115− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1116− SUCH DAMAGE.
1117−
1118−byteable LICENSE file:
1119−
1120− Copyright (c) 2013 Vincent Hanquez <vincent@snarc.org>
1121−
1122− All rights reserved.
1123−
1124− Redistribution and use in source and binary forms, with or without
1125− modification, are permitted provided that the following conditions
1126− are met:
1127− 1. Redistributions of source code must retain the above copyright
1128− notice, this list of conditions and the following disclaimer.
1129− 2. Redistributions in binary form must reproduce the above copyright
1130− notice, this list of conditions and the following disclaimer in the
1131− documentation and/or other materials provided with the distribution.
1132− 3. Neither the name of the author nor the names of his contributors
1133− may be used to endorse or promote products derived from this software
1134− without specific prior written permission.
1135−
1136− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS AS IS'' AND
1137− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1138− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1139− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
1140− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1141− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1142− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1143− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1144− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1145− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1146− SUCH DAMAGE.
1147−
1148−byteorder LICENSE file:
1149−
1150− Copyright 2009, Antoine Latter
1151−
1152− All rights reserved.
1153−
1154− Redistribution and use in source and binary forms, with or without
1155− modification, are permitted provided that the following conditions are met:
1156−
1157− * Redistributions of source code must retain the above copyright
1158− notice, this list of conditions and the following disclaimer.
1159−
1160− * Redistributions in binary form must reproduce the above
1161− copyright notice, this list of conditions and the following
1162− disclaimer in the documentation and/or other materials provided
1163− with the distribution.
1164−
1165− * Neither the name of the author nor the names of other
1166− contributors may be used to endorse or promote products derived
1167− from this software without specific prior written permission.
1168−
1169− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1170− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1171− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1172− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1173− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1174− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1175− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1176− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1177− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1178− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1179− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1180−
1181−bytestring LICENSE file:
1182−
1183− Copyright (c) Don Stewart 2005-2009
1184− (c) Duncan Coutts 2006-2015
1185− (c) David Roundy 2003-2005
1186− (c) Simon Meier 2010-2011
1187−
1188− All rights reserved.
1189−
1190− Redistribution and use in source and binary forms, with or without
1191− modification, are permitted provided that the following conditions
1192− are met:
1193− 1. Redistributions of source code must retain the above copyright
1194− notice, this list of conditions and the following disclaimer.
1195− 2. Redistributions in binary form must reproduce the above copyright
1196− notice, this list of conditions and the following disclaimer in the
1197− documentation and/or other materials provided with the distribution.
1198− 3. Neither the name of the author nor the names of his contributors
1199− may be used to endorse or promote products derived from this software
1200− without specific prior written permission.
1201−
1202− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1203− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1204− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1205− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
1206− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1207− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1208− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1209− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1210− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1211− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1212− SUCH DAMAGE.
1213−
1214−bytestring-builder LICENSE file:
1215−
1216− Copyright Jasper Van der Jeugt 2010, Simon Meier 2010-2013
1217−
1218− All rights reserved.
1219−
1220− Redistribution and use in source and binary forms, with or without
1221− modification, are permitted provided that the following conditions are met:
1222−
1223− * Redistributions of source code must retain the above copyright
1224− notice, this list of conditions and the following disclaimer.
1225−
1226− * Redistributions in binary form must reproduce the above
1227− copyright notice, this list of conditions and the following
1228− disclaimer in the documentation and/or other materials provided
1229− with the distribution.
1230−
1231− * Neither the name of Jasper Van der Jeugt nor the names of other
1232− contributors may be used to endorse or promote products derived
1233− from this software without specific prior written permission.
1234−
1235− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1236− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1237− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1238− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1239− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1240− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1241− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1242− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1243− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1244− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1245− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1246−
1247−case-insensitive LICENSE file:
1248−
1249− Copyright (c) 2011-2013 Bas van Dijk
1250−
1251− All rights reserved.
1252−
1253− Redistribution and use in source and binary forms, with or without
1254− modification, are permitted provided that the following conditions are
1255− met:
1256−
1257− * Redistributions of source code must retain the above copyright
1258− notice, this list of conditions and the following disclaimer.
1259−
1260− * Redistributions in binary form must reproduce the above
1261− copyright notice, this list of conditions and the following
1262− disclaimer in the documentation and/or other materials provided
1263− with the distribution.
1264−
1265− * The name of Bas van Dijk and the names of contributors may NOT
1266− be used to endorse or promote products derived from this
1267− software without specific prior written permission.
1268−
1269− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1270− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1271− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1272− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1273− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1274− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1275− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1276− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1277− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1278− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1279− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1280−
1281−cereal LICENSE file:
1282−
1283− Copyright (c) Lennart Kolmodin, Galois, Inc.
1284−
1285− All rights reserved.
1286−
1287− Redistribution and use in source and binary forms, with or without
1288− modification, are permitted provided that the following conditions
1289− are met:
1290−
1291− 1. Redistributions of source code must retain the above copyright
1292− notice, this list of conditions and the following disclaimer.
1293−
1294− 2. Redistributions in binary form must reproduce the above copyright
1295− notice, this list of conditions and the following disclaimer in the
1296− documentation and/or other materials provided with the distribution.
1297−
1298− 3. Neither the name of the author nor the names of his contributors
1299− may be used to endorse or promote products derived from this software
1300− without specific prior written permission.
1301−
1302− THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
1303− OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1304− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1305− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
1306− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1307− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1308− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1309− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
1310− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
1311− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1312− POSSIBILITY OF SUCH DAMAGE.
1313−
1314−clock LICENSE file:
1315−
1316− Copyright (c) 2009-2012, Cetin Sert
1317− Copyright (c) 2010, Eugene Kirpichov
1318−
1319− All rights reserved.
1320−
1321− Redistribution and use in source and binary forms, with or without
1322− modification, are permitted provided that the following conditions are
1323− met:
1324−
1325− * Redistributions of source code must retain the above copyright
1326− notice, this list of conditions and the following disclaimer.
1327−
1328− * Redistributions in binary form must reproduce the above
1329− copyright notice, this list of conditions and the following
1330− disclaimer in the documentation and/or other materials provided
1331− with the distribution.
1332−
1333− * The names of contributors may not be used to endorse or promote
1334− products derived from this software without specific prior
1335− written permission.
1336−
1337− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1338− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1339− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1340− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1341− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1342− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1343− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1344− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1345− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1346− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1347− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1348−
1349−cmdargs LICENSE file:
1350−
1351− Copyright Neil Mitchell 2009-2016.
1352− All rights reserved.
1353−
1354− Redistribution and use in source and binary forms, with or without
1355− modification, are permitted provided that the following conditions are
1356− met:
1357−
1358− * Redistributions of source code must retain the above copyright
1359− notice, this list of conditions and the following disclaimer.
1360−
1361− * Redistributions in binary form must reproduce the above
1362− copyright notice, this list of conditions and the following
1363− disclaimer in the documentation and/or other materials provided
1364− with the distribution.
1365−
1366− * Neither the name of Neil Mitchell nor the names of other
1367− contributors may be used to endorse or promote products derived
1368− from this software without specific prior written permission.
1369−
1370− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1371− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1372− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1373− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1374− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1375− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1376− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1377− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1378− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1379− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1380− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1381−
1382−comonad LICENSE file:
1383−
1384− Copyright 2008-2014 Edward Kmett
1385− Copyright 2004-2008 Dave Menendez
1386−
1387− All rights reserved.
1388−
1389− Redistribution and use in source and binary forms, with or without
1390− modification, are permitted provided that the following conditions
1391− are met:
1392−
1393− 1. Redistributions of source code must retain the above copyright
1394− notice, this list of conditions and the following disclaimer.
1395−
1396− 2. Redistributions in binary form must reproduce the above copyright
1397− notice, this list of conditions and the following disclaimer in the
1398− documentation and/or other materials provided with the distribution.
1399−
1400− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
1401− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1402− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1403− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
1404− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1405− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1406− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1407− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
1408− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
1409− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1410− POSSIBILITY OF SUCH DAMAGE.
1411−
1412−conduit LICENSE file:
1413−
1414− Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
1415−
1416− Permission is hereby granted, free of charge, to any person obtaining
1417− a copy of this software and associated documentation files (the
1418− "Software"), to deal in the Software without restriction, including
1419− without limitation the rights to use, copy, modify, merge, publish,
1420− distribute, sublicense, and/or sell copies of the Software, and to
1421− permit persons to whom the Software is furnished to do so, subject to
1422− the following conditions:
1423−
1424− The above copyright notice and this permission notice shall be
1425− included in all copies or substantial portions of the Software.
1426−
1427− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1428− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1429− MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1430− NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1431− LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1432− OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1433− WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1434−
1435−conduit-extra LICENSE file:
1436−
1437− Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
1438−
1439− Permission is hereby granted, free of charge, to any person obtaining
1440− a copy of this software and associated documentation files (the
1441− "Software"), to deal in the Software without restriction, including
1442− without limitation the rights to use, copy, modify, merge, publish,
1443− distribute, sublicense, and/or sell copies of the Software, and to
1444− permit persons to whom the Software is furnished to do so, subject to
1445− the following conditions:
1446−
1447− The above copyright notice and this permission notice shall be
1448− included in all copies or substantial portions of the Software.
1449−
1450− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1451− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1452− MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1453− NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1454− LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1455− OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1456− WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1457−
1458−connection LICENSE file:
1459−
1460− Copyright (c) 2012 Vincent Hanquez <vincent@snarc.org>
1461−
1462− All rights reserved.
1463−
1464− Redistribution and use in source and binary forms, with or without
1465− modification, are permitted provided that the following conditions
1466− are met:
1467− 1. Redistributions of source code must retain the above copyright
1468− notice, this list of conditions and the following disclaimer.
1469− 2. Redistributions in binary form must reproduce the above copyright
1470− notice, this list of conditions and the following disclaimer in the
1471− documentation and/or other materials provided with the distribution.
1472− 3. Neither the name of the author nor the names of his contributors
1473− may be used to endorse or promote products derived from this software
1474− without specific prior written permission.
1475−
1476− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1477− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1478− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1479− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
1480− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1481− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1482− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1483− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1484− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1485− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1486− SUCH DAMAGE.
1487−
1488−containers LICENSE file:
1489−
1490− The Glasgow Haskell Compiler License
1491−
1492− Copyright 2004, The University Court of the University of Glasgow.
1493− All rights reserved.
1494−
1495− Redistribution and use in source and binary forms, with or without
1496− modification, are permitted provided that the following conditions are met:
1497−
1498− - Redistributions of source code must retain the above copyright notice,
1499− this list of conditions and the following disclaimer.
1500−
1501− - Redistributions in binary form must reproduce the above copyright notice,
1502− this list of conditions and the following disclaimer in the documentation
1503− and/or other materials provided with the distribution.
1504−
1505− - Neither name of the University nor the names of its contributors may be
1506− used to endorse or promote products derived from this software without
1507− specific prior written permission.
1508−
1509− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
1510− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1511− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
1512− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
1513− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
1514− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1515− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1516− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1517− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1518− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1519− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
1520− DAMAGE.
1521−
1522−contravariant LICENSE file:
1523−
1524− Copyright 2007-2015 Edward Kmett
1525−
1526− All rights reserved.
1527−
1528− Redistribution and use in source and binary forms, with or without
1529− modification, are permitted provided that the following conditions
1530− are met:
1531−
1532− 1. Redistributions of source code must retain the above copyright
1533− notice, this list of conditions and the following disclaimer.
1534−
1535− 2. Redistributions in binary form must reproduce the above copyright
1536− notice, this list of conditions and the following disclaimer in the
1537− documentation and/or other materials provided with the distribution.
1538−
1539− 3. Neither the name of the author nor the names of his contributors
1540− may be used to endorse or promote products derived from this software
1541− without specific prior written permission.
1542−
1543− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
1544− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1545− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1546− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
1547− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1548− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1549− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1550− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
1551− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
1552− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1553− POSSIBILITY OF SUCH DAMAGE.
1554−
1555−cookie LICENSE file:
1556−
1557− Copyright (c) 2010 Michael Snoyman, http://www.yesodweb.com/
1558−
1559− Permission is hereby granted, free of charge, to any person obtaining
1560− a copy of this software and associated documentation files (the
1561− "Software"), to deal in the Software without restriction, including
1562− without limitation the rights to use, copy, modify, merge, publish,
1563− distribute, sublicense, and/or sell copies of the Software, and to
1564− permit persons to whom the Software is furnished to do so, subject to
1565− the following conditions:
1566−
1567− The above copyright notice and this permission notice shall be
1568− included in all copies or substantial portions of the Software.
1569−
1570− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1571− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1572− MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1573− NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1574− LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1575− OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1576− WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1577−
1578−cryptonite LICENSE file:
1579−
1580− Copyright (c) 2006-2015 Vincent Hanquez <vincent@snarc.org>
1581−
1582− All rights reserved.
1583−
1584− Redistribution and use in source and binary forms, with or without
1585− modification, are permitted provided that the following conditions
1586− are met:
1587−
1588− 1. Redistributions of source code must retain the above copyright
1589− notice, this list of conditions and the following disclaimer.
1590− 2. Redistributions in binary form must reproduce the above copyright
1591− notice, this list of conditions and the following disclaimer in the
1592− documentation and/or other materials provided with the distribution.
1593− 3. Neither the name of the author nor the names of his contributors
1594− may be used to endorse or promote products derived from this software
1595− without specific prior written permission.
1596−
1597− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS AS IS'' AND
1598− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1599− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1600− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
1601− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1602− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1603− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1604− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1605− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1606− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1607− SUCH DAMAGE.
1608−
1609−data-default-class LICENSE file:
1610−
1611− Copyright (c) 2013 Lukas Mai
1612−
1613− All rights reserved.
1614−
1615− Redistribution and use in source and binary forms, with or without modification,
1616− are permitted provided that the following conditions are met:
1617−
1618− * Redistributions of source code must retain the above copyright notice, this
1619− list of conditions and the following disclaimer.
1620− * Redistributions in binary form must reproduce the above copyright notice,
1621− this list of conditions and the following disclaimer in the documentation
1622− and/or other materials provided with the distribution.
1623− * Neither the name of the author nor the names of his contributors
1624− may be used to endorse or promote products derived from this software
1625− without specific prior written permission.
1626−
1627− THIS SOFTWARE IS PROVIDED BY LUKAS MAI AND CONTRIBUTORS "AS IS" AND ANY
1628− EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1629− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1630− DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
1631− DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1632− (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1633− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
1634− ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1635− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
1636− SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1637−
1638−data-ordlist LICENSE file:
1639−
1640− Copyright (c) 2009-2010, Melding Monads
1641− All rights reserved.
1642−
1643− Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1644−
1645− * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
1646− * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
1647− * Neither the name of Melding Monads nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
1648−
1649− 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 HOLDER 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.
1650−
1651−deepseq LICENSE file:
1652−
1653− This library (deepseq) is derived from code from the GHC project which
1654− is largely (c) The University of Glasgow, and distributable under a
1655− BSD-style license (see below).
1656−
1657− -----------------------------------------------------------------------------
1658−
1659− The Glasgow Haskell Compiler License
1660−
1661− Copyright 2001-2009, The University Court of the University of Glasgow.
1662− All rights reserved.
1663−
1664− Redistribution and use in source and binary forms, with or without
1665− modification, are permitted provided that the following conditions are met:
1666−
1667− - Redistributions of source code must retain the above copyright notice,
1668− this list of conditions and the following disclaimer.
1669−
1670− - Redistributions in binary form must reproduce the above copyright notice,
1671− this list of conditions and the following disclaimer in the documentation
1672− and/or other materials provided with the distribution.
1673−
1674− - Neither name of the University nor the names of its contributors may be
1675− used to endorse or promote products derived from this software without
1676− specific prior written permission.
1677−
1678− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
1679− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1680− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
1681− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
1682− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
1683− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1684− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1685− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1686− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1687− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1688− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
1689− DAMAGE.
1690−
1691− -----------------------------------------------------------------------------
1692−
1693−directory LICENSE file:
1694−
1695− This library (libraries/base) is derived from code from two
1696− sources:
1697−
1698− * Code from the GHC project which is largely (c) The University of
1699− Glasgow, and distributable under a BSD-style license (see below),
1700−
1701− * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
1702− and freely redistributable (but see the full license for
1703− restrictions).
1704−
1705− The full text of these licenses is reproduced below. Both of the
1706− licenses are BSD-style or compatible.
1707−
1708− -----------------------------------------------------------------------------
1709−
1710− The Glasgow Haskell Compiler License
1711−
1712− Copyright 2004, The University Court of the University of Glasgow.
1713− All rights reserved.
1714−
1715− Redistribution and use in source and binary forms, with or without
1716− modification, are permitted provided that the following conditions are met:
1717−
1718− - Redistributions of source code must retain the above copyright notice,
1719− this list of conditions and the following disclaimer.
1720−
1721− - Redistributions in binary form must reproduce the above copyright notice,
1722− this list of conditions and the following disclaimer in the documentation
1723− and/or other materials provided with the distribution.
1724−
1725− - Neither name of the University nor the names of its contributors may be
1726− used to endorse or promote products derived from this software without
1727− specific prior written permission.
1728−
1729− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
1730− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1731− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
1732− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
1733− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
1734− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1735− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1736− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1737− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1738− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1739− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
1740− DAMAGE.
1741−
1742− -----------------------------------------------------------------------------
1743−
1744− Code derived from the document "Report on the Programming Language
1745− Haskell 98", is distributed under the following license:
1746−
1747− Copyright (c) 2002 Simon Peyton Jones
1748−
1749− The authors intend this Report to belong to the entire Haskell
1750− community, and so we grant permission to copy and distribute it for
1751− any purpose, provided that it is reproduced in its entirety,
1752− including this Notice. Modified versions of this Report may also be
1753− copied and distributed for any purpose, provided that the modified
1754− version is clearly presented as such, and that it does not claim to
1755− be a definition of the Haskell 98 Language.
1756−
1757− -----------------------------------------------------------------------------
1758−
1759−distributive LICENSE file:
1760−
1761− Copyright 2011-2016 Edward Kmett
1762−
1763− All rights reserved.
1764−
1765− Redistribution and use in source and binary forms, with or without
1766− modification, are permitted provided that the following conditions
1767− are met:
1768−
1769− 1. Redistributions of source code must retain the above copyright
1770− notice, this list of conditions and the following disclaimer.
1771−
1772− 2. Redistributions in binary form must reproduce the above copyright
1773− notice, this list of conditions and the following disclaimer in the
1774− documentation and/or other materials provided with the distribution.
1775−
1776− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
1777− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1778− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1779− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
1780− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1781− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1782− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1783− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
1784− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
1785− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1786− POSSIBILITY OF SUCH DAMAGE.
1787−
1788−dlist LICENSE file:
1789−
1790− Copyright (c) 2006-2009 Don Stewart, 2013-2014 Sean Leather
1791−
1792− All rights reserved.
1793−
1794− Redistribution and use in source and binary forms, with or without
1795− modification, are permitted provided that the following conditions are
1796− met:
1797−
1798− * Redistributions of source code must retain the above copyright
1799− notice, this list of conditions and the following disclaimer.
1800−
1801− * Redistributions in binary form must reproduce the above
1802− copyright notice, this list of conditions and the following
1803− disclaimer in the documentation and/or other materials provided
1804− with the distribution.
1805−
1806− * Neither the name of Don Stewart nor the names of other
1807− contributors may be used to endorse or promote products derived
1808− from this software without specific prior written permission.
1809−
1810− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1811− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1812− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1813− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1814− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1815− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1816− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1817− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1818− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1819− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1820− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1821−
1822−easy-file LICENSE file:
1823−
1824− Copyright (c) 2009, IIJ Innovation Institute Inc.
1825− All rights reserved.
1826−
1827− Redistribution and use in source and binary forms, with or without
1828− modification, are permitted provided that the following conditions
1829− are met:
1830−
1831− * Redistributions of source code must retain the above copyright
1832− notice, this list of conditions and the following disclaimer.
1833− * Redistributions in binary form must reproduce the above copyright
1834− notice, this list of conditions and the following disclaimer in
1835− the documentation and/or other materials provided with the
1836− distribution.
1837− * Neither the name of the copyright holders nor the names of its
1838− contributors may be used to endorse or promote products derived
1839− from this software without specific prior written permission.
1840−
1841− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1842− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1843− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
1844− FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
1845− COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
1846− INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
1847− BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1848− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1849− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1850− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
1851− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1852− POSSIBILITY OF SUCH DAMAGE.
1853−
1854−edit-distance LICENSE file:
1855−
1856− Copyright (c) 2008-2013 Maximilian Bolingbroke
1857− All rights reserved.
1858−
1859− Redistribution and use in source and binary forms, with or without modification, are permitted
1860− provided that the following conditions are met:
1861−
1862− * Redistributions of source code must retain the above copyright notice, this list of
1863− conditions and the following disclaimer.
1864− * Redistributions in binary form must reproduce the above copyright notice, this list of
1865− conditions and the following disclaimer in the documentation and/or other materials
1866− provided with the distribution.
1867− * Neither the name of Maximilian Bolingbroke nor the names of other contributors may be used to
1868− endorse or promote products derived from this software without specific prior written permission.
1869−
1870− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
1871− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
1872− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
1873− CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1874− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1875− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
1876− IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
1877− OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1878−
1879−entropy LICENSE file:
1880−
1881− Copyright (c) Thomas DuBuisson
1882−
1883− All rights reserved.
1884−
1885− Redistribution and use in source and binary forms, with or without
1886− modification, are permitted provided that the following conditions
1887− are met:
1888−
1889− 1. Redistributions of source code must retain the above copyright
1890− notice, this list of conditions and the following disclaimer.
1891−
1892− 2. Redistributions in binary form must reproduce the above copyright
1893− notice, this list of conditions and the following disclaimer in the
1894− documentation and/or other materials provided with the distribution.
1895−
1896− 3. Neither the name of the author nor the names of his contributors
1897− may be used to endorse or promote products derived from this software
1898− without specific prior written permission.
1899−
1900− THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
1901− OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1902− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1903− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
1904− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1905− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1906− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1907− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
1908− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
1909− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1910− POSSIBILITY OF SUCH DAMAGE.
1911−
1912−exceptions LICENSE file:
1913−
1914− Copyright 2013-2015 Edward Kmett
1915− Copyright 2012 Google Inc.
1916−
1917− All rights reserved.
1918−
1919− Redistribution and use in source and binary forms, with or without
1920− modification, are permitted provided that the following conditions
1921− are met:
1922−
1923− 1. Redistributions of source code must retain the above copyright
1924− notice, this list of conditions and the following disclaimer.
1925−
1926− 2. Redistributions in binary form must reproduce the above copyright
1927− notice, this list of conditions and the following disclaimer in the
1928− documentation and/or other materials provided with the distribution.
1929−
1930− 3. Neither the name of the author nor the names of his contributors
1931− may be used to endorse or promote products derived from this software
1932− without specific prior written permission.
1933−
1934− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
1935− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1936− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1937− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
1938− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1939− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1940− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1941− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
1942− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
1943− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1944− POSSIBILITY OF SUCH DAMAGE.
1945−
1946−fail LICENSE file:
1947−
1948− Copyright (c) 2015, David Luposchainsky & Herbert Valerio Riedel
1949−
1950− All rights reserved.
1951−
1952− Redistribution and use in source and binary forms, with or without
1953− modification, are permitted provided that the following conditions are met:
1954−
1955− * Redistributions of source code must retain the above copyright
1956− notice, this list of conditions and the following disclaimer.
1957−
1958− * Redistributions in binary form must reproduce the above
1959− copyright notice, this list of conditions and the following
1960− disclaimer in the documentation and/or other materials provided
1961− with the distribution.
1962−
1963− * Neither the name of Herbert Valerio Riedel nor the names of other
1964− contributors may be used to endorse or promote products derived
1965− from this software without specific prior written permission.
1966−
1967− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1968− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1969− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1970− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1971− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1972− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1973− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1974− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1975− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1976− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1977− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1978−
1979−fast-logger LICENSE file:
1980−
1981− Copyright (c) 2009, IIJ Innovation Institute Inc.
1982− All rights reserved.
1983−
1984− Redistribution and use in source and binary forms, with or without
1985− modification, are permitted provided that the following conditions
1986− are met:
1987−
1988− * Redistributions of source code must retain the above copyright
1989− notice, this list of conditions and the following disclaimer.
1990− * Redistributions in binary form must reproduce the above copyright
1991− notice, this list of conditions and the following disclaimer in
1992− the documentation and/or other materials provided with the
1993− distribution.
1994− * Neither the name of the copyright holders nor the names of its
1995− contributors may be used to endorse or promote products derived
1996− from this software without specific prior written permission.
1997−
1998− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1999− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2000− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
2001− FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
2002− COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
2003− INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
2004− BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2005− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2006− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2007− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2008− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2009− POSSIBILITY OF SUCH DAMAGE.
2010−
2011−file-embed LICENSE file:
2012−
2013− The following license covers this documentation, and the source code, except
2014− where otherwise indicated.
2015−
2016− Copyright 2008, Michael Snoyman. All rights reserved.
2017−
2018− Redistribution and use in source and binary forms, with or without
2019− modification, are permitted provided that the following conditions are met:
2020−
2021− * Redistributions of source code must retain the above copyright notice, this
2022− list of conditions and the following disclaimer.
2023−
2024− * Redistributions in binary form must reproduce the above copyright notice,
2025− this list of conditions and the following disclaimer in the documentation
2026− and/or other materials provided with the distribution.
2027−
2028− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR
2029− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2030− MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
2031− EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
2032− INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2033− NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
2034− OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
2035− LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
2036− OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
2037− ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2038−
2039−filepath LICENSE file:
2040−
2041− Copyright Neil Mitchell 2005-2015.
2042− All rights reserved.
2043−
2044− Redistribution and use in source and binary forms, with or without
2045− modification, are permitted provided that the following conditions are
2046− met:
2047−
2048− * Redistributions of source code must retain the above copyright
2049− notice, this list of conditions and the following disclaimer.
2050−
2051− * Redistributions in binary form must reproduce the above
2052− copyright notice, this list of conditions and the following
2053− disclaimer in the documentation and/or other materials provided
2054− with the distribution.
2055−
2056− * Neither the name of Neil Mitchell nor the names of other
2057− contributors may be used to endorse or promote products derived
2058− from this software without specific prior written permission.
2059−
2060− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2061− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2062− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2063− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2064− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2065− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2066− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2067− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2068− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2069− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2070− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2071−
2072−foldl LICENSE file:
2073−
2074− Copyright (c) 2013 Gabriel Gonzalez
2075− All rights reserved.
2076−
2077− Redistribution and use in source and binary forms, with or without modification,
2078− are permitted provided that the following conditions are met:
2079− * Redistributions of source code must retain the above copyright notice,
2080− this list of conditions and the following disclaimer.
2081− * Redistributions in binary form must reproduce the above copyright notice,
2082− this list of conditions and the following disclaimer in the documentation
2083− and/or other materials provided with the distribution.
2084− * Neither the name of Gabriel Gonzalez nor the names of other contributors
2085− may be used to endorse or promote products derived from this software
2086− without specific prior written permission.
2087−
2088− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2089− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2090− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2091− DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
2092− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2093− (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2094− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2095− ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2096− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2097− SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2098−
2099−free LICENSE file:
2100−
2101− Copyright 2008-2013 Edward Kmett
2102−
2103− All rights reserved.
2104−
2105− Redistribution and use in source and binary forms, with or without
2106− modification, are permitted provided that the following conditions
2107− are met:
2108−
2109− 1. Redistributions of source code must retain the above copyright
2110− notice, this list of conditions and the following disclaimer.
2111−
2112− 2. Redistributions in binary form must reproduce the above copyright
2113− notice, this list of conditions and the following disclaimer in the
2114− documentation and/or other materials provided with the distribution.
2115−
2116− 3. Neither the name of the author nor the names of his contributors
2117− may be used to endorse or promote products derived from this software
2118− without specific prior written permission.
2119−
2120− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
2121− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2122− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2123− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
2124− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2125− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2126− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2127− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
2128− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2129− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2130− POSSIBILITY OF SUCH DAMAGE.
2131−
2132−fsnotify LICENSE file:
2133−
2134− Copyright (c) 2012, Mark Dittmer
2135−
2136− All rights reserved.
2137−
2138− Redistribution and use in source and binary forms, with or without
2139− modification, are permitted provided that the following conditions are met:
2140−
2141− * Redistributions of source code must retain the above copyright
2142− notice, this list of conditions and the following disclaimer.
2143−
2144− * Redistributions in binary form must reproduce the above
2145− copyright notice, this list of conditions and the following
2146− disclaimer in the documentation and/or other materials provided
2147− with the distribution.
2148−
2149− * Neither the name of Mark Dittmer nor the names of other
2150− contributors may be used to endorse or promote products derived
2151− from this software without specific prior written permission.
2152−
2153− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2154− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2155− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2156− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2157− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2158− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2159− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2160− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2161− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2162− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2163− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2164−
2165−ghc-prim LICENSE file:
2166−
2167− This library (libraries/ghc-prim) is derived from code from several
2168− sources:
2169−
2170− * Code from the GHC project which is largely (c) The University of
2171− Glasgow, and distributable under a BSD-style license (see below),
2172−
2173− * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
2174− and freely redistributable (but see the full license for
2175− restrictions).
2176−
2177− The full text of these licenses is reproduced below. All of the
2178− licenses are BSD-style or compatible.
2179−
2180− -----------------------------------------------------------------------------
2181−
2182− The Glasgow Haskell Compiler License
2183−
2184− Copyright 2004, The University Court of the University of Glasgow.
2185− All rights reserved.
2186−
2187− Redistribution and use in source and binary forms, with or without
2188− modification, are permitted provided that the following conditions are met:
2189−
2190− - Redistributions of source code must retain the above copyright notice,
2191− this list of conditions and the following disclaimer.
2192−
2193− - Redistributions in binary form must reproduce the above copyright notice,
2194− this list of conditions and the following disclaimer in the documentation
2195− and/or other materials provided with the distribution.
2196−
2197− - Neither name of the University nor the names of its contributors may be
2198− used to endorse or promote products derived from this software without
2199− specific prior written permission.
2200−
2201− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
2202− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
2203− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
2204− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
2205− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
2206− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2207− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2208− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2209− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2210− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2211− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
2212− DAMAGE.
2213−
2214− -----------------------------------------------------------------------------
2215−
2216− Code derived from the document "Report on the Programming Language
2217− Haskell 98", is distributed under the following license:
2218−
2219− Copyright (c) 2002 Simon Peyton Jones
2220−
2221− The authors intend this Report to belong to the entire Haskell
2222− community, and so we grant permission to copy and distribute it for
2223− any purpose, provided that it is reproduced in its entirety,
2224− including this Notice. Modified versions of this Report may also be
2225− copied and distributed for any purpose, provided that the modified
2226− version is clearly presented as such, and that it does not claim to
2227− be a definition of the Haskell 98 Language.
2228−
2229−
2230−hashable LICENSE file:
2231−
2232− Copyright Milan Straka 2010
2233−
2234− All rights reserved.
2235−
2236− Redistribution and use in source and binary forms, with or without
2237− modification, are permitted provided that the following conditions are met:
2238−
2239− * Redistributions of source code must retain the above copyright
2240− notice, this list of conditions and the following disclaimer.
2241−
2242− * Redistributions in binary form must reproduce the above
2243− copyright notice, this list of conditions and the following
2244− disclaimer in the documentation and/or other materials provided
2245− with the distribution.
2246−
2247− * Neither the name of Milan Straka nor the names of other
2248− contributors may be used to endorse or promote products derived
2249− from this software without specific prior written permission.
2250−
2251− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2252− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2253− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2254− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2255− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2256− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2257− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2258− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2259− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2260− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2261− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2262−
2263−haskeline LICENSE file:
2264−
2265− Copyright 2007-2009, Judah Jacobson.
2266− All Rights Reserved.
2267−
2268− Redistribution and use in source and binary forms, with or without
2269− modification, are permitted provided that the following conditions are met:
2270−
2271− - Redistribution of source code must retain the above copyright notice,
2272− this list of conditions and the following disclaimer.
2273−
2274− - Redistribution in binary form must reproduce the above copyright notice,
2275− this list of conditions and the following disclaimer in the documentation
2276− and/or other materials provided with the distribution.
2277−
2278− THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY
2279− EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2280− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2281− DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE CONTRIBUTORS BE LIABLE
2282− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2283− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2284− SERVICES; LOSS OF USE, DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2285− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2286− OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
2287− USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2288−
2289−hex LICENSE file:
2290−
2291− Copyright (c) 2008, Taru Karttunen
2292− All rights reserved.
2293−
2294− Redistribution and use in source and binary forms, with or without
2295− modification, are permitted provided that the following conditions
2296− are met:
2297−
2298− Redistributions of source code must retain the above copyright
2299− notice, this list of conditions and the following disclaimer.
2300−
2301− Redistributions in binary form must reproduce the above copyright
2302− notice, this list of conditions and the following disclaimer in the
2303− documentation and/or other materials provided with the distribution.
2304−
2305− Neither the name of the Taru Karttunen; nor the names of its contributors
2306− may be used to endorse or promote products derived from this software
2307− without specific prior written permission.
2308−
2309− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2310− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2311− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2312− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
2313− CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
2314− EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
2315− PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
2316− PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
2317− LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
2318− NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2319− SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2320−
2321−hinotify LICENSE file:
2322−
2323− Copyright (c) Lennart Kolmodin
2324−
2325− All rights reserved.
2326−
2327− Redistribution and use in source and binary forms, with or without
2328− modification, are permitted provided that the following conditions
2329− are met:
2330−
2331− 1. Redistributions of source code must retain the above copyright
2332− notice, this list of conditions and the following disclaimer.
2333−
2334− 2. Redistributions in binary form must reproduce the above copyright
2335− notice, this list of conditions and the following disclaimer in the
2336− documentation and/or other materials provided with the distribution.
2337−
2338− 3. Neither the name of the author nor the names of his contributors
2339− may be used to endorse or promote products derived from this software
2340− without specific prior written permission.
2341−
2342− THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
2343− OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2344− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2345− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
2346− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2347− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2348− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2349− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
2350− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2351− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2352− POSSIBILITY OF SUCH DAMAGE.
2353−
2354−hostname LICENSE file:
2355−
2356− Copyright (c) 2008, Maximilian Bolingbroke
2357− All rights reserved.
2358−
2359− Redistribution and use in source and binary forms, with or without modification, are permitted
2360− provided that the following conditions are met:
2361−
2362− * Redistributions of source code must retain the above copyright notice, this list of
2363− conditions and the following disclaimer.
2364− * Redistributions in binary form must reproduce the above copyright notice, this list of
2365− conditions and the following disclaimer in the documentation and/or other materials
2366− provided with the distribution.
2367− * Neither the name of Maximilian Bolingbroke nor the names of other contributors may be used to
2368− endorse or promote products derived from this software without specific prior written permission.
2369−
2370− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
2371− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
2372− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
2373− CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2374− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2375− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
2376− IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
2377− OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2378−
2379−hourglass LICENSE file:
2380−
2381− Copyright (c) 2014 Vincent Hanquez <vincent@snarc.org>
2382−
2383− All rights reserved.
2384−
2385− Redistribution and use in source and binary forms, with or without
2386− modification, are permitted provided that the following conditions
2387− are met:
2388− 1. Redistributions of source code must retain the above copyright
2389− notice, this list of conditions and the following disclaimer.
2390− 2. Redistributions in binary form must reproduce the above copyright
2391− notice, this list of conditions and the following disclaimer in the
2392− documentation and/or other materials provided with the distribution.
2393− 3. Neither the name of the author nor the names of his contributors
2394− may be used to endorse or promote products derived from this software
2395− without specific prior written permission.
2396−
2397− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS AS IS'' AND
2398− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2399− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2400− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
2401− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2402− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2403− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2404− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2405− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2406− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2407− SUCH DAMAGE.
2408−
2409−http-client LICENSE file:
2410−
2411− The MIT License (MIT)
2412−
2413− Copyright (c) 2013 Michael Snoyman
2414−
2415− Permission is hereby granted, free of charge, to any person obtaining a copy of
2416− this software and associated documentation files (the "Software"), to deal in
2417− the Software without restriction, including without limitation the rights to
2418− use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
2419− the Software, and to permit persons to whom the Software is furnished to do so,
2420− subject to the following conditions:
2421−
2422− The above copyright notice and this permission notice shall be included in all
2423− copies or substantial portions of the Software.
2424−
2425− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2426− IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
2427− FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
2428− COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
2429− IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2430− CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2431−
2432−http-client-tls LICENSE file:
2433−
2434− The MIT License (MIT)
2435−
2436− Copyright (c) 2013 Michael Snoyman
2437−
2438− Permission is hereby granted, free of charge, to any person obtaining a copy of
2439− this software and associated documentation files (the "Software"), to deal in
2440− the Software without restriction, including without limitation the rights to
2441− use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
2442− the Software, and to permit persons to whom the Software is furnished to do so,
2443− subject to the following conditions:
2444−
2445− The above copyright notice and this permission notice shall be included in all
2446− copies or substantial portions of the Software.
2447−
2448− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2449− IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
2450− FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
2451− COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
2452− IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2453− CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2454−
2455−http-date LICENSE file:
2456−
2457− Copyright (c) 2009, IIJ Innovation Institute Inc.
2458− All rights reserved.
2459−
2460− Redistribution and use in source and binary forms, with or without
2461− modification, are permitted provided that the following conditions
2462− are met:
2463−
2464− * Redistributions of source code must retain the above copyright
2465− notice, this list of conditions and the following disclaimer.
2466− * Redistributions in binary form must reproduce the above copyright
2467− notice, this list of conditions and the following disclaimer in
2468− the documentation and/or other materials provided with the
2469− distribution.
2470− * Neither the name of the copyright holders nor the names of its
2471− contributors may be used to endorse or promote products derived
2472− from this software without specific prior written permission.
2473−
2474− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2475− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2476− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
2477− FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
2478− COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
2479− INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
2480− BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2481− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2482− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2483− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2484− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2485− POSSIBILITY OF SUCH DAMAGE.
2486−
2487−http-types LICENSE file:
2488−
2489− Copyright (c) 2011, Aristid Breitkreuz
2490− Copyright (c) 2011, Michael Snoyman
2491−
2492− All rights reserved.
2493−
2494− Redistribution and use in source and binary forms, with or without
2495− modification, are permitted provided that the following conditions are met:
2496−
2497− * Redistributions of source code must retain the above copyright
2498− notice, this list of conditions and the following disclaimer.
2499−
2500− * Redistributions in binary form must reproduce the above
2501− copyright notice, this list of conditions and the following
2502− disclaimer in the documentation and/or other materials provided
2503− with the distribution.
2504−
2505− * Neither the name of Aristid Breitkreuz nor the names of other
2506− contributors may be used to endorse or promote products derived
2507− from this software without specific prior written permission.
2508−
2509− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2510− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2511− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2512− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2513− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2514− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2515− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2516− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2517− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2518− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2519− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2520−
2521−http2 LICENSE file:
2522−
2523− Copyright (c) 2013, IIJ Innovation Institute Inc.
2524− All rights reserved.
2525−
2526− Redistribution and use in source and binary forms, with or without
2527− modification, are permitted provided that the following conditions
2528− are met:
2529−
2530− * Redistributions of source code must retain the above copyright
2531− notice, this list of conditions and the following disclaimer.
2532− * Redistributions in binary form must reproduce the above copyright
2533− notice, this list of conditions and the following disclaimer in
2534− the documentation and/or other materials provided with the
2535− distribution.
2536− * Neither the name of the copyright holders nor the names of its
2537− contributors may be used to endorse or promote products derived
2538− from this software without specific prior written permission.
2539−
2540− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2541− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2542− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
2543− FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
2544− COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
2545− INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
2546− BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2547− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2548− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2549− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2550− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2551− POSSIBILITY OF SUCH DAMAGE.
2552−
2553−integer-gmp LICENSE file:
2554−
2555− Copyright (c) 2014, Herbert Valerio Riedel
2556−
2557− All rights reserved.
2558−
2559− Redistribution and use in source and binary forms, with or without
2560− modification, are permitted provided that the following conditions are met:
2561−
2562− * Redistributions of source code must retain the above copyright
2563− notice, this list of conditions and the following disclaimer.
2564−
2565− * Redistributions in binary form must reproduce the above
2566− copyright notice, this list of conditions and the following
2567− disclaimer in the documentation and/or other materials provided
2568− with the distribution.
2569−
2570− * Neither the name of Herbert Valerio Riedel nor the names of other
2571− contributors may be used to endorse or promote products derived
2572− from this software without specific prior written permission.
2573−
2574− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2575− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2576− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2577− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2578− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2579− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2580− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2581− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2582− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2583− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2584− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2585−
2586−iproute LICENSE file:
2587−
2588− Copyright (c) 2009, IIJ Innovation Institute Inc.
2589− All rights reserved.
2590−
2591− Redistribution and use in source and binary forms, with or without
2592− modification, are permitted provided that the following conditions
2593− are met:
2594−
2595− * Redistributions of source code must retain the above copyright
2596− notice, this list of conditions and the following disclaimer.
2597− * Redistributions in binary form must reproduce the above copyright
2598− notice, this list of conditions and the following disclaimer in
2599− the documentation and/or other materials provided with the
2600− distribution.
2601− * Neither the name of the copyright holders nor the names of its
2602− contributors may be used to endorse or promote products derived
2603− from this software without specific prior written permission.
2604−
2605− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2606− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2607− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
2608− FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
2609− COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
2610− INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
2611− BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2612− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2613− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2614− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2615− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2616− POSSIBILITY OF SUCH DAMAGE.
2617−
2618−kan-extensions LICENSE file:
2619−
2620− Copyright 2008-2013 Edward Kmett
2621−
2622− All rights reserved.
2623−
2624− Redistribution and use in source and binary forms, with or without
2625− modification, are permitted provided that the following conditions
2626− are met:
2627−
2628− 1. Redistributions of source code must retain the above copyright
2629− notice, this list of conditions and the following disclaimer.
2630−
2631− 2. Redistributions in binary form must reproduce the above copyright
2632− notice, this list of conditions and the following disclaimer in the
2633− documentation and/or other materials provided with the distribution.
2634−
2635− 3. Neither the name of the author nor the names of his contributors
2636− may be used to endorse or promote products derived from this software
2637− without specific prior written permission.
2638−
2639− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
2640− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2641− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2642− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
2643− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2644− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2645− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2646− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
2647− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2648− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2649− POSSIBILITY OF SUCH DAMAGE.
2650−
2651−language-javascript LICENSE file:
2652−
2653− Copyright (c)2010, Alan Zimmerman
2654−
2655− All rights reserved.
2656−
2657− Redistribution and use in source and binary forms, with or without
2658− modification, are permitted provided that the following conditions are met:
2659−
2660− * Redistributions of source code must retain the above copyright
2661− notice, this list of conditions and the following disclaimer.
2662−
2663− * Redistributions in binary form must reproduce the above
2664− copyright notice, this list of conditions and the following
2665− disclaimer in the documentation and/or other materials provided
2666− with the distribution.
2667−
2668− * Neither the name of Alan Zimmerman nor the names of other
2669− contributors may be used to endorse or promote products derived
2670− from this software without specific prior written permission.
2671−
2672− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2673− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2674− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2675− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2676− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2677− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2678− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2679− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2680− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2681− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2682− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2683−
2684−lens LICENSE file:
2685−
2686− Copyright 2012-2015 Edward Kmett
2687−
2688− All rights reserved.
2689−
2690− Redistribution and use in source and binary forms, with or without
2691− modification, are permitted provided that the following conditions
2692− are met:
2693−
2694− 1. Redistributions of source code must retain the above copyright
2695− notice, this list of conditions and the following disclaimer.
2696−
2697− 2. Redistributions in binary form must reproduce the above copyright
2698− notice, this list of conditions and the following disclaimer in the
2699− documentation and/or other materials provided with the distribution.
2700−
2701− 3. Neither the name of the author nor the names of his contributors
2702− may be used to endorse or promote products derived from this software
2703− without specific prior written permission.
2704−
2705− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
2706− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2707− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2708− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
2709− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2710− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2711− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2712− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
2713− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2714− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2715− POSSIBILITY OF SUCH DAMAGE.
2716−
2717−lifted-base LICENSE file:
2718−
2719− Copyright © 2010-2012, Bas van Dijk, Anders Kaseorg
2720− All rights reserved.
2721−
2722− Redistribution and use in source and binary forms, with or without
2723− modification, are permitted provided that the following conditions are
2724− met:
2725−
2726− • Redistributions of source code must retain the above copyright
2727− notice, this list of conditions and the following disclaimer.
2728−
2729− • Redistributions in binary form must reproduce the above copyright
2730− notice, this list of conditions and the following disclaimer in the
2731− documentation and/or other materials provided with the distribution.
2732−
2733− • Neither the name of the author nor the names of other contributors
2734− may be used to endorse or promote products derived from this
2735− software without specific prior written permission.
2736−
2737− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2738− “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2739− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2740− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2741− HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2742− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2743− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2744− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2745− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2746− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2747− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2748−
2749−managed LICENSE file:
2750−
2751− Copyright (c) 2014 Gabriel Gonzalez
2752− All rights reserved.
2753−
2754− Redistribution and use in source and binary forms, with or without modification,
2755− are permitted provided that the following conditions are met:
2756− * Redistributions of source code must retain the above copyright notice,
2757− this list of conditions and the following disclaimer.
2758− * Redistributions in binary form must reproduce the above copyright notice,
2759− this list of conditions and the following disclaimer in the documentation
2760− and/or other materials provided with the distribution.
2761− * Neither the name of Gabriel Gonzalez nor the names of other contributors
2762− may be used to endorse or promote products derived from this software
2763− without specific prior written permission.
2764−
2765− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2766− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2767− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2768− DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
2769− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2770− (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2771− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2772− ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2773− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2774− SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2775−
2776−memory LICENSE file:
2777−
2778− Copyright (c) 2015 Vincent Hanquez <vincent@snarc.org>
2779−
2780− All rights reserved.
2781−
2782− Redistribution and use in source and binary forms, with or without
2783− modification, are permitted provided that the following conditions
2784− are met:
2785−
2786− 1. Redistributions of source code must retain the above copyright
2787− notice, this list of conditions and the following disclaimer.
2788− 2. Redistributions in binary form must reproduce the above copyright
2789− notice, this list of conditions and the following disclaimer in the
2790− documentation and/or other materials provided with the distribution.
2791− 3. Neither the name of the author nor the names of his contributors
2792− may be used to endorse or promote products derived from this software
2793− without specific prior written permission.
2794−
2795− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS AS IS'' AND
2796− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2797− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2798− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
2799− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2800− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2801− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2802− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2803− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2804− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2805− SUCH DAMAGE.
2806−
2807−mime-types LICENSE file:
2808−
2809− Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
2810−
2811− Permission is hereby granted, free of charge, to any person obtaining
2812− a copy of this software and associated documentation files (the
2813− "Software"), to deal in the Software without restriction, including
2814− without limitation the rights to use, copy, modify, merge, publish,
2815− distribute, sublicense, and/or sell copies of the Software, and to
2816− permit persons to whom the Software is furnished to do so, subject to
2817− the following conditions:
2818−
2819− The above copyright notice and this permission notice shall be
2820− included in all copies or substantial portions of the Software.
2821−
2822− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2823− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2824− MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2825− NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
2826− LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
2827− OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
2828− WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2829−
2830−mmorph LICENSE file:
2831−
2832− Copyright (c) 2013, Gabriel Gonzalez
2833− All rights reserved.
2834−
2835− Redistribution and use in source and binary forms, with or without modification,
2836− are permitted provided that the following conditions are met:
2837−
2838− * Redistributions of source code must retain the above copyright notice, this
2839− list of conditions and the following disclaimer.
2840− * Redistributions in binary form must reproduce the above copyright notice, this
2841− list of conditions and the following disclaimer in the documentation and/or
2842− other materials provided with the distribution.
2843− * Neither the name of Gabriel Gonzalez nor the names of other contributors may
2844− be used to endorse or promote products derived from this software without
2845− specific prior written permission.
2846−
2847− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2848− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2849− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2850− DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
2851− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2852− (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2853− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2854− ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2855− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2856− SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2857−
2858−monad-control LICENSE file:
2859−
2860− Copyright © 2010, Bas van Dijk, Anders Kaseorg
2861− All rights reserved.
2862−
2863− Redistribution and use in source and binary forms, with or without
2864− modification, are permitted provided that the following conditions are
2865− met:
2866−
2867− • Redistributions of source code must retain the above copyright
2868− notice, this list of conditions and the following disclaimer.
2869−
2870− • Redistributions in binary form must reproduce the above copyright
2871− notice, this list of conditions and the following disclaimer in the
2872− documentation and/or other materials provided with the distribution.
2873−
2874− • Neither the name of the author nor the names of other contributors
2875− may be used to endorse or promote products derived from this
2876− software without specific prior written permission.
2877−
2878− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2879− “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2880− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2881− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2882− HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2883− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2884− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2885− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2886− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2887− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2888− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2889−
2890−monad-logger LICENSE file:
2891−
2892− Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
2893−
2894− Permission is hereby granted, free of charge, to any person obtaining
2895− a copy of this software and associated documentation files (the
2896− "Software"), to deal in the Software without restriction, including
2897− without limitation the rights to use, copy, modify, merge, publish,
2898− distribute, sublicense, and/or sell copies of the Software, and to
2899− permit persons to whom the Software is furnished to do so, subject to
2900− the following conditions:
2901−
2902− The above copyright notice and this permission notice shall be
2903− included in all copies or substantial portions of the Software.
2904−
2905− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2906− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2907− MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2908− NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
2909− LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
2910− OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
2911− WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2912−
2913−mtl LICENSE file:
2914−
2915− The Glasgow Haskell Compiler License
2916−
2917− Copyright 2004, The University Court of the University of Glasgow.
2918− All rights reserved.
2919−
2920− Redistribution and use in source and binary forms, with or without
2921− modification, are permitted provided that the following conditions are met:
2922−
2923− - Redistributions of source code must retain the above copyright notice,
2924− this list of conditions and the following disclaimer.
2925−
2926− - Redistributions in binary form must reproduce the above copyright notice,
2927− this list of conditions and the following disclaimer in the documentation
2928− and/or other materials provided with the distribution.
2929−
2930− - Neither name of the University nor the names of its contributors may be
2931− used to endorse or promote products derived from this software without
2932− specific prior written permission.
2933−
2934− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
2935− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
2936− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
2937− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
2938− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
2939− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2940− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2941− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2942− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2943− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2944− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
2945− DAMAGE.
2946−
2947−mwc-random LICENSE file:
2948−
2949− Copyright (c) 2009, Bryan O'Sullivan
2950− All rights reserved.
2951−
2952− Redistribution and use in source and binary forms, with or without
2953− modification, are permitted provided that the following conditions
2954− are met:
2955−
2956− * Redistributions of source code must retain the above copyright
2957− notice, this list of conditions and the following disclaimer.
2958−
2959− * Redistributions in binary form must reproduce the above
2960− copyright notice, this list of conditions and the following
2961− disclaimer in the documentation and/or other materials provided
2962− with the distribution.
2963−
2964− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2965− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2966− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2967− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2968− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2969− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2970− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2971− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2972− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2973− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2974− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2975−
2976−network LICENSE file:
2977−
2978− Copyright (c) 2002-2010, The University Court of the University of Glasgow.
2979− Copyright (c) 2007-2010, Johan Tibell
2980−
2981− Redistribution and use in source and binary forms, with or without
2982− modification, are permitted provided that the following conditions are met:
2983−
2984− - Redistributions of source code must retain the above copyright notice,
2985− this list of conditions and the following disclaimer.
2986−
2987− - Redistributions in binary form must reproduce the above copyright notice,
2988− this list of conditions and the following disclaimer in the documentation
2989− and/or other materials provided with the distribution.
2990−
2991− - Neither name of the University nor the names of its contributors may be
2992− used to endorse or promote products derived from this software without
2993− specific prior written permission.
2994−
2995− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
2996− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
2997− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
2998− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
2999− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3000− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3001− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3002− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3003− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3004− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3005− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3006− DAMAGE.
3007−
3008−network-uri LICENSE file:
3009−
3010− Copyright (c) 2002-2010, The University Court of the University of Glasgow.
3011− Copyright (c) 2007-2010, Johan Tibell
3012−
3013− Redistribution and use in source and binary forms, with or without
3014− modification, are permitted provided that the following conditions are met:
3015−
3016− - Redistributions of source code must retain the above copyright notice,
3017− this list of conditions and the following disclaimer.
3018−
3019− - Redistributions in binary form must reproduce the above copyright notice,
3020− this list of conditions and the following disclaimer in the documentation
3021− and/or other materials provided with the distribution.
3022−
3023− - Neither name of the University nor the names of its contributors may be
3024− used to endorse or promote products derived from this software without
3025− specific prior written permission.
3026−
3027− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3028− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3029− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3030− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3031− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3032− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3033− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3034− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3035− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3036− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3037− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3038− DAMAGE.
3039−
3040−old-locale LICENSE file:
3041−
3042− This library (libraries/base) is derived from code from two
3043− sources:
3044−
3045− * Code from the GHC project which is largely (c) The University of
3046− Glasgow, and distributable under a BSD-style license (see below),
3047−
3048− * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
3049− and freely redistributable (but see the full license for
3050− restrictions).
3051−
3052− The full text of these licenses is reproduced below. Both of the
3053− licenses are BSD-style or compatible.
3054−
3055− -----------------------------------------------------------------------------
3056−
3057− The Glasgow Haskell Compiler License
3058−
3059− Copyright 2004, The University Court of the University of Glasgow.
3060− All rights reserved.
3061−
3062− Redistribution and use in source and binary forms, with or without
3063− modification, are permitted provided that the following conditions are met:
3064−
3065− - Redistributions of source code must retain the above copyright notice,
3066− this list of conditions and the following disclaimer.
3067−
3068− - Redistributions in binary form must reproduce the above copyright notice,
3069− this list of conditions and the following disclaimer in the documentation
3070− and/or other materials provided with the distribution.
3071−
3072− - Neither name of the University nor the names of its contributors may be
3073− used to endorse or promote products derived from this software without
3074− specific prior written permission.
3075−
3076− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3077− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3078− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3079− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3080− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3081− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3082− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3083− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3084− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3085− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3086− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3087− DAMAGE.
3088−
3089− -----------------------------------------------------------------------------
3090−
3091− Code derived from the document "Report on the Programming Language
3092− Haskell 98", is distributed under the following license:
3093−
3094− Copyright (c) 2002 Simon Peyton Jones
3095−
3096− The authors intend this Report to belong to the entire Haskell
3097− community, and so we grant permission to copy and distribute it for
3098− any purpose, provided that it is reproduced in its entirety,
3099− including this Notice. Modified versions of this Report may also be
3100− copied and distributed for any purpose, provided that the modified
3101− version is clearly presented as such, and that it does not claim to
3102− be a definition of the Haskell 98 Language.
3103−
3104− -----------------------------------------------------------------------------
3105−
3106−old-time LICENSE file:
3107−
3108− This library (libraries/base) is derived from code from two
3109− sources:
3110−
3111− * Code from the GHC project which is largely (c) The University of
3112− Glasgow, and distributable under a BSD-style license (see below),
3113−
3114− * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
3115− and freely redistributable (but see the full license for
3116− restrictions).
3117−
3118− The full text of these licenses is reproduced below. Both of the
3119− licenses are BSD-style or compatible.
3120−
3121− -----------------------------------------------------------------------------
3122−
3123− The Glasgow Haskell Compiler License
3124−
3125− Copyright 2004, The University Court of the University of Glasgow.
3126− All rights reserved.
3127−
3128− Redistribution and use in source and binary forms, with or without
3129− modification, are permitted provided that the following conditions are met:
3130−
3131− - Redistributions of source code must retain the above copyright notice,
3132− this list of conditions and the following disclaimer.
3133−
3134− - Redistributions in binary form must reproduce the above copyright notice,
3135− this list of conditions and the following disclaimer in the documentation
3136− and/or other materials provided with the distribution.
3137−
3138− - Neither name of the University nor the names of its contributors may be
3139− used to endorse or promote products derived from this software without
3140− specific prior written permission.
3141−
3142− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3143− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3144− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3145− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3146− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3147− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3148− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3149− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3150− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3151− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3152− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3153− DAMAGE.
3154−
3155− -----------------------------------------------------------------------------
3156−
3157− Code derived from the document "Report on the Programming Language
3158− Haskell 98", is distributed under the following license:
3159−
3160− Copyright (c) 2002 Simon Peyton Jones
3161−
3162− The authors intend this Report to belong to the entire Haskell
3163− community, and so we grant permission to copy and distribute it for
3164− any purpose, provided that it is reproduced in its entirety,
3165− including this Notice. Modified versions of this Report may also be
3166− copied and distributed for any purpose, provided that the modified
3167− version is clearly presented as such, and that it does not claim to
3168− be a definition of the Haskell 98 Language.
3169−
3170− -----------------------------------------------------------------------------
3171−
3172−optional-args LICENSE file:
3173−
3174− Copyright (c) 2015 Gabriel Gonzalez
3175− All rights reserved.
3176−
3177− Redistribution and use in source and binary forms, with or without modification,
3178− are permitted provided that the following conditions are met:
3179− * Redistributions of source code must retain the above copyright notice,
3180− this list of conditions and the following disclaimer.
3181− * Redistributions in binary form must reproduce the above copyright notice,
3182− this list of conditions and the following disclaimer in the documentation
3183− and/or other materials provided with the distribution.
3184− * Neither the name of Gabriel Gonzalez nor the names of other contributors
3185− may be used to endorse or promote products derived from this software
3186− without specific prior written permission.
3187−
3188− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3189− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3190− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3191− DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
3192− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3193− (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3194− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
3195− ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3196− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3197− SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3198−
3199−optparse-applicative LICENSE file:
3200−
3201− Copyright (c) 2012, Paolo Capriotti
3202−
3203− All rights reserved.
3204−
3205− Redistribution and use in source and binary forms, with or without
3206− modification, are permitted provided that the following conditions are met:
3207−
3208− * Redistributions of source code must retain the above copyright
3209− notice, this list of conditions and the following disclaimer.
3210−
3211− * Redistributions in binary form must reproduce the above
3212− copyright notice, this list of conditions and the following
3213− disclaimer in the documentation and/or other materials provided
3214− with the distribution.
3215−
3216− * Neither the name of Paolo Capriotti nor the names of other
3217− contributors may be used to endorse or promote products derived
3218− from this software without specific prior written permission.
3219−
3220− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3221− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3222− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3223− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3224− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3225− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3226− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3227− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3228− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3229− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3230− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3231−
3232−parallel LICENSE file:
3233−
3234− This library (libraries/parallel) is derived from code from
3235− the GHC project which is largely (c) The University of
3236− Glasgow, and distributable under a BSD-style license (see below).
3237−
3238− -----------------------------------------------------------------------------
3239−
3240− The Glasgow Haskell Compiler License
3241−
3242− Copyright 2004, The University Court of the University of Glasgow.
3243− All rights reserved.
3244−
3245− Redistribution and use in source and binary forms, with or without
3246− modification, are permitted provided that the following conditions are met:
3247−
3248− - Redistributions of source code must retain the above copyright notice,
3249− this list of conditions and the following disclaimer.
3250−
3251− - Redistributions in binary form must reproduce the above copyright notice,
3252− this list of conditions and the following disclaimer in the documentation
3253− and/or other materials provided with the distribution.
3254−
3255− - Neither name of the University nor the names of its contributors may be
3256− used to endorse or promote products derived from this software without
3257− specific prior written permission.
3258−
3259− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3260− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3261− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3262− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3263− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3264− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3265− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3266− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3267− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3268− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3269− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3270− DAMAGE.
3271−
3272− -----------------------------------------------------------------------------
3273−
3274−parsec LICENSE file:
3275−
3276− Copyright 1999-2000, Daan Leijen; 2007, Paolo Martini. All rights reserved.
3277−
3278− Redistribution and use in source and binary forms, with or without
3279− modification, are permitted provided that the following conditions are met:
3280−
3281− * Redistributions of source code must retain the above copyright notice,
3282− this list of conditions and the following disclaimer.
3283− * Redistributions in binary form must reproduce the above copyright
3284− notice, this list of conditions and the following disclaimer in the
3285− documentation and/or other materials provided with the distribution.
3286−
3287− This software is provided by the copyright holders "as is" and any express or
3288− implied warranties, including, but not limited to, the implied warranties of
3289− merchantability and fitness for a particular purpose are disclaimed. In no
3290− event shall the copyright holders be liable for any direct, indirect,
3291− incidental, special, exemplary, or consequential damages (including, but not
3292− limited to, procurement of substitute goods or services; loss of use, data,
3293− or profits; or business interruption) however caused and on any theory of
3294− liability, whether in contract, strict liability, or tort (including
3295− negligence or otherwise) arising in any way out of the use of this software,
3296− even if advised of the possibility of such damage.
3297−
3298−pattern-arrows LICENSE file:
3299−
3300− The MIT License (MIT)
3301−
3302− Copyright (c) 2013 Phil Freeman
3303−
3304− Permission is hereby granted, free of charge, to any person obtaining a copy of
3305− this software and associated documentation files (the "Software"), to deal in
3306− the Software without restriction, including without limitation the rights to
3307− use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
3308− the Software, and to permit persons to whom the Software is furnished to do so,
3309− subject to the following conditions:
3310−
3311− The above copyright notice and this permission notice shall be included in all
3312− copies or substantial portions of the Software.
3313−
3314− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3315− IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
3316− FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
3317− COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
3318− IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
3319− CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3320−
3321−pem LICENSE file:
3322−
3323− Copyright (c) 2010-2012 Vincent Hanquez <vincent@snarc.org>
3324−
3325− All rights reserved.
3326−
3327− Redistribution and use in source and binary forms, with or without
3328− modification, are permitted provided that the following conditions
3329− are met:
3330− 1. Redistributions of source code must retain the above copyright
3331− notice, this list of conditions and the following disclaimer.
3332− 2. Redistributions in binary form must reproduce the above copyright
3333− notice, this list of conditions and the following disclaimer in the
3334− documentation and/or other materials provided with the distribution.
3335− 3. Neither the name of the author nor the names of his contributors
3336− may be used to endorse or promote products derived from this software
3337− without specific prior written permission.
3338−
3339− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
3340− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3341− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3342− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
3343− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3344− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3345− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3346− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3347− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3348− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3349− SUCH DAMAGE.
3350−
3351−pipes LICENSE file:
3352−
3353− Copyright (c) 2012-2014 Gabriel Gonzalez
3354− All rights reserved.
3355−
3356− Redistribution and use in source and binary forms, with or without modification,
3357− are permitted provided that the following conditions are met:
3358− * Redistributions of source code must retain the above copyright notice,
3359− this list of conditions and the following disclaimer.
3360− * Redistributions in binary form must reproduce the above copyright notice,
3361− this list of conditions and the following disclaimer in the documentation
3362− and/or other materials provided with the distribution.
3363− * Neither the name of Gabriel Gonzalez nor the names of other contributors
3364− may be used to endorse or promote products derived from this software
3365− without specific prior written permission.
3366−
3367− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3368− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3369− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3370− DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
3371− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3372− (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3373− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
3374− ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3375− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3376− SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3377−
3378−pipes-http LICENSE file:
3379−
3380− Copyright (c) 2016 Gabriel Gonzalez
3381− All rights reserved.
3382−
3383− Redistribution and use in source and binary forms, with or without modification,
3384− are permitted provided that the following conditions are met:
3385− * Redistributions of source code must retain the above copyright notice,
3386− this list of conditions and the following disclaimer.
3387− * Redistributions in binary form must reproduce the above copyright notice,
3388− this list of conditions and the following disclaimer in the documentation
3389− and/or other materials provided with the distribution.
3390− * Neither the name of Gabriel Gonzalez nor the names of other contributors
3391− may be used to endorse or promote products derived from this software
3392− without specific prior written permission.
3393−
3394− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3395− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3396− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3397− DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
3398− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3399− (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3400− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
3401− ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3402− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3403− SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3404−
3405−prelude-extras LICENSE file:
3406−
3407− Copyright 2011-2016 Edward Kmett
3408−
3409− All rights reserved.
3410−
3411− Redistribution and use in source and binary forms, with or without
3412− modification, are permitted provided that the following conditions
3413− are met:
3414−
3415− 1. Redistributions of source code must retain the above copyright
3416− notice, this list of conditions and the following disclaimer.
3417−
3418− 2. Redistributions in binary form must reproduce the above copyright
3419− notice, this list of conditions and the following disclaimer in the
3420− documentation and/or other materials provided with the distribution.
3421−
3422− 3. Neither the name of the author nor the names of his contributors
3423− may be used to endorse or promote products derived from this software
3424− without specific prior written permission.
3425−
3426− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
3427− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3428− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3429− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
3430− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3431− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3432− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3433− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
3434− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
3435− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3436− POSSIBILITY OF SUCH DAMAGE.
3437−
3438−primitive LICENSE file:
3439−
3440− Copyright (c) 2008-2009, Roman Leshchinskiy
3441− All rights reserved.
3442−
3443− Redistribution and use in source and binary forms, with or without
3444− modification, are permitted provided that the following conditions are met:
3445−
3446− - Redistributions of source code must retain the above copyright notice,
3447− this list of conditions and the following disclaimer.
3448−
3449− - Redistributions in binary form must reproduce the above copyright notice,
3450− this list of conditions and the following disclaimer in the documentation
3451− and/or other materials provided with the distribution.
3452−
3453− - Neither name of the University nor the names of its contributors may be
3454− used to endorse or promote products derived from this software without
3455− specific prior written permission.
3456−
3457− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3458− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3459− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3460− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3461− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3462− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3463− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3464− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3465− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3466− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3467− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3468− DAMAGE.
3469−
3470−
3471−process LICENSE file:
3472−
3473− This library (libraries/process) is derived from code from two
3474− sources:
3475−
3476− * Code from the GHC project which is largely (c) The University of
3477− Glasgow, and distributable under a BSD-style license (see below),
3478−
3479− * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
3480− and freely redistributable (but see the full license for
3481− restrictions).
3482−
3483− The full text of these licenses is reproduced below. Both of the
3484− licenses are BSD-style or compatible.
3485−
3486− -----------------------------------------------------------------------------
3487−
3488− The Glasgow Haskell Compiler License
3489−
3490− Copyright 2004, The University Court of the University of Glasgow.
3491− All rights reserved.
3492−
3493− Redistribution and use in source and binary forms, with or without
3494− modification, are permitted provided that the following conditions are met:
3495−
3496− - Redistributions of source code must retain the above copyright notice,
3497− this list of conditions and the following disclaimer.
3498−
3499− - Redistributions in binary form must reproduce the above copyright notice,
3500− this list of conditions and the following disclaimer in the documentation
3501− and/or other materials provided with the distribution.
3502−
3503− - Neither name of the University nor the names of its contributors may be
3504− used to endorse or promote products derived from this software without
3505− specific prior written permission.
3506−
3507− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3508− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3509− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3510− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3511− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3512− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3513− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3514− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3515− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3516− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3517− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3518− DAMAGE.
3519−
3520− -----------------------------------------------------------------------------
3521−
3522− Code derived from the document "Report on the Programming Language
3523− Haskell 98", is distributed under the following license:
3524−
3525− Copyright (c) 2002 Simon Peyton Jones
3526−
3527− The authors intend this Report to belong to the entire Haskell
3528− community, and so we grant permission to copy and distribute it for
3529− any purpose, provided that it is reproduced in its entirety,
3530− including this Notice. Modified versions of this Report may also be
3531− copied and distributed for any purpose, provided that the modified
3532− version is clearly presented as such, and that it does not claim to
3533− be a definition of the Haskell 98 Language.
3534−
3535− -----------------------------------------------------------------------------
3536−
3537−profunctors LICENSE file:
3538−
3539− Copyright 2011-2015 Edward Kmett
3540−
3541− All rights reserved.
3542−
3543− Redistribution and use in source and binary forms, with or without
3544− modification, are permitted provided that the following conditions
3545− are met:
3546−
3547− 1. Redistributions of source code must retain the above copyright
3548− notice, this list of conditions and the following disclaimer.
3549−
3550− 2. Redistributions in binary form must reproduce the above copyright
3551− notice, this list of conditions and the following disclaimer in the
3552− documentation and/or other materials provided with the distribution.
3553−
3554− 3. Neither the name of the author nor the names of his contributors
3555− may be used to endorse or promote products derived from this software
3556− without specific prior written permission.
3557−
3558− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
3559− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3560− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3561− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
3562− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3563− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3564− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3565− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
3566− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
3567− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3568− POSSIBILITY OF SUCH DAMAGE.
3569−
3570−protolude LICENSE file:
3571−
3572− Copyright (c) 2016, Stephen Diehl
3573−
3574− Permission is hereby granted, free of charge, to any person obtaining a copy
3575− of this software and associated documentation files (the "Software"), to
3576− deal in the Software without restriction, including without limitation the
3577− rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
3578− sell copies of the Software, and to permit persons to whom the Software is
3579− furnished to do so, subject to the following conditions:
3580−
3581− The above copyright notice and this permission notice shall be included in
3582− all copies or substantial portions of the Software.
3583−
3584− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3585− IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
3586− FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3587− AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
3588− LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
3589− FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3590− IN THE SOFTWARE.
3591−
3592−psqueues LICENSE file:
3593−
3594− The Glasgow Haskell Compiler License
3595−
3596− Copyright 2004, The University Court of the University of Glasgow.
3597− All rights reserved.
3598−
3599− Redistribution and use in source and binary forms, with or without
3600− modification, are permitted provided that the following conditions are met:
3601−
3602− - Redistributions of source code must retain the above copyright notice,
3603− this list of conditions and the following disclaimer.
3604−
3605− - Redistributions in binary form must reproduce the above copyright notice,
3606− this list of conditions and the following disclaimer in the documentation
3607− and/or other materials provided with the distribution.
3608−
3609− - Neither name of the University nor the names of its contributors may be
3610− used to endorse or promote products derived from this software without
3611− specific prior written permission.
3612−
3613− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3614− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3615− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3616− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3617− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3618− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3619− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3620− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3621− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3622− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3623− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3624− DAMAGE.
3625−
3626−random LICENSE file:
3627−
3628− This library (libraries/base) is derived from code from two
3629− sources:
3630−
3631− * Code from the GHC project which is largely (c) The University of
3632− Glasgow, and distributable under a BSD-style license (see below),
3633−
3634− * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
3635− and freely redistributable (but see the full license for
3636− restrictions).
3637−
3638− The full text of these licenses is reproduced below. Both of the
3639− licenses are BSD-style or compatible.
3640−
3641− -----------------------------------------------------------------------------
3642−
3643− The Glasgow Haskell Compiler License
3644−
3645− Copyright 2004, The University Court of the University of Glasgow.
3646− All rights reserved.
3647−
3648− Redistribution and use in source and binary forms, with or without
3649− modification, are permitted provided that the following conditions are met:
3650−
3651− - Redistributions of source code must retain the above copyright notice,
3652− this list of conditions and the following disclaimer.
3653−
3654− - Redistributions in binary form must reproduce the above copyright notice,
3655− this list of conditions and the following disclaimer in the documentation
3656− and/or other materials provided with the distribution.
3657−
3658− - Neither name of the University nor the names of its contributors may be
3659− used to endorse or promote products derived from this software without
3660− specific prior written permission.
3661−
3662− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3663− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3664− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3665− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3666− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3667− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3668− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3669− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3670− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3671− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3672− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3673− DAMAGE.
3674−
3675− -----------------------------------------------------------------------------
3676−
3677− Code derived from the document "Report on the Programming Language
3678− Haskell 98", is distributed under the following license:
3679−
3680− Copyright (c) 2002 Simon Peyton Jones
3681−
3682− The authors intend this Report to belong to the entire Haskell
3683− community, and so we grant permission to copy and distribute it for
3684− any purpose, provided that it is reproduced in its entirety,
3685− including this Notice. Modified versions of this Report may also be
3686− copied and distributed for any purpose, provided that the modified
3687− version is clearly presented as such, and that it does not claim to
3688− be a definition of the Haskell 98 Language.
3689−
3690− -----------------------------------------------------------------------------
3691−
3692−reflection LICENSE file:
3693−
3694− Copyright (c) 2009-2013 Edward Kmett
3695− Copyright (c) 2004 Oleg Kiselyov and Chung-chieh Shan
3696− All rights reserved.
3697−
3698− Redistribution and use in source and binary forms, with or without
3699− modification, are permitted provided that the following conditions are
3700− met:
3701−
3702− * Redistributions of source code must retain the above copyright
3703− notice, this list of conditions and the following disclaimer.
3704−
3705− * Redistributions in binary form must reproduce the above
3706− copyright notice, this list of conditions and the following
3707− disclaimer in the documentation and/or other materials provided
3708− with the distribution.
3709−
3710− * Neither the name of Edward Kmett nor the names of other
3711− contributors may be used to endorse or promote products derived
3712− from this software without specific prior written permission.
3713−
3714− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3715− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3716− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3717− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3718− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3719− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3720− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3721− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3722− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3723− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3724− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3725−
3726−regex-base LICENSE file:
3727−
3728− This modile is under this "3 clause" BSD license:
3729−
3730− Copyright (c) 2007, Christopher Kuklewicz
3731− All rights reserved.
3732−
3733− Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
3734−
3735− * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
3736− * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3737− * The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission.
3738−
3739− 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.
3740−
3741−regex-tdfa LICENSE file:
3742−
3743− This modile is under this "3 clause" BSD license:
3744−
3745− Copyright (c) 2007-2009, Christopher Kuklewicz
3746− All rights reserved.
3747−
3748− Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
3749−
3750− * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
3751− * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3752− * The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission.
3753−
3754− 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.
3755−
3756−resourcet LICENSE file:
3757−
3758− Copyright (c)2011, Michael Snoyman
3759−
3760− All rights reserved.
3761−
3762− Redistribution and use in source and binary forms, with or without
3763− modification, are permitted provided that the following conditions are met:
3764−
3765− * Redistributions of source code must retain the above copyright
3766− notice, this list of conditions and the following disclaimer.
3767−
3768− * Redistributions in binary form must reproduce the above
3769− copyright notice, this list of conditions and the following
3770− disclaimer in the documentation and/or other materials provided
3771− with the distribution.
3772−
3773− * Neither the name of Michael Snoyman nor the names of other
3774− contributors may be used to endorse or promote products derived
3775− from this software without specific prior written permission.
3776−
3777− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3778− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3779− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3780− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3781− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3782− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3783− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3784− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3785− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3786− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3787− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3788−
3789−safe LICENSE file:
3790−
3791− Copyright Neil Mitchell 2007-2016.
3792− All rights reserved.
3793−
3794− Redistribution and use in source and binary forms, with or without
3795− modification, are permitted provided that the following conditions are
3796− met:
3797−
3798− * Redistributions of source code must retain the above copyright
3799− notice, this list of conditions and the following disclaimer.
3800−
3801− * Redistributions in binary form must reproduce the above
3802− copyright notice, this list of conditions and the following
3803− disclaimer in the documentation and/or other materials provided
3804− with the distribution.
3805−
3806− * Neither the name of Neil Mitchell nor the names of other
3807− contributors may be used to endorse or promote products derived
3808− from this software without specific prior written permission.
3809−
3810− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3811− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3812− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3813− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3814− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3815− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3816− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3817− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3818− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3819− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3820− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3821−
3822−scientific LICENSE file:
3823−
3824− Copyright (c) 2013, Bas van Dijk
3825−
3826− All rights reserved.
3827−
3828− Redistribution and use in source and binary forms, with or without
3829− modification, are permitted provided that the following conditions are met:
3830−
3831− * Redistributions of source code must retain the above copyright
3832− notice, this list of conditions and the following disclaimer.
3833−
3834− * Redistributions in binary form must reproduce the above
3835− copyright notice, this list of conditions and the following
3836− disclaimer in the documentation and/or other materials provided
3837− with the distribution.
3838−
3839− * Neither the name of Bas van Dijk nor the names of other
3840− contributors may be used to endorse or promote products derived
3841− from this software without specific prior written permission.
3842−
3843− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3844− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3845− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3846− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3847− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3848− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3849− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3850− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3851− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3852− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3853− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3854−
3855−semigroupoids LICENSE file:
3856−
3857− Copyright 2011-2015 Edward Kmett
3858−
3859− All rights reserved.
3860−
3861− Redistribution and use in source and binary forms, with or without
3862− modification, are permitted provided that the following conditions
3863− are met:
3864−
3865− 1. Redistributions of source code must retain the above copyright
3866− notice, this list of conditions and the following disclaimer.
3867−
3868− 2. Redistributions in binary form must reproduce the above copyright
3869− notice, this list of conditions and the following disclaimer in the
3870− documentation and/or other materials provided with the distribution.
3871−
3872− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
3873− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3874− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3875− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
3876− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3877− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3878− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3879− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
3880− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
3881− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3882− POSSIBILITY OF SUCH DAMAGE.
3883−
3884−semigroups LICENSE file:
3885−
3886− Copyright 2011-2015 Edward Kmett
3887−
3888− All rights reserved.
3889−
3890− Redistribution and use in source and binary forms, with or without
3891− modification, are permitted provided that the following conditions
3892− are met:
3893−
3894− 1. Redistributions of source code must retain the above copyright
3895− notice, this list of conditions and the following disclaimer.
3896−
3897− 2. Redistributions in binary form must reproduce the above copyright
3898− notice, this list of conditions and the following disclaimer in the
3899− documentation and/or other materials provided with the distribution.
3900−
3901− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
3902− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3903− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3904− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
3905− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3906− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3907− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3908− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
3909− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
3910− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3911− POSSIBILITY OF SUCH DAMAGE.
3912−
3913−simple-sendfile LICENSE file:
3914−
3915− Copyright (c) 2009, IIJ Innovation Institute Inc.
3916− All rights reserved.
3917−
3918− Redistribution and use in source and binary forms, with or without
3919− modification, are permitted provided that the following conditions
3920− are met:
3921−
3922− * Redistributions of source code must retain the above copyright
3923− notice, this list of conditions and the following disclaimer.
3924− * Redistributions in binary form must reproduce the above copyright
3925− notice, this list of conditions and the following disclaimer in
3926− the documentation and/or other materials provided with the
3927− distribution.
3928− * Neither the name of the copyright holders nor the names of its
3929− contributors may be used to endorse or promote products derived
3930− from this software without specific prior written permission.
3931−
3932− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3933− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3934− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
3935− FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3936− COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
3937− INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
3938− BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3939− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3940− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3941− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
3942− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3943− POSSIBILITY OF SUCH DAMAGE.
3944−
3945−socks LICENSE file:
3946−
3947− Copyright (c) 2010-2011 Vincent Hanquez <vincent@snarc.org>
3948−
3949− All rights reserved.
3950−
3951− Redistribution and use in source and binary forms, with or without
3952− modification, are permitted provided that the following conditions
3953− are met:
3954− 1. Redistributions of source code must retain the above copyright
3955− notice, this list of conditions and the following disclaimer.
3956− 2. Redistributions in binary form must reproduce the above copyright
3957− notice, this list of conditions and the following disclaimer in the
3958− documentation and/or other materials provided with the distribution.
3959− 3. Neither the name of the author nor the names of his contributors
3960− may be used to endorse or promote products derived from this software
3961− without specific prior written permission.
3962−
3963− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
3964− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3965− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3966− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
3967− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3968− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3969− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3970− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3971− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3972− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3973− SUCH DAMAGE.
3974−
3975−sourcemap LICENSE file:
3976−
3977− Copyright (c) 2012, Chris Done
3978−
3979− All rights reserved.
3980−
3981− Redistribution and use in source and binary forms, with or without
3982− modification, are permitted provided that the following conditions are met:
3983−
3984− * Redistributions of source code must retain the above copyright
3985− notice, this list of conditions and the following disclaimer.
3986−
3987− * Redistributions in binary form must reproduce the above
3988− copyright notice, this list of conditions and the following
3989− disclaimer in the documentation and/or other materials provided
3990− with the distribution.
3991−
3992− * Neither the name of Chris Done nor the names of other
3993− contributors may be used to endorse or promote products derived
3994− from this software without specific prior written permission.
3995−
3996− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3997− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3998− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3999− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4000− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4001− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4002− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4003− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4004− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4005− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4006− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4007−
4008−spdx LICENSE file:
4009−
4010− Copyright (c) 2015, Oleg Grenrus
4011−
4012− All rights reserved.
4013−
4014− Redistribution and use in source and binary forms, with or without
4015− modification, are permitted provided that the following conditions are met:
4016−
4017− * Redistributions of source code must retain the above copyright
4018− notice, this list of conditions and the following disclaimer.
4019−
4020− * Redistributions in binary form must reproduce the above
4021− copyright notice, this list of conditions and the following
4022− disclaimer in the documentation and/or other materials provided
4023− with the distribution.
4024−
4025− * Neither the name of Oleg Grenrus nor the names of other
4026− contributors may be used to endorse or promote products derived
4027− from this software without specific prior written permission.
4028−
4029− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4030− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4031− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4032− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4033− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4034− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4035− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4036− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4037− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4038− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4039− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4040−
4041−split LICENSE file:
4042−
4043− Copyright (c) 2008 Brent Yorgey, Louis Wasserman
4044−
4045− All rights reserved.
4046−
4047− Redistribution and use in source and binary forms, with or without
4048− modification, are permitted provided that the following conditions
4049− are met:
4050− 1. Redistributions of source code must retain the above copyright
4051− notice, this list of conditions and the following disclaimer.
4052− 2. Redistributions in binary form must reproduce the above copyright
4053− notice, this list of conditions and the following disclaimer in the
4054− documentation and/or other materials provided with the distribution.
4055− 3. Neither the name of the author nor the names of other contributors
4056− may be used to endorse or promote products derived from this software
4057− without specific prior written permission.
4058−
4059− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND
4060− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4061− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4062− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
4063− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4064− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4065− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4066− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4067− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4068− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4069− SUCH DAMAGE.
4070−
4071−stm LICENSE file:
4072−
4073− The Glasgow Haskell Compiler License
4074−
4075− Copyright 2004, The University Court of the University of Glasgow.
4076− All rights reserved.
1+Copyright Andy Arvanitis (c) 2018
40772
4078− Redistribution and use in source and binary forms, with or without
4079− modification, are permitted provided that the following conditions are met:
4080−
4081− - Redistributions of source code must retain the above copyright notice,
4082− this list of conditions and the following disclaimer.
4083−
4084− - Redistributions in binary form must reproduce the above copyright notice,
4085− this list of conditions and the following disclaimer in the documentation
4086− and/or other materials provided with the distribution.
4087−
4088− - Neither name of the University nor the names of its contributors may be
4089− used to endorse or promote products derived from this software without
4090− specific prior written permission.
4091−
4092− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
4093− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
4094− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
4095− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
4096− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
4097− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4098− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4099− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4100− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4101− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4102− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
4103− DAMAGE.
4104−
4105−stm-chans LICENSE file:
4106−
4107− === stm-chans license ===
4108−
4109− Copyright (c) 2011--2013, wren gayle romano.
4110− ALL RIGHTS RESERVED.
4111−
4112− Redistribution and use in source and binary forms, with or without
4113− modification, are permitted provided that the following conditions
4114− are met:
4115−
4116− * Redistributions of source code must retain the above copyright
4117− notice, this list of conditions and the following disclaimer.
4118−
4119− * Redistributions in binary form must reproduce the above
4120− copyright notice, this list of conditions and the following
4121− disclaimer in the documentation and/or other materials provided
4122− with the distribution.
4123−
4124− * Neither the name of the copyright holders nor the names of
4125− other contributors may be used to endorse or promote products
4126− derived from this software without specific prior written
4127− permission.
4128−
4129− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4130− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4131− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
4132− FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
4133− COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
4134− INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
4135− BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4136− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4137− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4138− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
4139− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4140− POSSIBILITY OF SUCH DAMAGE.
4141−
4142−
4143−streaming-commons LICENSE file:
4144−
4145− The MIT License (MIT)
4146−
4147− Copyright (c) 2014 FP Complete
4148−
4149− Permission is hereby granted, free of charge, to any person obtaining a copy
4150− of this software and associated documentation files (the "Software"), to deal
4151− in the Software without restriction, including without limitation the rights
4152− to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
4153− copies of the Software, and to permit persons to whom the Software is
4154− furnished to do so, subject to the following conditions:
4155−
4156− The above copyright notice and this permission notice shall be included in all
4157− copies or substantial portions of the Software.
4158−
4159− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4160− IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
4161− FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4162− AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4163− LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4164− OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
4165− SOFTWARE.
4166−
4167−stringsearch LICENSE file:
4168−
4169− Copyright (c)2010, Daniel Fischer
4170−
4171− All rights reserved.
4172−
4173− Redistribution and use in source and binary forms, with or without
4174− modification, are permitted provided that the following conditions are met:
4175−
4176− * Redistributions of source code must retain the above copyright
4177− notice, this list of conditions and the following disclaimer.
4178−
4179− * Redistributions in binary form must reproduce the above
4180− copyright notice, this list of conditions and the following
4181− disclaimer in the documentation and/or other materials provided
4182− with the distribution.
4183−
4184− * Neither the name of Daniel Fischer nor the names of other
4185− contributors may be used to endorse or promote products derived
4186− from this software without specific prior written permission.
4187−
4188− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4189− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4190− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4191− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4192− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4193− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4194− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4195− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4196− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4197− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4198− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4199−
4200−syb LICENSE file:
4201−
4202− This library (libraries/syb) is derived from code from several
4203− sources:
4204−
4205− * Code from the GHC project which is largely (c) The University of
4206− Glasgow, and distributable under a BSD-style license (see below),
4207−
4208− * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
4209− and freely redistributable (but see the full license for
4210− restrictions).
4211−
4212− * Code from the Haskell Foreign Function Interface specification,
4213− which is (c) Manuel M. T. Chakravarty and freely redistributable
4214− (but see the full license for restrictions).
4215−
4216− The full text of these licenses is reproduced below. All of the
4217− licenses are BSD-style or compatible.
4218−
4219− -----------------------------------------------------------------------------
4220−
4221− The Glasgow Haskell Compiler License
4222−
4223− Copyright 2004, The University Court of the University of Glasgow.
4224− All rights reserved.
4225−
4226− Redistribution and use in source and binary forms, with or without
4227− modification, are permitted provided that the following conditions are met:
4228−
4229− - Redistributions of source code must retain the above copyright notice,
4230− this list of conditions and the following disclaimer.
4231−
4232− - Redistributions in binary form must reproduce the above copyright notice,
4233− this list of conditions and the following disclaimer in the documentation
4234− and/or other materials provided with the distribution.
4235−
4236− - Neither name of the University nor the names of its contributors may be
4237− used to endorse or promote products derived from this software without
4238− specific prior written permission.
4239−
4240− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
4241− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
4242− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
4243− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
4244− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
4245− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4246− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4247− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4248− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4249− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4250− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
4251− DAMAGE.
4252−
4253− -----------------------------------------------------------------------------
4254−
4255− Code derived from the document "Report on the Programming Language
4256− Haskell 98", is distributed under the following license:
4257−
4258− Copyright (c) 2002 Simon Peyton Jones
4259−
4260− The authors intend this Report to belong to the entire Haskell
4261− community, and so we grant permission to copy and distribute it for
4262− any purpose, provided that it is reproduced in its entirety,
4263− including this Notice. Modified versions of this Report may also be
4264− copied and distributed for any purpose, provided that the modified
4265− version is clearly presented as such, and that it does not claim to
4266− be a definition of the Haskell 98 Language.
4267−
4268− -----------------------------------------------------------------------------
4269−
4270− Code derived from the document "The Haskell 98 Foreign Function
4271− Interface, An Addendum to the Haskell 98 Report" is distributed under
4272− the following license:
4273−
4274− Copyright (c) 2002 Manuel M. T. Chakravarty
4275−
4276− The authors intend this Report to belong to the entire Haskell
4277− community, and so we grant permission to copy and distribute it for
4278− any purpose, provided that it is reproduced in its entirety,
4279− including this Notice. Modified versions of this Report may also be
4280− copied and distributed for any purpose, provided that the modified
4281− version is clearly presented as such, and that it does not claim to
4282− be a definition of the Haskell 98 Foreign Function Interface.
4283−
4284− -----------------------------------------------------------------------------
4285−
4286−system-fileio LICENSE file:
4287−
4288− Copyright (c) 2011 John Millikin
4289−
4290− Permission is hereby granted, free of charge, to any person
4291− obtaining a copy of this software and associated documentation
4292− files (the "Software"), to deal in the Software without
4293− restriction, including without limitation the rights to use,
4294− copy, modify, merge, publish, distribute, sublicense, and/or sell
4295− copies of the Software, and to permit persons to whom the
4296− Software is furnished to do so, subject to the following
4297− conditions:
4298−
4299− The above copyright notice and this permission notice shall be
4300− included in all copies or substantial portions of the Software.
4301−
4302− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
4303− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
4304− OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
4305− NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
4306− HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
4307− WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4308− FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4309− OTHER DEALINGS IN THE SOFTWARE.
4310−
4311−system-filepath LICENSE file:
4312−
4313− Copyright (c) 2010 John Millikin
4314−
4315− Permission is hereby granted, free of charge, to any person
4316− obtaining a copy of this software and associated documentation
4317− files (the "Software"), to deal in the Software without
4318− restriction, including without limitation the rights to use,
4319− copy, modify, merge, publish, distribute, sublicense, and/or sell
4320− copies of the Software, and to permit persons to whom the
4321− Software is furnished to do so, subject to the following
4322− conditions:
4323−
4324− The above copyright notice and this permission notice shall be
4325− included in all copies or substantial portions of the Software.
4326−
4327− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
4328− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
4329− OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
4330− NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
4331− HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
4332− WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4333− FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4334− OTHER DEALINGS IN THE SOFTWARE.
4335−
4336−tagged LICENSE file:
4337−
4338− Copyright (c) 2009-2015 Edward Kmett
4339− All rights reserved.
4340−
4341− Redistribution and use in source and binary forms, with or without
4342− modification, are permitted provided that the following conditions are
4343− met:
4344−
4345− * Redistributions of source code must retain the above copyright
4346− notice, this list of conditions and the following disclaimer.
4347−
4348− * Redistributions in binary form must reproduce the above
4349− copyright notice, this list of conditions and the following
4350− disclaimer in the documentation and/or other materials provided
4351− with the distribution.
4352−
4353− * Neither the name of Edward Kmett nor the names of other
4354− contributors may be used to endorse or promote products derived
4355− from this software without specific prior written permission.
4356−
4357− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4358− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4359− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4360− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4361− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4362− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4363− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4364− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4365− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4366− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4367− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4368−
4369−template-haskell LICENSE file:
4370−
4371−
4372− The Glasgow Haskell Compiler License
4373−
4374− Copyright 2002-2007, The University Court of the University of Glasgow.
4375− All rights reserved.
4376−
4377− Redistribution and use in source and binary forms, with or without
4378− modification, are permitted provided that the following conditions are met:
4379−
4380− - Redistributions of source code must retain the above copyright notice,
4381− this list of conditions and the following disclaimer.
4382−
4383− - Redistributions in binary form must reproduce the above copyright notice,
4384− this list of conditions and the following disclaimer in the documentation
4385− and/or other materials provided with the distribution.
4386−
4387− - Neither name of the University nor the names of its contributors may be
4388− used to endorse or promote products derived from this software without
4389− specific prior written permission.
4390−
4391− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
4392− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
4393− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
4394− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
4395− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
4396− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4397− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4398− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4399− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4400− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4401− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
4402− DAMAGE.
4403−
4404−
4405−temporary LICENSE file:
4406−
4407− Copyright (c) 2008, Maximilian Bolingbroke
4408− All rights reserved.
4409−
4410− Redistribution and use in source and binary forms, with or without modification, are permitted
4411− provided that the following conditions are met:
4412−
4413− * Redistributions of source code must retain the above copyright notice, this list of
4414− conditions and the following disclaimer.
4415− * Redistributions in binary form must reproduce the above copyright notice, this list of
4416− conditions and the following disclaimer in the documentation and/or other materials
4417− provided with the distribution.
4418− * Neither the name of Maximilian Bolingbroke nor the names of other contributors may be used to
4419− endorse or promote products derived from this software without specific prior written permission.
4420−
4421− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
4422− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
4423− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
4424− CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4425− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4426− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
4427− IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
4428− OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4429−
4430−terminfo LICENSE file:
4431−
4432− Copyright 2007, Judah Jacobson.
4433− All Rights Reserved.
4434−
4435− Redistribution and use in source and binary forms, with or without
4436− modification, are permitted provided that the following conditions are met:
4437−
4438− - Redistribution of source code must retain the above copyright notice,
4439− this list of conditions and the following disclamer.
4440−
4441− - Redistribution in binary form must reproduce the above copyright notice,
4442− this list of conditions and the following disclamer in the documentation
4443− and/or other materials provided with the distribution.
4444−
4445− THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY
4446− EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4447− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4448− DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE CONTRIBUTORS BE LIABLE
4449− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4450− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4451− SERVICES; LOSS OF USE, DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4452− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
4453− OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
4454− USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4455−
4456−text LICENSE file:
4457−
4458− Copyright (c) 2008-2009, Tom Harper
4459− All rights reserved.
4460−
4461− Redistribution and use in source and binary forms, with or without
4462− modification, are permitted provided that the following conditions
4463− are met:
4464−
4465− * Redistributions of source code must retain the above copyright
4466− notice, this list of conditions and the following disclaimer.
4467−
4468− * Redistributions in binary form must reproduce the above
4469− copyright notice, this list of conditions and the following
4470− disclaimer in the documentation and/or other materials provided
4471− with the distribution.
4472−
4473− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4474− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4475− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4476− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4477− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4478− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4479− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4480− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4481− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4482− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4483− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4484−
4485−time LICENSE file:
4486−
4487− TimeLib is Copyright (c) Ashley Yakeley, 2004-2014. All rights reserved.
4488− Certain sections are Copyright 2004, The University Court of the University of Glasgow. All rights reserved.
4489−
4490− Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4491−
4492− - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
4493−
4494− - 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.
4495−
4496− 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.
4497−
4498−tls LICENSE file:
4499−
4500− Copyright (c) 2010-2015 Vincent Hanquez <vincent@snarc.org>
4501−
4502− All rights reserved.
4503−
4504− Redistribution and use in source and binary forms, with or without
4505− modification, are permitted provided that the following conditions
4506− are met:
4507− 1. Redistributions of source code must retain the above copyright
4508− notice, this list of conditions and the following disclaimer.
4509− 2. Redistributions in binary form must reproduce the above copyright
4510− notice, this list of conditions and the following disclaimer in the
4511− documentation and/or other materials provided with the distribution.
4512− 3. Neither the name of the author nor the names of his contributors
4513− may be used to endorse or promote products derived from this software
4514− without specific prior written permission.
4515−
4516− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
4517− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4518− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4519− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
4520− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4521− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4522− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4523− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4524− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4525− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4526− SUCH DAMAGE.
4527−
4528−transformers LICENSE file:
4529−
4530− The Glasgow Haskell Compiler License
4531−
4532− Copyright 2004, The University Court of the University of Glasgow.
4533− All rights reserved.
4534−
4535− Redistribution and use in source and binary forms, with or without
4536− modification, are permitted provided that the following conditions are met:
4537−
4538− - Redistributions of source code must retain the above copyright notice,
4539− this list of conditions and the following disclaimer.
4540−
4541− - Redistributions in binary form must reproduce the above copyright notice,
4542− this list of conditions and the following disclaimer in the documentation
4543− and/or other materials provided with the distribution.
4544−
4545− - Neither name of the University nor the names of its contributors may be
4546− used to endorse or promote products derived from this software without
4547− specific prior written permission.
4548−
4549− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
4550− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
4551− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
4552− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
4553− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
4554− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4555− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4556− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4557− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4558− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4559− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
4560− DAMAGE.
4561−
4562−transformers-base LICENSE file:
4563−
4564− Copyright (c) 2011, Mikhail Vorozhtsov, Bas van Dijk
4565− All rights reserved.
4566−
4567− Redistribution and use in source and binary forms, with or without
4568− modification, are permitted provided that the following conditions are met:
4569−
4570− - Redistributions of source code must retain the above copyright notice,
4571− this list of conditions and the following disclaimer.
4572− - Redistributions in binary form must reproduce the above copyright
4573− notice, this list of conditions and the following disclaimer in the
4574− documentation and/or other materials provided with the distribution.
4575− - Neither the names of the copyright owners nor the names of the
4576− contributors may be used to endorse or promote products derived
4577− from this software without specific prior written permission.
4578−
4579− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4580− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4581− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4582− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4583− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4584− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4585− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4586− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4587− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4588− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4589− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4590−
4591−
4592−transformers-compat LICENSE file:
4593−
4594− Copyright 2012 Edward Kmett
4595−
4596− All rights reserved.
4597−
4598− Redistribution and use in source and binary forms, with or without
4599− modification, are permitted provided that the following conditions
4600− are met:
4601−
4602− 1. Redistributions of source code must retain the above copyright
4603− notice, this list of conditions and the following disclaimer.
4604−
4605− 2. Redistributions in binary form must reproduce the above copyright
4606− notice, this list of conditions and the following disclaimer in the
4607− documentation and/or other materials provided with the distribution.
4608−
4609− 3. Neither the name of the author nor the names of his contributors
4610− may be used to endorse or promote products derived from this software
4611− without specific prior written permission.
4612−
4613− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
4614− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4615− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4616− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
4617− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4618− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4619− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4620− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
4621− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
4622− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4623− POSSIBILITY OF SUCH DAMAGE.
4624−
4625−turtle LICENSE file:
4626−
4627− Copyright (c) 2015 Gabriel Gonzalez
4628− All rights reserved.
4629−
4630− Redistribution and use in source and binary forms, with or without modification,
4631− are permitted provided that the following conditions are met:
4632− * Redistributions of source code must retain the above copyright notice,
4633− this list of conditions and the following disclaimer.
4634− * Redistributions in binary form must reproduce the above copyright notice,
4635− this list of conditions and the following disclaimer in the documentation
4636− and/or other materials provided with the distribution.
4637− * Neither the name of Gabriel Gonzalez nor the names of other contributors
4638− may be used to endorse or promote products derived from this software
4639− without specific prior written permission.
4640−
4641− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
4642− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4643− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4644− DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
4645− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4646− (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4647− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
4648− ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4649− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
4650− SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4651−
4652−unix LICENSE file:
4653−
4654− The Glasgow Haskell Compiler License
4655−
4656− Copyright 2004, The University Court of the University of Glasgow.
4657− All rights reserved.
4658−
4659− Redistribution and use in source and binary forms, with or without
4660− modification, are permitted provided that the following conditions are met:
4661−
4662− - Redistributions of source code must retain the above copyright notice,
4663− this list of conditions and the following disclaimer.
4664−
4665− - Redistributions in binary form must reproduce the above copyright notice,
4666− this list of conditions and the following disclaimer in the documentation
4667− and/or other materials provided with the distribution.
4668−
4669− - Neither name of the University nor the names of its contributors may be
4670− used to endorse or promote products derived from this software without
4671− specific prior written permission.
4672−
4673− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
4674− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
4675− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
4676− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
4677− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
4678− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4679− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4680− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4681− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4682− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4683− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
4684− DAMAGE.
4685−
4686−unix-compat LICENSE file:
4687−
4688− Copyright (c) 2007-2008, Björn Bringert
4689− Copyright (c) 2007-2009, Duncan Coutts
4690− Copyright (c) 2010-2011, Jacob Stanley
4691− Copyright (c) 2011, Bryan O'Sullivan
4692− All rights reserved.
4693−
4694− Redistribution and use in source and binary forms, with or without
4695− modification, are permitted provided that the following conditions are met:
4696−
4697− - Redistributions of source code must retain the above copyright notice,
4698− this list of conditions and the following disclaimer.
4699− - Redistributions in binary form must reproduce the above copyright
4700− notice, this list of conditions and the following disclaimer in the
4701− documentation and/or other materials provided with the distribution.
4702− - Neither the names of the copyright owners nor the names of the
4703− contributors may be used to endorse or promote products derived
4704− from this software without specific prior written permission.
4705−
4706− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4707− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4708− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4709− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4710− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4711− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4712− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4713− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4714− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4715− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4716− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4717−
4718−unix-time LICENSE file:
4719−
4720− Copyright (c) 2009, IIJ Innovation Institute Inc.
4721− All rights reserved.
4722−
4723− Redistribution and use in source and binary forms, with or without
4724− modification, are permitted provided that the following conditions
4725− are met:
4726−
4727− * Redistributions of source code must retain the above copyright
4728− notice, this list of conditions and the following disclaimer.
4729− * Redistributions in binary form must reproduce the above copyright
4730− notice, this list of conditions and the following disclaimer in
4731− the documentation and/or other materials provided with the
4732− distribution.
4733− * Neither the name of the copyright holders nor the names of its
4734− contributors may be used to endorse or promote products derived
4735− from this software without specific prior written permission.
4736−
4737− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4738− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4739− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
4740− FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
4741− COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
4742− INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
4743− BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4744− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4745− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4746− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
4747− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4748− POSSIBILITY OF SUCH DAMAGE.
4749−
4750−unordered-containers LICENSE file:
4751−
4752− Copyright (c) 2010, Johan Tibell
4753−
4754− All rights reserved.
4755−
4756− Redistribution and use in source and binary forms, with or without
4757− modification, are permitted provided that the following conditions are met:
4758−
4759− * Redistributions of source code must retain the above copyright
4760− notice, this list of conditions and the following disclaimer.
4761−
4762− * Redistributions in binary form must reproduce the above
4763− copyright notice, this list of conditions and the following
4764− disclaimer in the documentation and/or other materials provided
4765− with the distribution.
4766−
4767− * Neither the name of Johan Tibell nor the names of other
4768− contributors may be used to endorse or promote products derived
4769− from this software without specific prior written permission.
4770−
4771− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4772− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4773− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4774− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4775− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4776− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4777− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4778− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4779− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4780− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4781− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4782−
4783−utf8-string LICENSE file:
4784−
4785− * Copyright (c) 2007, Galois Inc.
4786− * All rights reserved.
4787− *
4788− * Redistribution and use in source and binary forms, with or without
4789− * modification, are permitted provided that the following conditions are met:
4790− * * Redistributions of source code must retain the above copyright
4791− * notice, this list of conditions and the following disclaimer.
4792− * * Redistributions in binary form must reproduce the above copyright
4793− * notice, this list of conditions and the following disclaimer in the
4794− * documentation and/or other materials provided with the distribution.
4795− * * Neither the name of Galois Inc. nor the
4796− * names of its contributors may be used to endorse or promote products
4797− * derived from this software without specific prior written permission.
4798− *
4799− * THIS SOFTWARE IS PROVIDED BY Galois Inc. ``AS IS'' AND ANY
4800− * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4801− * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4802− * DISCLAIMED. IN NO EVENT SHALL Galois Inc. BE LIABLE FOR ANY
4803− * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4804− * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4805− * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
4806− * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4807− * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
4808− * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4809−
4810−vault LICENSE file:
4811−
4812− Copyright (c)2011, Heinrich Apfelmus
4813−
4814− All rights reserved.
4815−
4816− Redistribution and use in source and binary forms, with or without
4817− modification, are permitted provided that the following conditions are met:
4818−
4819− * Redistributions of source code must retain the above copyright
4820− notice, this list of conditions and the following disclaimer.
4821−
4822− * Redistributions in binary form must reproduce the above
4823− copyright notice, this list of conditions and the following
4824− disclaimer in the documentation and/or other materials provided
4825− with the distribution.
4826−
4827− * Neither the name of Heinrich Apfelmus nor the names of other
4828− contributors may be used to endorse or promote products derived
4829− from this software without specific prior written permission.
4830−
4831− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4832− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4833− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4834− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4835− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4836− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4837− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4838− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4839− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4840− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4841− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4842−
4843−vector LICENSE file:
4844−
4845− Copyright (c) 2008-2012, Roman Leshchinskiy
4846− All rights reserved.
4847−
4848− Redistribution and use in source and binary forms, with or without
4849− modification, are permitted provided that the following conditions are met:
4850−
4851− - Redistributions of source code must retain the above copyright notice,
4852− this list of conditions and the following disclaimer.
4853−
4854− - Redistributions in binary form must reproduce the above copyright notice,
4855− this list of conditions and the following disclaimer in the documentation
4856− and/or other materials provided with the distribution.
4857−
4858− - Neither name of the University nor the names of its contributors may be
4859− used to endorse or promote products derived from this software without
4860− specific prior written permission.
4861−
4862− THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
4863− GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
4864− INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
4865− FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
4866− UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
4867− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4868− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4869− SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4870− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4871− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4872− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
4873− DAMAGE.
4874−
4875−
4876−void LICENSE file:
4877−
4878− Copyright 2015 Edward Kmett
4879−
4880− All rights reserved.
4881−
4882− Redistribution and use in source and binary forms, with or without
4883− modification, are permitted provided that the following conditions
4884− are met:
4885−
4886− 1. Redistributions of source code must retain the above copyright
4887− notice, this list of conditions and the following disclaimer.
4888−
4889− 2. Redistributions in binary form must reproduce the above copyright
4890− notice, this list of conditions and the following disclaimer in the
4891− documentation and/or other materials provided with the distribution.
4892−
4893− 3. Neither the name of the author nor the names of his contributors
4894− may be used to endorse or promote products derived from this software
4895− without specific prior written permission.
4896−
4897− THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
4898− IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4899− WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4900− DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
4901− ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4902− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4903− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4904− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
4905− STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
4906− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4907− POSSIBILITY OF SUCH DAMAGE.
4908−
4909−wai LICENSE file:
4910−
4911− Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
4912−
4913− Permission is hereby granted, free of charge, to any person obtaining
4914− a copy of this software and associated documentation files (the
4915− "Software"), to deal in the Software without restriction, including
4916− without limitation the rights to use, copy, modify, merge, publish,
4917− distribute, sublicense, and/or sell copies of the Software, and to
4918− permit persons to whom the Software is furnished to do so, subject to
4919− the following conditions:
4920−
4921− The above copyright notice and this permission notice shall be
4922− included in all copies or substantial portions of the Software.
4923−
4924− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
4925− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
4926− MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
4927− NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
4928− LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
4929− OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
4930− WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4931−
4932−wai-app-static LICENSE file:
4933−
4934− Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
4935−
4936− Permission is hereby granted, free of charge, to any person obtaining
4937− a copy of this software and associated documentation files (the
4938− "Software"), to deal in the Software without restriction, including
4939− without limitation the rights to use, copy, modify, merge, publish,
4940− distribute, sublicense, and/or sell copies of the Software, and to
4941− permit persons to whom the Software is furnished to do so, subject to
4942− the following conditions:
4943−
4944− The above copyright notice and this permission notice shall be
4945− included in all copies or substantial portions of the Software.
4946−
4947− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
4948− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
4949− MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
4950− NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
4951− LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
4952− OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
4953− WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4954−
4955−wai-extra LICENSE file:
4956−
4957− Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
4958−
4959− Permission is hereby granted, free of charge, to any person obtaining
4960− a copy of this software and associated documentation files (the
4961− "Software"), to deal in the Software without restriction, including
4962− without limitation the rights to use, copy, modify, merge, publish,
4963− distribute, sublicense, and/or sell copies of the Software, and to
4964− permit persons to whom the Software is furnished to do so, subject to
4965− the following conditions:
4966−
4967− The above copyright notice and this permission notice shall be
4968− included in all copies or substantial portions of the Software.
4969−
4970− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
4971− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
4972− MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
4973− NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
4974− LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
4975− OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
4976− WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4977−
4978−wai-logger LICENSE file:
4979−
4980− Copyright (c) 2009, IIJ Innovation Institute Inc.
4981− All rights reserved.
3+All rights reserved.
49824
4983− Redistribution and use in source and binary forms, with or without
4984− modification, are permitted provided that the following conditions
4985− are met:
5+Redistribution and use in source and binary forms, with or without
6+modification, are permitted provided that the following conditions are met:
49867
49878 * Redistributions of source code must retain the above copyright
49889 notice, this list of conditions and the following disclaimer.
4989− * Redistributions in binary form must reproduce the above copyright
4990− notice, this list of conditions and the following disclaimer in
4991− the documentation and/or other materials provided with the
4992− distribution.
4993− * Neither the name of the copyright holders nor the names of its
4994− contributors may be used to endorse or promote products derived
4995− from this software without specific prior written permission.
4996−
4997− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4998− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4999− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
5000− FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
5001− COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
5002− INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
5003− BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
5004− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5005− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5006− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
5007− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
5008− POSSIBILITY OF SUCH DAMAGE.
5009−
5010−wai-websockets LICENSE file:
5011−
5012− Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
5013−
5014− Permission is hereby granted, free of charge, to any person obtaining
5015− a copy of this software and associated documentation files (the
5016− "Software"), to deal in the Software without restriction, including
5017− without limitation the rights to use, copy, modify, merge, publish,
5018− distribute, sublicense, and/or sell copies of the Software, and to
5019− permit persons to whom the Software is furnished to do so, subject to
5020− the following conditions:
5021−
5022− The above copyright notice and this permission notice shall be
5023− included in all copies or substantial portions of the Software.
5024−
5025− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
5026− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
5027− MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
5028− NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
5029− LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
5030− OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
5031− WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5032−
5033−warp LICENSE file:
5034−
5035− Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
5036−
5037− Permission is hereby granted, free of charge, to any person obtaining
5038− a copy of this software and associated documentation files (the
5039− "Software"), to deal in the Software without restriction, including
5040− without limitation the rights to use, copy, modify, merge, publish,
5041− distribute, sublicense, and/or sell copies of the Software, and to
5042− permit persons to whom the Software is furnished to do so, subject to
5043− the following conditions:
5044−
5045− The above copyright notice and this permission notice shall be
5046− included in all copies or substantial portions of the Software.
5047−
5048− THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
5049− EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
5050− MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
5051− NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
5052− LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
5053− OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
5054− WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5055−
5056−websockets LICENSE file:
5057−
5058− Copyright Jasper Van der Jeugt, 2011
5059−
5060− All rights reserved.
5061−
5062− Redistribution and use in source and binary forms, with or without
5063− modification, are permitted provided that the following conditions are met:
5064−
5065− * Redistributions of source code must retain the above copyright
5066− notice, this list of conditions and the following disclaimer.
5067−
5068− * Redistributions in binary form must reproduce the above
5069− copyright notice, this list of conditions and the following
5070− disclaimer in the documentation and/or other materials provided
5071− with the distribution.
507210
5073− * Neither the name of Siniša Biđin nor the names of other
5074− contributors may be used to endorse or promote products derived
5075− from this software without specific prior written permission.
11+ * Redistributions in binary form must reproduce the above
12+ copyright notice, this list of conditions and the following
13+ disclaimer in the documentation and/or other materials provided
14+ with the distribution.
507615
5077− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5078− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5079− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
5080− A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
5081− OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
5082− SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
5083− LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
5084− DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
5085− THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5086− (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5087− OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5088−
5089−word8 LICENSE file:
5090−
5091− Copyright (c) 2012, IIJ Innovation Institute Inc.
5092− All rights reserved.
5093−
5094− Redistribution and use in source and binary forms, with or without
5095− modification, are permitted provided that the following conditions
5096− are met:
5097−
5098− * Redistributions of source code must retain the above copyright
5099− notice, this list of conditions and the following disclaimer.
5100− * Redistributions in binary form must reproduce the above copyright
5101− notice, this list of conditions and the following disclaimer in
5102− the documentation and/or other materials provided with the
5103− distribution.
5104− * Neither the name of the copyright holders nor the names of its
16+ * Neither the name of Author name here nor the names of other
510517 contributors may be used to endorse or promote products derived
510618 from this software without specific prior written permission.
510719
5108− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5109− "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5110− LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
5111− FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
5112− COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
5113− INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
5114− BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
5115− LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5116− CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5117− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
5118− ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
5119− POSSIBILITY OF SUCH DAMAGE.
5120−
5121−x509 LICENSE file:
5122−
5123− Copyright (c) 2010-2013 Vincent Hanquez <vincent@snarc.org>
5124−
5125− All rights reserved.
5126−
5127− Redistribution and use in source and binary forms, with or without
5128− modification, are permitted provided that the following conditions
5129− are met:
5130− 1. Redistributions of source code must retain the above copyright
5131− notice, this list of conditions and the following disclaimer.
5132− 2. Redistributions in binary form must reproduce the above copyright
5133− notice, this list of conditions and the following disclaimer in the
5134− documentation and/or other materials provided with the distribution.
5135− 3. Neither the name of the author nor the names of his contributors
5136− may be used to endorse or promote products derived from this software
5137− without specific prior written permission.
5138−
5139− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
5140− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5141− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5142− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
5143− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5144− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5145− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5146− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5147− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5148− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5149− SUCH DAMAGE.
5150−
5151−x509-store LICENSE file:
5152−
5153− Copyright (c) 2010-2013 Vincent Hanquez <vincent@snarc.org>
5154−
5155− All rights reserved.
5156−
5157− Redistribution and use in source and binary forms, with or without
5158− modification, are permitted provided that the following conditions
5159− are met:
5160− 1. Redistributions of source code must retain the above copyright
5161− notice, this list of conditions and the following disclaimer.
5162− 2. Redistributions in binary form must reproduce the above copyright
5163− notice, this list of conditions and the following disclaimer in the
5164− documentation and/or other materials provided with the distribution.
5165− 3. Neither the name of the author nor the names of his contributors
5166− may be used to endorse or promote products derived from this software
5167− without specific prior written permission.
5168−
5169− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
5170− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5171− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5172− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
5173− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5174− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5175− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5176− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5177− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5178− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5179− SUCH DAMAGE.
5180−
5181−x509-system LICENSE file:
5182−
5183− Copyright (c) 2010-2013 Vincent Hanquez <vincent@snarc.org>
5184−
5185− All rights reserved.
5186−
5187− Redistribution and use in source and binary forms, with or without
5188− modification, are permitted provided that the following conditions
5189− are met:
5190− 1. Redistributions of source code must retain the above copyright
5191− notice, this list of conditions and the following disclaimer.
5192− 2. Redistributions in binary form must reproduce the above copyright
5193− notice, this list of conditions and the following disclaimer in the
5194− documentation and/or other materials provided with the distribution.
5195− 3. Neither the name of the author nor the names of his contributors
5196− may be used to endorse or promote products derived from this software
5197− without specific prior written permission.
5198−
5199− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
5200− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5201− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5202− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
5203− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5204− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5205− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5206− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5207− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5208− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5209− SUCH DAMAGE.
5210−
5211−x509-validation LICENSE file:
5212−
5213− Copyright (c) 2010-2013 Vincent Hanquez <vincent@snarc.org>
5214−
5215− All rights reserved.
5216−
5217− Redistribution and use in source and binary forms, with or without
5218− modification, are permitted provided that the following conditions
5219− are met:
5220− 1. Redistributions of source code must retain the above copyright
5221− notice, this list of conditions and the following disclaimer.
5222− 2. Redistributions in binary form must reproduce the above copyright
5223− notice, this list of conditions and the following disclaimer in the
5224− documentation and/or other materials provided with the distribution.
5225− 3. Neither the name of the author nor the names of his contributors
5226− may be used to endorse or promote products derived from this software
5227− without specific prior written permission.
5228−
5229− THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
5230− ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5231− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5232− ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
5233− FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5234− DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5235− OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5236− HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5237− LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5238− OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5239− SUCH DAMAGE.
5240−
5241−zlib LICENSE file:
5242−
5243− Copyright (c) 2006-2016, Duncan Coutts
5244− All rights reserved.
5245−
5246− Redistribution and use in source and binary forms, with or without
5247− modification, are permitted provided that the following conditions are met:
5248−
5249− 1. Redistributions of source code must retain the above copyright notice,
5250− this list of conditions and the following disclaimer.
5251− 2. Redistributions in binary form must reproduce the above copyright
5252− notice, this list of conditions and the following disclaimer in the
5253− documentation and/or other materials provided with the distribution.
5254− 3. This clause is intentionally left blank.
5255−
5256− THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
5257− AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5258− IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5259− ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
5260− LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
5261− CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
5262− SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
5263− INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
5264− CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
5265− ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
5266− POSSIBILITY OF SUCH DAMAGE.
5267−
20+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
README-go.mdnew file+48
@@ -0,0 +1,48 @@
1+
2+### psgo
3+
4+#### Performance
5+
6+* No runtime system beyond some support types and functions
7+* Uses PureScript's normal tail call optimization techniques for generated Go code
8+
9+#### Differences from PureScript:
10+
11+* Foreign imports/exports are Go instead of JavaScript – see [standard library foreign implementations](https://github.com/andyarvanitis/purescript-native-go-ffi)
12+* No Go-specific REPL
13+
14+#### Other notes:
15+
16+* The provided `Any` type is just an alias for `interface{}`
17+* PureScript types are represented in Go with:
18+
19+ | PureScript | Go |
20+ |------------|----|
21+ |`Array` | `[]Any`|
22+ |`String` | `string`|
23+ |`Number` | `float64`|
24+ |`Int` | `int`|
25+ |`Char` | `string` (single UTF-8 entity)|
26+ |`Boolean` | `bool`|
27+ |Records | `map[string]Any`|
28+
29+#### Future ideas:
30+
31+* Nice facilities (modules) for concurrency/parallelism, using goroutines
32+
33+
34+#### Getting Started
35+This assumes you are running macOS (OS X) or a Unix-like system (Linux, *BSD, etc.).
36+
37+1. Choose a working directory wherever you like. Then create a `src` subdirectory under it, which will be where you will place your own PureScript source files.
38+
39+1. Initialize your project with `spago init`, and install any dependencies with `spago install` (please see their instructions if you haven't used it before).
40+
41+1. Add the `backend = "psgo"` option to your `spago.dhall` file. That way `spago` will use the psgo backend when compiling.
42+
43+1. You should now be ready to build a PureScript program:
44+ * As stated above, place your source file(s) in the working directory's `src` subdirectory and execute `spago build`.
45+
46+ * This will generate the Go source tree for your program and then build an executable binary. The resulting executable will be in your working directory and will be named `Main`. The generated source files will be under `output/`.
47+
48+---
README.md+32−20
@@ -1,29 +1,41 @@
1−[![PureScript](logo.png)](http://purescript.org)
1+[![PureScript](https://raw.githubusercontent.com/purescript/purescript/master/logo.png)](http://purescript.org)
22
3−A small strongly typed programming language with expressive types that compiles to Javascript, written in and inspired by Haskell.
3+This is a platform-native compiler backend for [PureScript](https://github.com/purescript/purescript). It attempts to generate "sane", debuggable, and portable [C++11](https://isocpp.org/wiki/faq/cpp11) (or later) or [Go](https://golang.org/) code as an intermediate language, which is then compiled to a native executable binary. This also enables easy interoperability with existing C/C++ or Go frameworks and libraries on a number of platforms.
44
5−[![Hackage](https://img.shields.io/hackage/v/purescript.svg)](http://hackage.haskell.org/package/purescript) [![Build Status](https://api.travis-ci.org/purescript/purescript.svg?branch=master)](http://travis-ci.org/purescript/purescript)
5+There are two utilities in the purescript-native "suite": `pscpp` and `psgo`. The source code in this branch is for `psgo`, the purescript-to-Go transpiler. For the source code of the `pscpp` purescript-to-C++ transpiler, please see the [cpp branch](https://github.com/andyarvanitis/purescript-native/tree/cpp).
66
7−[![Stackage LTS 2](http://stackage.org/package/purescript/badge/lts-2)](http://stackage.org/lts-2/package/purescript)
8−[![Stackage LTS 3](http://stackage.org/package/purescript/badge/lts-3)](http://stackage.org/lts-3/package/purescript)
9−[![Stackage Nightly](http://stackage.org/package/purescript/badge/nightly)](http://stackage.org/nightly/package/purescript)
7+#### Platforms
8+* Although purescript-native should work on any platform supporting PureScript and modern C++ or Go, the generated code and resulting binary executables have been tested on:
9+ * macOS Mojave 10.14.5 – full test suite
10+ * For C++, Xcode 10.2.1's `clang` was used
11+ * For Go, `go` version 1.12.7 was used
12+ * Windows 10 x64 – full test suite
13+ * C++: Visual Studio 2017 and `clang`
14+ * Go: `go` version 1.12.7
15+ * Linux Debian 9.5 amd64 – full test suite (C++)
16+ * Default versions of `clang` and `gcc`
17+ * Linux Debian 10 amd64 – full test suite (Go)
18+ * Default version of `go`
19+ * Raspberry Pi 3 B+ Raspbian official build (ARM), default versions of `clang` and `gcc`
1020
11−## Language info
1221
13−- [PureScript home](http://purescript.org)
14−- [Releases & changelog](https://github.com/purescript/purescript/releases)
15−- [Contributing to PureScript](https://github.com/purescript/purescript/blob/master/CONTRIBUTING.md)
22+#### Requirements for building `pscpp` and `psgo`
1623
17−## Resources
24+* [Haskell Stack](https://docs.haskellstack.org/en/stable/README/) (if you're running macOS 10.14.5+, you can use pre-built binaries from [here](https://github.com/andyarvanitis/purescript-native/releases/))
1825
19−- [PureScript book](https://leanpub.com/purescript/read)
20−- [Documentation](https://github.com/purescript/documentation)
21−- [Try PureScript](http://try.purescript.org)
22−- [Pursuit Package Index](http://pursuit.purescript.org/)
26+#### Requirements for using PureScript + purescript-native
2327
24−## Help!
28+* A recent version (0.13+) of [purescript](https://github.com/purescript/purescript/releases).
2529
26−- [#purescript IRC @ FreeNode](http://webchat.freenode.net/?channels=purescript)
27−- [PureScript on StackOverflow](http://stackoverflow.com/questions/tagged/purescript)
28−- [Google Group](https://groups.google.com/forum/#!forum/purescript)
29−- [Gitter Channel](https://gitter.im/purescript/purescript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
30+* For `pscpp`, a C++11-capable toolchain, e.g. recent versions of clang, gcc, Microsoft Visual Studio
31+ * GNU Make + `psc-package` is the default supported build tool, but you should be able to use your favorite package manager, C++ build system, tools, debuggers, etc.
32+* For `psgo`, the [Go toolchain](https://golang.org) for your system
33+ * You can use your favorite PureScript package manager and build tools – but for simplicity, [`spago`](https://github.com/spacchetti/spago) is recommended.
34+
35+
36+#### For more information and a Getting Started guide, please see
37+* [`pscpp`](https://github.com/andyarvanitis/purescript-native/blob/cpp/README-cpp.md)
38+* [`psgo`](https://github.com/andyarvanitis/purescript-native/blob/golang/README-go.md)
39+
40+
41+---
Setup.hs−4
@@ -1,6 +1,2 @@
1−module Main where
2−
31import Distribution.Simple
4−
5−main :: IO ()
62main = defaultMain
app/Main.hsnew file+250
@@ -0,0 +1,250 @@
1+{-# LANGUAGE OverloadedStrings #-}
2+{-# LANGUAGE RankNTypes #-}
3+{-# LANGUAGE TemplateHaskell #-}
4+
5+module Main where
6+
7+import Control.Monad (when)
8+import qualified Control.Monad.Parallel as Par
9+import Data.Aeson
10+import Data.Aeson.Types
11+import Data.Char
12+import Data.FileEmbed (embedFile)
13+import Data.List (delete, intercalate, isPrefixOf, nub, partition, (\\))
14+import Data.Maybe
15+import Data.Monoid ((<>))
16+import Data.Version
17+import Control.Monad.Supply
18+import Control.Monad.Supply.Class
19+import Text.Printf
20+
21+import System.Environment
22+import System.Directory (createDirectoryIfMissing, doesDirectoryExist, doesFileExist, getCurrentDirectory, getModificationTime)
23+import System.FilePath ((</>), joinPath, splitDirectories, takeDirectory)
24+import System.FilePath.Find
25+import System.Process
26+
27+import Data.Text (Text)
28+import qualified Data.Text as T
29+import qualified Data.Text.Encoding as T
30+import qualified Data.Text.Lazy as L
31+import qualified Data.Text.Lazy.Encoding as L
32+import qualified Data.ByteString as B
33+
34+import Development.GitRev
35+
36+import Language.PureScript.AST.Literals
37+import Language.PureScript.CoreFn
38+import Language.PureScript.CoreFn.FromJSON
39+
40+import CodeGen.IL
41+import CodeGen.IL.Common
42+import CodeGen.IL.Printer
43+
44+import Tests
45+
46+data Command = Build | Run (Maybe String)
47+
48+parseJson :: Text -> Value
49+parseJson text
50+ | Just fileJson <- decode . L.encodeUtf8 $ L.fromStrict text = fileJson
51+ | otherwise = error "Bad json"
52+
53+jsonToModule :: Value -> Module Ann
54+jsonToModule value =
55+ case parse moduleFromJSON value of
56+ Success (_, r) -> r
57+ _ -> error "Failed parsing corefn. Psgo currently supports purescript <= 0.13.8"
58+
59+splitArgs :: [String] -> ([String], Maybe String, [String])
60+splitArgs args =
61+ let (opts, files) = partition (isPrefixOf "--") args
62+ opts' = (map . map) toLower opts
63+ (moduleName, files') =
64+ if null files
65+ then (Nothing, files)
66+ else
67+ if "--run" `elem` opts' && length (files) >= 1
68+ then do
69+ let file0 = head files
70+ files' = tail files
71+ case file0 of
72+ "Main.main" -> (Just "Main", files')
73+ "Test.Main.main" -> (Just "Test.Main", files')
74+ _ -> (Nothing, files)
75+ else (Nothing, files)
76+ in (opts, moduleName, files')
77+
78+main :: IO ()
79+main = do
80+ args <- getArgs
81+ -- let (opts, files) = partition (isPrefixOf "--") args
82+ let (opts, moduleName, files) = splitArgs args
83+ opts' = (map . map) toLower opts
84+ if "--tests" `elem` opts'
85+ then runTests
86+ else do
87+ if "--help" `elem` opts' || "--version" `elem` opts'
88+ then do
89+ when ("--help" `elem` opts') $ do
90+ putStrLn help
91+ when ("--version" `elem` opts') $ do
92+ let branch = $(gitBranch)
93+ details | branch == "golang" = "master, commit " ++ $(gitHash)
94+ | otherwise = branch
95+ putStrLn $ details ++ if $(gitDirty) then " (DIRTY)" else ""
96+ else do
97+ if null files
98+ then do
99+ currentDir <- getCurrentDirectory
100+ processFiles opts' [currentDir]
101+ else
102+ processFiles opts' files
103+ if "--run" `elem` opts
104+ then runBuildTool $ Run moduleName
105+ else when ("--no-build" `notElem` opts) $
106+ runBuildTool Build
107+ return ()
108+ where
109+ processFiles :: [String] -> [FilePath] -> IO ()
110+ processFiles opts [file] = do
111+ isDir <- doesDirectoryExist file
112+ if isDir then do
113+ files <- find always (fileName ==? corefn) file
114+ if null files
115+ then errorNoCorefnFiles
116+ else generateFiles opts files
117+ else generateFiles opts [file]
118+ processFiles opts files = do
119+ generateFiles opts files
120+ basePath :: [FilePath] -> FilePath
121+ basePath files =
122+ let filepath = takeDirectory (head files) in
123+ joinPath $ (init $ splitDirectories filepath)
124+ generateFiles :: [String] -> [FilePath] -> IO ()
125+ generateFiles opts files = do
126+ let baseOutpath = basePath files
127+ writeSupportFiles baseOutpath
128+ Par.mapM (generateCode opts baseOutpath) files
129+ return ()
130+ runBuildTool :: Command -> IO ()
131+ runBuildTool cmd = do
132+ project <- projectEnv
133+ case cmd of
134+ Build -> do
135+ callProcess "go" ["build", T.unpack project </> modPrefix' </> "Main"]
136+ Run moduleName -> do
137+ callProcess "go" ["run", T.unpack project </> modPrefix' </> fromMaybe "Main" moduleName]
138+ return ()
139+
140+generateCode :: [String] -> FilePath -> FilePath -> IO ()
141+generateCode opts baseOutpath jsonFile = do
142+ jsonModTime <- getModificationTime jsonFile
143+ let filepath = takeDirectory jsonFile
144+ dirparts = splitDirectories $ filepath
145+ mname = last dirparts
146+ basedir = joinPath $ init dirparts
147+ mname' = T.pack mname
148+ possibleFileName = basedir </> (T.unpack mname') </> implFileName mname'
149+ exists <- doesFileExist possibleFileName
150+ if exists
151+ then do
152+ modTime <- getModificationTime possibleFileName
153+ when (modTime < jsonModTime) $
154+ transpile opts baseOutpath jsonFile
155+ else transpile opts baseOutpath jsonFile
156+
157+transpile :: [String] -> FilePath -> FilePath -> IO ()
158+transpile opts baseOutpath jsonFile = do
159+ jsonText <- T.decodeUtf8 <$> B.readFile jsonFile
160+ project <- projectEnv
161+ let module' = jsonToModule $ parseJson jsonText
162+ ((_, foreigns, asts, implHeader, implFooter), _) <- runSupplyT 5 (moduleToIL module' project)
163+ let mn = moduleNameToIL' $ moduleName module'
164+ implementation = prettyPrintIL asts
165+ outpath = joinPath [baseOutpath, T.unpack mn]
166+ implPath = outpath </> implFileName mn
167+ createDirectoryIfMissing True outpath
168+ putStrLn implPath
169+ B.writeFile implPath $ T.encodeUtf8 (implHeader <> implementation <> implFooter)
170+
171+writeSupportFiles :: FilePath -> IO ()
172+writeSupportFiles baseOutpath = do
173+ currentDir <- getCurrentDirectory
174+ let outputdir = T.pack $ baseOutpath \\ currentDir
175+ ffiOutpath = currentDir </> subdir
176+ createDirectoryIfMissing True baseOutpath
177+ createDirectoryIfMissing True ffiOutpath
178+ writeModuleFile outputdir currentDir $(embedFile "support/go.mod.working")
179+ writeModuleFile outputdir baseOutpath $(embedFile "support/go.mod.output")
180+ writeModuleFile outputdir ffiOutpath $(embedFile "support/go.mod.ffi-loader")
181+ writeLoaderFile ffiOutpath $(embedFile "support/ffi-loader.go")
182+ where
183+ writeModuleFile :: Text -> FilePath -> B.ByteString -> IO ()
184+ writeModuleFile outputdir path modText = do
185+ let goModSource = path </> "go.mod"
186+ goModSourceExists <- doesFileExist goModSource
187+ when (not goModSourceExists) $ do
188+ project <- projectEnv
189+ let project' = T.unpack project
190+ outputdir' = tail $ T.unpack outputdir
191+ modText' = T.replace "$PROJECT" project $ T.decodeUtf8 modText
192+ replaceLoader = project' </> ffiLoader' <> "=." </> subdir
193+ replaceOutput = project' </> modPrefix' <> "=." </> outputdir'
194+ B.writeFile goModSource $ T.encodeUtf8 modText'
195+ callProcess "go" ["mod", "edit", "-replace", replaceLoader]
196+ callProcess "go" ["mod", "edit", "-replace", replaceOutput]
197+ callProcess "go" ["clean", "-modcache"]
198+ writeLoaderFile :: FilePath -> B.ByteString -> IO ()
199+ writeLoaderFile ffiOutpath loaderText = do
200+ let loaderSource = ffiOutpath </> "ffi_loader.go"
201+ loaderSourceExists <- doesFileExist loaderSource
202+ when (not loaderSourceExists) $ do
203+ B.writeFile loaderSource loaderText
204+
205+implFileName :: Text -> FilePath
206+implFileName mn = ((\c -> if c == '.' then '_' else c) <$> T.unpack mn) <> ".go"
207+
208+projectEnv :: IO Text
209+projectEnv = do
210+ T.pack . fromMaybe defaultProject <$> lookupEnv goproject
211+
212+help :: String
213+help = "Usage: psgo OPTIONS COREFN-FILES\n\
214+ \ PureScript to native (via go) compiler\n\n\
215+ \Available options:\n\
216+ \ --help Show this help text\n\n\
217+ \ --version Show the version number\n\n\
218+ \ --run Run the generated go code directly, without building an\n\
219+ \ executable\n\
220+ \ --no-build Generate go source files, but do not build an executable\n\
221+ \ --tests Run test cases (under construction)\n\n\
222+ \See also:\n\
223+ \ purs compile --help\n"
224+
225+corefn :: String
226+corefn = "corefn.json"
227+
228+goSrc :: String
229+goSrc = ".go"
230+
231+goproject :: String
232+goproject = "GOPROJECT"
233+
234+defaultProject :: String
235+defaultProject = "project.localhost"
236+
237+modPrefix' :: String
238+modPrefix' = T.unpack modPrefix
239+
240+ffiLoader' :: String
241+ffiLoader' = T.unpack ffiLoader
242+
243+subdir :: String
244+subdir = T.unpack modLabel
245+
246+errorNoCorefnFiles :: IO ()
247+errorNoCorefnFiles = do
248+ ioError . userError $ "no compiled purescript '" <> corefn <> "' files found –\n" <>
249+ " make sure to use the '--codegen corefn' option with your purs\n" <>
250+ " project build tool"
appveyor.ymldeleted−54
@@ -1,54 +0,0 @@
1−platform: x64
2−version: '{build}'
3−environment:
4− # Keep the path as short as possible, just in case.
5− STACK_ROOT: c:\s
6− STACK_VER: 1.2.0
7− RELEASE_USER: purescript
8− RELEASE_REPO: purescript
9−cache:
10−- c:\s -> appveyor/cache-buster.txt
11−install:
12−- git submodule update --init
13−- ps: Install-Product node 5
14−- npm install -g bower
15−
16−- ps: |
17− New-Item -ItemType Directory -Force -Path C:\tools
18− $env:Path += ";C:\tools"
19− $stackRelease = "stack-$env:STACK_VER-windows-x86_64"
20− $downloadUrl = "https://github.com/commercialhaskell/stack/releases/download/v$env:STACK_VER/$stackRelease.zip"
21− (New-Object Net.WebClient).DownloadFile($downloadUrl, 'c:\tools\stack.zip')
22− pushd c:\tools
23− 7z x c:\tools\stack.zip stack.exe
24− popd
25−
26−- stack --no-terminal --verbosity=error setup 1>stack-setup.log 2>&1 || type stack-setup.log
27−
28−build_script:
29−# Override the default build script.
30−- echo ""
31−test_script:
32−- stack -j1 --no-terminal test --pedantic
33−on_success:
34−- ps: |
35− function UploadFile
36− {
37− github-release upload --user $env:RELEASE_USER --repo $env:RELEASE_REPO --tag $env:APPVEYOR_REPO_TAG_NAME --file $args[0] --name $args[0]
38− }
39−
40− if ($env:APPVEYOR_REPO_TAG_NAME)
41− {
42− bash ./bundle/build.sh win64
43−
44− (New-Object Net.WebClient).DownloadFile('https://github.com/aktau/github-release/releases/download/v0.6.2/windows-amd64-github-release.zip', 'c:\tools\github-release.zip')
45− pushd c:\tools
46− 7z x github-release.zip bin/windows/amd64/github-release.exe
47− Copy-Item bin/windows/amd64/github-release.exe github-release.exe
48− popd
49−
50− pushd bundle
51− UploadFile win64.tar.gz
52− UploadFile win64.sha
53− popd
54− }
appveyor/cache-buster.txtdeleted−8
@@ -1,8 +0,0 @@
1−This file acts as a cache buster for the AppVeyor (Windows CI) build
2−cache. In order to invalidate the AppVeyor build cache, simply make a
3−change to the number at the end of this file and commit.
4−
5−See http://www.appveyor.com/docs/build-cache#cache-dependencies for more
6−information.
7−
8−Increment me to invalidate the cache: 0
bundle/.gitignoredeleted−4
@@ -1,4 +0,0 @@
1−build/
2−*.tar.gz
3−*.sha
4−*.md5
bundle/READMEdeleted−25
@@ -1,25 +0,0 @@
1− ____ ____ _ _
2−| _ \ _ _ _ __ ___/ ___| ___ _ __(_)_ __ | |_
3−| |_) | | | | '__/ _ \___ \ / __| '__| | '_ \| __|
4−| __/| |_| | | | __/___) | (__| | | | |_) | |_
5−|_| \__,_|_| \___|____/ \___|_| |_| .__/ \__|
6− |_|
7−
8−Installation Instructions
9−-------------------------
10−
11−This bundle contains the following executables:
12−
13−- psc The PureScript compiler
14−- psci The PureScript interactive REPL (requires NodeJS)
15−- psc-docs A Markdown documentation generator for PureScript code
16−- psc-bundle Bundles together CommonJS modules produced by `psc` into a
17− single JavaScript file; useful for running in the browser.
18−- psc-publish Generates documentation packages for uploading to Pursuit
19−- psc-ide-server Provides Editor Support in the form of type information and
20− autocompletion
21−- psc-ide-client Utility to query psc-ide-server
22−- psc-package Package manager for PureScript packages
23−
24−Copy these files anywhere on your PATH.
25−
bundle/build.shdeleted−65
@@ -1,65 +0,0 @@
1−## This script can be run on any supported OS to create a binary .tar.gz
2−## bundle.
3−## For Windows, msysgit contains all of the pieces needed to run this script.
4−set -e
5−
6−OS=$1
7−
8−if [ -z $OS ]
9−then
10− echo "Usage: build.sh osname"
11− exit 1
12−fi
13−
14−pushd $(stack path --project-root)
15−
16−LOCAL_INSTALL_ROOT=$(stack path --local-install-root)
17−
18−if [ "$OS" = "win64" ]
19−then
20− BIN_EXT=".exe"
21−else
22− BIN_EXT=""
23−fi
24−
25−# Make the staging directory
26−mkdir -p bundle/build/purescript
27−
28−# Strip the binaries, and copy them to the staging directory
29−for BIN in psc psci psc-docs psc-publish psc-bundle psc-ide-server psc-ide-client psc-package
30−do
31− FULL_BIN="$LOCAL_INSTALL_ROOT/bin/${BIN}${BIN_EXT}"
32− if [ "$OS" != "win64" ]
33− then
34− strip "$FULL_BIN"
35− fi
36− cp "$FULL_BIN" bundle/build/purescript
37−done
38−
39−# Copy extra files to the staging directory
40−cp bundle/README bundle/build/purescript/
41−cp LICENSE bundle/build/purescript/
42−cp INSTALL.md bundle/build/purescript/
43−
44−stack list-dependencies >bundle/build/purescript/dependencies.txt
45−
46−# Make the binary bundle
47−pushd bundle/build > /dev/null
48−tar -zcvf ../${OS}.tar.gz purescript
49−popd > /dev/null
50−
51−# Calculate the SHA hash
52−if [ "$OS" = "win64" ]
53−then
54− # msys/mingw does not include shasum. :(
55− SHASUM="openssl dgst -sha1"
56−else
57− SHASUM="shasum"
58−fi
59−
60−$SHASUM bundle/${OS}.tar.gz > bundle/${OS}.sha
61−
62−# Remove the staging directory
63−rm -rf build/
64−
65−popd > /dev/null
core-tests/.gitignoredeleted−3
@@ -1,3 +0,0 @@
1−core-docs.md
2−bower_components/
3−output/
core-tests/bower.jsondeleted−60
@@ -1,60 +0,0 @@
1−{
2− "name": "core-tests",
3− "homepage": "https://github.com/purescript/purescript",
4− "authors": [
5− "Phil Freeman <paf31@cantab.net>"
6− ],
7− "ignore": [
8− "**/.*",
9− "node_modules",
10− "bower_components",
11− "test",
12− "tests"
13− ],
14− "dependencies": {
15− "purescript-arrays": "#8c9ada5762",
16− "purescript-bifunctors": "#9e3b2864ce",
17− "purescript-console": "#db29da9aca",
18− "purescript-const": "#cf538a65d8",
19− "purescript-contravariant": "#9ae6d7c99c",
20− "purescript-control": "#97096c7e26",
21− "purescript-distributive": "#ba81c64ffd",
22− "purescript-eff": "#dbd6c4a415",
23− "purescript-either": "#54f4efd423",
24− "purescript-enums": "#9332412e52",
25− "purescript-exceptions": "#522a0cea50",
26− "purescript-exists": "#e828c8341e",
27− "purescript-foldable-traversable": "#df37787855",
28− "purescript-foreign": "#64890cbbdb",
29− "purescript-free": "#f8ab7c5f05",
30− "purescript-functions": "#e417541936",
31− "purescript-functor-coproducts": "#7654d9dea4",
32− "purescript-generics": "#d09cb16ca3",
33− "purescript-globals": "#113ee398be",
34− "purescript-graphs": "#0b7089afa2",
35− "purescript-identity": "#204ac5f46a",
36− "purescript-inject": "#3ae4880bad",
37− "purescript-integers": "#58d7605dd5",
38− "purescript-lazy": "#bf4b34d673",
39− "purescript-maps": "#d9e4c6599a",
40− "purescript-math": "#99797b6494",
41− "purescript-maybe": "#1b60a07038",
42− "purescript-monoid": "#a8c8bb9d73",
43− "purescript-parallel": "#c7296ab008",
44− "purescript-prelude": "#318ee857bd",
45− "purescript-profunctor": "#a649126cea",
46− "purescript-proxy": "#c494b11bd7",
47− "purescript-quickcheck": "#4a15c93f12",
48− "purescript-random": "#68314c21e2",
49− "purescript-refs": "#f47e1059a3",
50− "purescript-semirings": "#c40efda15f",
51− "purescript-sets": "#1eaabf177f",
52− "purescript-st": "#077d9a2d7e",
53− "purescript-strings": "#87dd5f1694",
54− "purescript-tailrec": "#3c11db00ba",
55− "purescript-transformers": "#2d0a471ce4",
56− "purescript-tuples": "#4fe689ef93",
57− "purescript-unfoldable": "#e2382f30d8",
58− "purescript-validation": "#f43ff0fbdd"
59− }
60−}
core-tests/test-everything.shdeleted−33
@@ -1,33 +0,0 @@
1−#!/usr/bin/env bash
2−
3−set -e
4−
5−force_recompile='false'
6−force_reinstall='false'
7−
8−while getopts 'ci' flag; do
9− case "${flag}" in
10− c) force_recompile='true' ;;
11− i) force_reinstall='true' ;;
12− *) error "Unexpected option ${flag}" ;;
13− esac
14−done
15−
16−if [ "$force_reinstall" = "true" ] && [ -d "bower_components" ]; then
17− echo "Reinstalling core packages..."
18− rm -r bower_components
19−fi
20−
21−# todo : fix this once core libraries reach 1.0
22−yes 1 | bower i
23−
24−if [ "$force_recompile" = "true" ] && [ -d "output" ]; then
25− echo "Recompiling..."
26− rm -r output
27−fi
28−
29−stack exec psc 'tests/**/*.purs' 'bower_components/purescript-*/src/**/*.purs'
30−
31−stack exec psc-docs 'bower_components/purescript-*/src/**/*.purs' > core-docs.md
32−
33−NODE_PATH=output node -e "require('Test.Main').main()"
core-tests/tests/GenericDeriving.pursdeleted−30
@@ -1,30 +0,0 @@
1−module Test.GenericDeriving where
2−
3−import Prelude
4−
5−import Control.Monad.Eff (Eff)
6−import Control.Monad.Eff.Console (CONSOLE, log, logShow)
7−import Data.Generic (class Generic, gShow, gEq)
8−import Partial.Unsafe (unsafePartial)
9−
10−data Empty
11−
12−derive instance genericEmpty :: Partial => Generic Empty
13−
14−data A a
15− = A Number String
16− | B Int
17− | C (Array (A a))
18− | D { "asgård" :: a }
19− | E Empty
20−
21−derive instance genericA :: (Partial, Generic b) => Generic (A b)
22−
23−newtype X b = X b
24−
25−derive instance genericX :: Generic (X String)
26−
27−main :: forall eff. Eff (console :: CONSOLE | eff) Unit
28−main = unsafePartial do
29− log $ gShow (D { "asgård": C [ A 1.0 "test", B 42, D { "asgård": true } ] })
30− logShow $ gEq (C [B 0]) (C [B 0] :: A Empty)
core-tests/tests/Main.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Test.Main where
2−
3−import Prelude
4−import Control.Monad.Eff (Eff)
5−import Control.Monad.Eff.Console (CONSOLE)
6−import Test.GenericDeriving as GenericDeriving
7−
8−main :: forall eff. Eff (console :: CONSOLE | eff) Unit
9−main = GenericDeriving.main
default.nixnew file+23
@@ -0,0 +1,23 @@
1+let
2+ haskellNix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {};
3+ nixpkgsSrc = haskellNix.sources.nixpkgs-1903; # has hsc2hs-0.68.4
4+
5+ hsc2hsOverlay = self: super: {
6+ buildPackages = super.buildPackages // {
7+ hsc2hs = super.haskellPackages.hsc2hs;
8+ };
9+ };
10+
11+ nixpkgsArgs = haskellNix.nixpkgsArgs // {
12+ overlays = haskellNix.nixpkgsArgs.overlays ++ [ hsc2hsOverlay ];
13+ };
14+in
15+{ pkgs ? import nixpkgsSrc nixpkgsArgs
16+}:
17+
18+pkgs.haskell-nix.stackProject {
19+ src = pkgs.haskell-nix.haskellLib.cleanGit {
20+ name = "purescript-native";
21+ src = ./.;
22+ };
23+}
examples/.gitignoredeleted−1
@@ -1 +0,0 @@
1−shelltest/tests
examples/docs/bower.jsondeleted−20
@@ -1,20 +0,0 @@
1−{
2− "name": "docs-test-package",
3− "version": "1.0.0",
4− "moduleType": [
5− "node"
6− ],
7− "repository": {
8− "type": "git",
9− "url": "git://github.com/not-real/not-a-real-repo.git"
10− },
11− "ignore": [
12− "**/.*",
13− "node_modules",
14− "bower_components",
15− "output"
16− ],
17− "dependencies": {
18− },
19− "license": "MIT"
20−}
examples/docs/bower_components/purescript-prelude/src/Prelude.pursdeleted−8
@@ -1,8 +0,0 @@
1−module Prelude where
2−
3−newtype Unit = Unit {}
4−
5−unit :: Unit
6−unit = Unit {}
7−
8−data Boolean2 = True | False
examples/docs/src/Clash.pursdeleted−4
@@ -1,4 +0,0 @@
1−module Clash (module Clash1) where
2−
3−import Clash1 as Clash1
4−import Clash2 as Clash2
examples/docs/src/Clash1.pursdeleted−3
@@ -1,3 +0,0 @@
1−module Clash1 (module Clash1a) where
2−
3−import Clash1a
examples/docs/src/Clash1a.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Clash1a where
2−
3−value :: Int
4−value = 0
5−
6−type Type = Int
7−
8−class TypeClass a where
9− typeClassMember :: a
examples/docs/src/Clash2.pursdeleted−3
@@ -1,3 +0,0 @@
1−module Clash2 (module Clash2a) where
2−
3−import Clash2a
examples/docs/src/Clash2a.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Clash2a where
2−
3−value :: String
4−value = "hello"
5−
6−type Type = String
7−
8−class TypeClass a b where
9− typeClassMember :: a -> b
examples/docs/src/ConstrainedArgument.pursdeleted−9
@@ -1,9 +0,0 @@
1−module ConstrainedArgument where
2−
3−class Foo t
4−
5−type WithoutArgs = forall a. (Partial => a) -> a
6−type WithArgs = forall a. (Foo a => a) -> a
7−type MultiWithoutArgs = forall a. ((Partial, Partial) => a) -> a
8−type MultiWithArgs = forall a b. ((Foo a, Foo b) => a) -> a
9−
examples/docs/src/DocComments.pursdeleted−11
@@ -1,11 +0,0 @@
1−module DocComments where
2−
3−-- | This declaration has a code block:
4−-- |
5−-- | example == 0
6−-- |
7−-- | Here we are really testing that the leading whitespace is not stripped, as
8−-- | this ensures that we don't accidentally change code blocks into normal
9−-- | paragraphs.
10−example :: Int
11−example = 0
examples/docs/src/DuplicateNames.pursdeleted−9
@@ -1,9 +0,0 @@
1−module DuplicateNames
2− ( module DuplicateNames
3− , module Prelude
4− ) where
5−
6−import Prelude (Unit)
7−
8−unit :: Int
9−unit = 0
examples/docs/src/Example.pursdeleted−7
@@ -1,7 +0,0 @@
1−module Example
2− ( module Prelude
3− , module Example2
4− ) where
5−
6−import Prelude (Unit())
7−import Example2 (one)
examples/docs/src/Example2.pursdeleted−7
@@ -1,7 +0,0 @@
1−module Example2 where
2−
3−one :: Int
4−one = 1
5−
6−two :: Int
7−two = 2
examples/docs/src/ExplicitTypeSignatures.pursdeleted−18
@@ -1,18 +0,0 @@
1−
2−module ExplicitTypeSignatures where
3−
4−-- This should use the explicit type signature so that the type variable name
5−-- is preserved.
6−explicit :: forall something. something -> something
7−explicit x
8− | true = x
9− | false = x
10−
11−-- This should use the inferred type.
12−anInt :: _
13−anInt = 0
14−
15−-- This should infer a type.
16−aNumber = 1.0
17−
18−foreign import nestedForAll :: forall c. (forall a b. c)
examples/docs/src/ImportedTwice.pursdeleted−13
@@ -1,13 +0,0 @@
1−-- See also an example in the wild: purescript-transformers v0.8.4.
2−-- Control.Monad.RWS.Trans re-exports `lift` from both Control.Monad.Trans
3−-- (where it is originally defined) and Control.Monad.RWS.Class (which
4−-- re-exports it from Control.Monad.Trans).
5−
6−module ImportedTwice
7− ( module ImportedTwiceA
8− , module ImportedTwiceB
9− )
10− where
11−
12−import ImportedTwiceA
13−import ImportedTwiceB
examples/docs/src/ImportedTwiceA.pursdeleted−8
@@ -1,8 +0,0 @@
1−module ImportedTwiceA
2− ( module ImportedTwiceB )
3− where
4−
5−import ImportedTwiceB
6−
7−bar :: Int
8−bar = 1
examples/docs/src/ImportedTwiceB.pursdeleted−4
@@ -1,4 +0,0 @@
1−module ImportedTwiceB where
2−
3−foo :: Int
4−foo = 0
examples/docs/src/MultiVirtual.pursdeleted−6
@@ -1,6 +0,0 @@
1−module MultiVirtual
2− ( module X )
3− where
4−
5−import MultiVirtual1 as X
6−import MultiVirtual2 as X
examples/docs/src/MultiVirtual1.pursdeleted−4
@@ -1,4 +0,0 @@
1−module MultiVirtual1 where
2−
3−foo :: Int
4−foo = 1
examples/docs/src/MultiVirtual2.pursdeleted−9
@@ -1,9 +0,0 @@
1−module MultiVirtual2
2− ( module MultiVirtual2
3− , module MultiVirtual3
4− ) where
5−
6−import MultiVirtual3
7−
8−bar :: Int
9−bar = 2
examples/docs/src/MultiVirtual3.pursdeleted−4
@@ -1,4 +0,0 @@
1−module MultiVirtual3 where
2−
3−baz :: Int
4−baz = 3
examples/docs/src/NewOperators.pursdeleted−5
@@ -1,5 +0,0 @@
1−module NewOperators
2− ( module NewOperators2 )
3− where
4−
5−import NewOperators2
examples/docs/src/NewOperators2.pursdeleted−6
@@ -1,6 +0,0 @@
1−module NewOperators2 where
2−
3−infixl 8 _compose as >>>
4−
5−_compose :: forall a b c. (b -> c) -> (a -> b) -> (a -> c)
6−_compose f g x = f (g x)
examples/docs/src/NotAllCtors.pursdeleted−5
@@ -1,5 +0,0 @@
1−module NotAllCtors
2− ( module Prelude )
3− where
4−
5−import Prelude (Boolean2(True))
examples/docs/src/ReExportedTypeClass.pursdeleted−5
@@ -1,5 +0,0 @@
1−module ReExportedTypeClass
2− ( module SomeTypeClass )
3− where
4−
5−import SomeTypeClass
examples/docs/src/SolitaryTypeClassMember.pursdeleted−6
@@ -1,6 +0,0 @@
1−module SolitaryTypeClassMember
2− ( module SomeTypeClass )
3− where
4−
5−import SomeTypeClass (member)
6−
examples/docs/src/SomeTypeClass.pursdeleted−5
@@ -1,5 +0,0 @@
1−
2−module SomeTypeClass where
3−
4−class SomeClass a where
5− member :: a
examples/docs/src/Transitive1.pursdeleted−5
@@ -1,5 +0,0 @@
1−module Transitive1
2− ( module Transitive2 )
3− where
4−
5−import Transitive2
examples/docs/src/Transitive2.pursdeleted−5
@@ -1,5 +0,0 @@
1−module Transitive2
2− ( module Transitive3 )
3− where
4−
5−import Transitive3
examples/docs/src/Transitive3.pursdeleted−4
@@ -1,4 +0,0 @@
1−module Transitive3 where
2−
3−transitive3 :: Int
4−transitive3 = 0
examples/docs/src/TypeClassWithFunDeps.pursdeleted−5
@@ -1,5 +0,0 @@
1−
2−module TypeClassWithFunDeps where
3−
4−class TypeClassWithFunDeps a b c d e | a b -> c, c -> d e where
5− aMember :: a
examples/docs/src/TypeClassWithoutMembers.pursdeleted−5
@@ -1,5 +0,0 @@
1−module TypeClassWithoutMembers
2− ( module TypeClassWithoutMembersIntermediate )
3− where
4−
5−import TypeClassWithoutMembersIntermediate
examples/docs/src/TypeClassWithoutMembersIntermediate.pursdeleted−5
@@ -1,5 +0,0 @@
1−module TypeClassWithoutMembersIntermediate
2− ( module SomeTypeClass )
3− where
4−
5−import SomeTypeClass (class SomeClass)
examples/docs/src/TypeOpAliases.pursdeleted−18
@@ -1,18 +0,0 @@
1−module TypeOpAliases where
2−
3−type AltFn a b = a -> b
4−
5−infixr 6 type AltFn as ~>
6−
7−foreign import test1 :: forall a b. a ~> b
8−foreign import test2 :: forall a b c. a ~> b ~> c
9−foreign import test3 :: forall a b c d. a ~> (b ~> c) ~> d
10−foreign import test4 :: forall a b c d. ((a ~> b) ~> c) ~> d
11−
12−data Tuple a b = Tuple a b
13−
14−infixl 6 Tuple as ×
15−infixl 6 type Tuple as ×
16−
17−third ∷ ∀ a b c. a × b × c → c
18−third (a × b × c) = c
examples/docs/src/UTF8.pursdeleted−7
@@ -1,7 +0,0 @@
1−module UTF8 where
2−
3−import Prelude (Unit, unit)
4−
5−-- | üÜäÄ 😰
6−thing :: Unit
7−thing = unit
examples/docs/src/Virtual.pursdeleted−5
@@ -1,5 +0,0 @@
1−module Virtual
2− ( module VirtualPrelude )
3− where
4−
5−import Prelude as VirtualPrelude
examples/failing/1071.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith KindsDoNotUnify
2−module Main where
3−
4−class Foo a b where
5− foo :: a -> b
6−
7−bar :: forall a. (Foo a) => a -> a
8−bar a = a
examples/failing/1169.pursdeleted−12
@@ -1,12 +0,0 @@
1−-- @shouldFailWith IncorrectConstructorArity
2−module Test where
3−
4−data Outer a = Outer a
5−
6−data Inner a b = Inner a b
7−
8−test1 :: forall a b. Outer (Inner a b) -> Boolean
9−test1 (Outer (Inner _)) = true
10−
11−test2 :: forall a b. Inner a b -> Boolean
12−test2 (Inner _) = true
examples/failing/1175.pursdeleted−11
@@ -1,11 +0,0 @@
1−-- @shouldFailWith TypesDoNotUnify
2−module X where
3−
4−class Foo where
5− foo :: String
6−
7−instance f :: Foo where
8− foo = "a"
9− where
10− bar :: String
11− bar = 1
examples/failing/1310.pursdeleted−18
@@ -1,18 +0,0 @@
1−-- @shouldFailWith NoInstanceFound
2−
3−module Issue1310 where
4−
5−import Prelude
6−import Control.Monad.Eff
7−import Control.Monad.Eff.Console
8−
9−class Inject f g where
10− inj :: forall a. f a -> g a
11−
12−instance inject :: Inject f f where
13− inj x = x
14−
15−foreign import data Oops :: !
16−
17−main :: forall eff. Eff (oops :: Oops | eff) Unit
18−main = inj (log "Oops")
examples/failing/1570.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith ExpectedType
2−module M where
3−
4−data F a = F a
5−
6−test = \(x :: F) -> x
examples/failing/1733.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith UnknownName
2−module Main where
3−
4−import Thingy as Thing
5−
6−main = Thing.doesntExist "hi"
examples/failing/1733/Thingy.pursdeleted−4
@@ -1,4 +0,0 @@
1−module Thingy where
2−
3−foo :: Int
4−foo = 1
examples/failing/1825.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith UnknownName
2−
3−module Main where
4−
5−data W = X | Y | Z
6−
7−bad X a = a
8−bad Y _ = a
9−bad Z a = a
examples/failing/1881.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith ErrorParsingModule
2−module Main where
3−
4−foo =
5−bar :: Int
6−bar = 3
examples/failing/2128-class.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldFailWith ErrorParsingModule
2−module Main where
3−
4−class Foo a where
5− foo :: a -> !!!
examples/failing/2128-instance.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith ErrorParsingModule
2−module Main where
3−
4−class Foo a where
5− foo :: a
6−
7−instance fooInt :: Foo Int where
8− foo = !!!
examples/failing/2378.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith OrphanInstance
2−module Main where
3−
4−import Lib
5−
6−instance fooX :: Foo "x"
examples/failing/2378/Lib.pursdeleted−3
@@ -1,3 +0,0 @@
1−module Lib (class Foo) where
2−
3−class Foo (a :: Symbol)
examples/failing/2379.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith UnknownClass
2−module Main where
3−
4−import Lib
5−
6−test = x [1, 2, 3]
examples/failing/2379/Lib.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Lib (class X, x) where
2−
3−class X a where
4− x :: a -> String
5−
6−class Y a
7−
8−instance xArray :: Y a => X (Array a) where
9− x _ = "[]"
examples/failing/2434.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldFailWith ErrorParsingModule
2−module Main where
3−
4−x :: Char
5−x = '\x10000'
examples/failing/365.pursdeleted−14
@@ -1,14 +0,0 @@
1−-- @shouldFailWith CycleInDeclaration
2−module Main where
3−
4−import Prelude
5−
6−class C a where
7− f :: a -> a
8− g :: a -> a
9−
10−instance cS :: C String where
11− f s = s
12− g = f
13−
14−main = g "Done"
examples/failing/438.pursdeleted−15
@@ -1,15 +0,0 @@
1−-- @shouldFailWith PossiblyInfiniteInstance
2−
3−-- See issue 438 for details: this test is mainly here to test that code like
4−-- this doesn't cause the compiler to loop.
5−
6−module Main where
7−
8−import Prelude
9−
10−data Fix f = In (f (Fix f))
11−
12−instance eqFix :: (Eq (f (Fix f))) => Eq (Fix f) where
13− eq (In f) (In g) = f == g
14−
15−example = In [] == In []
examples/failing/881.pursdeleted−13
@@ -1,13 +0,0 @@
1−-- @shouldFailWith DuplicateValueDeclaration
2−module Main where
3−
4−data X = X | Y
5−
6−class Foo a where
7− foo :: a -> a
8− bar :: a
9−
10−instance fooX :: Foo X where
11− foo X = X
12− bar = X
13− foo Y = Y
examples/failing/AnonArgument1.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldFailWith IncorrectAnonymousArgument
2−module Main where
3−
4−test :: Int -> Int
5−test = _
examples/failing/AnonArgument2.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith IncorrectAnonymousArgument
2−module Main where
3−
4−import Prelude
5−
6−test :: Int -> Int
7−test = 1 + 2 * _
examples/failing/AnonArgument3.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldFailWith IncorrectAnonymousArgument
2−module Main where
3−
4−test :: Int -> Int
5−test = 1 + _
examples/failing/ArgLengthMismatch.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith ArgListLengthsDiffer
2−module ArgLengthMismatch where
3−
4−import Prelude
5−
6−f x y = true
7−f = false
examples/failing/ArrayType.pursdeleted−14
@@ -1,14 +0,0 @@
1−-- @shouldFailWith TypesDoNotUnify
2−
3−module Main where
4−
5−import Prelude
6−import Control.Monad.Eff.Console
7−
8−bar :: Number -> Number -> Number
9−bar n m = n + m
10−
11−foo = x `bar` y
12− where
13− x = 1
14− y = []
examples/failing/Arrays.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith TypesDoNotUnify
2−module Main where
3−
4−foreign import ix :: forall a. Array a -> Int -> a
5−
6−test = \arr -> arr `ix` (0 `ix` 0)
examples/failing/CannotDeriveNewtypeForData.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith CannotDeriveNewtypeForData
2−module CannotDeriveNewtypeForData where
3−
4−import Data.Newtype
5−
6−data Test = Test String
7−
8−derive instance newtypeTest :: Newtype Test _
examples/failing/CaseBinderLengthsDiffer.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith CaseBinderLengthDiffers
2−module Main where
3−
4−test = case 1, 2 of
5− 1, 2, 3 -> 42
6− _, _ -> 43
examples/failing/CaseDoesNotMatchAllConstructorArgs.pursdeleted−15
@@ -1,15 +0,0 @@
1−-- @shouldFailWith IncorrectConstructorArity
2−module Main where
3−
4−import Prelude
5−
6−data Person = Person String Int
7−
8−data TwoPeople = Two Person Person
9−
10−getName p = case p of
11− (Two (Person n) (Person n2 a2)) -> n
12− _ -> "Unknown"
13−
14−
15−name = getName (Two (Person "Jimmy" 20) (Person "" 1))
examples/failing/ConflictingExports.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith ScopeConflict
2−-- Fails here because re-exporting forces any scope conflicts to be resolved
3−module Main (module A, module B) where
4−
5− import A
6− import B
examples/failing/ConflictingExports/A.pursdeleted−4
@@ -1,4 +0,0 @@
1−module A where
2−
3−thing :: Int
4−thing = 1
examples/failing/ConflictingExports/B.pursdeleted−4
@@ -1,4 +0,0 @@
1−module B where
2−
3−thing :: Int
4−thing = 2
examples/failing/ConflictingImports.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith ScopeConflict
2−module Main where
3−
4−import A
5−import B
6−
7−-- Error due to referencing `thing` which is in scope as A.thing and B.thing
8−what :: Int
9−what = thing
examples/failing/ConflictingImports/A.pursdeleted−4
@@ -1,4 +0,0 @@
1−module A where
2−
3−thing :: Int
4−thing = 1
examples/failing/ConflictingImports/B.pursdeleted−4
@@ -1,4 +0,0 @@
1−module B where
2−
3−thing :: Int
4−thing = 2
examples/failing/ConflictingImports2.pursdeleted−10
@@ -1,10 +0,0 @@
1−-- @shouldFailWith ScopeConflict
2−module Main where
3−
4−import A (thing)
5−import B (thing)
6−
7−-- Error due to referencing `thing` which is explicitly in scope as A.thing
8−-- and B.thing
9−what :: Int
10−what = thing
examples/failing/ConflictingImports2/A.pursdeleted−4
@@ -1,4 +0,0 @@
1−module A where
2−
3−thing :: Int
4−thing = 1
examples/failing/ConflictingImports2/B.pursdeleted−4
@@ -1,4 +0,0 @@
1−module B where
2−
3−thing :: Int
4−thing = 2
examples/failing/ConflictingQualifiedImports.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith ScopeConflict
2−module Main where
3−
4−import A as X
5−import B as X
6−
7−foo = X.thing
examples/failing/ConflictingQualifiedImports/A.pursdeleted−4
@@ -1,4 +0,0 @@
1−module A where
2−
3−thing :: Int
4−thing = 1
examples/failing/ConflictingQualifiedImports/B.pursdeleted−4
@@ -1,4 +0,0 @@
1−module B where
2−
3−thing :: Int
4−thing = 2
examples/failing/ConflictingQualifiedImports2.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldFailWith ScopeConflict
2−module Main (module X) where
3−
4−import A as X
5−import B as X
examples/failing/ConflictingQualifiedImports2/A.pursdeleted−4
@@ -1,4 +0,0 @@
1−module A where
2−
3−thing :: Int
4−thing = 1
examples/failing/ConflictingQualifiedImports2/B.pursdeleted−4
@@ -1,4 +0,0 @@
1−module B where
2−
3−thing :: Int
4−thing = 2
examples/failing/ConstraintFailure.pursdeleted−13
@@ -1,13 +0,0 @@
1−-- @shouldFailWith NoInstanceFound
2−
3−module Main where
4−
5−import Prelude
6−
7−data Foo = Bar
8−
9−spin :: forall a. a -> Foo
10−spin x = Bar
11−
12−main = show <<< spin
13−
examples/failing/ConstraintInference.pursdeleted−10
@@ -1,10 +0,0 @@
1−-- @shouldFailWith AmbiguousTypeVariables
2−
3−module Main where
4−
5−import Prelude
6−
7−spin :: forall a b. a -> b
8−spin x = spin x
9−
10−test = show <<< spin
examples/failing/DctorOperatorAliasExport.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith TransitiveDctorExportError
2−module Data.List (List, (:)) where
3−
4− data List a = Cons a (List a) | Nil
5−
6− infixr 6 Cons as :
examples/failing/DeclConflictClassCtor.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith DeclConflict
2−module Main where
3−
4−data T = Fail
5−
6−class Fail
examples/failing/DeclConflictClassSynonym.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith DeclConflict
2−module Main where
3−
4−import Prelude
5−
6−type Fail = Unit
7−
8−class Fail
examples/failing/DeclConflictClassType.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith DeclConflict
2−module Main where
3−
4−class Fail
5−
6−data Fail
examples/failing/DeclConflictCtorClass.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith DeclConflict
2−module Main where
3−
4−class Fail
5−
6−data T = Fail
examples/failing/DeclConflictCtorCtor.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith DeclConflict
2−module Main where
3−
4−data T1 = Fail
5−
6−data T2 = Fail
examples/failing/DeclConflictSynonymClass.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith DeclConflict
2−module Main where
3−
4−import Prelude
5−
6−class Fail
7−
8−type Fail = Unit
examples/failing/DeclConflictSynonymType.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith DeclConflict
2−module Main where
3−
4−import Prelude
5−
6−data Fail
7−
8−type Fail = Unit
examples/failing/DeclConflictTypeClass.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith DeclConflict
2−module Main where
3−
4−class Fail
5−
6−data Fail
examples/failing/DeclConflictTypeSynonym.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith DeclConflict
2−module Main where
3−
4−import Prelude
5−
6−type Fail = Unit
7−
8−data Fail
examples/failing/DeclConflictTypeType.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith DeclConflict
2−module Main where
3−
4−data Fail
5−
6−data Fail
examples/failing/DiffKindsSameName.pursdeleted−15
@@ -1,15 +0,0 @@
1−-- @shouldFailWith KindsDoNotUnify
2−module DiffKindsSameName where
3−
4−import DiffKindsSameName.LibA as LibA
5−import DiffKindsSameName.LibB as LibB
6−
7−-- both `LibA` and `LibB` define a kind locally called `DemoKind`
8−-- `LibB` defines `DemoData :: LibB.DemoKind`
9−-- if we try to use `DemoData` in a place where `LibA.DemoKind` is expected, it should fail with `KindsDoNotUnify`
10−
11−data AProxy (m :: LibA.DemoKind) = AProxy
12−
13−bProxy :: AProxy LibB.DemoData
14−bProxy = AProxy
15−
examples/failing/DiffKindsSameName/LibA.pursdeleted−4
@@ -1,4 +0,0 @@
1−module DiffKindsSameName.LibA where
2−
3−foreign import kind DemoKind
4−
examples/failing/DiffKindsSameName/LibB.pursdeleted−6
@@ -1,6 +0,0 @@
1−module DiffKindsSameName.LibB where
2−
3−foreign import kind DemoKind
4−
5−foreign import data DemoData :: DemoKind
6−
examples/failing/Do.pursdeleted−12
@@ -1,12 +0,0 @@
1−-- @shouldFailWith InvalidDoBind
2−-- @shouldFailWith InvalidDoLet
3−module Main where
4−
5−import Prelude
6−
7−test1 = do let x = 1
8−
9−test2 y = do x <- y
10−
11−test3 = do pure 1
12− pure 2
examples/failing/DoNotSuggestComposition.pursdeleted−13
@@ -1,13 +0,0 @@
1−-- @shouldFailWith TypesDoNotUnify
2−-- TODO: Check that this does not produce a "function composition is (<<<)"
3−-- suggestion.
4−module DoNotSuggestComposition where
5−
6−import Prelude
7−
8−x = { y: 3 }
9−
10−foo :: String -> String
11−foo y = y
12−
13−bar = foo x
examples/failing/DoNotSuggestComposition2.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith TypesDoNotUnify
2−-- TODO: Check that this does not produce a "function composition is (<<<)"
3−-- suggestion.
4−
5−module DoNotSuggestComposition2 where
6−
7−foo = let x = { y: 3 } in x 2
examples/failing/DuplicateDeclarationsInLet.pursdeleted−12
@@ -1,12 +0,0 @@
1−-- @shouldFailWith OverlappingNamesInLet
2−module Main where
3−
4−import Prelude
5−
6−foo = a
7− where
8− a :: Number
9− a = 1
10−
11− a :: Number
12− a = 2
examples/failing/DuplicateModule.pursdeleted−2
@@ -1,2 +0,0 @@
1−-- @shouldFailWith DuplicateModule
2−module M1 where
examples/failing/DuplicateModule/M1.pursdeleted−1
@@ -1 +0,0 @@
1−module M1 where
examples/failing/DuplicateProperties1.pursdeleted−12
@@ -1,12 +0,0 @@
1−-- @shouldFailWith TypesDoNotUnify
2−module DuplicateProperties where
3−
4−import Prelude
5−
6−foreign import data Test :: # * -> *
7−
8−foreign import subtractX :: forall r. Test (x :: Unit | r) -> Test r
9−
10−foreign import hasX :: Test (x :: Unit, y :: Unit)
11−
12−baz = subtractX (subtractX hasX)
examples/failing/DuplicateProperties2.pursdeleted−12
@@ -1,12 +0,0 @@
1−-- @shouldFailWith DuplicateLabel
2−module DuplicateProperties where
3−
4−import Prelude
5−
6−foreign import data Test :: # * -> *
7−
8−foreign import subtractX :: forall r. Test (x :: Unit | r) -> Test r
9−
10−foreign import hasX :: forall r. Test (x :: Unit, y :: Unit | r)
11−
12−baz = subtractX (subtractX hasX)
examples/failing/DuplicateTypeVars.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith DuplicateTypeArgument
2−module Main where
3−
4−import Prelude
5−
6−type Foo a a = a
examples/failing/Eff.pursdeleted−13
@@ -1,13 +0,0 @@
1−-- @shouldFailWith TypesDoNotUnify
2−module Main where
3−
4−import Prelude
5−import Control.Monad.Eff
6−import Control.Monad.ST
7−import Control.Monad.Eff.Console
8−
9−test = pureST (do
10− ref <- newSTRef 0
11− log "ST"
12− modifySTRef ref $ \n -> n + 1
13− readSTRef ref)
examples/failing/EmptyCase.pursdeleted−4
@@ -1,4 +0,0 @@
1−-- @shouldFailWith ErrorParsingModule
2−module Main where
3−
4−error err = case err of \_ -> 1
examples/failing/EmptyClass.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith ErrorParsingModule
2−module Main where
3−
4−class Foo x where
5−
6−bar :: String
7−bar = "hello"
examples/failing/EmptyDo.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith ErrorParsingModule
2−
3−module Main where
4−
5−main = do
6−
examples/failing/ExportConflictClass.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldFailWith ExportConflict
2−module C (module A, module B) where
3−
4−import A as A
5−import B as B
examples/failing/ExportConflictClass/A.pursdeleted−3
@@ -1,3 +0,0 @@
1−module A where
2−
3−class X
examples/failing/ExportConflictClass/B.pursdeleted−3
@@ -1,3 +0,0 @@
1−module B where
2−
3−class X
examples/failing/ExportConflictCtor.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldFailWith ExportConflict
2−module C (module A, module B) where
3−
4−import A as A
5−import B as B
examples/failing/ExportConflictCtor/A.pursdeleted−3
@@ -1,3 +0,0 @@
1−module A where
2−
3−data T1 = X
examples/failing/ExportConflictCtor/B.pursdeleted−3
@@ -1,3 +0,0 @@
1−module B where
2−
3−data T2 = X
examples/failing/ExportConflictType.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldFailWith ExportConflict
2−module C (module A, module B) where
3−
4−import A as A
5−import B as B
examples/failing/ExportConflictType/A.pursdeleted−3
@@ -1,3 +0,0 @@
1−module A where
2−
3−data T
examples/failing/ExportConflictType/B.pursdeleted−3
@@ -1,3 +0,0 @@
1−module B where
2−
3−data T
examples/failing/ExportConflictTypeOp.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldFailWith ExportConflict
2−module C (module A, module B) where
3−
4−import A as A
5−import B as B
examples/failing/ExportConflictTypeOp/A.pursdeleted−5
@@ -1,5 +0,0 @@
1−module A where
2−
3−type T1 a b = a -> b
4−
5−infixr 4 type T1 as ??
examples/failing/ExportConflictTypeOp/B.pursdeleted−5
@@ -1,5 +0,0 @@
1−module B where
2−
3−type T2 a b = a -> b
4−
5−infixr 4 type T2 as ??
examples/failing/ExportConflictValue.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldFailWith ExportConflict
2−module C (module A, module B) where
3−
4−import A as A
5−import B as B
examples/failing/ExportConflictValue/A.pursdeleted−4
@@ -1,4 +0,0 @@
1−module A where
2−
3−x :: Boolean
4−x = true
examples/failing/ExportConflictValue/B.pursdeleted−4
@@ -1,4 +0,0 @@
1−module B where
2−
3−x :: Boolean
4−x = false
examples/failing/ExportConflictValueOp.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldFailWith ExportConflict
2−module C (module A, module B) where
3−
4−import A as A
5−import B as B
examples/failing/ExportConflictValueOp/A.pursdeleted−6
@@ -1,6 +0,0 @@
1−module A where
2−
3−f1 :: forall a b. a -> b -> a
4−f1 x _ = x
5−
6−infix 0 f1 as !!
examples/failing/ExportConflictValueOp/B.pursdeleted−6
@@ -1,6 +0,0 @@
1−module B where
2−
3−f2 :: forall a b. a -> b -> a
4−f2 x _ = x
5−
6−infix 0 f2 as !!
examples/failing/ExportExplicit.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith UnknownExport
2−-- should fail as z does not exist in the module
3−module M1 (x, y, z) where
4−
5−import Prelude
6−
7−x = 1
8−y = 2
examples/failing/ExportExplicit1.pursdeleted−12
@@ -1,12 +0,0 @@
1−-- @shouldFailWith UnknownName
2−module Main where
3−
4−import M1
5−import Control.Monad.Eff.Console (log)
6−
7−testX = X
8−
9−-- should fail as Y constructor is not exported from M1
10−testY = Y
11−
12−main = log "Done"
examples/failing/ExportExplicit1/M1.pursdeleted−3
@@ -1,3 +0,0 @@
1−module M1 (X(X)) where
2−
3−data X = X | Y
examples/failing/ExportExplicit2.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith UnknownExportDataConstructor
2−-- should fail as Y is not a data constructor for X
3−module M1 (X(Y)) where
4−
5−import Prelude
6−
7−data X = X
8−data Y = Y
examples/failing/ExportExplicit3.pursdeleted−10
@@ -1,10 +0,0 @@
1−-- @shouldFailWith UnknownName
2−module Main where
3−
4−import M1 as M
5−import Control.Monad.Eff.Console (log)
6−
7−-- should fail as Z is not exported from M1
8−testZ = M.Z
9−
10−main = log "Done"
examples/failing/ExportExplicit3/M1.pursdeleted−4
@@ -1,4 +0,0 @@
1−module M1 (X(..)) where
2−
3−data X = X | Y
4−data Z = Z
examples/failing/ExtraRecordField.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith AdditionalProperty
2−module ExtraRecordField where
3−
4−import Prelude ((<>))
5−
6−full :: { first :: String, last :: String } -> String
7−full p = p.first <> " " <> p.last
8−
9−oops = full { first: "Jane", last: "Smith", age: 29 }
examples/failing/Foldable.pursdeleted−17
@@ -1,17 +0,0 @@
1−-- @shouldFailWith CycleInDeclaration
2−module Main where
3−
4−import Prelude
5−
6−class Foldable f where
7− fold :: forall a b. (a -> b -> b) -> b -> f a -> b
8− size :: forall a. f a -> Number
9−
10−data L a = C a (L a) | N
11−
12−instance foldableL :: Foldable L where
13− fold _ z N = z
14− fold f z (C x xs) = x `f` (fold f z xs)
15− size = fold (const ((+) 1.0)) 0.0
16−
17−x = size (C 1 (C 2 (C 3 N)))
examples/failing/Generalization1.pursdeleted−11
@@ -1,11 +0,0 @@
1−-- @shouldFailWith CannotGeneralizeRecursiveFunction
2−module Main where
3−
4−import Prelude
5−
6−foo 0 x _ = x
7−foo n x y = x <> bar (n - 1) x y
8−
9−bar 0 x _ = x
10−bar n x y = y <> foo (n - 1) x y
11−
examples/failing/Generalization2.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith CannotGeneralizeRecursiveFunction
2−module Main where
3−
4−import Prelude
5−
6−test n m | n <= 1 = m
7− | otherwise = test (n - 1) (m <> m)
8−
examples/failing/ImportExplicit.pursdeleted−4
@@ -1,4 +0,0 @@
1−-- @shouldFailWith UnknownImport
2−module Main where
3−
4−import M1 (X(..))
examples/failing/ImportExplicit/M1.pursdeleted−3
@@ -1,3 +0,0 @@
1−module M1 where
2−
3−foo = "foo"
examples/failing/ImportExplicit2.pursdeleted−4
@@ -1,4 +0,0 @@
1−-- @shouldFailWith UnknownImportDataConstructor
2−module Main where
3−
4−import M1 (X(Z, Q))
examples/failing/ImportExplicit2/M1.pursdeleted−3
@@ -1,3 +0,0 @@
1−module M1 where
2−
3−data X = Y
examples/failing/ImportHidingModule.pursdeleted−4
@@ -1,4 +0,0 @@
1−-- @shouldFailWith ImportHidingModule
2−module Main where
3−
4−import B hiding (module A)
examples/failing/ImportHidingModule/A.pursdeleted−2
@@ -1,2 +0,0 @@
1−module A where
2−x = 1
examples/failing/ImportHidingModule/B.pursdeleted−3
@@ -1,3 +0,0 @@
1−module B (module B, module A) where
2−import A
3−y = 1
examples/failing/ImportModule.pursdeleted−4
@@ -1,4 +0,0 @@
1−-- @shouldFailWith UnknownName
2−module Main where
3−
4−import M1
examples/failing/ImportModule/M2.pursdeleted−3
@@ -1,3 +0,0 @@
1−module M2 where
2−
3−data X = X
examples/failing/InfiniteKind.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldFailWith InfiniteKind
2−
3−module Main where
4−
5−data F a = F (a a)
examples/failing/InfiniteType.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldFailWith InfiniteType
2−
3−module Main where
4−
5−f a = a a
examples/failing/InstanceExport.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith TransitiveExportError
2−module Test where
3−
4−import InstanceExport
5−import Prelude
6−
7−test = f $ S "Test"
examples/failing/InstanceExport/InstanceExport.pursdeleted−11
@@ -1,11 +0,0 @@
1−module InstanceExport (S(..), f) where
2−
3−import Prelude
4−
5−newtype S = S String
6−
7−class F a where
8− f :: a -> String
9−
10−instance fs :: F S where
11− f (S s) = s
examples/failing/IntOutOfRange.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith IntOutOfRange
2−
3−module Main where
4−
5−n :: Int
6−n = 2147483648
examples/failing/InvalidOperatorInBinder.pursdeleted−12
@@ -1,12 +0,0 @@
1−-- @shouldFailWith InvalidOperatorInBinder
2−module Main where
3−
4−data List a = Cons a (List a) | Nil
5−
6−cons ∷ ∀ a. a → List a → List a
7−cons = Cons
8−
9−infixl 6 cons as :
10−
11−get ∷ ∀ a. List a → a
12−get (_ : x : _) = x
examples/failing/KindError.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith KindsDoNotUnify
2−module Main where
3−
4−import Prelude
5−
6−data KindError f a = One f | Two (f a)
examples/failing/KindStar.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith ExpectedType
2−
3−module X where
4−
5−data List a = Nil | Cons a (List a)
6−
7−test :: List
8−test = Nil
examples/failing/LeadingZeros1.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith ErrorParsingModule
2−module Main where
3−
4−import Prelude
5−
6−x = 01
examples/failing/LeadingZeros2.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith ErrorParsingModule
2−module Main where
3−
4−import Prelude
5−
6−x = 00.1
examples/failing/Let.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith CycleInDeclaration
2−module Main where
3−
4−import Prelude
5−
6−test = let x = x in x
examples/failing/MPTCs.pursdeleted−10
@@ -1,10 +0,0 @@
1−-- @shouldFailWith KindsDoNotUnify
2−module Main where
3−
4−import Prelude
5−
6−class Foo a where
7− f :: a -> a
8−
9−instance fooStringString :: Foo String String where
10− f a = a
examples/failing/MissingClassExport.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith TransitiveExportError
2−module Test (bar) where
3−
4−import Prelude
5−
6−class Foo a where
7− bar :: a -> a
examples/failing/MissingClassMemberExport.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith TransitiveExportError
2−module Test (class Foo) where
3−
4−import Prelude
5−
6−class Foo a where
7− bar :: a -> a
examples/failing/MissingRecordField.pursdeleted−10
@@ -1,10 +0,0 @@
1−-- @shouldFailWith PropertyIsMissing
2−module MissingRecordField where
3−
4−import Prelude ((>))
5−
6−john = { first: "John", last: "Smith" }
7−
8−isOver50 p = p.age > 50.0
9−
10−result = isOver50 john
examples/failing/MultipleErrors.pursdeleted−13
@@ -1,13 +0,0 @@
1−-- @shouldFailWith TypesDoNotUnify
2−-- @shouldFailWith TypesDoNotUnify
3−module MultipleErrors where
4−
5−import Prelude
6−
7−foo :: Int -> Int
8−foo 0 = "Test"
9−foo n = bar (n - 1)
10−
11−bar :: Int -> Int
12−bar 0 = "Test"
13−bar n = foo (n - 1)
examples/failing/MultipleErrors2.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith UnknownName
2−-- @shouldFailWith UnknownName
3−module MultipleErrors2 where
4−
5−import Prelude
6−
7−foo = itDoesntExist
8−
9−bar = neitherDoesThis
examples/failing/MultipleTypeOpFixities.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith MultipleTypeOpFixities
2−module MultipleTypeOpFixities where
3−
4−import Prelude
5−
6−type Op x y = Op x y
7−
8−infix 2 type Op as !?
9−infix 2 type Op as !?
examples/failing/MultipleValueOpFixities.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith MultipleValueOpFixities
2−module MultipleValueOpFixities where
3−
4−import Prelude
5−
6−add x y = x + y
7−
8−infix 2 add as !?
9−infix 2 add as !?
examples/failing/MutRec.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith CycleInDeclaration
2−-- @shouldFailWith CycleInDeclaration
3−module MutRec where
4−
5−import Prelude
6−
7−x = y
8−
9−y = x
examples/failing/MutRec2.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith CycleInDeclaration
2−module Main where
3−
4−import Prelude
5−
6−x = x
examples/failing/NewtypeInstance.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith InvalidNewtypeInstance
2−module Main where
3−
4−import Prelude
5−
6−data X = X
7−
8−derive newtype instance showX :: Show X
examples/failing/NewtypeInstance2.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith InvalidNewtypeInstance
2−module Main where
3−
4−import Prelude
5−
6−data X a = X a a
7−
8−derive newtype instance showX :: Show a => Show (X a)
examples/failing/NewtypeInstance3.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith InvalidNewtypeInstance
2−module Main where
3−
4−import Prelude
5−
6−class Nullary
7−
8−derive newtype instance nullary :: Nullary
examples/failing/NewtypeInstance4.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith InvalidNewtypeInstance
2−module Main where
3−
4−import Prelude
5−
6−data X = X | Y
7−
8−derive newtype instance showX :: Show X
examples/failing/NewtypeInstance5.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith InvalidNewtypeInstance
2−module Main where
3−
4−import Prelude
5−
6−newtype X a = X a
7−
8−derive newtype instance functorX :: Functor X
examples/failing/NewtypeInstance6.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith InvalidNewtypeInstance
2−module Main where
3−
4−import Prelude
5−
6−newtype X a b = X (Array b)
7−
8−derive newtype instance functorX :: Functor X
examples/failing/NewtypeMultiArgs.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith InvalidNewtype
2−module Main where
3−
4−import Prelude
5−
6−newtype Thing = Thing String Boolean
examples/failing/NewtypeMultiCtor.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith InvalidNewtype
2−module Main where
3−
4−import Prelude
5−
6−newtype Thing = Thing String | Other
examples/failing/NonWildcardNewtypeInstance.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith ExpectedWildcard
2−module NonWildcardNewtypeInstance where
3−
4−import Data.Newtype
5−
6−data Test = Test String
7−
8−derive instance newtypeTest :: Newtype Test String
examples/failing/NullaryAbs.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith ErrorParsingModule
2−module Main where
3−
4−import Prelude
5−
6−func = \ -> "no"
examples/failing/Object.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith PropertyIsMissing
2−module Main where
3−
4−import Prelude
5−
6−test o = o.foo
7−
8−test1 = test {}
examples/failing/OperatorAliasNoExport.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith TransitiveExportError
2−module Test ((?!)) where
3−
4−infixl 4 what as ?!
5−
6−what :: forall a b. a -> b -> a
7−what a _ = a
examples/failing/OperatorSections.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith TypesDoNotUnify
2−module Main where
3−
4−import Prelude
5−
6−main = do
7− (true `not` _)
examples/failing/OrphanInstance.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith OrphanInstance
2−module Test where
3−
4−import Class
5−
6−instance cBoolean :: C Boolean where
7− op a = a
examples/failing/OrphanInstance/Class.pursdeleted−4
@@ -1,4 +0,0 @@
1−module Class where
2−
3−class C a where
4− op :: a -> a
examples/failing/OrphanTypeDecl.pursdeleted−4
@@ -1,4 +0,0 @@
1−-- @shouldFailWith OrphanTypeDeclaration
2−module OrphanTypeDecl where
3−
4−fn :: Number -> Boolean
examples/failing/OverlappingArguments.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith OverlappingArgNames
2−module OverlappingArguments where
3−
4−import Prelude
5−
6−f x x = x
examples/failing/OverlappingBinders.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith OverlappingArgNames
2−module OverlappingBinders where
3−
4−import Prelude
5−
6−data S a = S a (S a)
7−
8−f x = case x of
9− (S y (S y@(S z zs))) -> y
examples/failing/OverlappingVars.pursdeleted−14
@@ -1,14 +0,0 @@
1−-- @shouldFailWith NoInstanceFound
2−module Main where
3−
4−import Prelude
5−
6−class OverlappingVars a where
7− f :: a -> a
8−
9−data Foo a b = Foo a b
10−
11−instance overlappingVarsFoo :: OverlappingVars (Foo a a) where
12− f a = a
13−
14−test = f (Foo "" 0)
examples/failing/ProgrammableTypeErrors.pursdeleted−16
@@ -1,16 +0,0 @@
1−-- @shouldFailWith NoInstanceFound
2−
3−module Main where
4−
5−import Prelude
6−import Control.Monad.Eff (Eff)
7−import Control.Monad.Eff.Console (log)
8−
9−class MyShow a where
10− myShow :: a -> String
11−
12−instance cannotShowFunctions :: Fail "Cannot show functions" => MyShow (a -> b) where
13− myShow _ = "unreachable"
14−
15−main :: Eff _ _
16−main = log (myShow (_ + 1))
examples/failing/ProgrammableTypeErrorsTypeString.pursdeleted−18
@@ -1,18 +0,0 @@
1−-- @shouldFailWith NoInstanceFound
2−
3−module Main where
4−
5−import Prelude
6−import Control.Monad.Eff (Eff)
7−import Control.Monad.Eff.Console (log)
8−
9−newtype MyType a = MyType a
10−
11−instance cannotShowFunctions :: Fail ("Don't want to show " <> TypeString (MyType a) <> " because.") => Show (MyType a) where
12− show _ = "unreachable"
13−
14−infixl 6 type TypeConcat as <>
15−
16−main :: Eff _ _
17−main = do
18− log $ show (MyType 2)
examples/failing/Rank2Types.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith TypesDoNotUnify
2−module Main where
3−
4−import Prelude
5−
6−foreign import test :: (forall a. a -> a) -> Number
7−
8−test1 = test (\n -> n + 1)
examples/failing/RequiredHiddenType.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith TransitiveExportError
2−-- exporting `a` should fail as `A` is hidden
3−module Foo (B(..), a, b) where
4−
5−data A = A
6−data B = B
7−
8−a = A
9−b = B
examples/failing/Reserved.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith ErrorParsingModule
2−module Main where
3−
4−import Prelude
5−
6−(<) :: Number -> Number -> Number
7−(<) a b = !(a >= b)
examples/failing/RowConstructors1.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith KindsDoNotUnify
2−module Main where
3−
4−import Control.Monad.Eff.Console (log)
5−
6−data Foo = Bar
7−type Baz = { | Foo }
8−
9−main = log "Done"
examples/failing/RowConstructors2.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith KindsDoNotUnify
2−module Main where
3−
4−import Control.Monad.Eff.Console (log)
5−
6−type Foo r = (x :: Number | r)
7−type Bar = { | Foo }
8−
9−main = log "Done"
examples/failing/RowConstructors3.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith KindsDoNotUnify
2−module Main where
3−
4−import Control.Monad.Eff.Console (log)
5−
6−type Foo = { x :: Number }
7−type Bar = { | Foo }
8−
9−main = log "Done"
examples/failing/RowInInstanceNotDetermined0.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith InvalidInstanceHead
2−module Main where
3−
4−import Prelude
5−
6−-- no fundeps
7−class C a b
8−instance c :: C Unit {}
9−
examples/failing/RowInInstanceNotDetermined1.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith InvalidInstanceHead
2−module Main where
3−
4−import Prelude
5−
6−-- `c` not mentioned in any fundeps
7−class C a b c | a -> b
8−instance c :: C Unit Unit {}
9−
examples/failing/RowInInstanceNotDetermined2.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith InvalidInstanceHead
2−module Main where
3−
4−import Prelude
5−
6−-- `b` isn't determined by anything that `b` doesn't determine
7−class C a b | a -> b, b -> a
8−instance c :: C Unit {}
9−
examples/failing/SkolemEscape.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith EscapedSkolem
2−module Main where
3−
4−import Prelude
5−
6−foreign import foo :: (forall a. a -> a) -> Number
7−
8−test = \x -> foo x
examples/failing/SkolemEscape2.pursdeleted−10
@@ -1,10 +0,0 @@
1−-- @shouldFailWith EscapedSkolem
2−module Main where
3−
4−import Prelude
5−import Control.Monad.Eff
6−import Control.Monad.ST
7−
8−test _ = do
9− r <- runST (newSTRef 0)
10− pure 0
examples/failing/SuggestComposition.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith TypesDoNotUnify
2−-- TODO: Ensure the correct suggestion is produced.
3−module SuggestComposition where
4−
5−import Prelude
6−
7−f = g . g where g = (_ + 1)
examples/failing/Superclasses1.pursdeleted−14
@@ -1,14 +0,0 @@
1−-- @shouldFailWith NoInstanceFound
2−module Main where
3−
4−import Prelude
5−
6−class Su a where
7− su :: a -> a
8−
9−class (Su a) <= Cl a where
10− cl :: a -> a -> a
11−
12−instance clNumber :: Cl Number where
13− cl n m = n + m
14−
examples/failing/Superclasses2.pursdeleted−13
@@ -1,13 +0,0 @@
1−-- @shouldFailWith CycleInTypeSynonym
2−-- TODO: Should this have its own error, perhaps CycleInTypeClassDeclaration?
3−module CycleInSuperclasses where
4−
5−import Prelude
6−
7−class (Foo a) <= Bar a
8−
9−class (Bar a) <= Foo a
10−
11−instance barString :: Bar String
12−
13−instance fooString :: Foo String
examples/failing/Superclasses3.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith UndefinedTypeVariable
2−module UnknownSuperclassTypeVar where
3−
4−import Prelude
5−
6−class Foo a
7−
8−class (Foo b) <= Bar a
examples/failing/Superclasses5.pursdeleted−26
@@ -1,26 +0,0 @@
1−-- @shouldFailWith NoInstanceFound
2−
3−module Main where
4−
5−import Prelude
6−import Control.Monad.Eff.Console (logShow)
7−
8−class Su a where
9− su :: a -> a
10−
11−class (Su (Array a)) <= Cl a where
12− cl :: a -> a -> a
13−
14−instance suNumber :: Su Number where
15− su n = n + 1.0
16−
17−instance suArray :: (Su a) => Su (Array a) where
18− su [x] = [su x]
19−
20−instance clNumber :: Cl Number where
21− cl n m = n + m
22−
23−test :: forall a. (Cl a) => a -> Array a
24−test x = su [cl x x]
25−
26−main = logShow $ test 10.0
examples/failing/TopLevelCaseNoArgs.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith DuplicateValueDeclaration
2−module Main where
3−
4−import Prelude
5−
6−foo :: Number
7−foo = 1
8−foo = 2
examples/failing/TransitiveDctorExport.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldFailWith TransitiveExportError
2−module Main (Y(..)) where
3−
4−type X = Int
5−data Y = Y X
examples/failing/TransitiveSynonymExport.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldFailWith TransitiveExportError
2−module Main (Y()) where
3−
4−type X = Int
5−type Y = X
examples/failing/TypeClassInstances.pursdeleted−11
@@ -1,11 +0,0 @@
1−-- @shouldFailWith MissingClassMember
2−module Main where
3−
4−import Prelude
5−
6−class A a where
7− a :: a -> String
8− b :: a -> Number
9−
10−instance aString :: A String where
11− a s = s
examples/failing/TypeClasses2.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith NoInstanceFound
2−module Main where
3−
4−import Prelude ()
5−
6−class Show a where
7− show :: a -> String
8−
9−test = show "testing"
examples/failing/TypeError.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith TypesDoNotUnify
2−module Main where
3−
4−import Prelude
5−
6−test = 1 <> "A"
examples/failing/TypeOperatorAliasNoExport.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith TransitiveExportError
2−module Test (type (×)) where
3−
4−data Tuple a b = Tuple a b
5−
6−infixl 6 type Tuple as ×
examples/failing/TypeSynonyms.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldFailWith CycleInTypeSynonym
2−module Main where
3−
4−import Prelude
5−
6−type T1 = Array T2
7−
8−type T2 = T1
examples/failing/TypeSynonyms2.pursdeleted−12
@@ -1,12 +0,0 @@
1−-- @shouldFailWith TypeSynonymInstance
2−module Main where
3−
4−import Prelude
5−
6−class Foo a where
7− foo :: a -> String
8−
9−type Bar = String
10−
11−instance fooBar :: Foo Bar where
12− foo s = s
examples/failing/TypeSynonyms3.pursdeleted−12
@@ -1,12 +0,0 @@
1−-- @shouldFailWith TypeSynonymInstance
2−module Main where
3−
4−import Prelude
5−
6−class Foo a where
7− foo :: a -> String
8−
9−type Bar = String
10−
11−instance fooBar :: Foo Bar where
12− foo s = s
examples/failing/TypeSynonyms4.pursdeleted−11
@@ -1,11 +0,0 @@
1−-- @shouldFailWith PartiallyAppliedSynonym
2−module TypeSynonyms4 where
3−
4−import Prelude
5−
6−type F x y = x -> y
7−
8−type G x = F x
9−
10−f :: G String String -> String
11−f k = k "Done"
examples/failing/TypeSynonyms5.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith CycleInTypeSynonym
2−module Main where
3−
4−import Prelude
5−
6−type T = T
examples/failing/TypeWildcards1.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith ErrorParsingModule
2−module TypeWildcards where
3−
4−import Prelude
5−
6−type Test = _
7−
examples/failing/TypeWildcards2.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith ErrorParsingModule
2−module TypeWildcards where
3−
4−import Prelude
5−
6−data Test = Test _
7−
examples/failing/TypeWildcards3.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith InvalidInstanceHead
2−module TypeWildcards where
3−
4−import Prelude
5−
6−data Foo a = Foo
7−
8−instance showFoo :: Show (Foo _) where
9− show Foo = "Foo"
examples/failing/TypedBinders.pursdeleted−10
@@ -1,10 +0,0 @@
1−-- @shouldFailWith ErrorParsingModule
2−module Main where
3−
4−import Control.Monad.Eff.Console (log)
5−
6−test = (\f :: Int -> Int -> f 10) id
7−
8−main = do
9− let t1 = test
10− log "Done"
examples/failing/TypedBinders2.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith TypesDoNotUnify
2−module Main where
3−
4−import Prelude
5−import Control.Monad.Eff.Console (log)
6−
7−main = do
8− s :: String <- log "Foo"
9− log "Done"
examples/failing/TypedBinders3.pursdeleted−13
@@ -1,13 +0,0 @@
1−-- @shouldFailWith TypesDoNotUnify
2−module Main where
3−
4−import Prelude
5−import Control.Monad.Eff.Console (log)
6−
7−test = case 1 of
8− (0 :: String) -> true
9− _ -> false
10−
11−main = do
12− let t = test
13− log "Done"
examples/failing/TypedHole.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldFailWith HoleInferredType
2−module Main where
3−
4−import Prelude
5−import Control.Monad.Eff (Eff)
6−import Control.Monad.Eff.Console (CONSOLE, log)
7−
8−main :: forall e. Eff (console :: CONSOLE | e) Unit
9−main = ?ummm
examples/failing/UnderscoreModuleName.pursdeleted−6
@@ -1,6 +0,0 @@
1−-- @shouldFailWith ErrorParsingModule
2−module Bad_Module where
3−
4−import Control.Monad.Eff.Console (log)
5−
6−main = log "Done"
examples/failing/UnknownType.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldFailWith UnknownName
2−module Main where
3−
4−import Prelude
5−
6−test :: Number -> Something
7−test = {}
examples/passing/1185.pursdeleted−15
@@ -1,15 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−data Person = Person String Boolean
6−
7−getName :: Person -> String
8−getName p = case p of
9− Person name true -> name
10− _ -> "Unknown"
11−
12−name :: String
13−name = getName (Person "John Smith" true)
14−
15−main = log "Done"
examples/passing/1335.pursdeleted−14
@@ -1,14 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−x :: forall a. a -> String
7−x a = y "Test"
8− where
9− y :: forall a. (Show a) => a -> String
10− y a = show (a :: a)
11−
12−main = do
13− log (x 0)
14− log "Done"
examples/passing/1570.pursdeleted−8
@@ -1,8 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−test :: forall a. a -> a
6−test = \(x :: a) -> x
7−
8−main = log "Done"
examples/passing/1664.pursdeleted−16
@@ -1,16 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−
7−data Identity a = Identity a
8−
9−newtype IdentityEff e a = IdentityEff (Eff e (Identity a))
10−
11−test :: forall e a. IdentityEff e a -> IdentityEff e Unit
12−test (IdentityEff action) = IdentityEff $ do
13− (Identity x :: Identity _) <- action
14− pure $ Identity unit
15−
16−main = log "Done"
examples/passing/1697.pursdeleted−25
@@ -1,25 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−_2 :: forall a. a -> a
7−_2 a = a
8−
9−x :: forall m. (Monad m) => m Unit
10−x = do
11− _ <- pure unit
12− pure unit
13−
14−y :: forall m. (Monad m) => m Unit
15−y = do
16− _ <- pure unit
17− pure unit
18−
19−wtf :: forall m. (Monad m) => m Unit
20−wtf = do
21− _ <- pure unit
22− let tmp = _2 1
23− pure unit
24−
25−main = log "Done"
examples/passing/1807.pursdeleted−14
@@ -1,14 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−fn = _.b.c.d
7−a = {b:{c:{d:2}}}
8−
9−d :: Int
10−d = fn a + a.b.c.d
11−
12−main = if fn a + a.b.c.d == 4
13− then log "Done"
14− else log "Fail"
examples/passing/1881.pursdeleted−19
@@ -1,19 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−foo =
6− 1
7−
8−bar
9− = 2
10−
11−baz
12− =
13− 3
14−
15−qux
16− =
17− 3
18−
19−main = log "Done"
examples/passing/1991.pursdeleted−22
@@ -1,22 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−singleton :: forall a. a -> Array a
7−singleton x = [x]
8−
9−empty :: forall a. Array a
10−empty = []
11−
12−foldMap :: forall a m. (Semigroup m) => (a -> m) -> Array a -> m
13−foldMap f [a, b, c, d, e] = f a <> f b <> f c <> f d <> f e
14−foldMap f xs = foldMap f xs -- spin, not used
15−
16−regression :: Array Int
17−regression =
18− let as = [1,2,3,4,5]
19− as' = foldMap (\x -> if 1 < x && x < 4 then singleton x else empty) as
20− in as'
21−
22−main = log "Done"
examples/passing/2018.pursdeleted−12
@@ -1,12 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import A (foo)
5−import B (Foo(..))
6−import Control.Monad.Eff (Eff)
7−import Control.Monad.Eff.Console (CONSOLE, log)
8−
9−main :: forall e. Eff (console :: CONSOLE | e) Unit
10−main = do
11− let tmp = foo X
12− log "Done"
examples/passing/2018/A.pursdeleted−7
@@ -1,7 +0,0 @@
1−module A where
2−
3−import B as Main
4−
5−-- Prior to the 2018 fix this would be detected as a cycle between A and Main.
6−foo ∷ Main.Foo → Main.Foo
7−foo x = x
examples/passing/2018/B.pursdeleted−3
@@ -1,3 +0,0 @@
1−module B where
2−
3−data Foo = X | Y
examples/passing/2049.pursdeleted−14
@@ -1,14 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data List a = Cons a (List a) | Nil
7−
8−infixr 6 Cons as :
9−
10−f :: List { x :: Int, y :: Int } -> Int
11−f ( r@{ x } : _) = x + r.y
12−f _ = 0
13−
14−main = log "Done"
examples/passing/2138.pursdeleted−7
@@ -1,7 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−import Lib (A(B,C))
6−
7−main = log "Done"
examples/passing/2138/Lib.pursdeleted−3
@@ -1,3 +0,0 @@
1−module Lib (A(..), A) where
2−
3−data A = B | C
examples/passing/2172.jsdeleted−5
@@ -1,5 +0,0 @@
1−exports['a\''] = 0;
2−exports["\x62\x27"] = 1;
3−// NOTE: I wanted to use "\c'" here, but langauge-javascript doesn't support it...
4−exports["c'"] = 2;
5−exports["\u0064\u0027"] = 3;
examples/passing/2172.pursdeleted−10
@@ -1,10 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−foreign import a' :: Number
6−foreign import b' :: Number
7−foreign import c' :: Number
8−foreign import d' :: Number
9−
10−main = log "Done"
examples/passing/2252.pursdeleted−15
@@ -1,15 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−data T a = T
6−
7−ti :: T Int
8−ti = T
9−
10−t :: forall a. T a
11−t = T
12−
13−xs = [ti, t, t]
14−
15−main = log "Done"
examples/passing/2378.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−class Foo (a :: Symbol)
6−
7−instance fooX :: Foo "x"
8−
9−main = log "Done"
examples/passing/2438.pursdeleted−8
@@ -1,8 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−done :: String
6−done = {"𝌆": "Done"}."𝌆"
7−
8−main = log done
examples/passing/652.pursdeleted−18
@@ -1,18 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−class Foo a b
7−
8−class Bar a c
9−
10−class (Foo a b, Bar a c) <= Baz a b c
11−
12−instance foo :: Foo (a -> b) a
13−
14−instance bar :: Bar (a -> b) b
15−
16−instance baz :: (Eq a) => Baz (a -> b) a b
17−
18−main = log "Done"
examples/passing/810.pursdeleted−14
@@ -1,14 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data Maybe a = Nothing | Just a
7−
8−test :: forall a. Maybe a -> Maybe a
9−test m = o.x
10− where
11− o = case m of Nothing -> { x : Nothing }
12− Just a -> { x : Just a }
13−
14−main = log "Done"
examples/passing/862.pursdeleted−8
@@ -1,8 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console
5−
6−id' = (\x -> x) <$> \y -> y
7−
8−main = log (id' "Done")
examples/passing/922.pursdeleted−20
@@ -1,20 +0,0 @@
1−module Main where
2−
3−import Prelude
4−
5−import Control.Monad.Eff.Console
6−
7−class Default a where
8− def :: a
9−
10−instance defaultString :: Default String where
11− def = "Done"
12−
13−data I a = I a
14−
15−instance defaultI :: (Default a) => Default (I a) where
16− def = I def
17−
18−main = do
19− case def of
20− I s -> log s
examples/passing/Applicative.pursdeleted−16
@@ -1,16 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−class Applicative f where
6− pure :: forall a. a -> f a
7− apply :: forall a b. f (a -> b) -> f a -> f b
8−
9−data Maybe a = Nothing | Just a
10−
11−instance applicativeMaybe :: Applicative Maybe where
12− pure = Just
13− apply (Just f) (Just a) = Just (f a)
14− apply _ _ = Nothing
15−
16−main = log "Done"
examples/passing/ArrayType.pursdeleted−12
@@ -1,12 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−class Pointed p where
7− point :: forall a. a -> p a
8−
9−instance pointedArray :: Pointed Array where
10− point a = [a]
11−
12−main = log "Done"
examples/passing/Auto.pursdeleted−16
@@ -1,16 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data Auto s i o = Auto { state :: s, step :: s -> i -> o }
7−
8−type SomeAuto i o = forall r. (forall s. Auto s i o -> r) -> r
9−
10−exists :: forall s i o. s -> (s -> i -> o) -> SomeAuto i o
11−exists = \state step f -> f (Auto { state: state, step: step })
12−
13−run :: forall i o. SomeAuto i o -> i -> o
14−run = \s i -> s (\a -> case a of Auto a -> a.step a.state i)
15−
16−main = log "Done"
examples/passing/AutoPrelude.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−f x = x * 10.0
7−g y = y - 10.0
8−
9−main = do
10− log $ show $ (f <<< g) 100.0
11− log "Done"
examples/passing/AutoPrelude2.pursdeleted−10
@@ -1,10 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Prelude as P
5−import Control.Monad.Eff.Console
6−
7−f :: forall a. a -> a
8−f = P.id
9−
10−main = P.($) log ((f P.<<< f) "Done")
examples/passing/BindersInFunctions.pursdeleted−16
@@ -1,16 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Partial.Unsafe (unsafePartial)
5−import Test.Assert (assert')
6−import Control.Monad.Eff (Eff)
7−import Control.Monad.Eff.Console (log)
8−
9−snd :: forall a. Partial => Array a -> a
10−snd = \[_, y] -> y
11−
12−main :: Eff _ _
13−main = do
14− let ts = unsafePartial (snd [1.0, 2.0])
15− assert' "Incorrect result from 'snd'." (ts == 2.0)
16− log "Done"
examples/passing/BindingGroups.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−foo = bar
7− where bar r = r + 1.0
8−
9−r = foo 2.0
10−
11−main = log "Done"
examples/passing/BlockString.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−foo :: String
7−foo = """foo"""
8−
9−main = log "Done"
examples/passing/CaseInDo.pursdeleted−21
@@ -1,21 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Partial.Unsafe (unsafeCrashWith)
5−import Control.Monad.Eff.Console
6−import Control.Monad.Eff
7−
8−doIt :: forall eff. Eff eff Boolean
9−doIt = pure true
10−
11−set = do
12− log "Testing..."
13− case 0 of
14− 0 -> doIt
15− _ -> pure false
16−
17−main = do
18− b <- set
19− case b of
20− true -> log "Done"
21− false -> unsafeCrashWith "Failed"
examples/passing/CaseInputWildcard.pursdeleted−18
@@ -1,18 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff (Eff)
5−import Control.Monad.Eff.Console (log, CONSOLE)
6−
7−data Foo = X | Y
8−
9−what ∷ Foo → Int → Boolean → Foo
10−what x = case _, x, _ of
11− 0, X, true → X
12− 0, Y, true → X
13− _, _, _ → Y
14−
15−main :: forall e. Eff (console :: CONSOLE | e) Unit
16−main = do
17− let tmp = what Y 0 true
18− log "Done"
examples/passing/CaseMultipleExpressions.pursdeleted−21
@@ -1,21 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Partial.Unsafe (unsafeCrashWith)
5−import Control.Monad.Eff.Console
6−import Control.Monad.Eff
7−
8−doIt :: forall eff. Eff eff Boolean
9−doIt = pure true
10−
11−set = do
12− log "Testing..."
13− case 42, 10 of
14− 42, 10 -> doIt
15− _ , _ -> pure false
16−
17−main = do
18− b <- set
19− case b of
20− true -> log "Done"
21− false -> unsafeCrashWith "Failed"
examples/passing/CaseStatement.pursdeleted−22
@@ -1,22 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data A = A | B | C
7−
8−f a _ A = a
9−f _ a B = a
10−f _ _ C = "Done"
11−
12−g a _ A = a
13−g _ b B = b
14−g _ _ C = C
15−
16−data M a = N | J a
17−
18−h f N a = a
19−h f a N = a
20−h f (J a) (J b) = J (f a b)
21−
22−main = log $ f "Done" "Failed" A
examples/passing/CheckFunction.pursdeleted−8
@@ -1,8 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−test = ((\x -> x+1.0) >>> (\x -> x*2.0)) 4.0
7−
8−main = log "Done"
examples/passing/CheckSynonymBug.pursdeleted−13
@@ -1,13 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−length :: forall a. Array a -> Int
7−length _ = 0
8−
9−type Foo a = Array a
10−
11−foo _ = length ([] :: Foo Number)
12−
13−main = log "Done"
examples/passing/CheckTypeClass.pursdeleted−18
@@ -1,18 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data Bar a = Bar
7−data Baz
8−
9−class Foo a where
10− foo :: Bar a -> Baz
11−
12−foo_ :: forall a. (Foo a) => a -> Baz
13−foo_ x = foo ((mkBar :: forall a. (Foo a) => a -> Bar a) x)
14−
15−mkBar :: forall a. a -> Bar a
16−mkBar _ = Bar
17−
18−main = log "Done"
examples/passing/Church.pursdeleted−18
@@ -1,18 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−type List a = forall r. r -> (a -> r -> r) -> r
6−
7−empty :: forall a. List a
8−empty = \r f -> r
9−
10−cons :: forall a. a -> List a -> List a
11−cons = \a l r f -> f a (l r f)
12−
13−append :: forall a. List a -> List a -> List a
14−append = \l1 l2 r f -> l2 (l1 r f) f
15−
16−test = append (cons 1 empty) (cons 2 empty)
17−
18−main = log "Done"
examples/passing/ClassRefSyntax.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Main where
2−
3−import Lib (class X, go)
4−import Control.Monad.Eff.Console (log)
5−
6−go' :: forall a. (X a) => a -> a
7−go' = go
8−
9−main = log "Done"
examples/passing/ClassRefSyntax/Lib.pursdeleted−4
@@ -1,4 +0,0 @@
1−module Lib (class X, go) where
2−
3−class X a where
4− go :: a -> a
examples/passing/Collatz.pursdeleted−21
@@ -1,21 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.ST
6−import Control.Monad.Eff.Console (log, logShow)
7−
8−collatz :: Int -> Int
9−collatz n = runPure (runST (do
10− r <- newSTRef n
11− count <- newSTRef 0
12− untilE $ do
13− modifySTRef count $ (+) 1
14− m <- readSTRef r
15− writeSTRef r $ if m `mod` 2 == 0 then m / 2 else 3 * m + 1
16− pure $ m == 1
17− readSTRef count))
18−
19−main = do
20− logShow $ collatz 1000
21− log "Done"
examples/passing/Comparisons.pursdeleted−15
@@ -1,15 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−import Test.Assert
7−
8−main = do
9− assert (1.0 < 2.0)
10− assert (2.0 == 2.0)
11− assert (3.0 > 1.0)
12− assert ("a" < "b")
13− assert ("a" == "a")
14− assert ("z" > "a")
15− log "Done"
examples/passing/Conditional.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−fns = \f -> if f true then f else \x -> x
6−
7−not = \x -> if x then false else true
8−
9−main = log "Done"
examples/passing/Console.pursdeleted−15
@@ -1,15 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−
7−replicateM_ :: forall m a. (Monad m) => Number -> m a -> m {}
8−replicateM_ 0.0 _ = pure {}
9−replicateM_ n act = do
10− act
11− replicateM_ (n - 1.0) act
12−
13−main = do
14− replicateM_ 10.0 (log "Hello World!")
15− log "Done"
examples/passing/ConstraintInference.pursdeleted−10
@@ -1,10 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−shout = log <<< (_ <> "!") <<< show
7−
8−main = do
9− shout "Test"
10− log "Done"
examples/passing/ConstraintParsingIssue.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console
4−
5−class X a
6−
7−instance x :: X (Array (Array a)) => X (Array a)
8−
9−main = log "Done"
examples/passing/ContextSimplification.pursdeleted−15
@@ -1,15 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console
5−
6−shout = log <<< (_ <> "!") <<< show
7−
8−-- Here, we should simplify the context so that only one Show
9−-- constraint is added.
10−usesShowTwice true = shout
11−usesShowTwice false = logShow
12−
13−main = do
14− usesShowTwice true "Test"
15− log "Done"
examples/passing/DataAndType.pursdeleted−10
@@ -1,10 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data A = A B
7−
8−type B = A
9−
10−main = log "Done"
examples/passing/DctorName.pursdeleted−33
@@ -1,33 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−newtype Bar' = Bar' Int
7−
8−data Foo' = Foo' Bar'
9−
10−data Baz'' = Baz'' | Baz'
11−
12−f ∷ Foo' → Boolean
13−f a = case a of Foo' b → true
14−
15−f' ∷ Boolean
16−f' = f $ Foo' $ Bar' 0
17−
18−g ∷ Baz'' → Int
19−g Baz'' = 0
20−g Baz' = 1
21−
22−g' ∷ Int
23−g' = g Baz''
24−
25−h ∷ Bar' → Int
26−h (Bar' x)
27− | x <= 10 = x * 2
28− | otherwise = 10
29−
30−h' ∷ Int
31−h' = h $ Bar' 4
32−
33−main = log "Done"
examples/passing/DctorOperatorAlias.pursdeleted−34
@@ -1,34 +0,0 @@
1−module Main where
2−
3− import Prelude (Unit, bind, (==))
4− import Control.Monad.Eff (Eff)
5− import Control.Monad.Eff.Console (CONSOLE, log)
6− import Test.Assert (ASSERT, assert')
7− import List (List(..), (:))
8− import List as L
9−
10− -- unqualified
11− infixl 6 Cons as !
12−
13− -- qualified
14− infixl 6 L.Cons as !!
15−
16− get1 ∷ ∀ a. a → List a → a
17− get1 y xs = case xs of
18− _ : x : _ → x
19− _ → y
20−
21− get2 ∷ ∀ a. a → List a → a
22− get2 _ (_ : x : _) = x
23− get2 y _ = y
24−
25− get3 ∷ ∀ a. a → List a → a
26− get3 _ (_ ! (x ! _)) = x
27− get3 y _ = y
28−
29− main ∷ Eff (assert ∷ ASSERT, console ∷ CONSOLE) Unit
30− main = do
31− assert' "Incorrect result!" (get1 0 (1 : 2 : 3 : Nil) == 2)
32− assert' "Incorrect result!" (get2 0 (1 ! (2 ! (3 ! Nil))) == 2)
33− assert' "Incorrect result!" (get3 0.0 (1.0 : 2.0 : (3.0 ! Nil)) == 2.0)
34− log "Done"
examples/passing/DctorOperatorAlias/List.pursdeleted−5
@@ -1,5 +0,0 @@
1−module List where
2−
3−data List a = Cons a (List a) | Nil
4−
5−infixr 6 Cons as :
examples/passing/DeepArrayBinder.pursdeleted−17
@@ -1,17 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console (log)
6−import Test.Assert
7−
8−data List a = Cons a (List a) | Nil
9−
10−match2 :: List Number -> Number
11−match2 (Cons x (Cons y xs)) = x * y + match2 xs
12−match2 _ = 0.0
13−
14−main = do
15− let result = match2 (Cons 1.0 (Cons 2.0 (Cons 3.0 (Cons 4.0 (Cons 5.0 (Cons 6.0 (Cons 7.0 (Cons 8.0 (Cons 9.0 Nil)))))))))
16− assert' "Incorrect result!" (result == 100.0)
17− log "Done"
examples/passing/DeepCase.pursdeleted−15
@@ -1,15 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log, logShow)
5−
6−f x y =
7− let
8− g = case y of
9− 0.0 -> x
10− x -> 1.0 + x * x
11− in g + x + y
12−
13−main = do
14− logShow $ f 1.0 10.0
15− log "Done"
examples/passing/DeriveNewtype.pursdeleted−27
@@ -1,27 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−import Data.Newtype
6−
7−newtype Test = Test String
8−
9−derive instance newtypeTest :: Newtype Test _
10−
11−t :: Test
12−t = wrap "hello"
13−
14−a :: String
15−a = unwrap t
16−
17−newtype First a = First a
18−
19−derive instance newtypeFirst :: Newtype (First b) _
20−
21−f :: First Int
22−f = wrap 1
23−
24−i :: Int
25−i = unwrap f
26−
27−main = log "Done"
examples/passing/Deriving.pursdeleted−34
@@ -1,34 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−import Test.Assert
6−
7−data V
8−
9−derive instance eqV :: Eq V
10−
11−derive instance ordV :: Ord V
12−
13−data X = X Int | Y String
14−
15−derive instance eqX :: Eq X
16−
17−derive instance ordX :: Ord X
18−
19−newtype Z = Z { left :: X, right :: X }
20−
21−derive instance eqZ :: Eq Z
22−
23−main = do
24− assert $ X 0 == X 0
25− assert $ X 0 /= X 1
26− assert $ Y "Foo" == Y "Foo"
27− assert $ Y "Foo" /= Y "Bar"
28− assert $ X 0 < X 1
29− assert $ X 0 < Y "Foo"
30− assert $ Y "Bar" < Y "Baz"
31− assert $ z == z
32− log "Done"
33− where
34− z = Z { left: X 0, right: Y "Foo" }
examples/passing/Do.pursdeleted−68
@@ -1,68 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data Maybe a = Nothing | Just a
7−
8−instance functorMaybe :: Functor Maybe where
9− map f Nothing = Nothing
10− map f (Just x) = Just (f x)
11−
12−instance applyMaybe :: Apply Maybe where
13− apply (Just f) (Just x) = Just (f x)
14− apply _ _ = Nothing
15−
16−instance applicativeMaybe :: Applicative Maybe where
17− pure = Just
18−
19−instance bindMaybe :: Bind Maybe where
20− bind Nothing _ = Nothing
21− bind (Just a) f = f a
22−
23−instance monadMaybe :: Monad Maybe
24−
25−test1 = \_ -> do
26− Just "abc"
27−
28−test2 = \_ -> do
29− x <- Just 1.0
30− y <- Just 2.0
31− Just (x + y)
32−
33−test3 = \_ -> do
34− Just 1.0
35− Nothing :: Maybe Number
36− Just 2.0
37−
38−test4 mx my = do
39− x <- mx
40− y <- my
41− Just (x + y + 1.0)
42−
43−test5 mx my mz = do
44− x <- mx
45− y <- my
46− let sum = x + y
47− z <- mz
48− Just (z + sum + 1.0)
49−
50−test6 mx = \_ -> do
51− let
52− f :: forall a. Maybe a -> a
53− f (Just x) = x
54− Just (f mx)
55−
56−test8 = \_ -> do
57− Just (do
58− Just 1.0)
59−
60−test9 = \_ -> (+) <$> Just 1.0 <*> Just 2.0
61−
62−test10 _ = do
63− let
64− f x = g x * 3.0
65− g x = f x / 2.0
66− Just (f 10.0)
67−
68−main = log "Done"
examples/passing/Dollar.pursdeleted−16
@@ -1,16 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−applyFn :: forall a b. (a -> b) -> a -> b
6−applyFn f x = f x
7−
8−infixr 1000 applyFn as $
9−
10−id x = x
11−
12−test1 x = id $ id $ id $ id $ x
13−
14−test2 x = id id $ id x
15−
16−main = log "Done"
examples/passing/Eff.pursdeleted−26
@@ -1,26 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.ST
6−import Control.Monad.Eff.Console (log, logShow)
7−
8−test1 = do
9− log "Line 1"
10− log "Line 2"
11−
12−test2 = runPure (runST (do
13− ref <- newSTRef 0.0
14− modifySTRef ref $ \n -> n + 1.0
15− readSTRef ref))
16−
17−test3 = pureST (do
18− ref <- newSTRef 0.0
19− modifySTRef ref $ \n -> n + 1.0
20− readSTRef ref)
21−
22−main = do
23− test1
24− logShow test2
25− logShow test3
26− log "Done"
examples/passing/EmptyDataDecls.pursdeleted−20
@@ -1,20 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Test.Assert
5−import Control.Monad.Eff.Console (log)
6−
7−data Z
8−data S n
9−
10−data ArrayBox n a = ArrayBox (Array a)
11−
12−nil :: forall a. ArrayBox Z a
13−nil = ArrayBox []
14−
15−cons' :: forall a n. a -> ArrayBox n a -> ArrayBox (S n) a
16−cons' x (ArrayBox xs) = ArrayBox $ append [x] xs
17−
18−main = case cons' 1 $ cons' 2 $ cons' 3 nil of
19− ArrayBox [1, 2, 3] -> log "Done"
20− _ -> assert' "Failed" false
examples/passing/EmptyRow.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data Foo r = Foo { | r }
7−
8−test :: Foo ()
9−test = Foo {}
10−
11−main = log "Done"
examples/passing/EmptyTypeClass.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−
7−head :: forall a. Partial => Array a -> a
8−head [x] = x
9−
10−main :: Eff _ _
11−main = log "Done"
examples/passing/EntailsKindedType.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−
7−test x = show (x :: _ :: *)
8−
9−main = do
10− when (show (unit :: Unit :: *) == "unit") (log "Done")
11− when (test unit == "unit") (log "Done")
examples/passing/EqOrd.pursdeleted−18
@@ -1,18 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log, logShow)
5−
6−data Pair a b = Pair a b
7−
8−instance ordPair :: (Ord a, Ord b) => Ord (Pair a b) where
9− compare (Pair a1 b1) (Pair a2 b2) = case compare a1 a2 of
10− EQ -> compare b1 b2
11− r -> r
12−
13−instance eqPair :: (Eq a, Eq b) => Eq (Pair a b) where
14− eq (Pair a1 b1) (Pair a2 b2) = a1 == a2 && b1 == b2
15−
16−main = do
17− logShow $ Pair 1.0 2.0 == Pair 1.0 2.0
18− log "Done"
examples/passing/ExplicitImportReExport.pursdeleted−11
@@ -1,11 +0,0 @@
1−-- from #1244
2−module Main where
3−
4−import Prelude
5−import Control.Monad.Eff.Console (log)
6−import Bar (foo)
7−
8−baz :: Int
9−baz = foo
10−
11−main = log "Done"
examples/passing/ExplicitImportReExport/Bar.pursdeleted−3
@@ -1,3 +0,0 @@
1−module Bar (module Foo) where
2−
3−import Foo
examples/passing/ExplicitImportReExport/Foo.pursdeleted−4
@@ -1,4 +0,0 @@
1−module Foo where
2−
3−foo :: Int
4−foo = 3
examples/passing/ExplicitOperatorSections.pursdeleted−15
@@ -1,15 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−subtractOne :: Int -> Int
7−subtractOne = (_ - 1)
8−
9−addOne :: Int -> Int
10−addOne = (1 + _)
11−
12−named :: Int -> Int
13−named = (_ `sub` 1)
14−
15−main = log "Done"
examples/passing/ExportExplicit.pursdeleted−10
@@ -1,10 +0,0 @@
1−module Main where
2−
3−import M1
4−import Control.Monad.Eff.Console (log)
5−
6−testX = X
7−testZ = Z
8−testFoo = foo
9−
10−main = log "Done"
examples/passing/ExportExplicit/M1.pursdeleted−10
@@ -1,10 +0,0 @@
1−module M1 (X(X), Z(..), foo) where
2−
3−data X = X | Y
4−data Z = Z
5−
6−foo :: Int
7−foo = 0
8−
9−bar :: Int
10−bar = 1
examples/passing/ExportExplicit2.pursdeleted−8
@@ -1,8 +0,0 @@
1−module Main where
2−
3−import M1
4−import Control.Monad.Eff.Console (log)
5−
6−testBar = bar
7−
8−main = log "Done"
examples/passing/ExportExplicit2/M1.pursdeleted−7
@@ -1,7 +0,0 @@
1−module M1 (bar) where
2−
3−foo :: Int
4−foo = 0
5−
6−bar :: Int
7−bar = foo
examples/passing/ExportedInstanceDeclarations.pursdeleted−45
@@ -1,45 +0,0 @@
1−-- Tests that instances for non-exported classes / types do not appear in the
2−-- result of `exportedDeclarations`.
3−module Main
4− ( Const(..)
5− , class Foo
6− , foo
7− , main
8− ) where
9−
10−import Prelude
11−import Control.Monad.Eff.Console (log)
12−
13−data Const a b = Const a
14−
15−class Foo a where
16− foo :: a
17−
18−data NonexportedType = NonexportedType
19−
20−class NonexportedClass a where
21− notExported :: a
22−
23−-- There are three places that a nonexported type or type class can occur,
24−-- leading an instance to count as non-exported:
25−-- * Constraints
26−-- * The type class itself
27−-- * The instance types
28−
29−-- Case 1: constraints
30−instance nonExportedFoo :: (NonexportedClass a) => Foo a where
31− foo = notExported
32−
33−-- Another instance of case 1:
34−instance nonExportedFoo2 :: (Foo NonexportedType) => Foo (a -> a) where
35− foo = id
36−
37−-- Case 2: type class
38−instance nonExportedNonexportedType :: NonexportedClass (Const Int a) where
39− notExported = Const 0
40−
41−-- Case 3: instance types
42−instance constFoo :: Foo (Const NonexportedType b) where
43− foo = Const NonexportedType
44−
45−main = log "Done"
examples/passing/ExtendedInfixOperators.pursdeleted−17
@@ -1,17 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log, logShow)
5−import Data.Function (on)
6−
7−comparing :: forall a b. (Ord b) => (a -> b) -> a -> a -> Ordering
8−comparing f = compare `on` f
9−
10−null [] = true
11−null _ = false
12−
13−test = [1.0, 2.0, 3.0] `comparing null` [4.0, 5.0, 6.0]
14−
15−main = do
16− logShow test
17− log "Done"
examples/passing/Fib.pursdeleted−18
@@ -1,18 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff (whileE)
5−import Control.Monad.Eff.Console (log, logShow)
6−import Control.Monad.ST (runST, newSTRef, readSTRef, writeSTRef)
7−
8−main = do
9− runST do
10− n1 <- newSTRef 1.0
11− n2 <- newSTRef 1.0
12− whileE ((>) 1000.0 <$> readSTRef n1) $ do
13− n1' <- readSTRef n1
14− n2' <- readSTRef n2
15− writeSTRef n2 $ n1' + n2'
16− writeSTRef n1 n2'
17− logShow n2'
18− log "Done"
examples/passing/FieldConsPuns.pursdeleted−13
@@ -1,13 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log, logShow)
5−
6−greet { greeting, name } = log $ greeting <> ", " <> name <> "."
7−
8−main = do
9− greet { greeting, name }
10− log "Done"
11− where
12− greeting = "Hello"
13− name = "World"
examples/passing/FieldPuns.pursdeleted−10
@@ -1,10 +0,0 @@
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 = do
9− greet { greeting: "Hello", name: "World" }
10− log "Done"
examples/passing/FinalTagless.pursdeleted−25
@@ -1,25 +0,0 @@
1−module Main where
2−
3−import Prelude hiding (add)
4−import Control.Monad.Eff.Console (log, logShow)
5−
6−class E e where
7− num :: Number -> e Number
8− add :: e Number -> e Number -> e Number
9−
10−type Expr a = forall e. (E e) => e a
11−
12−data Id a = Id a
13−
14−instance exprId :: E Id where
15− num = Id
16− add (Id n) (Id m) = Id (n + m)
17−
18−runId (Id a) = a
19−
20−three :: Expr Number
21−three = add (num 1.0) (num 2.0)
22−
23−main = do
24− logShow $ runId three
25− log "Done"
examples/passing/ForeignKind.pursdeleted−10
@@ -1,10 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import ForeignKinds.Lib (kind Nat, Zero, Succ, N3, NatProxy, class AddNat, addNat, proxy1, proxy2)
5−import Control.Monad.Eff.Console (log)
6−
7−proxy1Add2Is3 :: NatProxy N3
8−proxy1Add2Is3 = addNat proxy1 proxy2
9−
10−main = log "Done"
examples/passing/ForeignKind/Lib.pursdeleted−60
@@ -1,60 +0,0 @@
1−module ForeignKinds.Lib (kind Nat, Kinded, Zero, Succ, N0, N1, N2, N3, NatProxy(..), class AddNat, addNat, proxy1, proxy2) where
2−
3−-- declaration
4−
5−foreign import kind Nat
6−
7−-- use in foreign data
8−
9−foreign import data Zero :: Nat
10−foreign import data Succ :: Nat -> Nat
11−
12−-- use in data
13−
14−data NatProxy (t :: Nat) = NatProxy
15−
16−-- use in type sig
17−
18−succProxy :: forall n. NatProxy n -> NatProxy (Succ n)
19−succProxy _ = NatProxy
20−
21−-- use in alias
22−
23−type Kinded f = f :: Nat
24−
25−type KindedZero = Kinded Zero
26−
27−type N0 = Zero
28−type N1 = Succ N0
29−type N2 = Succ N1
30−type N3 = Succ N2
31−
32−-- use of alias
33−
34−proxy0 :: NatProxy N0
35−proxy0 = NatProxy
36−
37−proxy1 :: NatProxy N1
38−proxy1 = NatProxy
39−
40−proxy2 :: NatProxy N2
41−proxy2 = NatProxy
42−
43−proxy3 :: NatProxy N3
44−proxy3 = NatProxy
45−
46−-- use in class
47−
48−class AddNat (l :: Nat) (r :: Nat) (o :: Nat) | l -> r o
49−
50−instance addNatZero
51− :: AddNat Zero r r
52−
53−instance addNatSucc
54− :: AddNat l r o
55− => AddNat (Succ l) r (Succ o)
56−
57−-- use of class
58−
59−addNat :: forall l r o. AddNat l r o => NatProxy l -> NatProxy r -> NatProxy o
60−addNat _ _ = NatProxy
examples/passing/FunWithFunDeps.jsdeleted−32
@@ -1,32 +0,0 @@
1−
2−//: forall e. FVect Z e
3−exports.fnil = [];
4−
5−//: forall n e. e -> FVect n e -> FVect (S n) e
6−exports.fcons = function (hd) {
7− return function (tl) {
8− return [hd].concat(tl);
9− };
10−};
11−
12−exports.fappend = function (dict) {
13− return function (left) {
14− return function (right) {
15− return left.concat(right);
16− };
17− };
18−};
19−
20−exports.fflatten = function (dict) {
21− return function (v) {
22− var accRef = [];
23− for (var indexRef = 0; indexRef < v.length; indexRef += 1) {
24− accRef = accRef.concat(v[indexRef]);
25− }
26− return accRef;
27− };
28−};
29−
30−exports.ftoArray = function (vect) {
31− return vect;
32−};
examples/passing/FunWithFunDeps.pursdeleted−41
@@ -1,41 +0,0 @@
1−-- Taken from https://github.com/LiamGoodacre/purescript-fun-with-fundeps
2−
3−module Main where
4−
5−import Control.Monad.Eff.Console (log)
6−
7−-- Nat : Type
8−data Z
9−data S n
10−
11−type S2 n = S (S n)
12−type S3 n = S (S2 n)
13−type S4 n = S (S3 n)
14−type S5 n = S (S4 n)
15−type S15 n = S5 (S5 (S5 n))
16−
17−class NatPlus l r o | l r -> o
18−instance natPlusZ :: NatPlus Z r r
19−instance natPlusS :: (NatPlus l r o) => NatPlus (S l) r (S o)
20−
21−class NatMult l r o | l r -> o
22−instance natMultZ :: NatMult Z n Z
23−instance natMultS :: (NatMult m n r, NatPlus n r s) => NatMult (S m) n s
24−
25−-- Foreign Vect
26−foreign import data FVect :: * -> * -> *
27−foreign import fnil :: forall e. FVect Z e
28−foreign import fcons :: forall n e. e -> FVect n e -> FVect (S n) e
29−foreign import fappend :: forall l r o e. (NatPlus l r o) => FVect l e -> FVect r e -> FVect o e
30−foreign import fflatten :: forall f s t o. (NatMult f s o) => FVect f (FVect s t) -> FVect o t
31−foreign import ftoArray :: forall n e. FVect n e -> Array e
32−
33−-- should be able to figure these out
34−fsingleton x = fcons x fnil
35−fexample = fcons 1 (fsingleton 2) `fappend` fsingleton 3 `fappend` fcons 4 (fsingleton 5)
36−fexample2 = fexample `fappend` fexample `fappend` fexample
37−fexample3 = fsingleton fexample `fappend` fsingleton fexample `fappend` fsingleton fexample
38−
39−fexample4 = fflatten fexample3
40−
41−main = log "Done"
examples/passing/FunctionScope.pursdeleted−13
@@ -1,13 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Test.Assert
5−import Control.Monad.Eff.Console (log)
6−
7−mkValue :: Number -> Number
8−mkValue id = id
9−
10−main = do
11− let value = mkValue 1.0
12− assert $ value == 1.0
13− log "Done"
examples/passing/FunctionalDependencies.pursdeleted−21
@@ -1,21 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−data Nil
6−data Cons x xs
7−
8−class Append a b c | a b -> c
9−
10−instance appendNil :: Append Nil b b
11−
12−instance appendCons :: Append xs b c => Append (Cons x xs) b (Cons x c)
13−
14−data Proxy a = Proxy
15−
16−appendProxy :: forall a b c. Append a b c => Proxy a -> Proxy b -> Proxy c
17−appendProxy Proxy Proxy = Proxy
18−
19−test = appendProxy (Proxy :: Proxy (Cons Int Nil)) (Proxy :: Proxy (Cons String Nil))
20−
21−main = log "Done"
examples/passing/Functions.pursdeleted−12
@@ -1,12 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−test1 = \_ -> 0.0
7−
8−test2 = \a b -> a + b + 1.0
9−
10−test3 = \a -> a
11−
12−main = log "Done"
examples/passing/Functions2.pursdeleted−13
@@ -1,13 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Test.Assert
5−import Control.Monad.Eff.Console (log)
6−
7−test :: forall a b. a -> b -> a
8−test = \const _ -> const
9−
10−main = do
11− let value = test "Done" {}
12− assert' "Not done" $ value == "Done"
13− log "Done"
examples/passing/Generalization1.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (logShow, log)
5−
6−main = do
7− logShow (sum 1.0 2.0)
8− logShow (sum 1 2)
9− log "Done"
10−
11−sum x y = x + y
examples/passing/GenericsRep.pursdeleted−53
@@ -1,53 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff (Eff)
5−import Control.Monad.Eff.Console (CONSOLE, log, logShow)
6−import Data.Generic.Rep (class Generic)
7−import Data.Generic.Rep.Eq (genericEq)
8−
9−data X a = X a
10−
11−derive instance genericX :: Generic (X a) _
12−
13−instance eqX :: Eq a => Eq (X a) where
14− eq xs ys = genericEq xs ys
15−
16−data Y a = Y | Z a (Y a)
17−
18−derive instance genericY :: Generic (Y a) _
19−
20−instance eqY :: Eq a => Eq (Y a) where
21− eq xs ys = genericEq xs ys
22−
23−data Z
24−
25−derive instance genericZ :: Generic Z _
26−
27−instance eqZ :: Eq Z where
28− eq x y = genericEq x y
29−
30−newtype W = W { x :: Int, y :: String }
31−
32−derive instance genericW :: Generic W _
33−
34−instance eqW :: Eq W where
35− eq x y = genericEq x y
36−
37−data V = V { x :: Int } { x :: Int }
38−
39−derive instance genericV :: Generic V _
40−
41−instance eqV :: Eq V where
42− eq x y = genericEq x y
43−
44−main :: Eff (console :: CONSOLE) Unit
45−main = do
46− logShow (X 0 == X 1)
47− logShow (X 1 == X 1)
48− logShow (Z 1 Y == Z 1 Y)
49− logShow (Z 1 Y == Y)
50− logShow (Y == Y :: Y Z)
51− logShow (W { x: 0, y: "A" } == W { x: 0, y: "A" })
52− logShow (V { x: 0 } { x: 0 } == V { x: 0 } { x: 0 })
53− log "Done"
examples/passing/Guards.pursdeleted−30
@@ -1,30 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−collatz = \x -> case x of
7− y | y `mod` 2.0 == 0.0 -> y / 2.0
8− y -> y * 3.0 + 1.0
9−
10−-- Guards have access to current scope
11−collatz2 = \x y -> case x of
12− z | y > 0.0 -> z / 2.0
13− z -> z * 3.0 + 1.0
14−
15−min :: forall a. (Ord a) => a -> a -> a
16−min n m | n < m = n
17− | otherwise = m
18−
19−max :: forall a. (Ord a) => a -> a -> a
20−max n m = case unit of
21− _ | m < n -> n
22− | otherwise -> m
23−
24−testIndentation :: Number -> Number -> Number
25−testIndentation x y | x > 0.0
26− = x + y
27− | otherwise
28− = y - x
29−
30−main = log $ min "Done" "ZZZZ"
examples/passing/HasOwnProperty.pursdeleted−5
@@ -1,5 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−main = log ({hasOwnProperty: "Hi"} {hasOwnProperty = "Done"}).hasOwnProperty
examples/passing/HoistError.pursdeleted−12
@@ -1,12 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−import Test.Assert
7−
8−main = do
9− let x = 0.0
10− assert $ x == 0.0
11− let x = 1.0 + 1.0
12− log "Done"
examples/passing/IfThenElseMaybe.pursdeleted−12
@@ -1,12 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data Maybe a = Nothing | Just a
7−
8−test1 = if true then Just 10 else Nothing
9−
10−test2 = if true then Nothing else Just 10
11−
12−main = log "Done"
examples/passing/IfWildcard.pursdeleted−19
@@ -1,19 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff (Eff)
5−import Control.Monad.Eff.Console (log, CONSOLE)
6−
7−data Foo = X | Y
8−
9−cond ∷ ∀ a. Boolean → a → a → a
10−cond = if _ then _ else _
11−
12−what ∷ Boolean → Foo
13−what = if _ then X else Y
14−
15−main :: forall e. Eff (console :: CONSOLE | e) Unit
16−main = do
17− let tmp1 = what true
18− tmp2 = cond true 0 1
19− log "Done"
examples/passing/ImplicitEmptyImport.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−main = do
7− log "Hello"
8− log "Goodbye"
9− log "Done"
examples/passing/Import.pursdeleted−6
@@ -1,6 +0,0 @@
1−module Main where
2−
3−import M2
4−import Control.Monad.Eff.Console (log)
5−
6−main = log "Done"
examples/passing/Import/M1.pursdeleted−8
@@ -1,8 +0,0 @@
1−module M1 where
2−
3−import Prelude ()
4−
5−id :: forall a. a -> a
6−id = \x -> x
7−
8−foo = id
examples/passing/Import/M2.pursdeleted−6
@@ -1,6 +0,0 @@
1−module M2 where
2−
3−import Prelude ()
4−import M1
5−
6−main = \_ -> foo 42
examples/passing/ImportExplicit.pursdeleted−10
@@ -1,10 +0,0 @@
1−module Main where
2−
3−import M1 (X(..))
4−import Control.Monad.Eff.Console (log)
5−
6−testX :: X
7−testX = X
8−testY = Y
9−
10−main = log "Done"
examples/passing/ImportExplicit/M1.pursdeleted−4
@@ -1,4 +0,0 @@
1−module M1 where
2−
3−data X = X | Y
4−data Z = Z
examples/passing/ImportHiding.pursdeleted−19
@@ -1,19 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console
4−import Prelude hiding (
5− show, -- a value
6− class Show, -- a type class
7− Unit(..) -- a constructor
8− )
9−
10−show = 1.0
11−
12−class Show a where
13− noshow :: a -> a
14−
15−data Unit = X | Y
16−
17−main = do
18− logShow show
19− log "Done"
examples/passing/ImportQualified.pursdeleted−8
@@ -1,8 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import M1
6−import Control.Monad.Eff.Console as C
7−
8−main = C.log (log "Done")
examples/passing/ImportQualified/M1.pursdeleted−3
@@ -1,3 +0,0 @@
1−module M1 where
2−
3−log x = x
examples/passing/InferRecFunWithConstrainedArgument.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log, logShow)
5−
6−test 100 = 100
7−test n = test(1 + n)
8−
9−main = do
10− logShow (test 0)
11− log "Done"
examples/passing/InstanceBeforeClass.pursdeleted−12
@@ -1,12 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−instance fooNumber :: Foo Number where
7− foo = 0.0
8−
9−class Foo a where
10− foo :: a
11−
12−main = log "Done"
examples/passing/IntAndChar.pursdeleted−19
@@ -1,19 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console (log)
6−import Test.Assert
7−
8−f 1 = 1
9−f _ = 0
10−
11−g 'a' = 'a'
12−g _ = 'b'
13−
14−main = do
15− assert $ f 1 == 1
16− assert $ f 0 == 0
17− assert $ g 'a' == 'a'
18− assert $ g 'b' == 'b'
19− log "Done"
examples/passing/JSReserved.pursdeleted−13
@@ -1,13 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−yield = 0
7−member = 1
8−
9−public = \return -> return
10−
11−this catch = catch
12−
13−main = log "Done"
examples/passing/KindedType.pursdeleted−34
@@ -1,34 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−type Star2Star f = f :: * -> *
7−
8−type Star t = t :: *
9−
10−test1 :: Star2Star Array String
11−test1 = ["test"]
12−
13−f :: Star (String -> String)
14−f s = s
15−
16−test2 = f "test"
17−
18−data Proxy (f :: * -> *) = Proxy
19−
20−test3 :: Proxy Array
21−test3 = Proxy
22−
23−type Test (f :: * -> *) = f String
24−
25−test4 :: Test Array
26−test4 = ["test"]
27−
28−class Clazz (a :: *) where
29− def :: a
30−
31−instance clazzString :: Clazz String where
32− def = "test"
33−
34−main = log "Done"
examples/passing/LargeSumType.pursdeleted−35
@@ -1,35 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−data Large = A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
6−
7−explode A A = "A"
8−explode B B = "B"
9−explode C C = "C"
10−explode D D = "D"
11−explode E E = "E"
12−explode F F = "F"
13−explode G G = "G"
14−explode H H = "H"
15−explode I I = "I"
16−explode J J = "J"
17−explode K K = "K"
18−explode L L = "L"
19−explode M M = "M"
20−explode N N = "N"
21−explode O O = "O"
22−explode P P = "P"
23−explode Q Q = "Q"
24−explode R R = "R"
25−explode S S = "S"
26−explode T T = "T"
27−explode U U = "U"
28−explode V V = "V"
29−explode W W = "W"
30−explode X X = "X"
31−explode Y Y = "Y"
32−explode Z Z = "Z"
33−explode _ _ = ""
34−
35−main = log "Done"
examples/passing/Let.pursdeleted−58
@@ -1,58 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Partial.Unsafe (unsafePartial)
5−import Control.Monad.Eff
6−import Control.Monad.Eff.Console (log, logShow)
7−import Control.Monad.ST
8−
9−test1 x = let
10− y :: Number
11− y = x + 1.0
12− in y
13−
14−test2 x y =
15− let x' = x + 1.0 in
16− let y' = y + 1.0 in
17− x' + y'
18−
19−test3 = let f x y z = x + y + z in
20− f 1.0 2.0 3.0
21−
22−test4 = let
23− f x [y, z] = x y z
24− in f (+) [1.0, 2.0]
25−
26−test5 = let
27− f x | x > 0.0 = g (x / 2.0) + 1.0
28− f x = 0.0
29− g x = f (x - 1.0) + 1.0
30− in f 10.0
31−
32−test7 = let
33− f :: forall a. a -> a
34− f x = x
35− in if f true then f 1.0 else f 2.0
36−
37−test8 :: Number -> Number
38−test8 x = let
39− go y | (x - 0.1 < y * y) && (y * y < x + 0.1) = y
40− go y = go $ (y + x / y) / 2.0
41− in go x
42−
43−test10 _ =
44− let
45− f x = g x * 3.0
46− g x = f x / 2.0
47− in f 10.0
48−
49−main :: Eff _ _
50−main = do
51− logShow (test1 1.0)
52− logShow (test2 1.0 2.0)
53− logShow test3
54− unsafePartial (logShow test4)
55− logShow test5
56− logShow test7
57− logShow (test8 100.0)
58− log "Done"
examples/passing/Let2.pursdeleted−20
@@ -1,20 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log, logShow)
5−
6−test =
7− let f :: Number -> Boolean
8− f 0.0 = false
9− f n = g (n - 1.0)
10−
11− g :: Number -> Boolean
12− g 0.0 = true
13− g n = f (n - 1.0)
14−
15− x = f 1.0
16− in not x
17−
18−main = do
19− logShow test
20− log "Done"
examples/passing/LetInInstance.pursdeleted−15
@@ -1,15 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−class Foo a where
7− foo :: a -> String
8−
9−instance fooString :: Foo String where
10− foo = go
11− where
12− go :: String -> String
13− go s = s
14−
15−main = log "Done"
examples/passing/LiberalTypeSynonyms.pursdeleted−22
@@ -1,22 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−type Reader = (->) String
7−
8−foo :: Reader String
9−foo s = s
10−
11−type AndFoo r = (foo :: String | r)
12−
13−getFoo :: forall r. Prim.Record (AndFoo r) -> String
14−getFoo o = o.foo
15−
16−type F r = { | r } -> { | r }
17−
18−f :: (forall r. F r) -> String
19−f g = case g { x: "Hello" } of
20− { x: x } -> x
21−
22−main = log "Done"
examples/passing/MPTCs.pursdeleted−21
@@ -1,21 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−class NullaryTypeClass where
7− greeting :: String
8−
9−instance nullaryTypeClass :: NullaryTypeClass where
10− greeting = "Hello, World!"
11−
12−class Coerce a b where
13− coerce :: a -> b
14−
15−instance coerceRefl :: Coerce a a where
16− coerce a = a
17−
18−instance coerceShow :: Show a => Coerce a String where
19− coerce = show
20−
21−main = log "Done"
examples/passing/Match.pursdeleted−10
@@ -1,10 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data Foo a = Foo
7−
8−foo = \f -> case f of Foo -> "foo"
9−
10−main = log "Done"
examples/passing/Module.pursdeleted−7
@@ -1,7 +0,0 @@
1−module Main where
2−
3−import M1
4−import M2
5−import Control.Monad.Eff.Console (log)
6−
7−main = log "Done"
examples/passing/Module/M1.pursdeleted−14
@@ -1,14 +0,0 @@
1−module M1 where
2−
3−import Prelude
4−
5−data Foo = Foo String
6−
7−foo :: Foo -> String
8−foo = \f -> case f of Foo s -> s <> "foo"
9−
10−bar :: Foo -> String
11−bar = foo
12−
13−incr :: Int -> Int
14−incr x = x + 1
examples/passing/Module/M2.pursdeleted−10
@@ -1,10 +0,0 @@
1−module M2 where
2−
3−import Prelude
4−import M1 as M1
5−
6−baz :: M1.Foo -> String
7−baz = M1.foo
8−
9−match :: M1.Foo -> String
10−match = \f -> case f of M1.Foo s -> s <> "foo"
examples/passing/ModuleDeps.pursdeleted−6
@@ -1,6 +0,0 @@
1−module Main where
2−
3−import M1
4−import Control.Monad.Eff.Console (log)
5−
6−main = log "Done"
examples/passing/ModuleDeps/M1.pursdeleted−5
@@ -1,5 +0,0 @@
1−module M1 where
2−
3−import M2 as M2
4−
5−foo = M2.bar
examples/passing/ModuleDeps/M2.pursdeleted−5
@@ -1,5 +0,0 @@
1−module M2 where
2−
3−import M3 as M3
4−
5−bar = M3.baz
examples/passing/ModuleDeps/M3.pursdeleted−3
@@ -1,3 +0,0 @@
1−module M3 where
2−
3−baz = 1
examples/passing/ModuleExport.pursdeleted−8
@@ -1,8 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log, logShow)
4−import A
5−
6−main = do
7− logShow (show 1.0)
8− log "Done"
examples/passing/ModuleExport/A.pursdeleted−3
@@ -1,3 +0,0 @@
1−module A (module Prelude) where
2−
3−import Prelude
examples/passing/ModuleExportDupes.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3− import Control.Monad.Eff.Console
4− import A
5− import B
6− import C
7− import Prelude
8−
9− main = do
10− logShow (show 1.0)
11− log "Done"
examples/passing/ModuleExportDupes/A.pursdeleted−3
@@ -1,3 +0,0 @@
1−module A (module Prelude) where
2−
3−import Prelude
examples/passing/ModuleExportDupes/B.pursdeleted−3
@@ -1,3 +0,0 @@
1−module B (module Prelude) where
2−
3−import Prelude
examples/passing/ModuleExportDupes/C.pursdeleted−4
@@ -1,4 +0,0 @@
1−module C (module Prelude, module A) where
2−
3−import Prelude
4−import A
examples/passing/ModuleExportExcluded.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log, logShow)
5−import A (foo)
6−
7−otherwise = false
8−
9−main = do
10− logShow "1.0"
11− log "Done"
examples/passing/ModuleExportExcluded/A.pursdeleted−6
@@ -1,6 +0,0 @@
1−module A (module Prelude, foo) where
2−
3−import Prelude
4−
5−foo :: Number -> Number
6−foo _ = 0.0
examples/passing/ModuleExportQualified.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log, logShow)
5−import A as B
6−
7−main = do
8− logShow (B.show 1.0)
9− log "Done"
examples/passing/ModuleExportQualified/A.pursdeleted−3
@@ -1,3 +0,0 @@
1−module A (module Prelude) where
2−
3−import Prelude
examples/passing/ModuleExportSelf.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console
4−import A
5−
6−bar :: Foo
7−bar = true
8−
9−main = do
10− logShow (show bar)
11− log "Done"
examples/passing/ModuleExportSelf/A.pursdeleted−5
@@ -1,5 +0,0 @@
1−module A (module A, module Prelude) where
2−
3−import Prelude
4−
5−type Foo = Boolean
examples/passing/Monad.pursdeleted−32
@@ -1,32 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−type Monad m = { return :: forall a. a -> m a
6− , bind :: forall a b. m a -> (a -> m b) -> m b }
7−
8−data Id a = Id a
9−
10−id :: Monad Id
11−id = { return : Id
12− , bind : \ma f -> case ma of Id a -> f a }
13−
14−data Maybe a = Nothing | Just a
15−
16−maybe :: Monad Maybe
17−maybe = { return : Just
18− , bind : \ma f -> case ma of
19− Nothing -> Nothing
20− Just a -> f a
21− }
22−
23−test :: forall m. Monad m -> m Number
24−test = \m -> m.bind (m.return 1.0) (\n1 ->
25− m.bind (m.return "Test") (\n2 ->
26− m.return n1))
27−
28−test1 = test id
29−
30−test2 = test maybe
31−
32−main = log "Done"
examples/passing/MonadState.pursdeleted−63
@@ -1,63 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console
5−
6−data Tuple a b = Tuple a b
7−
8−instance showTuple :: (Show a, Show b) => Show (Tuple a b) where
9− show (Tuple a b) = "(" <> show a <> ", " <> show b <> ")"
10−
11−class Monad m <= MonadState s m where
12− get :: m s
13− put :: s -> m Unit
14−
15−data State s a = State (s -> Tuple s a)
16−
17−runState s (State f) = f s
18−
19−instance functorState :: Functor (State s) where
20− map = liftM1
21−
22−instance applyState :: Apply (State s) where
23− apply = ap
24−
25−instance applicativeState :: Applicative (State s) where
26− pure a = State $ \s -> Tuple s a
27−
28−instance bindState :: Bind (State s) where
29− bind f g = State $ \s -> case runState s f of
30− Tuple s1 a -> runState s1 (g a)
31−
32−instance monadState :: Monad (State s)
33−
34−instance monadStateState :: MonadState s (State s) where
35− get = State (\s -> Tuple s s)
36− put s = State (\_ -> Tuple s unit)
37−
38−-- Without the call to same, the following strange (but correct, in the absence of
39−-- functional dependencies) type:
40−--
41−-- forall m t1 t2.
42−-- ( Bind m
43−-- , MonadState t1 m
44−-- , MonadState t2 m
45−-- ) => (t1 -> t2) -> m Unit
46−--
47−-- With the type hint, the inferred type is more sensible:
48−--
49−-- forall m t.
50−-- ( Bind m
51−-- , MonadState t m
52−-- ) => (t -> t) -> m Unit
53−modify f =
54− do
55− s <- get
56− put (same f s)
57− where
58− same :: forall a. (a -> a) -> (a -> a)
59− same = id
60−
61−main = do
62− logShow $ runState 0 (modify (_ + 1))
63− log "Done"
examples/passing/MultiArgFunctions.pursdeleted−27
@@ -1,27 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Data.Function.Uncurried
5−import Control.Monad.Eff
6−import Control.Monad.Eff.Console
7−
8−f = mkFn2 $ \a b -> runFn2 g a b + runFn2 g b a
9−
10−g = mkFn2 $ \a b -> case {} of
11− _ | a <= 0.0 || b <= 0.0 -> b
12− _ -> runFn2 f (a - 0.0) (b - 0.0)
13−
14−main = do
15− runFn0 (mkFn0 $ \_ -> log $ show 0.0)
16− runFn1 (mkFn1 $ \a -> log $ show a) 0.0
17− runFn2 (mkFn2 $ \a b -> log $ show [a, b]) 0.0 0.0
18− runFn3 (mkFn3 $ \a b c -> log $ show [a, b, c]) 0.0 0.0 0.0
19− runFn4 (mkFn4 $ \a b c d -> log $ show [a, b, c, d]) 0.0 0.0 0.0 0.0
20− runFn5 (mkFn5 $ \a b c d e -> log $ show [a, b, c, d, e]) 0.0 0.0 0.0 0.0 0.0
21− runFn6 (mkFn6 $ \a b c d e f -> log $ show [a, b, c, d, e, f]) 0.0 0.0 0.0 0.0 0.0 0.0
22− runFn7 (mkFn7 $ \a b c d e f g -> log $ show [a, b, c, d, e, f, g]) 0.0 0.0 0.0 0.0 0.0 0.0 0.0
23− runFn8 (mkFn8 $ \a b c d e f g h -> log $ show [a, b, c, d, e, f, g, h]) 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
24− runFn9 (mkFn9 $ \a b c d e f g h i -> log $ show [a, b, c, d, e, f, g, h, i]) 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
25− runFn10 (mkFn10 $ \a b c d e f g h i j-> log $ show [a, b, c, d, e, f, g, h, i, j]) 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
26− logShow $ runFn2 g 0.0 0.0
27− log "Done"
examples/passing/MutRec.pursdeleted−20
@@ -1,20 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−f 0.0 = 0.0
7−f x = g x + 0.0
8−
9−g x = f (x / 0.0)
10−
11−data Even = Zero | Even Odd
12−
13−data Odd = Odd Even
14−
15−evenToNumber Zero = 0.0
16−evenToNumber (Even n) = oddToNumber n + 0.0
17−
18−oddToNumber (Odd n) = evenToNumber n + 0.0
19−
20−main = log "Done"
examples/passing/MutRec2.pursdeleted−20
@@ -1,20 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data A = A B
7−
8−data B = B A
9−
10−foreign import data S :: *
11−
12−f :: A -> S
13−f a = case a of A b -> g b
14−
15−g b = case b of B a -> f a
16−
17−showN :: A -> S
18−showN a = f a
19−
20−main = log "Done"
examples/passing/MutRec3.pursdeleted−20
@@ -1,20 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data A = A B
7−
8−data B = B A
9−
10−foreign import data S :: *
11−
12−f a = case a of A b -> g b
13−
14−g :: B -> S
15−g b = case b of B a -> f a
16−
17−showN :: A -> S
18−showN a = f a
19−
20−main = log "Done"
examples/passing/NakedConstraint.pursdeleted−10
@@ -1,10 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console
4−
5−data List a = Nil | Cons a (List a)
6−
7−head :: (Partial) => List Int -> Int
8−head (Cons x _) = x
9−
10−main = log "Done"
examples/passing/NamedPatterns.pursdeleted−10
@@ -1,10 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−foo = \x -> case x of
7− y@{ foo: "Foo" } -> y
8− y -> y
9−
10−main = log "Done"
examples/passing/NegativeBinder.pursdeleted−10
@@ -1,10 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−test :: Number -> Boolean
7−test -1.0 = false
8−test _ = true
9−
10−main = log "Done"
examples/passing/NegativeIntInRange.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−n :: Int
7−n = -2147483648
8−
9−main = log "Done"
examples/passing/Nested.pursdeleted−10
@@ -1,10 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data Extend r a = Extend { prev :: r a, next :: a }
7−
8−data Matrix r a = Square (r (r a)) | Bigger (Matrix (Extend r) a)
9−
10−main = log "Done"
examples/passing/NestedTypeSynonyms.pursdeleted−12
@@ -1,12 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−type X = String
7−type Y = X -> X
8−
9−fn :: Y
10−fn a = a
11−
12−main = log (fn "Done")
examples/passing/NestedWhere.pursdeleted−13
@@ -1,13 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−f x = g x
7− where
8− g x = go x
9− where
10− go x = go1 (x - 1.0)
11− go1 x = go x
12−
13−main = log "Done"
examples/passing/Newtype.pursdeleted−23
@@ -1,23 +0,0 @@
1−module Main where
2−
3−import Prelude hiding (apply)
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−
7−newtype Thing = Thing String
8−
9−instance showThing :: Show Thing where
10− show (Thing x) = "Thing " <> show x
11−
12−newtype Box a = Box a
13−
14−instance showBox :: (Show a) => Show (Box a) where
15− show (Box x) = "Box " <> show x
16−
17−apply f x = f x
18−
19−main = do
20− logShow $ Thing "hello"
21− logShow $ Box 42.0
22− logShow $ apply Box 9000.0
23− log "Done"
examples/passing/NewtypeClass.pursdeleted−39
@@ -1,39 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−
7−class Newtype t a | t -> a where
8− wrap :: a -> t
9− unwrap :: t -> a
10−
11−instance newtypeMultiplicative :: Newtype (Multiplicative a) a where
12− wrap = Multiplicative
13− unwrap (Multiplicative a) = a
14−
15−data Multiplicative a = Multiplicative a
16−
17−instance semiringMultiplicative :: Semiring a => Semigroup (Multiplicative a) where
18− append (Multiplicative a) (Multiplicative b) = Multiplicative (a * b)
19−
20−data Pair a = Pair a a
21−
22−foldPair :: forall a s. Semigroup s => (a -> s) -> Pair a -> s
23−foldPair f (Pair a b) = f a <> f b
24−
25−ala
26− :: forall f t a
27− . (Functor f, Newtype t a)
28− => (a -> t)
29− -> ((a -> t) -> f t)
30− -> f a
31−ala _ f = map unwrap (f wrap)
32−
33−test = ala Multiplicative foldPair
34−
35−test1 = ala Multiplicative foldPair (Pair 2 3)
36−
37−main = do
38− logShow (test (Pair 2 3))
39− log "Done"
examples/passing/NewtypeEff.pursdeleted−29
@@ -1,29 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console
5−import Control.Monad.Eff
6−
7−newtype T a = T (Eff (console :: CONSOLE) a)
8−
9−runT :: forall a. T a -> Eff (console :: CONSOLE) a
10−runT (T t) = t
11−
12−instance functorT :: Functor T where
13− map f (T t) = T (f <$> t)
14−
15−instance applyT :: Apply T where
16− apply (T f) (T x) = T (f <*> x)
17−
18−instance applicativeT :: Applicative T where
19− pure t = T (pure t)
20−
21−instance bindT :: Bind T where
22− bind (T t) f = T (t >>= \x -> runT (f x))
23−
24−instance monadT :: Monad T
25−
26−main = runT do
27− T $ log "Done"
28− T $ log "Done"
29− T $ log "Done"
examples/passing/NewtypeInstance.pursdeleted−41
@@ -1,41 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−
7−newtype X = X String
8−
9−derive newtype instance showX :: Show X
10−
11−derive newtype instance eqX :: Eq X
12−
13−derive newtype instance ordX :: Ord X
14−
15−newtype Y a = Y (Array a)
16−
17−derive newtype instance showY :: Show (Y String)
18−
19−class Singleton a b where
20− singleton :: a -> b
21−
22−instance singletonArray :: Singleton a (Array a) where
23− singleton x = [x]
24−
25−derive newtype instance singletonY :: Singleton a (Y a)
26−
27−newtype MyArray a = MyArray (Array a)
28−
29−derive newtype instance showMyArray :: Show a => Show (MyArray a)
30−
31−derive newtype instance functorMyArray :: Functor MyArray
32−
33−newtype ProxyArray x a = ProxyArray (Array a)
34−
35−derive newtype instance functorProxyArray :: Functor (ProxyArray x)
36−
37−main = do
38− logShow (X "test")
39− logShow (singleton "test" :: Y String)
40− logShow (map show (MyArray [1, 2, 3]))
41− log "Done"
examples/passing/NewtypeWithRecordUpdate.pursdeleted−16
@@ -1,16 +0,0 @@
1−-- https://github.com/purescript/purescript/issues/812.0
2−
3−module Main where
4−
5−import Prelude
6−import Control.Monad.Eff.Console
7−
8−newtype NewType a = NewType (Record a)
9−
10−rec1 :: Record (a :: Number, b :: Number, c:: Number)
11−rec1 = { a: 0.0, b: 0.0, c: 0.0 }
12−
13−rec2 :: NewType (a :: Number, b :: Number, c :: Number)
14−rec2 = NewType (rec1 { a = 1.0 })
15−
16−main = log "Done"
examples/passing/NonConflictingExports.pursdeleted−10
@@ -1,10 +0,0 @@
1−-- No failure here as the export `thing` only refers to Main.thing
2−module Main (thing, main) where
3−
4−import A
5−import Control.Monad.Eff.Console (log)
6−
7−thing :: Int
8−thing = 2
9−
10−main = log "Done"
examples/passing/NonConflictingExports/A.pursdeleted−4
@@ -1,4 +0,0 @@
1−module A where
2−
3−thing :: Int
4−thing = 1
examples/passing/NumberLiterals.pursdeleted−39
@@ -1,39 +0,0 @@
1−module Main where
2−
3−-- See issue #2115.
4−
5−import Prelude
6−import Test.Assert (assert')
7−import Control.Monad.Eff.Console (log)
8−
9−main = do
10− test "0.17" 0.17
11− test "0.25996181067141905" 0.25996181067141905
12− test "0.3572019862807257" 0.3572019862807257
13− test "0.46817723004874223" 0.46817723004874223
14− test "0.9640035681058178" 0.9640035681058178
15− test "4.23808622486133" 4.23808622486133
16− test "4.540362294799751" 4.540362294799751
17− test "5.212384849884261" 5.212384849884261
18− test "13.958257048123212" 13.958257048123212
19− test "32.96176575630599" 32.96176575630599
20− test "38.47735512322269" 38.47735512322269
21−
22− test "10000000000.0" 1e10
23− test "10000000000.0" 1.0e10
24− test "0.00001" 1e-5
25− test "0.00001" 1.0e-5
26− test "1.5339794352098402e-118" 1.5339794352098402e-118
27− test "2.108934760892056e-59" 2.108934760892056e-59
28− test "2.250634744599241e-19" 2.250634744599241e-19
29− test "5.960464477539063e-8" 5.960464477539063e-8
30− test "5e-324" 5e-324
31− test "5e-324" 5.0e-324
32−
33− log "Done"
34−
35−test str num =
36− if (show num == str)
37− then pure unit
38− else flip assert' false $
39− "Expected " <> show str <> ", got " <> show (show num) <> "."
examples/passing/ObjectGetter.pursdeleted−14
@@ -1,14 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log, logShow)
5−
6−getX = _.x
7−
8−point = { x: 1.0, y: 0.0 }
9−
10−main = do
11− logShow $ getX point
12− log $ _." 123 string Prop Name " { " 123 string Prop Name ": "OK" }
13− log $ (_.x >>> _.y) { x: { y: "Nested" } }
14− log $ _.value { value: "Done" }
examples/passing/ObjectSynonym.pursdeleted−16
@@ -1,16 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−type Inner = Number
7−
8−inner :: Inner
9−inner = 0.0
10−
11−type Outer = { inner :: Inner }
12−
13−outer :: Outer
14−outer = { inner: inner }
15−
16−main = log "Done"
examples/passing/ObjectUpdate.pursdeleted−23
@@ -1,23 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−update1 = \o -> o { foo = "Foo" }
7−
8−update2 :: forall r. { foo :: String | r } -> { foo :: String | r }
9−update2 = \o -> o { foo = "Foo" }
10−
11−replace = \o -> case o of
12− { foo: "Foo" } -> o { foo = "Bar" }
13− { foo: "Bar" } -> o { bar = "Baz" }
14− o -> o
15−
16−polyUpdate :: forall a r. { foo :: a | r } -> { foo :: String | r }
17−polyUpdate = \o -> o { foo = "Foo" }
18−
19−inferPolyUpdate = \o -> o { foo = "Foo" }
20−
21−main = do
22− log ((update1 {foo: ""}).foo)
23− log "Done"
examples/passing/ObjectUpdate2.pursdeleted−18
@@ -1,18 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−type X r = { | r }
7−
8−x :: X (baz :: String)
9−x = { baz: "baz" }
10−
11−blah :: forall r. X r -> X r
12−blah x = x
13−
14−test = blah x
15− { baz = "blah"
16− }
17−
18−main = log "Done"
examples/passing/ObjectUpdater.pursdeleted−26
@@ -1,26 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−import Test.Assert
7−
8−getValue :: forall e. Eff (| e) Boolean
9−getValue = pure true
10−
11−main = do
12− let record = { value: false }
13− record' <- record { value = _ } <$> getValue
14− assert $ record'.value == true
15−
16− let point = { x: 1.0, y: 1.0 }
17− x = 10.0
18− point' = (point { x = _, y = x }) 100.0
19−
20− assert $ point'.x == 100.0
21− assert $ point'.y == 10.0
22−
23− let record2 = (_ { x = _ }) { x: 0.0 } 10.0
24− assert $ record2.x == 10.0
25−
26− log "Done"
examples/passing/ObjectWildcards.pursdeleted−20
@@ -1,20 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−import Test.Assert
7−
8−mkRecord = { foo: _, bar: _, baz: "baz" }
9−
10−getValue :: forall e. Eff (| e) Boolean
11−getValue = pure true
12−
13−main = do
14− obj <- { value: _ } <$> getValue
15− logShow obj.value
16− let x = 1.0
17− point <- { x: _, y: x } <$> pure 2.0
18− assert $ point.x == 2.0
19− assert $ point.y == 1.0
20− log (mkRecord 1.0 "Done").bar
examples/passing/Objects.pursdeleted−36
@@ -1,36 +0,0 @@
1−module Main where
2−
3−import Prelude hiding (append)
4−import Control.Monad.Eff.Console (log)
5−
6−test = \x -> x.foo + x.bar + 1.0
7−
8−append = \o -> { foo: o.foo, bar: 1.0 }
9−
10−apTest = append({foo : "Foo", baz: "Baz"})
11−
12−f = (\a -> a.b.c) { b: { c: 1.0, d: "Hello" }, e: "World" }
13−
14−g = (\a -> a.f { x: 1.0, y: "y" }) { f: \o -> o.x + 1.0 }
15−
16−typed :: { foo :: Number }
17−typed = { foo: 0.0 }
18−
19−test2 = \x -> x."!@#"
20−
21−test3 = typed."foo"
22−
23−test4 = test2 weirdObj
24− where
25− weirdObj :: { "!@#" :: Number }
26− weirdObj = { "!@#": 1.0 }
27−
28−test5 = case { "***": 1.0 } of
29− { "***": n } -> n
30−
31−test6 = case { "***": 1.0 } of
32− { "***": n } -> n
33−
34−test7 {a: snoog , b : blah } = blah
35−
36−main = log "Done"
examples/passing/OneConstructor.pursdeleted−10
@@ -1,10 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data One a = One a
7−
8−one' (One a) = a
9−
10−main = log "Done"
examples/passing/OperatorAlias.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console
5−
6−infixl 4 what as ?!
7−
8−what :: forall a b. a -> b -> a
9−what a _ = a
10−
11−main = log $ "Done" ?! true
examples/passing/OperatorAliasElsewhere.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Def (what)
5−import Control.Monad.Eff.Console
6−
7−infixl 4 what as ?!
8−
9−main = log $ "Done" ?! true
examples/passing/OperatorAliasElsewhere/Def.pursdeleted−4
@@ -1,4 +0,0 @@
1−module Def where
2−
3−what :: forall a b. a -> b -> a
4−what a _ = a
examples/passing/OperatorAssociativity.pursdeleted−25
@@ -1,25 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−import Test.Assert
7−
8−bug :: Number -> Number -> Number
9−bug a b = 0.0 - (a - b)
10−
11−main = do
12− assert (bug 0.0 2.0 == 2.0)
13− assert (0.0 - (0.0 - 2.0) == 2.0)
14− assert (0.0 - (0.0 + 2.0) == -2.0)
15− assert (6.0 / (3.0 * 2.0) == 1.0)
16− assert ((6.0 / 3.0) * 2.0 == 4.0)
17− assert (not (1.0 < 0.0) == true)
18− assert (not ((negate 1.0) < 0.0) == false)
19− assert (negate (1.0 + 10.0) == -11.0)
20− assert (2.0 * 3.0 / 4.0 == 1.5)
21− assert (1.0 * 2.0 * 3.0 * 4.0 * 5.0 / 6.0 == 20.0)
22− assert (1.0 + 10.0 - 5.0 == 6.0)
23− assert (1.0 + 10.0 * 5.0 == 51.0)
24− assert (10.0 * 5.0 - 1.0 == 49.0)
25− log "Done"
examples/passing/OperatorInlining.pursdeleted−48
@@ -1,48 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (logShow, log)
5−
6−main = do
7−
8− -- semiringNumber
9− logShow (1.0 + 2.0)
10− logShow (1.0 * 2.0)
11−
12− -- ringNumber
13− logShow (1.0 - 2.0)
14− logShow (negate 1.0)
15−
16− -- moduleSemiringNumber
17− logShow (1.0 / 2.0)
18−
19− -- ordNumber
20− logShow (1.0 > 2.0)
21− logShow (1.0 < 2.0)
22− logShow (1.0 <= 2.0)
23− logShow (1.0 >= 2.0)
24− logShow (1.0 == 2.0)
25−
26− -- eqNumber
27− logShow (1.0 == 2.0)
28− logShow (1.0 /= 2.0)
29−
30− -- eqString
31− logShow ("foo" == "bar")
32− logShow ("foo" /= "bar")
33−
34− -- eqBoolean
35− logShow (true == false)
36− logShow (true /= false)
37−
38− -- semigroupString
39− logShow ("foo" <> "bar")
40−
41− -- latticeBoolean
42− logShow (top && true)
43− logShow (bottom || false)
44−
45− -- complementedLatticeBoolean
46− logShow (not true)
47−
48− log "Done"
examples/passing/OperatorSections.pursdeleted−18
@@ -1,18 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−import Test.Assert
6−
7−main = do
8− assert $ (_ / 2.0) 4.0 == 2.0
9− assert $ (2.0 / _) 4.0 == 0.5
10− assert $ (_ `const` 1.0) 2.0 == 2.0
11− assert $ (1.0 `const` _) 2.0 == 1.0
12− let foo = { x: 2.0 }
13− assert $ (_ / foo.x) 4.0 == 2.0
14− assert $ (foo.x / _) 4.0 == 0.5
15− let div x y = x.x / y.x
16− assert $ (_ `div` foo { x = 4.0 }) { x: 4.0 } == 1.0
17− assert $ (foo { x = 4.0 } `div` _) { x: 4.0 } == 1.0
18− log "Done"
examples/passing/Operators.pursdeleted−91
@@ -1,91 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Other (foo)
5−import Other as Other
6−import Control.Monad.Eff
7−import Control.Monad.Eff.Console
8−
9−op1 :: forall a. a -> a -> a
10−op1 x _ = x
11−
12−infix 4 op1 as ?!
13−
14−test1 :: forall n. (Semiring n) => n -> n -> (n -> n -> n) -> n
15−test1 x y z = x * y + z x y
16−
17−test2 = (\x -> x.foo false) { foo : \_ -> 1.0 }
18−
19−test3 = (\x y -> x)(1.0 + 2.0 * (1.0 + 2.0)) (true && (false || false))
20−
21−k = \x -> \y -> x
22−
23−test4 = 1 `k` 2
24−
25−op2 :: Number -> Number -> Number
26−op2 x y = x * y + y
27−
28−infixl 5 op2 as %%
29−
30−test5 = 1.0 %% 2.0 %% 3.0
31−
32−test6 = ((\x -> x) `k` 2.0) 3.0
33−
34−op3 :: String -> String -> String
35−op3 = \s1 s2 -> s1 <> s2
36−
37−infix 4 op3 as <+>
38−
39−test7 = "Hello" <+> "World!"
40−
41−op4 :: forall a b. (a -> b) -> a -> b
42−op4 = \f x -> f x
43−
44−infix 4 op4 as @@
45−
46−test8 = foo @@ "Hello World"
47−
48−test9 = Other.foo @@ "Hello World"
49−
50−test10 = "Hello" `Other.baz` "World"
51−
52−op5 :: forall a. Array a -> Array a -> Array a
53−op5 = \as -> \bs -> as
54−
55−infix 4 op5 as ...
56−
57−test11 = [1.0, 2.0, 0.0] ... [4.0, 5.0, 6.0]
58−
59−test14 :: Number -> Number -> Boolean
60−test14 a b = a < b
61−
62−test15 :: Number -> Number -> Boolean
63−test15 a b = const false $ a `test14` b
64−
65−test17 :: Number
66−test17 = negate (-1.0)
67−
68−test18 :: Number
69−test18 = negate $ negate 1.0
70−
71−test19 :: Number
72−test19 = negate $ negate (-1.0)
73−
74−main = do
75− let t1 = test1 1.0 2.0 (\x y -> x + y)
76− let t2 = test2
77− let t3 = test3
78− let t4 = test4
79− let t5 = test5
80− let t6 = test6
81− let t7 = test7
82− let t8 = test8
83− let t9 = test9
84− let t10 = test10
85− let t11 = test11
86− let t14 = test14 1.0 2.0
87− let t15 = test15 1.0 2.0
88− let t17 = test17
89− let t18 = test18
90− let t19 = test19
91− log "Done"
examples/passing/Operators/Other.pursdeleted−7
@@ -1,7 +0,0 @@
1−module Other where
2−
3−foo :: String -> String
4−foo s = s
5−
6−baz :: String -> String -> String
7−baz s _ = s
examples/passing/OptimizerBug.pursdeleted−10
@@ -1,10 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−x a = 1.0 + y a
7−
8−y a = x a
9−
10−main = log "Done"
examples/passing/OptionalQualified.pursdeleted−12
@@ -1,12 +0,0 @@
1−module Main where
2−
3−import Prelude as P
4−
5−-- qualified import without the "qualified" keyword
6−import Control.Monad.Eff.Console as Console
7−
8−bind = P.bind
9−
10−main = do
11− message <- P.pure "Done"
12− Console.log message
examples/passing/OverlappingInstances.pursdeleted−17
@@ -1,17 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−import Test.Assert (assert)
6−
7−data A = A
8−
9−instance showA1 :: Show A where
10− show A = "Instance 1"
11−
12−instance showA2 :: Show A where
13− show A = "Instance 2"
14−
15−main = do
16− assert $ show A == "Instance 1"
17− log "Done"
examples/passing/OverlappingInstances2.pursdeleted−27
@@ -1,27 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−import Test.Assert (assert)
6−
7−data A = A | B
8−
9−instance eqA1 :: Eq A where
10− eq A A = true
11− eq B B = true
12− eq _ _ = false
13−
14−instance eqA2 :: Eq A where
15− eq _ _ = true
16−
17−instance ordA :: Ord A where
18− compare A B = LT
19− compare B A = GT
20− compare _ _ = EQ
21−
22−test :: forall a. (Ord a) => a -> a -> String
23−test x y = show $ x == y
24−
25−main = do
26− assert $ test A B == "false"
27− log "Done"
examples/passing/OverlappingInstances3.pursdeleted−20
@@ -1,20 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−import Test.Assert (assert)
6−
7−class Foo a
8−
9−instance foo1 :: Foo Number
10−
11−instance foo2 :: Foo Number
12−
13−test :: forall a. (Foo a) => a -> a
14−test a = a
15−
16−test1 = test 0.0
17−
18−main = do
19− assert (test1 == 0.0)
20− log "Done"
examples/passing/ParensInTypedBinder.pursdeleted−20
@@ -1,20 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff (Eff)
5−import Control.Monad.Eff.Console (CONSOLE, log)
6−
7−foo :: Array Int
8−foo = do
9− xss :: Array (Array Int) <- [[[1,2,3], [4, 5]], [[6]]]
10− xs :: Array Int <- xss
11− xs
12−
13−main ::
14− forall eff.
15− Eff
16− ( console :: CONSOLE
17− | eff
18− )
19− Unit
20−main = log "Done"
examples/passing/PartialFunction.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−
7−fn :: Partial => Number -> Number
8−fn 0.0 = 0.0
9−fn 1.0 = 2.0
10−
11−main = log "Done"
examples/passing/Patterns.pursdeleted−23
@@ -1,23 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−test = \x -> case x of
7− { str: "Foo", bool: true } -> true
8− { str: "Bar", bool: b } -> b
9− _ -> false
10−
11−f = \o -> case o of
12− { foo: "Foo" } -> o.bar
13− _ -> 0
14−
15−h = \o -> case o of
16− a@[_,_,_] -> a
17− _ -> []
18−
19−isDesc :: Array Number -> Boolean
20−isDesc [x, y] | x > y = true
21−isDesc _ = false
22−
23−main = log "Done"
examples/passing/PendingConflictingImports.pursdeleted−8
@@ -1,8 +0,0 @@
1−module Main where
2−
3−-- No error as we never force `thing` to be resolved in `Main`
4−import A
5−import B
6−import Control.Monad.Eff.Console (log)
7−
8−main = log "Done"
examples/passing/PendingConflictingImports/A.pursdeleted−4
@@ -1,4 +0,0 @@
1−module A where
2−
3−thing :: Int
4−thing = 1
examples/passing/PendingConflictingImports/B.pursdeleted−4
@@ -1,4 +0,0 @@
1−module B where
2−
3−thing :: Int
4−thing = 2
examples/passing/PendingConflictingImports2.pursdeleted−10
@@ -1,10 +0,0 @@
1−module Main where
2−
3−import A
4−import Control.Monad.Eff.Console (log)
5−
6−-- No error as we never force `thing` to be resolved in `Main`
7−thing :: Int
8−thing = 2
9−
10−main = log "Done"
examples/passing/PendingConflictingImports2/A.pursdeleted−4
@@ -1,4 +0,0 @@
1−module A where
2−
3−thing :: Int
4−thing = 1
examples/passing/Person.pursdeleted−12
@@ -1,12 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data Person = Person { name :: String, age :: Number }
7−
8−showPerson :: Person -> String
9−showPerson = \p -> case p of
10− Person o -> o.name <> ", aged " <> show o.age
11−
12−main = log "Done"
examples/passing/PrimedTypeName.pursdeleted−20
@@ -1,20 +0,0 @@
1−module Main (T, T', T'', T''', main) where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data T a = T
7−type T' = T Unit
8−
9−data T'' = TP
10−
11−foreign import data T''' ∷ *
12−
13−instance eqT ∷ Eq T'' where
14− eq _ _ = true
15−
16−type A' a b = b → a
17−
18−infixr 4 type A' as ↫
19−
20−main = log "Done"
examples/passing/QualifiedNames.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Either as Either
5−import Control.Monad.Eff.Console (log)
6−
7−either :: forall a b c. (a -> c) -> (b -> c) -> Either.Either a b -> c
8−either f _ (Either.Left x) = f x
9−either _ g (Either.Right y) = g y
10−
11−main = log (either id id (Either.Left "Done"))
examples/passing/QualifiedNames/Either.pursdeleted−5
@@ -1,5 +0,0 @@
1−module Either where
2−
3−import Prelude
4−
5−data Either a b = Left a | Right b
examples/passing/QualifiedQualifiedImports.pursdeleted−6
@@ -1,6 +0,0 @@
1−module Main where
2−
3−-- qualified import with qualified imported names
4−import Control.Monad.Eff.Console (log) as Console
5−
6−main = Console.log "Done"
examples/passing/Rank2Data.pursdeleted−30
@@ -1,30 +0,0 @@
1−module Main where
2−
3−import Prelude hiding (add)
4−import Control.Monad.Eff.Console (log)
5−
6−data Id = Id forall a. a -> a
7−
8−runId = \id a -> case id of
9− Id f -> f a
10−
11−data Nat = Nat forall r. r -> (r -> r) -> r
12−
13−runNat = \nat -> case nat of
14− Nat f -> f 0.0 (\n -> n + 1.0)
15−
16−zero' = Nat (\zero' _ -> zero')
17−
18−succ = \n -> case n of
19− Nat f -> Nat (\zero' succ -> succ (f zero' succ))
20−
21−add = \n m -> case n of
22− Nat f -> case m of
23− Nat g -> Nat (\zero' succ -> g (f zero' succ) succ)
24−
25−one' = succ zero'
26−two = succ zero'
27−four = add two two
28−fourNumber = runNat four
29−
30−main = log "Done"
examples/passing/Rank2Object.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console
5−
6−data Foo = Foo { id :: forall a. a -> a }
7−
8−foo :: Foo -> Number
9−foo (Foo { id: f }) = f 0.0
10−
11−main = log "Done"
examples/passing/Rank2TypeSynonym.pursdeleted−17
@@ -1,17 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log, logShow)
5−
6−type Foo a = forall f. (Monad f) => f a
7−
8−foo :: forall a. a -> Foo a
9−foo x = pure x
10−
11−bar :: Foo Number
12−bar = foo 3.0
13−
14−main = do
15− x <- bar
16− logShow x
17− log "Done"
examples/passing/Rank2Types.pursdeleted−12
@@ -1,12 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−test1 :: (forall a. (a -> a)) -> Number
7−test1 = \f -> f 0.0
8−
9−forever :: forall m a b. (forall a b. m a -> (a -> m b) -> m b) -> m a -> m b
10−forever = \bind action -> bind action $ \_ -> forever bind action
11−
12−main = log "Done"
examples/passing/ReExportQualified.pursdeleted−7
@@ -1,7 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import C
5−import Control.Monad.Eff.Console (log)
6−
7−main = log (x <> y)
examples/passing/ReExportQualified/A.pursdeleted−3
@@ -1,3 +0,0 @@
1−module A where
2−
3−x = "Do"
examples/passing/ReExportQualified/B.pursdeleted−3
@@ -1,3 +0,0 @@
1−module B where
2−
3−y = "ne"
examples/passing/ReExportQualified/C.pursdeleted−4
@@ -1,4 +0,0 @@
1−module C (module A, module M2) where
2−
3−import A
4−import B as M2
examples/passing/RebindableSyntax.pursdeleted−43
@@ -1,43 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−example1 :: String
7−example1 = do
8− "Do"
9− " notation"
10− " for"
11− " Semigroup"
12− where
13− bind x f = x <> f unit
14−
15−applySecond :: forall f a b. (Apply f) => f a -> f b -> f b
16−applySecond fa fb = const id <$> fa <*> fb
17−
18−infixl 4 applySecond as *>
19−
20−newtype Const a b = Const a
21−
22−runConst :: forall a b. Const a b -> a
23−runConst (Const a) = a
24−
25−instance functorConst :: Functor (Const a) where
26− map _ (Const a) = Const a
27−
28−instance applyConst :: (Semigroup a) => Apply (Const a) where
29− apply (Const a1) (Const a2) = Const (a1 <> a2)
30−
31−example2 :: Const String Unit
32−example2 = do
33− Const "Do"
34− Const " notation"
35− Const " for"
36− Const " Apply"
37− where
38− bind x f = x *> f unit
39−
40−main = do
41− log example1
42− log $ runConst example2
43− log "Done"
examples/passing/Recursion.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−fib = \n -> case n of
7− 0.0 -> 1.0
8− 1.0 -> 1.0
9− n -> fib (n - 1.0) + fib (n - 2.0)
10−
11−main = log "Done"
examples/passing/RedefinedFixity.pursdeleted−6
@@ -1,6 +0,0 @@
1−module Main where
2−
3−import M3
4−import Control.Monad.Eff.Console (log)
5−
6−main = log "Done"
examples/passing/RedefinedFixity/M1.pursdeleted−6
@@ -1,6 +0,0 @@
1−module M1 where
2−
3−applyFn :: forall a b. (forall c d. c -> d) -> a -> b
4−applyFn f a = f a
5−
6−infixr 1000 applyFn as $
examples/passing/RedefinedFixity/M2.pursdeleted−5
@@ -1,5 +0,0 @@
1−module M2 where
2−
3−import Prelude ()
4−
5−import M1
examples/passing/RedefinedFixity/M3.pursdeleted−6
@@ -1,6 +0,0 @@
1−module M3 where
2−
3−import Prelude ()
4−
5−import M1
6−import M2
examples/passing/ReservedWords.pursdeleted−19
@@ -1,19 +0,0 @@
1−-- See https://github.com/purescript/purescript/issues/606
2−module Main where
3−
4−import Prelude
5−import Control.Monad.Eff
6−import Control.Monad.Eff.Console (log)
7−
8−o :: { type :: String }
9−o = { type: "o" }
10−
11−p :: { type :: String }
12−p = o { type = "p" }
13−
14−f :: forall r. { type :: String | r } -> String
15−f { type: "p" } = "Done"
16−f _ = "Fail"
17−
18−main :: Eff _ _
19−main = log $ f { type: p.type, foo: "bar" }
examples/passing/ResolvableScopeConflict.pursdeleted−13
@@ -1,13 +0,0 @@
1−module Main where
2−
3−import A (thing)
4−import B
5−import Control.Monad.Eff.Console (log)
6−
7−-- Not an error as although we have `thing` in scope from both A and B, it is
8−-- imported explicitly from A, giving it a resolvable solution.
9−what :: Boolean -> Int
10−what true = thing
11−what false = zing
12−
13−main = log "Done"
examples/passing/ResolvableScopeConflict/A.pursdeleted−4
@@ -1,4 +0,0 @@
1−module A where
2−
3−thing :: Int
4−thing = 1
examples/passing/ResolvableScopeConflict/B.pursdeleted−7
@@ -1,7 +0,0 @@
1−module B where
2−
3−thing :: Int
4−thing = 2
5−
6−zing :: Int
7−zing = 3
examples/passing/ResolvableScopeConflict2.pursdeleted−15
@@ -1,15 +0,0 @@
1−module Main where
2−
3−import A
4−import Control.Monad.Eff.Console (log)
5−
6−thing :: Int
7−thing = 1
8−
9−-- Not an error as although we have `thing` in scope from both Main and A,
10−-- as the local declaration takes precedence over the implicit import
11−what :: Boolean -> Int
12−what true = thing
13−what false = zing
14−
15−main = log "Done"
examples/passing/ResolvableScopeConflict2/A.pursdeleted−7
@@ -1,7 +0,0 @@
1−module A where
2−
3−thing :: Int
4−thing = 2
5−
6−zing :: Int
7−zing = 3
examples/passing/ResolvableScopeConflict3.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Main (thing, main, module A) where
2−
3−import A
4−import Control.Monad.Eff.Console (log)
5−
6−thing :: Int
7−thing = 2
8−
9−main = log "Done"
examples/passing/ResolvableScopeConflict3/A.pursdeleted−4
@@ -1,4 +0,0 @@
1−module A where
2−
3−thing :: Int
4−thing = 1
examples/passing/RowConstructors.pursdeleted−43
@@ -1,43 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−type Foo = (x :: Number | (y :: Number | (z :: Number)))
7−type Bar = (x :: Number, y :: Number, z :: Number)
8−type Baz = { w :: Number | Bar }
9−
10−foo :: { | Foo }
11−foo = { x: 0.0, y: 0.0, z: 0.0 }
12−
13−bar :: { | Bar }
14−bar = { x: 0.0, y: 0.0, z: 0.0 }
15−
16−id' :: Record Foo -> Record Bar
17−id' = id
18−
19−foo' :: { | Foo }
20−foo' = id' foo
21−
22−bar' :: { | Bar }
23−bar' = id' bar
24−
25−baz :: Baz
26−baz = { x: 0.0, y: 0.0, z: 0.0, w: 0.0 }
27−
28−type Quux r = (q :: Number | r)
29−type Norf r = (q' :: Number | Quux r)
30−
31−quux :: { f :: { | Foo } | Quux Bar }
32−quux = { f: foo', x: 0.0, y: 0.0, z: 0.0, q: 0.0 }
33−
34−quux' :: { | Norf Bar }
35−quux' = { x: 0.0, y: 0.0, z: 0.0, q: 0.0, q': 0.0 }
36−
37−wildcard :: { w :: Number | _ } -> Baz
38−wildcard { w: w } = { x: w, y: w, z: w, w: w }
39−
40−wildcard' :: { | Quux _ } -> Number
41−wildcard' { q: q } = q
42−
43−main = log "Done"
examples/passing/RowInInstanceHeadDetermined.pursdeleted−40
@@ -1,40 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data Empty = Empty
7−data Cons = Cons
8−
9−
10−-- simple case
11−class Simple a b | a -> b where c :: a -> b
12−instance simple0 :: Simple Empty {} where c _ = {}
13−instance simple1 :: Simple Cons {foo :: Cons} where c cons = {foo: cons}
14−
15−
16−-- simple transitive example
17−class Transitive a b c | a -> b, b -> c where d :: a -> c
18−instance transitive :: Transitive Empty {} {} where d _ = {}
19−
20−
21−-- transitive example with cycles
22−class Cyclic a b c d | a -> b, b -> a
23− , a -> c
24− , c -> d, d -> c
25−instance cyclic :: Cyclic Empty Empty {} {}
26−
27−
28−-- Determined cycle
29−class DeterminedCycle a b c | a -> b
30− , b -> c, c -> b
31−instance determinedCycle :: DeterminedCycle Empty {} {}
32−
33−
34−-- multiple determiners
35−class MultipleDeterminers a b c d | a b -> c d
36−instance multipleDeterminers :: MultipleDeterminers Empty Empty {} {}
37−
38−
39−main = log "Done"
40−
examples/passing/RowPolyInstanceContext.pursdeleted−23
@@ -1,23 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−class T s m | m -> s where
7− state :: (s -> s) -> m Unit
8−
9−data S s a = S (s -> { new :: s, ret :: a })
10−
11−instance st :: T s (S s) where
12− state f = S $ \s -> { new: f s, ret: unit }
13−
14−test1 :: forall r . S { foo :: String | r } Unit
15−test1 = state $ \o -> o { foo = o.foo <> "!" }
16−
17−test2 :: forall m r . (T { foo :: String | r } m) => m Unit
18−test2 = state $ \o -> o { foo = o.foo <> "!" }
19−
20−main = do
21− let t1 = test1
22− let t2 = test2
23− log "Done"
examples/passing/RowsInInstanceContext.pursdeleted−25
@@ -1,25 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff (Eff)
5−import Control.Monad.Eff.Console (CONSOLE, log)
6−import Data.Newtype (class Newtype, unwrap)
7−
8−class TypeEquals a b | a -> b, b -> a where
9− coerce :: a -> b
10− coerceBack :: b -> a
11−
12−instance refl :: TypeEquals a a where
13− coerce = id
14− coerceBack = id
15−
16−newtype RecordNewtype = RecordNewtype { x :: String }
17−
18−instance newtypeRecordNewtype ::
19− TypeEquals inner { x :: String }
20− => Newtype RecordNewtype inner where
21− wrap = RecordNewtype <<< coerce
22− unwrap (RecordNewtype rec) = coerceBack rec
23−
24−main :: Eff (console :: CONSOLE) Unit
25−main = log (unwrap (RecordNewtype { x: "Done" })).x
examples/passing/RuntimeScopeIssue.pursdeleted−22
@@ -1,22 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log, logShow)
5−
6−class A a where
7− a :: a -> Boolean
8−
9−class B a where
10− b :: a -> Boolean
11−
12−instance aNumber :: A Number where
13− a 0.0 = true
14− a n = b (n - 1.0)
15−
16−instance bNumber :: B Number where
17− b 0.0 = false
18− b n = a (n - 1.0)
19−
20−main = do
21− logShow $ a 10.0
22− log "Done"
examples/passing/ScopedTypeVariables.pursdeleted−37
@@ -1,37 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−test1 :: forall a. (a -> a) -> a -> a
7−test1 f x = g (g x)
8− where
9− g :: a -> a
10− g y = f (f y)
11−
12−test2 :: forall a. (a -> a) -> a -> a
13−test2 = h
14− where
15− h :: forall b. (b -> b) -> b -> b
16− h f x = g (g x)
17− where
18− g :: b -> b
19− g y = f (f y)
20−
21−test3 :: Number
22−test3 = ((\b -> b :: b) :: forall b. b -> b) 0.0
23−
24−test4 :: forall a. (a -> a) -> a -> a
25−test4 = h
26− where
27− h :: forall b. (b -> b) -> b -> b
28− h f x = g (g x)
29− where
30− g :: b -> b
31− g y = j (f (f y))
32− where
33− j :: forall b. b -> b
34− j x = x
35−
36−
37−main = log "Done"
examples/passing/Sequence.pursdeleted−16
@@ -1,16 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console (log)
6−
7−data List a = Cons a (List a) | Nil
8−
9−class Sequence t where
10− sequence :: forall m a. (Monad m) => t (m a) -> m (t a)
11−
12−instance sequenceList :: Sequence List where
13− sequence Nil = pure Nil
14− sequence (Cons x xs) = Cons <$> x <*> sequence xs
15−
16−main = sequence $ Cons (log "Done") Nil
examples/passing/SequenceDesugared.pursdeleted−38
@@ -1,38 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console (log)
6−
7−data List a = Cons a (List a) | Nil
8−
9−data Sequence t = Sequence (forall m a. (Monad m) => t (m a) -> m (t a))
10−
11−sequence :: forall t. Sequence t -> (forall m a. (Monad m) => t (m a) -> m (t a))
12−sequence (Sequence s) = s
13−
14−sequenceListSeq :: forall m a. (Monad m) => List (m a) -> m (List a)
15−sequenceListSeq Nil = pure Nil
16−sequenceListSeq (Cons x xs) = Cons <$> x <*> sequenceListSeq xs
17−
18−sequenceList :: Sequence List
19−sequenceList = Sequence (sequenceListSeq)
20−
21−sequenceList' :: Sequence List
22−sequenceList' = Sequence ((\val -> case val of
23− Nil -> pure Nil
24− Cons x xs -> Cons <$> x <*> sequence sequenceList' xs))
25−
26−sequenceList'' :: Sequence List
27−sequenceList'' = Sequence (sequenceListSeq :: forall m a. (Monad m) => List (m a) -> m (List a))
28−
29−sequenceList''' :: Sequence List
30−sequenceList''' = Sequence ((\val -> case val of
31− Nil -> pure Nil
32− Cons x xs -> Cons <$> x <*> sequence sequenceList''' xs) :: forall m a. (Monad m) => List (m a) -> m (List a))
33−
34−main = do
35− sequence sequenceList $ Cons (log "Done") Nil
36− sequence sequenceList' $ Cons (log "Done") Nil
37− sequence sequenceList'' $ Cons (log "Done") Nil
38− sequence sequenceList''' $ Cons (log "Done") Nil
examples/passing/ShadowedModuleName.pursdeleted−8
@@ -1,8 +0,0 @@
1−module Main where
2−
3−import Test
4−import Control.Monad.Eff.Console
5−
6−data Test = Test
7−
8−main = log (runZ (Z "Done"))
examples/passing/ShadowedModuleName/Test.pursdeleted−6
@@ -1,6 +0,0 @@
1−module Test where
2−
3−data Z = Z String
4−
5−runZ :: Z -> String
6−runZ (Z s) = s
examples/passing/ShadowedName.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console
5−import Control.Monad.Eff.Console (log)
6−
7−done :: String
8−done = let str = "Not yet done" in
9− let str = "Done" in str
10−
11−main = log done
examples/passing/ShadowedRename.pursdeleted−14
@@ -1,14 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−import Test.Assert
7−
8−foo foo = let foo_1 = \_ -> foo
9− foo_2 = foo_1 unit + 1.0
10− in foo_2
11−
12−main = do
13− assert $ foo 1.0 == 2.0
14− log "Done"
examples/passing/ShadowedTCO.pursdeleted−21
@@ -1,21 +0,0 @@
1−module Main where
2−
3−import Prelude hiding (add)
4−import Control.Monad.Eff.Console (log)
5−
6−runNat f = f 0.0 (\n -> n + 1.0)
7−
8−zero' z _ = z
9−
10−succ f zero' succ = succ (f zero' succ)
11−
12−add f g zero' succ = g (f zero' succ) succ
13−
14−one' = succ zero'
15−two = succ one'
16−four = add two two
17−fourNumber = runNat four
18−
19−main = do
20− log $ show fourNumber
21− log "Done"
examples/passing/ShadowedTCOLet.pursdeleted−15
@@ -1,15 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Partial.Unsafe (unsafePartial)
5−import Control.Monad.Eff
6−import Control.Monad.Eff.Console (log)
7−
8−f x y z =
9− let f 1.0 2.0 3.0 = 1.0
10− in f x z y
11−
12−main :: Eff _ _
13−main = do
14− log $ show $ unsafePartial f 1.0 3.0 2.0
15− log "Done"
examples/passing/SignedNumericLiterals.pursdeleted−18
@@ -1,18 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−p = 0.5
7−q = 1.0
8−x = -1.0
9−y = -0.5
10−z = 0.5
11−w = 1.0
12−
13−f :: Number -> Number
14−f x = -x
15−
16−test1 = 2.0 - 1.0
17−
18−main = log "Done"
examples/passing/SolvingAppendSymbol.pursdeleted−32
@@ -1,32 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−import Type.Data.Symbol (SProxy(..), class AppendSymbol, appendSymbol, reflectSymbol)
6−
7−sym :: SProxy ""
8−sym = SProxy
9−
10−symA :: SProxy "A"
11−symA = SProxy
12−
13−symB :: SProxy "B"
14−symB = SProxy
15−
16−egAB :: SProxy "AB"
17−egAB = appendSymbol symA symB
18−
19−egBA :: SProxy "BA"
20−egBA = appendSymbol symB symA
21−
22−egA' :: SProxy "A"
23−egA' = appendSymbol sym (appendSymbol symA sym)
24−
25−main = do
26− let gotAB = reflectSymbol egAB == "AB"
27− gotBA = reflectSymbol egBA == "BA"
28− gotA' = reflectSymbol egA' == "A"
29− when (not gotAB) $ log "Did not get AB"
30− when (not gotBA) $ log "Did not get BA"
31− when (not gotA') $ log "Did not get A"
32− when (gotAB && gotBA && gotA') $ log "Done"
examples/passing/SolvingCompareSymbol.pursdeleted−30
@@ -1,30 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−import Type.Data.Symbol (SProxy(..), class CompareSymbol, compareSymbol)
6−import Type.Data.Ordering (OProxy(..), kind Ordering, LT, EQ, GT, reflectOrdering)
7−
8−symA :: SProxy "A"
9−symA = SProxy
10−
11−symB :: SProxy "B"
12−symB = SProxy
13−
14−egLT :: OProxy LT
15−egLT = compareSymbol symA symB
16−
17−egEQ :: OProxy EQ
18−egEQ = compareSymbol symA symA
19−
20−egGT :: OProxy GT
21−egGT = compareSymbol symB symA
22−
23−main = do
24− let gotLT = reflectOrdering egLT == LT
25− gotEQ = reflectOrdering egEQ == EQ
26− gotGT = reflectOrdering egGT == GT
27− when (not gotLT) $ log "Did not get LT"
28− when (not gotEQ) $ log "Did not get EQ"
29− when (not gotGT) $ log "Did not get GT"
30− when (gotLT && gotEQ && gotGT) $ log "Done"
examples/passing/SolvingIsSymbol.pursdeleted−13
@@ -1,13 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−
7−-- Here we import as alias of reflectSymbol without importing Data.Symbol. However,
8−-- Data.Symbol should be implicitly imported as we have an instance of IsSymbol solved.
9−import SolvingIsSymbol.Lib (literalSymbol, libReflectSymbol)
10−
11−main = do
12− let lit = libReflectSymbol literalSymbol
13− when (lit == "literal") (log "Done")
examples/passing/SolvingIsSymbol/Lib.pursdeleted−10
@@ -1,10 +0,0 @@
1−module SolvingIsSymbol.Lib where
2−
3−import Data.Symbol
4−
5−literalSymbol :: SProxy "literal"
6−literalSymbol = SProxy
7−
8−libReflectSymbol :: forall s. IsSymbol s => SProxy s -> String
9−libReflectSymbol = reflectSymbol
10−
examples/passing/Stream.pursdeleted−26
@@ -1,26 +0,0 @@
1−module Main where
2−
3−import Prelude
4−
5−import Control.Monad.Eff (Eff)
6−import Control.Monad.Eff.Console (CONSOLE, log)
7−
8−class IsStream el s | s -> el where
9− cons :: el -> (Unit -> s) -> s
10− uncons :: s -> { head :: el, tail :: s }
11−
12−data Stream a = Stream a (Unit -> Stream a)
13−
14−instance streamIsStream :: IsStream a (Stream a) where
15− cons x xs = Stream x xs
16− uncons (Stream x f) = { head: x, tail: f unit }
17−
18−test :: forall el s. IsStream el s => s -> s
19−test s = case uncons s of
20− { head, tail } -> cons head \_ -> tail
21−
22−main :: Eff (console :: CONSOLE) Unit
23−main = do
24− let dones :: Stream String
25− dones = cons "Done" \_ -> dones
26− log (uncons (test dones)).head
examples/passing/StringEscapes.pursdeleted−26
@@ -1,26 +0,0 @@
1−module Main where
2−
3−import Prelude ((==), (/=), (<>), bind)
4−import Test.Assert (assert, assert')
5−import Control.Monad.Eff.Console (log)
6−
7−singleCharacter = "\0\b\t\n\v\f\r\"\\" == "\x0\x8\x9\xA\xB\xC\xD\x22\x5C"
8−hex = "\x1D306\x2603\x3C6\xE0\x0" == "𝌆☃φà\0"
9−decimal = "\119558\9731\966\224\0" == "𝌆☃φà\0"
10−surrogatePair = "\xD834\xDF06" == "\x1D306"
11−highSurrogate = "\xD834"
12−lowSurrogate = "\xDF06"
13−loneSurrogates = (highSurrogate <> lowSurrogate) == "\x1D306"
14−outOfOrderSurrogates = (lowSurrogate <> highSurrogate) == "\xDF06\xD834"
15−replacement = "\xFFFD"
16−notReplacing = replacement /= highSurrogate
17−
18−main = do
19− assert' "single-character escape sequences" singleCharacter
20− assert' "hex escape sequences" hex
21− assert' "decimal escape sequences" decimal
22− assert' "astral code points are represented as a UTF-16 surrogate pair" surrogatePair
23− assert' "lone surrogates may be combined into a surrogate pair" loneSurrogates
24− assert' "lone surrogates may be combined out of order to remain lone surrogates" outOfOrderSurrogates
25− -- assert' "lone surrogates are not replaced with the Unicode replacement character U+FFFD" notReplacing
26− log "Done"
examples/passing/Superclasses1.pursdeleted−23
@@ -1,23 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log, logShow)
5−
6−class Su a where
7− su :: a -> a
8−
9−class (Su a) <= Cl a where
10− cl :: a -> a -> a
11−
12−instance suNumber :: Su Number where
13− su n = n + 1.0
14−
15−instance clNumber :: Cl Number where
16− cl n m = n + m
17−
18−test :: forall a. (Cl a) => a -> a
19−test a = su (cl a a)
20−
21−main = do
22− logShow $ test 10.0
23− log "Done"
examples/passing/Superclasses3.pursdeleted−41
@@ -1,41 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console
5−import Control.Monad.Eff
6−
7−class (Monad m) <= MonadWriter w m where
8− tell :: w -> m Unit
9−
10−testFunctor :: forall m. (Monad m) => m Number -> m Number
11−testFunctor n = (+) 1.0 <$> n
12−
13−test :: forall w m. (Monad m, MonadWriter w m) => w -> m Unit
14−test w = do
15− tell w
16− tell w
17− tell w
18−
19−data MTrace a = MTrace (Eff (console :: CONSOLE) a)
20−
21−runMTrace :: forall a. MTrace a -> Eff (console :: CONSOLE) a
22−runMTrace (MTrace a) = a
23−
24−instance functorMTrace :: Functor MTrace where
25− map = liftM1
26−
27−instance applyMTrace :: Apply MTrace where
28− apply = ap
29−
30−instance applicativeMTrace :: Applicative MTrace where
31− pure = MTrace <<< pure
32−
33−instance bindMTrace :: Bind MTrace where
34− bind m f = MTrace (runMTrace m >>= (runMTrace <<< f))
35−
36−instance monadMTrace :: Monad MTrace
37−
38−instance writerMTrace :: MonadWriter String MTrace where
39− tell s = MTrace (log s)
40−
41−main = runMTrace $ test "Done"
examples/passing/TCO.pursdeleted−20
@@ -1,20 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log, logShow)
5−
6−main = do
7− let f x = x + 1
8− let v = 0
9− logShow (applyN 0 f v)
10− logShow (applyN 1 f v)
11− logShow (applyN 2 f v)
12− logShow (applyN 3 f v)
13− logShow (applyN 4 f v)
14− log "Done"
15−
16−applyN :: forall a. Int -> (a -> a) -> a -> a
17−applyN = go id
18− where
19− go f n _ | n <= 0 = f
20− go f n g = go (f >>> g) (n - 1) g
examples/passing/TCOCase.pursdeleted−13
@@ -1,13 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data Data = One | More Data
7−
8−main = log (from (to 10000.0 One))
9− where
10− to 0.0 a = a
11− to n a = to (n - 1.0) (More a)
12− from One = "Done"
13− from (More d) = from d
examples/passing/TailCall.pursdeleted−20
@@ -1,20 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log, logShow)
5−
6−data L a = C a (L a) | N
7−
8−test :: Number -> L Number -> Number
9−test n N = n
10−test n (C x xs) = test (n + x) xs
11−
12−loop :: forall a. Number -> a
13−loop x = loop (x + 1.0)
14−
15−notATailCall = \x ->
16− (\notATailCall -> notATailCall x) (\x -> x)
17−
18−main = do
19− logShow (test 0.0 (1.0 `C` (2.0 `C` (3.0 `C` N))))
20− log "Done"
examples/passing/Tick.pursdeleted−8
@@ -1,8 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−test' x = x
7−
8−main = log "Done"
examples/passing/TopLevelCase.pursdeleted−19
@@ -1,19 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−gcd :: Number -> Number -> Number
7−gcd 0.0 x = x
8−gcd x 0.0 = x
9−gcd x y | x > y = gcd (x `mod` y) y
10−gcd x y = gcd (y `mod` x) x
11−
12−guardsTest [x] | x > 0.0 = []
13−guardsTest xs = xs
14−
15−data A = A
16−
17−parseTest A 0.0 = 0.0
18−
19−main = log "Done"
examples/passing/TransitiveImport.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Main where
2−
3− import Prelude
4− import Middle
5− import Control.Monad.Eff.Console
6−
7− main = do
8− logShow (middle unit)
9− log "Done"
examples/passing/TransitiveImport/Middle.pursdeleted−5
@@ -1,5 +0,0 @@
1−module Middle where
2−
3−import Test (test)
4−
5−middle = test
examples/passing/TransitiveImport/Test.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Test where
2−
3−import Prelude
4−
5−class TestCls a where
6− test :: a -> a
7−
8−instance unitTestCls :: TestCls Unit where
9− test _ = unit
examples/passing/TypeClassMemberOrderChange.pursdeleted−16
@@ -1,16 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−class Test a where
7− fn :: a -> a -> a
8− val :: a
9−
10−instance testBoolean :: Test Boolean where
11− val = true
12− fn x y = y
13−
14−main = do
15− log (show (fn true val))
16− log "Done"
examples/passing/TypeClasses.pursdeleted−71
@@ -1,71 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−test1 = \_ -> show "testing"
7−
8−f :: forall a. (Show a) => a -> String
9−f x = show x
10−
11−test2 = \_ -> f "testing"
12−
13−test7 :: forall a. (Show a) => a -> String
14−test7 = show
15−
16−test8 = \_ -> show $ "testing"
17−
18−data Data a = Data a
19−
20−instance showData :: (Show a) => Show (Data a) where
21− show (Data a) = "Data (" <> show a <> ")"
22−
23−test3 = \_ -> show (Data "testing")
24−
25−instance functorData :: Functor Data where
26− map = liftM1
27−
28−instance applyData :: Apply Data where
29− apply = ap
30−
31−instance applicativeData :: Applicative Data where
32− pure = Data
33−
34−instance bindData :: Bind Data where
35− bind (Data a) f = f a
36−
37−instance monadData :: Monad Data
38−
39−data Maybe a = Nothing | Just a
40−
41−instance functorMaybe :: Functor Maybe where
42− map = liftM1
43−
44−instance applyMaybe :: Apply Maybe where
45− apply = ap
46−
47−instance applicativeMaybe :: Applicative Maybe where
48− pure = Just
49−
50−instance bindMaybe :: Bind Maybe where
51− bind Nothing _ = Nothing
52− bind (Just a) f = f a
53−
54−instance monadMaybe :: Monad Maybe
55−
56−test4 :: forall a m. (Monad m) => a -> m Number
57−test4 = \_ -> pure 1.0
58−
59−test5 = \_ -> Just 1.0 >>= \n -> pure (n + 1.0)
60−
61−ask r = r
62−
63−runReader r f = f r
64−
65−test9 _ = runReader 0.0 $ do
66− n <- ask
67− pure $ n + 1.0
68−
69−main = do
70− log (test7 "Hello")
71− log "Done"
examples/passing/TypeClassesInOrder.pursdeleted−12
@@ -1,12 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−class Foo a where
7− foo :: a -> String
8−
9−instance fooString :: Foo String where
10− foo s = s
11−
12−main = log $ foo "Done"
examples/passing/TypeClassesWithOverlappingTypeVariables.pursdeleted−12
@@ -1,12 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data Either a b = Left a | Right b
7−
8−instance functorEither :: Functor (Either a) where
9− map _ (Left x) = Left x
10− map f (Right y) = Right (f y)
11−
12−main = log "Done"
examples/passing/TypeDecl.pursdeleted−13
@@ -1,13 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−k :: String -> Number -> String
7−k x y = x
8−
9−iterate :: forall a. Number -> (a -> a) -> a -> a
10−iterate 0.0 f a = a
11−iterate n f a = iterate (n - 1.0) f (f a)
12−
13−main = log "Done"
examples/passing/TypeOperators.pursdeleted−20
@@ -1,20 +0,0 @@
1−module Main where
2−
3−import A (type (~>), type (/\), (/\))
4−import Control.Monad.Eff.Console (log)
5−
6−natty ∷ ∀ f. f ~> f
7−natty x = x
8−
9−data Compose f g a = Compose (f (g a))
10−
11−testPrecedence1 ∷ ∀ f g. Compose f g ~> Compose f g
12−testPrecedence1 x = x
13−
14−testPrecedence2 ∷ ∀ f g. f ~> g → f ~> g
15−testPrecedence2 nat fx = nat fx
16−
17−swap ∷ ∀ a b. a /\ b → b /\ a
18−swap (a /\ b) = b /\ a
19−
20−main = log "Done"
examples/passing/TypeOperators/A.pursdeleted−22
@@ -1,22 +0,0 @@
1−module A
2−( Tuple(..)
3−, type (/\)
4−, (/\)
5−, Natural
6−, type (~>)
7−) where
8−
9−data Tuple a b = Tuple a b
10−
11−infixl 6 Tuple as /\
12−infixl 6 type Tuple as /\
13−
14−type Natural f g = ∀ a. f a → g a
15−
16−infixr 0 type Natural as ~>
17−
18−tup ∷ ∀ a b. a → b → b /\ a
19−tup a b = b /\ a
20−
21−tupX ∷ ∀ a b c. a /\ b /\ c → c
22−tupX (a /\ b /\ c) = c
examples/passing/TypeSynonymInData.pursdeleted−12
@@ -1,12 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−type A a = Array a
7−
8−data Foo a = Foo (A a) | Bar
9−
10−foo (Foo []) = Bar
11−
12−main = log "Done"
examples/passing/TypeSynonyms.pursdeleted−28
@@ -1,28 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−type Lens a b =
7− { get :: a -> b
8− , set :: a -> b -> a
9− }
10−
11−composeLenses :: forall a b c. Lens a b -> Lens b c -> Lens a c
12−composeLenses = \l1 -> \l2 ->
13− { get: \a -> l2.get (l1.get a)
14− , set: \a c -> l1.set a (l2.set (l1.get a) c)
15− }
16−
17−type Pair a b = { fst :: a, snd :: b }
18−
19−fst :: forall a b. Lens (Pair a b) a
20−fst =
21− { get: \p -> p.fst
22− , set: \p a -> { fst: a, snd: p.snd }
23− }
24−
25−test1 :: forall a b c. Lens (Pair (Pair a b) c) a
26−test1 = composeLenses fst fst
27−
28−main = log "Done"
examples/passing/TypeWildcards.pursdeleted−16
@@ -1,16 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−testTopLevel :: _ -> _
7−testTopLevel n = n + 1.0
8−
9−test :: forall a. (Eq a) => (a -> a) -> a -> a
10−test f a = go (f a) a
11− where
12− go :: _ -> _ -> _
13− go a1 a2 | a1 == a2 = a1
14− go a1 _ = go (f a1) a1
15−
16−main = log "Done"
examples/passing/TypeWildcardsRecordExtension.pursdeleted−9
@@ -1,9 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−foo :: forall a. {b :: Number | a} -> {b :: Number | _}
7−foo f = f
8−
9−main = log "Done"
examples/passing/TypeWithoutParens.pursdeleted−12
@@ -1,12 +0,0 @@
1−module Main where
2−
3−import Lib (X, Y)
4−import Control.Monad.Eff.Console (log)
5−
6−idX :: X -> X
7−idX x = x
8−
9−idY :: Y -> Y
10−idY y = y
11−
12−main = log "Done"
examples/passing/TypeWithoutParens/Lib.pursdeleted−4
@@ -1,4 +0,0 @@
1−module Lib (X, Y) where
2−
3−data X = X
4−type Y = X
examples/passing/TypedBinders.pursdeleted−68
@@ -1,68 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data Tuple a b = Tuple a b
7−
8−class MonadState s m where
9− get :: m s
10− put :: s -> m {}
11−
12−data State s a = State (s -> Tuple s a)
13−
14−runState s (State f) = f s
15−
16−instance functorState :: Functor (State s) where
17− map = liftM1
18−
19−instance applyState :: Apply (State s) where
20− apply = ap
21−
22−instance applicativeState :: Applicative (State s) where
23− pure a = State $ \s -> Tuple s a
24−
25−instance bindState :: Bind (State s) where
26− bind f g = State $ \s -> case runState s f of
27− Tuple s1 a -> runState s1 (g a)
28−
29−instance monadState :: Monad (State s)
30−
31−instance monadStateState :: MonadState s (State s) where
32− get = State (\s -> Tuple s s)
33− put s = State (\_ -> Tuple s {})
34−
35−modify :: forall m s. (Monad m, MonadState s m) => (s -> s) -> m {}
36−modify f = do
37− s <- get
38− put (f s)
39−
40−test :: Tuple String String
41−test = runState "" $ do
42− modify $ (<>) "World!"
43− modify $ (<>) "Hello, "
44− str :: String <- get
45− pure str
46−
47−test2 :: (Int -> Int) -> Int
48−test2 = (\(f :: Int -> Int) -> f 10)
49−
50−test3 :: Int -> Boolean
51−test3 n = case n of
52− (0 :: Int) -> true
53− _ -> false
54−
55−test4 :: Tuple Int Int -> Tuple Int Int
56−test4 = (\(Tuple a b :: Tuple Int Int) -> Tuple b a)
57−
58−type Int1 = Int
59−
60−test5 :: Int1 -> Int1
61−test5 = \(x :: Int1) -> x
62−
63−main = do
64− let t1 = test
65− t2 = test2 id
66− t3 = test3 1
67− t4 = test4 (Tuple 1 0)
68− log "Done"
examples/passing/TypedWhere.pursdeleted−18
@@ -1,18 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data E a b = L a | R b
7−
8−data L a = C a (L a) | N
9−
10−lefts :: forall a b. L (E a b) -> L a
11−lefts = go N
12− where
13− go :: forall a b. L a -> L (E a b) -> L a
14− go ls N = ls
15− go ls (C (L a) rest) = go (C a ls) rest
16− go ls (C _ rest) = go ls rest
17−
18−main = log "Done"
examples/passing/UTF8Sourcefile.pursdeleted−8
@@ -1,8 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console
4−
5−-- '→' is multibyte sequence \u2192.
6−utf8multibyte = "Hello λ→ world!!"
7−
8−main = log "Done"
examples/passing/UnderscoreIdent.pursdeleted−13
@@ -1,13 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−data Data_type = Con_Structor | Con_2 String
7−
8−type Type_name = Data_type
9−
10−done (Con_2 s) = s
11−done _ = "Failed"
12−
13−main = log (done (Con_2 "Done"))
examples/passing/UnicodeIdentifier.pursdeleted−7
@@ -1,7 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−f asgård = asgård
6−
7−main = log (f "Done")
examples/passing/UnicodeOperators.pursdeleted−22
@@ -1,22 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−compose :: forall a b c. (b -> c) -> (a -> b) -> a -> c
6−compose f g a = f (g a)
7−
8−infixr 9 compose as ∘
9−
10−test1 = (\x -> x) ∘ \y -> y
11−
12−elem :: forall a b. a -> (a -> Boolean) -> Boolean
13−elem x f = f x
14−
15−infixl 1 elem as ∈
16−
17−emptySet :: forall a. a -> Boolean
18−emptySet _ = true
19−
20−test2 = 1 ∈ emptySet
21−
22−main = log "Done"
examples/passing/UnicodeType.pursdeleted−22
@@ -1,22 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−class Monad m ⇐ Monad1 m where
7− f1 :: Int
8−
9−class Monad m <= Monad2 m where
10− f2 :: Int
11−
12−f ∷ ∀ m. Monad m ⇒ Int → m Int
13−f n = do
14− n' ← pure n
15− pure n'
16−
17−f' :: forall m. Monad m => Int -> m Int
18−f' n = do
19− n' <- pure n
20− pure n'
21−
22−main = log "Done"
examples/passing/UnifyInTypeInstanceLookup.pursdeleted−25
@@ -1,25 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−data Z = Z
6−data S n = S n
7−
8−data T
9−data F
10−
11−class EQ x y b
12−instance eqT :: EQ x x T
13−instance eqF :: EQ x y F
14−
15−test :: forall a b. (EQ a b T) => a -> b -> a
16−test a _ = a
17−
18−spin :: forall a b. a -> b
19−spin a = spin a
20−
21−-- Expected type:
22−-- forall t. (EQ t (S Z) T) => t
23−test1 = test (spin 1) (S Z)
24−
25−main = log "Done"
examples/passing/Unit.pursdeleted−8
@@ -1,8 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (logShow, log)
5−
6−main = do
7− logShow (const unit $ "Hello world")
8− log "Done"
examples/passing/UnknownInTypeClassLookup.pursdeleted−15
@@ -1,15 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−class EQ a b
7−
8−instance eqAA :: EQ a a
9−
10−test :: forall a b. (EQ a b) => a -> b -> String
11−test _ _ = "Done"
12−
13−runTest a = test a a
14−
15−main = log $ runTest 0.0
examples/passing/UntupledConstraints.pursdeleted−17
@@ -1,17 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−class Show a <= Nonsense a where
7− method :: a -> a
8−
9−data Box a = Box a
10−
11−instance showBox :: Show a => Show (Box a) where
12− show (Box a) = "Box " <> show a
13−
14−strangeThing :: forall m. Semigroup (m Unit) => m Unit -> m Unit -> m Unit
15−strangeThing x y = x <> y
16−
17−main = log "Done"
examples/passing/Where.pursdeleted−49
@@ -1,49 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Partial.Unsafe (unsafePartial)
5−import Control.Monad.Eff
6−import Control.Monad.Eff.Console (logShow, log)
7−
8−test1 x = y
9− where
10− y :: Number
11− y = x + 1.0
12−
13−test2 x y = x' + y'
14− where
15− x' = x + 1.0
16− y' = y + 1.0
17−
18−test3 = f 1.0 2.0 3.0
19− where f x y z = x + y + z
20−
21−test4 = f (+) [1.0, 2.0]
22− where f x [y, z] = x y z
23−
24−test5 = g 10.0
25− where
26− f x | x > 0.0 = g (x / 2.0) + 1.0
27− f x = 0.0
28− g x = f (x - 1.0) + 1.0
29−
30−test6 = if f true then f 1.0 else f 2.0
31− where f :: forall a. a -> a
32− f x = x
33−
34−test7 :: Number -> Number
35−test7 x = go x
36− where
37− go y | (x - 0.1 < y * y) && (y * y < x + 0.1) = y
38− go y = go $ (y + x / y) / 2.0
39−
40−main :: Eff _ _
41−main = do
42− logShow (test1 1.0)
43− logShow (test2 1.0 2.0)
44− logShow test3
45− unsafePartial (logShow test4)
46− logShow test5
47− logShow test6
48− logShow (test7 100.0)
49− log "Done"
examples/passing/WildcardInInstance.pursdeleted−23
@@ -1,23 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff
5−import Control.Monad.Eff.Console
6−
7−-- Until the functional dependency gets added to purescript-eff,
8−-- we need this here.
9−class Monad m <= MonadEff eff m | m -> eff where
10− liftEff :: forall a. Eff eff a -> m a
11−
12−instance monadEffEff :: MonadEff eff (Eff eff) where
13− liftEff = id
14−
15−-- This should generate a warning with the correct inferred type.
16−test :: forall m. MonadEff _ m => m Unit
17−test = liftEff $ log "Done"
18−
19−test1 :: Eff _ Unit
20−test1 = liftEff $ log "Done"
21−
22−main :: forall eff. Eff (console :: CONSOLE | eff) Unit
23−main = test
examples/passing/WildcardType.pursdeleted−12
@@ -1,12 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−f1 :: (_ -> _) -> _
7−f1 g = g 1
8−
9−f2 :: _ -> _
10−f2 _ = "Done"
11−
12−main = log $ f1 f2
examples/passing/iota.pursdeleted−11
@@ -1,11 +0,0 @@
1−module Main where
2−
3−import Control.Monad.Eff.Console (log)
4−
5−s = \x -> \y -> \z -> x z (y z)
6−
7−k = \x -> \y -> x
8−
9−iota = \x -> x s k
10−
11−main = log "Done"
examples/passing/s.pursdeleted−8
@@ -1,8 +0,0 @@
1−module Main where
2−
3−import Prelude
4−import Control.Monad.Eff.Console (log)
5−
6−s = \x y z -> x z (y z)
7−
8−main = log "Done"
examples/warning/2140.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldWarnWith ShadowedTypeVar
2−module Main where
3−
4−class Test a where
5− f :: (forall a. a -> a) -> a -> a
examples/warning/2383.pursdeleted−12
@@ -1,12 +0,0 @@
1−-- | This specifically shouldn't warn about `x` being shadowed in `main`
2−-- | See https://github.com/purescript/purescript/issues/2383
3−module Main where
4−
5−import Prelude
6−
7−import Control.Monad.Eff (Eff)
8−
9−main :: Eff () Unit
10−main = do
11− x <- let x = pure unit in x
12− pure unit
examples/warning/2411.pursdeleted−15
@@ -1,15 +0,0 @@
1−-- @shouldWarnWith ShadowedName
2−module Main where
3−
4−import Prelude
5−
6−import Control.Monad.Eff (Eff)
7−
8−test :: forall m. Monad m => Int -> m Unit
9−test x =
10− let x = unit
11− in pure x
12−
13−main :: Eff () Unit
14−main = test 42
15−
examples/warning/DuplicateExportRef.pursdeleted−30
@@ -1,30 +0,0 @@
1−-- @shouldWarnWith DuplicateExportRef
2−-- @shouldWarnWith DuplicateExportRef
3−-- @shouldWarnWith DuplicateExportRef
4−-- @shouldWarnWith DuplicateExportRef
5−-- @shouldWarnWith DuplicateExportRef
6−-- @shouldWarnWith DuplicateExportRef
7−-- @shouldWarnWith DuplicateExportRef
8−module Main
9− ( X(X, X), X
10− , fn, fn
11− , (!), (!)
12− , class Y, class Y
13− , Natural, type (~>), type (~>)
14− , module Prelude, module Prelude
15− ) where
16−
17−import Prelude (Unit)
18−
19−data X = X
20−
21−fn :: X -> X -> X
22−fn _ _ = X
23−
24−infix 2 fn as !
25−
26−class Y a
27−
28−type Natural f g = forall a. f a -> g a
29−
30−infixl 1 type Natural as ~>
examples/warning/DuplicateImport.pursdeleted−10
@@ -1,10 +0,0 @@
1−-- @shouldWarnWith DuplicateImport
2−module Main where
3−
4−import Prelude (Unit, unit, pure)
5−import Prelude (Unit, unit, pure)
6−
7−import Control.Monad.Eff (Eff)
8−
9−main :: Eff () Unit
10−main = pure unit
examples/warning/DuplicateImportRef.pursdeleted−18
@@ -1,18 +0,0 @@
1−-- @shouldWarnWith DuplicateImportRef
2−-- @shouldWarnWith DuplicateImportRef
3−-- @shouldWarnWith DuplicateImportRef
4−-- @shouldWarnWith DuplicateImportRef
5−module Main where
6−
7−import Prelude
8− ( Unit, Unit
9− , unit, unit
10− , class Functor, class Functor
11− , (<>), (<>)
12− )
13−
14−u :: Unit
15−u = unit <> unit
16−
17−fid :: forall f a. Functor f => f a -> f a
18−fid fa = fa
examples/warning/DuplicateSelectiveImport.pursdeleted−10
@@ -1,10 +0,0 @@
1−-- @shouldWarnWith DuplicateSelectiveImport
2−module Main where
3−
4−import Prelude (Unit, unit)
5−import Prelude (pure)
6−
7−import Control.Monad.Eff (Eff)
8−
9−main :: Eff () Unit
10−main = pure unit
examples/warning/HidingImport.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldWarnWith HidingImport
2−-- @shouldWarnWith HidingImport
3−module Main where
4−
5−import Prelude hiding (one)
6−import Control.Monad.Eff hiding (runPure)
7−
8−main :: Eff () Unit
9−main = pure unit
examples/warning/ImplicitImport.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldWarnWith ImplicitImport
2−-- @shouldWarnWith ImplicitImport
3−module Main where
4−
5−import Prelude
6−import Control.Monad.Eff
7−
8−main :: Eff () Unit
9−main = pure unit
examples/warning/ImplicitQualifiedImport.pursdeleted−11
@@ -1,11 +0,0 @@
1−-- @shouldWarnWith ImplicitQualifiedImport
2−-- @shouldWarnWith ImplicitQualifiedImport
3−module Main where
4−
5−import Data.Unit
6−
7−import Control.Monad.Eff as E
8−import Control.Monad.Eff.Console as E
9−
10−main :: E.Eff (console :: E.CONSOLE) Unit
11−main = E.log "test"
examples/warning/MissingTypeDeclaration.pursdeleted−4
@@ -1,4 +0,0 @@
1−-- @shouldWarnWith MissingTypeDeclaration
2−module Main where
3−
4−x = 0
examples/warning/OverlappingInstances.pursdeleted−17
@@ -1,17 +0,0 @@
1−-- @shouldWarnWith OverlappingInstances
2−module Main where
3−
4−class Test a where
5− test :: a -> a
6−
7−instance testRefl :: Test a where
8− test x = x
9−
10−instance testInt :: Test Int where
11− test _ = 0
12−
13−-- The OverlappingInstances instances warning only arises when there are two
14−-- choices for a dictionary, not when the instances are defined. So without
15−-- `value` this module would not raise a warning.
16−value :: Int
17−value = test 1
examples/warning/OverlappingPattern.pursdeleted−15
@@ -1,15 +0,0 @@
1−-- @shouldWarnWith OverlappingPattern
2−-- @shouldWarnWith OverlappingPattern
3−module Main where
4−
5−data X = A | B
6−
7−pat1 :: X -> Boolean
8−pat1 A = true
9−pat1 A = true
10−pat1 B = false
11−
12−pat2 :: X -> Boolean
13−pat2 A = true
14−pat2 _ = false
15−pat2 B = false
examples/warning/ScopeShadowing.pursdeleted−13
@@ -1,13 +0,0 @@
1−-- @shouldWarnWith ScopeShadowing
2−module Main where
3−
4−import Prelude
5−
6−-- No warning at the definition, only when the name is later resolved
7−data Unit = Unit
8−
9−-- This is only a warning as the `Prelude` import is implicit. If `Unit` was
10−-- named explicitly in an import list, then this refernce to `Unit`
11−-- would be a `ScopeConflict` error instead.
12−test :: Unit
13−test = const Unit unit
examples/warning/ShadowedTypeVar.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldWarnWith ShadowedTypeVar
2−module Main where
3−
4−f :: forall a. (forall a. a -> a) -> a -> a
5−f g x = g x
examples/warning/UnnecessaryFFIModule.jsdeleted−1
@@ -1 +0,0 @@
1−exports.out = null;
examples/warning/UnnecessaryFFIModule.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldWarnWith UnnecessaryFFIModule
2−module Main where
3−
4−t :: Boolean
5−t = true
examples/warning/UnusedDctorExplicitImport.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldWarnWith UnusedDctorExplicitImport
2−module Main where
3−
4−import Data.Ordering (Ordering(EQ, LT))
5−
6−f :: Ordering -> Ordering
7−f EQ = EQ
8−f x = x
examples/warning/UnusedDctorImportAll.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldWarnWith UnusedDctorImport
2−module Main where
3−
4−import Data.Ordering (Ordering(..))
5−
6−f :: Ordering -> Ordering
7−f x = x
examples/warning/UnusedDctorImportExplicit.pursdeleted−7
@@ -1,7 +0,0 @@
1−-- @shouldWarnWith UnusedDctorImport
2−module Main where
3−
4−import Data.Ordering (Ordering(EQ))
5−
6−f :: Ordering -> Ordering
7−f x = x
examples/warning/UnusedExplicitImport.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldWarnWith UnusedExplicitImport
2−module Main where
3−
4−import Prelude (Unit, unit, pure, bind)
5−import Control.Monad.Eff (Eff)
6−
7−main :: Eff () Unit
8−main = pure unit
examples/warning/UnusedExplicitImportTypeOp.pursdeleted−9
@@ -1,9 +0,0 @@
1−-- @shouldWarnWith UnusedExplicitImport
2−module Main where
3−
4−import Prelude (Unit, unit, pure)
5−import Control.Monad.Eff (Eff)
6−import Lib (type (~>), natId)
7−
8−main :: Eff () Unit
9−main = natId (pure unit)
examples/warning/UnusedExplicitImportTypeOp/Lib.pursdeleted−8
@@ -1,8 +0,0 @@
1−module Lib where
2−
3−type Nat f g = ∀ x. f x → g x
4−
5−infixr 4 type Nat as ~>
6−
7−natId ∷ ∀ f. f ~> f
8−natId x = x
examples/warning/UnusedExplicitImportValOp.pursdeleted−8
@@ -1,8 +0,0 @@
1−-- @shouldWarnWith UnusedExplicitImport
2−module Main where
3−
4−import Prelude (Unit, unit, pure, (+))
5−import Control.Monad.Eff (Eff)
6−
7−main :: Eff () Unit
8−main = pure unit
examples/warning/UnusedFFIImplementations.jsdeleted−2
@@ -1,2 +0,0 @@
1−exports.yes = true;
2−exports.no = false;
examples/warning/UnusedFFIImplementations.pursdeleted−4
@@ -1,4 +0,0 @@
1−-- @shouldWarnWith UnusedFFIImplementations
2−module Main where
3−
4−foreign import yes :: Boolean
examples/warning/UnusedImport.pursdeleted−14
@@ -1,14 +0,0 @@
1−-- @shouldWarnWith UnusedImport
2−-- @shouldWarnWith UnusedImport
3−-- @shouldWarnWith UnusedImport
4−module Main where
5−
6−import Data.Unit (Unit, unit)
7−
8−-- All of the below are unused
9−import Control.Monad.Eff
10−import Control.Monad.Eff.Console as Console
11−import Test.Assert ()
12−
13−main :: Unit
14−main = unit
examples/warning/UnusedTypeVar.pursdeleted−5
@@ -1,5 +0,0 @@
1−-- @shouldWarnWith UnusedTypeVar
2−module Main where
3−
4−f :: forall a b. a -> a
5−f x = x
examples/warning/WildcardInferredType.pursdeleted−23
@@ -1,23 +0,0 @@
1−-- @shouldWarnWith WildcardInferredType
2−-- @shouldWarnWith WildcardInferredType
3−-- @shouldWarnWith WildcardInferredType
4−-- @shouldWarnWith WildcardInferredType
5−module Main where
6−
7−x :: Int
8−x = 0 :: _
9−
10−y :: _
11−y = 0
12−
13−z :: Int
14−z =
15− let n :: _
16− n = 0
17− in n
18−
19−w :: Int
20−w = n
21− where
22− n :: _
23− n = 0
hierarchy/Main.hsdeleted−119
@@ -1,119 +0,0 @@
1−-----------------------------------------------------------------------------
2−--
3−-- Module : Main
4−-- Copyright : (c) Hardy Jones 2014
5−-- License : MIT (http://opensource.org/licenses/MIT)
6−--
7−-- Maintainer : Hardy Jones <jones3.hardy@gmail.com>
8−-- Stability : experimental
9−-- Portability :
10−--
11−-- |
12−-- Generate Directed Graphs of PureScript TypeClasses
13−--
14−-----------------------------------------------------------------------------
15−
16−{-# LANGUAGE TupleSections #-}
17−{-# LANGUAGE DataKinds #-}
18−
19−module Main where
20−
21−import Control.Applicative (optional)
22−import Control.Monad (unless)
23−
24−import Data.List (intercalate,nub,sort)
25−import Data.Foldable (for_)
26−import Data.Version (showVersion)
27−import Data.Monoid ((<>))
28−import qualified Data.Text as T
29−
30−import Options.Applicative (Parser)
31−import qualified Options.Applicative as Opts
32−import System.Directory (createDirectoryIfMissing)
33−import System.FilePath ((</>))
34−import System.FilePath.Glob (glob)
35−import System.Exit (exitFailure, exitSuccess)
36−import System.IO (hPutStr, stderr)
37−import System.IO.UTF8 (readUTF8FileT)
38−
39−import qualified Language.PureScript as P
40−import qualified Paths_purescript as Paths
41−
42−data HierarchyOptions = HierarchyOptions
43− { hierachyInput :: FilePath
44− , hierarchyOutput :: Maybe FilePath
45− }
46−
47−newtype SuperMap = SuperMap { unSuperMap :: Either (P.ProperName 'P.ClassName) (P.ProperName 'P.ClassName, P.ProperName 'P.ClassName) }
48− deriving Eq
49−
50−instance Show SuperMap where
51− show (SuperMap (Left sub)) = show sub
52− show (SuperMap (Right (super, sub))) = show super ++ " -> " ++ show sub
53−
54−instance Ord SuperMap where
55− compare (SuperMap s) (SuperMap s') = getCls s `compare` getCls s'
56− where
57− getCls = either id snd
58−
59−runModuleName :: P.ModuleName -> String
60−runModuleName (P.ModuleName pns) = intercalate "_" ((T.unpack . P.runProperName) `map` pns)
61−
62−readInput :: [FilePath] -> IO (Either P.MultipleErrors [P.Module])
63−readInput paths = do
64− content <- mapM (\path -> (path, ) <$> readUTF8FileT path) paths
65− return $ map snd <$> P.parseModulesFromFiles id content
66−
67−compile :: HierarchyOptions -> IO ()
68−compile (HierarchyOptions inputGlob mOutput) = do
69− input <- glob inputGlob
70− modules <- readInput input
71− case modules of
72− Left errs -> hPutStr stderr (P.prettyPrintMultipleErrors P.defaultPPEOptions errs) >> exitFailure
73− Right ms -> do
74− for_ ms $ \(P.Module _ _ moduleName decls _) ->
75− let name = runModuleName moduleName
76− tcs = filter P.isTypeClassDeclaration decls
77− supers = sort . nub . filter (not . null) $ fmap superClasses tcs
78− prologue = "digraph " ++ name ++ " {\n"
79− body = intercalate "\n" (concatMap (fmap (\s -> " " ++ show s ++ ";")) supers)
80− epilogue = "\n}"
81− hier = prologue ++ body ++ epilogue
82− in unless (null supers) $ case mOutput of
83− Just output -> do
84− createDirectoryIfMissing True output
85− writeFile (output </> name) hier
86− Nothing -> putStrLn hier
87− exitSuccess
88−
89−superClasses :: P.Declaration -> [SuperMap]
90−superClasses (P.TypeClassDeclaration sub _ supers@(_:_) _ _) =
91− fmap (\(P.Constraint (P.Qualified _ super) _ _) -> SuperMap (Right (super, sub))) supers
92−superClasses (P.TypeClassDeclaration sub _ _ _ _) = [SuperMap (Left sub)]
93−superClasses (P.PositionedDeclaration _ _ decl) = superClasses decl
94−superClasses _ = []
95−
96−inputFile :: Parser FilePath
97−inputFile = Opts.strArgument $
98− Opts.metavar "FILE"
99− <> Opts.value "main.purs"
100− <> Opts.showDefault
101− <> Opts.help "The input file to generate a hierarchy from"
102−
103−outputFile :: Parser (Maybe FilePath)
104−outputFile = optional . Opts.strOption $
105− Opts.short 'o'
106− <> Opts.long "output"
107− <> Opts.help "The output directory"
108−
109−pscOptions :: Parser HierarchyOptions
110−pscOptions = HierarchyOptions <$> inputFile
111− <*> outputFile
112−
113−main :: IO ()
114−main = Opts.execParser opts >>= compile
115− where
116− opts = Opts.info (Opts.helper <*> pscOptions) infoModList
117− infoModList = Opts.fullDesc <> headerInfo <> footerInfo
118− headerInfo = Opts.header "hierarchy - Creates a GraphViz directed graph of PureScript TypeClasses"
119− footerInfo = Opts.footer $ "hierarchy " ++ showVersion Paths.version
license-generator/generate.hsdeleted−172
@@ -1,172 +0,0 @@
1−{-# LANGUAGE TupleSections #-}
2−-- |
3−-- A small script which regenerates the LICENSE file with all
4−-- dependencies' licenses, when the dependencies are provided via standard
5−-- input.
6−--
7−-- It is recommended to run this as follows:
8−--
9−-- stack list-dependencies | stack exec runhaskell license-generator/generate.hs > LICENSE
10−--
11−
12−module Main (main) where
13−
14−import Control.Monad (forM_, when)
15−import Data.Char (isSpace, toLower)
16−import Data.Maybe (mapMaybe)
17−import Data.List
18−import Data.List.Split (splitOn)
19−import Data.Foldable
20−import Data.Traversable
21−import qualified Data.ByteString.Lazy as LBS
22−import qualified Data.Text.Lazy as TL
23−import qualified Data.Text.Lazy.Encoding as TLE
24−import Network.HTTP.Types (ok200)
25−import Network.HTTP.Client (Manager, newManager, httpLbs, parseRequest, responseBody, responseStatus)
26−import Network.HTTP.Client.TLS (tlsManagerSettings)
27−import System.IO (hPutStrLn, stderr, getContents)
28−import System.Exit (exitFailure)
29−
30−main :: IO ()
31−main = do
32− deps <- depsNamesAndVersions
33− echoHeader
34− putStrLn ""
35− forM_ deps $ \(d, _) -> putStr " " >> putStrLn d
36− putStrLn ""
37− manager <- newManager tlsManagerSettings
38− results <- traverse (\d -> (d,) <$> depsLicense manager d) deps
39− let failures = filter (not . snd) results
40− if not (null failures)
41− then do
42− hPutStrLn stderr "Licenses were not found for the following packages:"
43− traverse_ (hPutStrLn stderr . showPair . fst) failures
44− exitFailure
45− else
46− hPutStrLn stderr "Everything looks ok."
47−
48− where
49− showPair (pkg, version) = pkg ++ " " ++ version
50−
51−echoHeader :: IO ()
52−echoHeader =
53− readFile "license-generator/header.txt" >>= putStr
54−
55−depsNamesAndVersions :: IO [(String, String)]
56−depsNamesAndVersions = do
57− contents <- lines <$> getContents
58− deps <- traverse parse contents
59− pure (filter ((/= "purescript") . fst) deps)
60−
61− where
62− parse line =
63− case splitOn " " line of
64− [pkg, vers] -> pure (pkg, vers)
65− _ -> fail $ "Unable to parse input line: " ++ line
66−
67−-- Returns True on success, False on failure.
68−depsLicense :: Manager -> (String, String) -> IO Bool
69−depsLicense manager dep = do
70− hPutStrLn stderr (fst dep)
71− result <- downloadLicenseFromHackage manager dep
72− case result of
73− FoundLicense license -> do
74− putStrLn $ fst dep ++ " LICENSE file:"
75− putStrLn ""
76− putStrLn $ f license
77− pure True
78− LicenseNotNeeded ->
79− pure True
80− Failed ->
81− pure False
82− where
83− f = unlines . map (trimEnd . (" " ++)) . lines
84− trimEnd = reverse . dropWhile isSpace . reverse
85−
86−data LicenseResult
87− = FoundLicense String
88− | LicenseNotNeeded
89− | Failed
90− deriving (Show, Eq, Ord)
91−
92−downloadLicenseFromHackage :: Manager -> (String, String) -> IO LicenseResult
93−downloadLicenseFromHackage manager dep = do
94− mcabalFile <- downloadCabalFileFromHackage manager dep
95− case mcabalFile of
96− Nothing ->
97− pure Failed
98− Just cabalFile ->
99− let
100− field f = extractCabalField f cabalFile
101− in
102− case (field "license", field "license-file") of
103− (_, Just licenseFile) -> do
104− getLicense licenseFile
105− (Just "PublicDomain", _) -> do
106− pure LicenseNotNeeded
107− _ -> do
108− hPutStrLn stderr $
109− "Unable to extract license information from cabal file for " ++
110− fst dep
111− pure Failed
112−
113− where
114− getLicense licenseFile = do
115− r <- downloadFromHackage ("/src/" ++ licenseFile) manager dep
116− pure $ maybe Failed FoundLicense r
117−
118−-- Attempt to extract a field from a cabal file. Note that this only works for
119−-- fields which are at the top level, not inside subsections such as
120−-- 'executable' or 'test-suite'.
121−extractCabalField :: String -> String -> Maybe String
122−extractCabalField fieldName cabalFile =
123− case mapMaybe (stripPrefixCaseInsensitive fieldName) (lines cabalFile) of
124− [line] ->
125− Just $
126− line
127− |> dropWhile isSpace
128− |> drop 1 -- colon
129− |> trim
130− _ ->
131− Nothing
132− where
133− x |> f = f x
134−
135− trim =
136− reverse . dropWhile isSpace . reverse . dropWhile isSpace
137−
138− stripPrefixCaseInsensitive prefix str =
139− if map toLower prefix `isPrefixOf` map toLower str
140− then Just (drop (length prefix) str)
141− else Nothing
142−
143−downloadCabalFileFromHackage :: Manager -> (String, String) -> IO (Maybe String)
144−downloadCabalFileFromHackage manager dep = do
145− downloadFromHackage ("/src/" ++ fst dep ++ ".cabal") manager dep
146−
147−downloadFromHackage :: String -> Manager -> (String, String) -> IO (Maybe String)
148−downloadFromHackage urlpath manager dep = do
149− let url = hackageBaseUrl dep ++ urlpath
150− req <- parseRequest url
151− resp <- httpLbs req manager
152−
153− let status = responseStatus resp
154− if (status /= ok200)
155− then do
156− hPutStrLn stderr $ "Bad status code for " ++ url
157− hPutStrLn stderr $ "Expected 200, got " ++ show status
158− pure Nothing
159− else
160− pure (Just (toString (responseBody resp)))
161−
162− where
163− toString = TL.unpack . TLE.decodeUtf8
164−
165−hackageBaseUrl :: (String, String) -> String
166−hackageBaseUrl (dep, version) =
167− concat
168− [ "https://hackage.haskell.org/package/"
169− , dep
170− , "-"
171− , version
172− ]
license-generator/header.txtdeleted−15
@@ -1,15 +0,0 @@
1−Copyright (c) 2013-16 Phil Freeman, (c) 2014-2016 Gary Burgess, and other
2−contributors
3−All rights reserved.
4−
5−Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6−
7−1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8−
9−2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
10−
11−3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
12−
13−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 HOLDER 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.
14−
15−PureScript uses the following Haskell library packages. Their license files follow.
logo.pngdeleted

Binary file not shown.

make_release_notesdeleted−2
@@ -1,2 +0,0 @@
1−curl https://api.github.com/repos/purescript/purescript/pulls?state=closed\&per_page=100 \
2− | jq -r '.[] | ("- " + .title + " (@" + .user.login + ")")'
package.yamlnew file+86
@@ -0,0 +1,86 @@
1+name: psgo
2+version: 0.1.0.0
3+github: "andyarvanitis/purescript-native"
4+license: BSD3
5+author: "Andy Arvanitis"
6+maintainer: "example@example.com"
7+copyright: "2018 Andy Arvanitis"
8+
9+extra-source-files:
10+- README.md
11+- ChangeLog.md
12+- stack.yaml
13+- support/*
14+
15+# Metadata used when publishing your package
16+# synopsis: Short description of your package
17+# category: Web
18+
19+# To avoid duplicated efforts in documentation and dealing with the
20+# complications of embedding Haddock markup inside cabal files, it is
21+# common to point users to the README.md file.
22+description: Please see the README on Github at <https://github.com/andyarvanitis/purescript-native#readme>
23+
24+dependencies:
25+- base >= 4.7 && < 5
26+- bytestring >= 0.10.8.2 && < 0.11
27+- purescript
28+- base-compat >=0.6.0
29+- protolude >=0.1.6
30+- text
31+- containers
32+- filepath
33+- monad-parallel >= 0.7.2.2 && <0.8
34+- pattern-arrows >=0.0.2 && <0.1
35+- safe >=0.3.9 && <0.4
36+- transformers >=0.3.0 && <0.6
37+- mtl >=2.1.0 && <2.3.0
38+- aeson >=1.0 && <1.5
39+- directory
40+- process
41+- file-embed
42+- filemanip
43+- gitrev
44+
45+library:
46+ source-dirs: src
47+ default-extensions:
48+ - ConstraintKinds
49+ - DataKinds
50+ - DeriveFunctor
51+ - EmptyDataDecls
52+ - FlexibleContexts
53+ - KindSignatures
54+ - LambdaCase
55+ - MultiParamTypeClasses
56+ - NoImplicitPrelude
57+ - PatternGuards
58+ - PatternSynonyms
59+ - RankNTypes
60+ - RecordWildCards
61+ - OverloadedStrings
62+ - ScopedTypeVariables
63+ - TupleSections
64+ - ViewPatterns
65+
66+executables:
67+ psgo:
68+ main: Main.hs
69+ source-dirs: app
70+ ghc-options:
71+ - -threaded
72+ - -rtsopts
73+ - -with-rtsopts=-N
74+ dependencies:
75+ - psgo
76+
77+tests:
78+ psgo-test:
79+ main: Spec.hs
80+ source-dirs: test
81+ ghc-options:
82+ - -threaded
83+ - -rtsopts
84+ - -with-rtsopts=-N
85+ dependencies:
86+ - psgo
psc-bundle/Main.hsdeleted−147
@@ -1,147 +0,0 @@
1−{-# LANGUAGE FlexibleContexts #-}
2−{-# LANGUAGE ScopedTypeVariables #-}
3−{-# LANGUAGE TupleSections #-}
4−{-# LANGUAGE RecordWildCards #-}
5−
6−-- | Bundles compiled PureScript modules for the browser.
7−module Main (main) where
8−
9−import Data.Traversable (for)
10−import Data.Version (showVersion)
11−import Data.Monoid ((<>))
12−import Data.Aeson (encode)
13−import Data.Maybe (isNothing)
14−
15−import Control.Applicative
16−import Control.Monad
17−import Control.Monad.Error.Class
18−import Control.Monad.Trans.Except
19−import Control.Monad.IO.Class
20−
21−import System.FilePath (takeDirectory, (</>), (<.>), takeFileName)
22−import System.FilePath.Glob (glob)
23−import System.Exit (exitFailure)
24−import System.IO (stderr, stdout, hPutStrLn, hSetEncoding, utf8)
25−import System.IO.UTF8 (readUTF8File, writeUTF8File)
26−import System.Directory (createDirectoryIfMissing, getCurrentDirectory)
27−
28−import qualified Data.ByteString.Lazy as B
29−import qualified Data.ByteString.UTF8 as BU8
30−
31−import Language.PureScript.Bundle
32−
33−import Options.Applicative (Parser, ParseError (..))
34−import qualified Options.Applicative as Opts
35−
36−import qualified Paths_purescript as Paths
37−
38−import SourceMap
39−import SourceMap.Types
40−
41−-- | Command line options.
42−data Options = Options
43− { optionsInputFiles :: [FilePath]
44− , optionsOutputFile :: Maybe FilePath
45− , optionsEntryPoints :: [String]
46− , optionsMainModule :: Maybe String
47− , optionsNamespace :: String
48− , optionsSourceMaps :: Bool
49− } deriving Show
50−
51−-- | The main application function.
52−-- This function parses the input files, performs dead code elimination, filters empty modules
53−-- and generates and prints the final Javascript bundle.
54−app :: (MonadError ErrorMessage m, MonadIO m) => Options -> m (Maybe SourceMapping, String)
55−app Options{..} = do
56− inputFiles <- concat <$> mapM (liftIO . glob) optionsInputFiles
57− when (null inputFiles) . liftIO $ do
58− hPutStrLn stderr "psc-bundle: No input files."
59− exitFailure
60− when (isNothing optionsOutputFile && optionsSourceMaps == True) . liftIO $ do
61− hPutStrLn stderr "psc-bundle: Source maps only supported when output file specified."
62− exitFailure
63−
64− input <- for inputFiles $ \filename -> do
65− js <- liftIO (readUTF8File filename)
66− mid <- guessModuleIdentifier filename
67− length js `seq` return (mid, Just filename, js) -- evaluate readFile till EOF before returning, not to exhaust file handles
68−
69− let entryIds = map (`ModuleIdentifier` Regular) optionsEntryPoints
70−
71− currentDir <- liftIO getCurrentDirectory
72− let outFile = if optionsSourceMaps then fmap (currentDir </>) optionsOutputFile else Nothing
73− bundleSM input entryIds optionsMainModule optionsNamespace outFile
74−
75−-- | Command line options parser.
76−options :: Parser Options
77−options = Options <$> some inputFile
78− <*> optional outputFile
79− <*> many entryPoint
80− <*> optional mainModule
81− <*> namespace
82− <*> sourceMaps
83− where
84− inputFile :: Parser FilePath
85− inputFile = Opts.strArgument $
86− Opts.metavar "FILE"
87− <> Opts.help "The input .js file(s)"
88−
89− outputFile :: Parser FilePath
90− outputFile = Opts.strOption $
91− Opts.short 'o'
92− <> Opts.long "output"
93− <> Opts.help "The output .js file"
94−
95− entryPoint :: Parser String
96− entryPoint = Opts.strOption $
97− Opts.short 'm'
98− <> Opts.long "module"
99− <> Opts.help "Entry point module name(s). All code which is not a transitive dependency of an entry point module will be removed."
100−
101− mainModule :: Parser String
102− mainModule = Opts.strOption $
103− Opts.long "main"
104− <> Opts.help "Generate code to run the main method in the specified module."
105−
106− namespace :: Parser String
107− namespace = Opts.strOption $
108− Opts.short 'n'
109− <> Opts.long "namespace"
110− <> Opts.value "PS"
111− <> Opts.showDefault
112− <> Opts.help "Specify the namespace that PureScript modules will be exported to when running in the browser."
113−
114− sourceMaps :: Parser Bool
115− sourceMaps = Opts.switch $
116− Opts.long "source-maps"
117− <> Opts.help "Whether to generate source maps for the bundle (requires --output)."
118−
119−-- | Make it go.
120−main :: IO ()
121−main = do
122− hSetEncoding stdout utf8
123− hSetEncoding stderr utf8
124− opts <- Opts.execParser (Opts.info (version <*> Opts.helper <*> options) infoModList)
125− output <- runExceptT (app opts)
126− case output of
127− Left err -> do
128− hPutStrLn stderr (unlines (printErrorMessage err))
129− exitFailure
130− Right (sourcemap, js) ->
131− case optionsOutputFile opts of
132− Just outputFile -> do
133− createDirectoryIfMissing True (takeDirectory outputFile)
134− case sourcemap of
135− Just sm -> do
136− writeUTF8File outputFile $ js ++ "\n//# sourceMappingURL=" ++ (takeFileName outputFile <.> "map") ++ "\n"
137− writeUTF8File (outputFile <.> "map") $ BU8.toString . B.toStrict . encode $ generate sm
138− Nothing -> writeUTF8File outputFile js
139− Nothing -> putStrLn js
140− where
141− infoModList = Opts.fullDesc <> headerInfo <> footerInfo
142− headerInfo = Opts.header "psc-bundle - Bundles compiled PureScript modules for the browser"
143− footerInfo = Opts.footer $ "psc-bundle " ++ showVersion Paths.version
144−
145− version :: Parser (a -> a)
146− version = Opts.abortOption (InfoMsg (showVersion Paths.version)) $
147− Opts.long "version" <> Opts.help "Show the version number" <> Opts.hidden
psc-bundle/README.mddeleted−18
@@ -1,18 +0,0 @@
1−# psc-bundle
2−
3−A dead code elimination tool for PureScript-style CommonJS modules. This can be used as an alternative to Browserify.
4−
5−## Usage
6−
7− psc-bundle FILE (-m|--module ARG) [--main ARG] [--namespace ARG]
8−
9−Options:
10−
11−- The input .js file(s)
12−- Entry point module name(s) are specified with `-m` or `--module`. All code which is not a transitive dependency of an entry point module will be removed.
13−- The main module is (optionally) specified using `--main`. If specified, this will generate code to run the main method in the specified module.
14−- The browser namespace defaults to `PS`, and can be overridden with `--namespace`.
15−
16−For example, to bundle the modules in the `output` directory, with main module `Main`:
17−
18− psc-bundle output/**/*.js -m Main --main Main
psc-docs/Ctags.hsdeleted−13
@@ -1,13 +0,0 @@
1−module Ctags (dumpCtags) where
2−
3−import qualified Language.PureScript as P
4−import Tags
5−import Data.List (sort)
6−
7−dumpCtags :: [(String, P.Module)] -> [String]
8−dumpCtags = sort . concatMap renderModCtags
9−
10−renderModCtags :: (String, P.Module) -> [String]
11−renderModCtags (path, mdl) = sort tagLines
12− where tagLines = map tagLine $ tags mdl
13− tagLine (name, line) = name ++ "\t" ++ path ++ "\t" ++ show line
psc-docs/Etags.hsdeleted−13
@@ -1,13 +0,0 @@
1−module Etags (dumpEtags) where
2−
3−import qualified Language.PureScript as P
4−import Tags
5−
6−dumpEtags :: [(String, P.Module)] -> [String]
7−dumpEtags = concatMap renderModEtags
8−
9−renderModEtags :: (String, P.Module) -> [String]
10−renderModEtags (path, mdl) = ["\x0c", path ++ "," ++ show tagsLen] ++ tagLines
11− where tagsLen = sum $ map length tagLines
12− tagLines = map tagLine $ tags mdl
13− tagLine (name, line) = "\x7f" ++ name ++ "\x01" ++ show line ++ ","
psc-docs/Main.hsdeleted−253
@@ -1,253 +0,0 @@
1−{-# LANGUAGE TupleSections #-}
2−
3−module Main where
4−
5−import Control.Applicative
6−import Control.Monad.Trans.Except (runExceptT)
7−import Control.Arrow (first, second)
8−import Control.Category ((>>>))
9−import Control.Monad.Writer
10−import Data.Text (Text)
11−import qualified Data.Text as T
12−import qualified Data.Text.IO as T
13−import Data.Function (on)
14−import Data.List
15−import Data.Maybe (fromMaybe)
16−import Data.Tuple (swap)
17−import Data.Version (showVersion)
18−
19−import Options.Applicative
20−import qualified Text.PrettyPrint.ANSI.Leijen as PP
21−
22−import qualified Language.PureScript as P
23−import qualified Paths_purescript as Paths
24−import System.Exit (exitFailure)
25−import System.IO (hPutStrLn, hPrint, hSetEncoding, stderr, stdout, utf8)
26−import System.IO.UTF8 (readUTF8FileT, writeUTF8FileT)
27−import System.Directory (createDirectoryIfMissing)
28−import System.FilePath (takeDirectory)
29−import System.FilePath.Glob (glob)
30−
31−import Etags
32−import Ctags
33−import qualified Language.PureScript.Docs as D
34−import qualified Language.PureScript.Docs.AsMarkdown as D
35−
36−-- Available output formats
37−data Format = Markdown -- Output documentation in Markdown format
38− | Ctags -- Output ctags symbol index suitable for use with vi
39− | Etags -- Output etags symbol index suitable for use with emacs
40− deriving (Show, Eq, Ord)
41−
42−-- | Available methods of outputting Markdown documentation
43−data DocgenOutput
44− = EverythingToStdOut
45− | ToStdOut [P.ModuleName]
46− | ToFiles [(P.ModuleName, FilePath)]
47− deriving (Show)
48−
49−data PSCDocsOptions = PSCDocsOptions
50− { pscdFormat :: Format
51− , pscdInputFiles :: [FilePath]
52− , pscdDocgen :: DocgenOutput
53− }
54− deriving (Show)
55−
56−docgen :: PSCDocsOptions -> IO ()
57−docgen (PSCDocsOptions fmt inputGlob output) = do
58− input <- concat <$> mapM glob inputGlob
59− case fmt of
60− Etags -> dumpTags input dumpEtags
61− Ctags -> dumpTags input dumpCtags
62− Markdown -> do
63− ms <- runExceptT (D.parseAndBookmark input []
64− >>= (fst >>> D.convertModulesInPackage))
65− >>= successOrExit
66−
67− case output of
68− EverythingToStdOut ->
69− T.putStrLn (D.runDocs (D.modulesAsMarkdown ms))
70− ToStdOut names -> do
71− let (ms', missing) = takeByName ms names
72− guardMissing missing
73− T.putStrLn (D.runDocs (D.modulesAsMarkdown ms'))
74− ToFiles names -> do
75− let (ms', missing) = takeByName' ms names
76− guardMissing missing
77−
78− let ms'' = groupBy ((==) `on` fst) . sortBy (compare `on` fst) $ map swap ms'
79− forM_ ms'' $ \grp -> do
80− let fp = fst (head grp)
81− createDirectoryIfMissing True (takeDirectory fp)
82− writeUTF8FileT fp (D.runDocs (D.modulesAsMarkdown (map snd grp)))
83−
84− where
85− guardMissing [] = return ()
86− guardMissing [mn] = do
87− hPutStrLn stderr ("psc-docs: error: unknown module \"" ++ T.unpack (P.runModuleName mn) ++ "\"")
88− exitFailure
89− guardMissing mns = do
90− hPutStrLn stderr "psc-docs: error: unknown modules:"
91− forM_ mns $ \mn ->
92− hPutStrLn stderr (" * " ++ T.unpack (P.runModuleName mn))
93− exitFailure
94−
95− successOrExit :: Either P.MultipleErrors a -> IO a
96− successOrExit act =
97− case act of
98− Right x ->
99− return x
100− Left err -> do
101− hPutStrLn stderr $ P.prettyPrintMultipleErrors P.defaultPPEOptions err
102− exitFailure
103−
104− takeByName = takeModulesByName D.modName
105− takeByName' = takeModulesByName' D.modName
106−
107−-- |
108−-- Given a list of module names and a list of modules, return a list of modules
109−-- whose names appeared in the given name list, together with a list of names
110−-- for which no module could be found in the module list.
111−--
112−takeModulesByName :: (Eq n) => (m -> n) -> [m] -> [n] -> ([m], [n])
113−takeModulesByName getModuleName modules names =
114− first (map fst) (takeModulesByName' getModuleName modules (map (,()) names))
115−
116−-- |
117−-- Like takeModulesByName, but also keeps some extra information with each
118−-- module.
119−--
120−takeModulesByName' :: (Eq n) => (m -> n) -> [m] -> [(n, a)] -> ([(m, a)], [n])
121−takeModulesByName' getModuleName modules = foldl go ([], [])
122− where
123− go (ms, missing) (name, x) =
124− case find ((== name) . getModuleName) modules of
125− Just m -> ((m, x) : ms, missing)
126− Nothing -> (ms, name : missing)
127−
128−dumpTags :: [FilePath] -> ([(String, P.Module)] -> [String]) -> IO ()
129−dumpTags input renderTags = do
130− e <- P.parseModulesFromFiles (fromMaybe "") <$> mapM (fmap (first Just) . parseFile) (nub input)
131− case e of
132− Left err -> do
133− hPrint stderr err
134− exitFailure
135− Right ms ->
136− ldump (renderTags (pairs ms))
137−
138− where
139− pairs :: [(Maybe String, m)] -> [(String, m)]
140− pairs = map (first (fromMaybe ""))
141−
142− ldump :: [String] -> IO ()
143− ldump = mapM_ putStrLn
144−
145−parseFile :: FilePath -> IO (FilePath, Text)
146−parseFile input = (,) input <$> readUTF8FileT input
147−
148−inputFile :: Parser FilePath
149−inputFile = strArgument $
150− metavar "FILE"
151− <> help "The input .purs file(s)"
152−
153−instance Read Format where
154− readsPrec _ "etags" = [(Etags, "")]
155− readsPrec _ "ctags" = [(Ctags, "")]
156− readsPrec _ "markdown" = [(Markdown, "")]
157− readsPrec _ _ = []
158−
159−format :: Parser Format
160−format = option auto $ value Markdown
161− <> long "format"
162− <> metavar "FORMAT"
163− <> help "Set output FORMAT (markdown | etags | ctags)"
164−
165−docgenModule :: Parser String
166−docgenModule = strOption $
167− long "docgen"
168− <> help "A list of module names which should appear in the output. This can optionally include file paths to write individual modules to, by separating with a colon ':'. For example, Prelude:docs/Prelude.md. This option may be specified multiple times."
169−
170−pscDocsOptions :: Parser (Format, [FilePath], [String])
171−pscDocsOptions = (,,) <$> format <*> many inputFile <*> many docgenModule
172−
173−parseDocgen :: [String] -> Either String DocgenOutput
174−parseDocgen [] = Right EverythingToStdOut
175−parseDocgen xs = go xs
176− where
177− go = intersperse " "
178− >>> concat
179− >>> words
180− >>> map parseItem
181− >>> combine
182−
183−data DocgenOutputItem
184− = IToStdOut P.ModuleName
185− | IToFile (P.ModuleName, FilePath)
186−
187−parseItem :: String -> DocgenOutputItem
188−parseItem s = case elemIndex ':' s of
189− Just i ->
190− s # splitAt i
191− >>> first (P.moduleNameFromString . T.pack)
192− >>> second (drop 1)
193− >>> IToFile
194− Nothing ->
195− IToStdOut (P.moduleNameFromString (T.pack s))
196−
197− where
198− infixr 1 #
199− (#) = flip ($)
200−
201−combine :: [DocgenOutputItem] -> Either String DocgenOutput
202−combine [] = Right EverythingToStdOut
203−combine (x:xs) = foldM go (initial x) xs
204− where
205− initial (IToStdOut m) = ToStdOut [m]
206− initial (IToFile m) = ToFiles [m]
207−
208− go (ToStdOut ms) (IToStdOut m) = Right (ToStdOut (m:ms))
209− go (ToFiles ms) (IToFile m) = Right (ToFiles (m:ms))
210− go _ _ = Left "Can't mix module names and module name/file path pairs in the same invocation."
211−
212−buildOptions :: (Format, [FilePath], [String]) -> IO PSCDocsOptions
213−buildOptions (fmt, input, mapping) =
214− case parseDocgen mapping of
215− Right mapping' -> return (PSCDocsOptions fmt input mapping')
216− Left err -> do
217− hPutStrLn stderr "psc-docs: error in --docgen option:"
218− hPutStrLn stderr (" " ++ err)
219− exitFailure
220−
221−main :: IO ()
222−main = do
223− hSetEncoding stdout utf8
224− hSetEncoding stderr utf8
225− execParser opts >>= buildOptions >>= docgen
226− where
227− opts = info (version <*> helper <*> pscDocsOptions) infoModList
228− infoModList = fullDesc <> headerInfo <> footerInfo
229− headerInfo = header "psc-docs - Generate Markdown documentation from PureScript source files"
230− footerInfo = footerDoc $ Just $ PP.vcat
231− [ examples, PP.empty, PP.text ("psc-docs " ++ showVersion Paths.version) ]
232−
233− version :: Parser (a -> a)
234− version = abortOption (InfoMsg (showVersion Paths.version)) $ long "version" <> help "Show the version number" <> hidden
235−
236−examples :: PP.Doc
237−examples =
238− PP.vcat $ map PP.text
239− [ "Examples:"
240− , " print documentation for Data.List to stdout:"
241− , " psc-docs \"src/**/*.purs\" \".psc-package/*/*/*/src/**/*.purs\" \\"
242− , " --docgen Data.List"
243− , ""
244− , " write documentation for Data.List to docs/Data.List.md:"
245− , " psc-docs \"src/**/*.purs\" \".psc-package/*/*/*/src/**/*.purs\" \\"
246− , " --docgen Data.List:docs/Data.List.md"
247− , ""
248− , " write documentation for Data.List to docs/Data.List.md, and"
249− , " documentation for Data.List.Lazy to docs/Data.List.Lazy.md:"
250− , " psc-docs \"src/**/*.purs\" \".psc-package/*/*/*/src/**/*.purs\" \\"
251− , " --docgen Data.List:docs/Data.List.md \\"
252− , " --docgen Data.List.Lazy:docs/Data.List.Lazy.md"
253− ]
psc-docs/Tags.hsdeleted−21
@@ -1,21 +0,0 @@
1−module Tags where
2−
3−import Control.Arrow (first)
4−import qualified Data.Text as T
5−import qualified Language.PureScript as P
6−
7−tags :: P.Module -> [(String, Int)]
8−tags = map (first T.unpack) . concatMap dtags . P.exportedDeclarations
9− where dtags (P.PositionedDeclaration sp _ d) = map tag $ names d
10− where tag name = (name, line)
11− line = P.sourcePosLine $ P.spanStart sp
12− dtags _ = []
13− names (P.DataDeclaration _ name _ dcons) = P.runProperName name : consNames
14− where consNames = map (\(cname, _) -> P.runProperName cname) dcons
15− names (P.TypeDeclaration ident _) = [P.showIdent ident]
16− names (P.ExternDeclaration ident _) = [P.showIdent ident]
17− names (P.TypeSynonymDeclaration name _ _) = [P.runProperName name]
18− names (P.TypeClassDeclaration name _ _ _ _) = [P.runProperName name]
19− names (P.TypeInstanceDeclaration name _ _ _ _) = [P.showIdent name]
20− names (P.ExternKindDeclaration name) = [P.runProperName name]
21− names _ = []
psc-ide-client/Main.hsdeleted−48
@@ -1,48 +0,0 @@
1−module Main where
2−
3−import Prelude ()
4−import Prelude.Compat
5−
6−import Control.Exception
7−import qualified Data.ByteString.Char8 as BS8
8−import qualified Data.Text.IO as T
9−import Data.Version (showVersion)
10−import Data.Monoid ((<>))
11−import Network
12−import Options.Applicative (ParseError (..))
13−import qualified Options.Applicative as Opts
14−import System.Exit
15−import System.IO
16−
17−import qualified Paths_purescript as Paths
18−
19−data Options = Options
20− { optionsPort :: PortID
21− }
22−
23−main :: IO ()
24−main = do
25− Options port <- Opts.execParser opts
26− client port
27− where
28− parser =
29− Options <$>
30− (PortNumber . fromIntegral <$>
31− Opts.option Opts.auto (Opts.long "port" <> Opts.short 'p' <> Opts.value (4242 :: Integer)))
32− opts = Opts.info (version <*> Opts.helper <*> parser) mempty
33− version = Opts.abortOption (InfoMsg (showVersion Paths.version)) $
34− Opts.long "version" <> Opts.help "Show the version number" <> Opts.hidden
35−
36−client :: PortID -> IO ()
37−client port = do
38− h <-
39− connectTo "127.0.0.1" port `catch`
40− (\(SomeException e) ->
41− putStrLn
42− ("Couldn't connect to psc-ide-server on port: " ++
43− show port ++ " Error: " ++ show e) >>
44− exitFailure)
45− T.hPutStrLn h =<< T.getLine
46− BS8.putStrLn =<< BS8.hGetLine h
47− hFlush stdout
48− hClose h
psc-ide-server/Main.hsdeleted−179
@@ -1,179 +0,0 @@
1−-----------------------------------------------------------------------------
2−--
3−-- Module : Main
4−-- Description : The server accepting commands for psc-ide
5−-- Copyright : Christoph Hegemann 2016
6−-- License : MIT (http://opensource.org/licenses/MIT)
7−--
8−-- Maintainer : Christoph Hegemann <christoph.hegemann1337@gmail.com>
9−-- Stability : experimental
10−--
11−-- |
12−-- The server accepting commands for psc-ide
13−-----------------------------------------------------------------------------
14−
15−{-# LANGUAGE FlexibleContexts #-}
16−{-# LANGUAGE MultiParamTypeClasses #-}
17−{-# LANGUAGE OverloadedStrings #-}
18−{-# LANGUAGE PackageImports #-}
19−{-# LANGUAGE TemplateHaskell #-}
20−{-# LANGUAGE NoImplicitPrelude #-}
21−
22−module Main where
23−
24−import Protolude
25−
26−import qualified Data.Aeson as Aeson
27−import Control.Concurrent.STM
28−import "monad-logger" Control.Monad.Logger
29−import qualified Data.Text.IO as T
30−import qualified Data.ByteString.Lazy.Char8 as BS8
31−import Data.Version (showVersion)
32−import Language.PureScript.Ide
33−import Language.PureScript.Ide.Command
34−import Language.PureScript.Ide.Util
35−import Language.PureScript.Ide.Error
36−import Language.PureScript.Ide.Types
37−import Language.PureScript.Ide.Watcher
38−import Network hiding (socketPort, accept)
39−import Network.BSD (getProtocolNumber)
40−import Network.Socket hiding (PortNumber, Type,
41− sClose)
42−import Options.Applicative (ParseError (..))
43−import qualified Options.Applicative as Opts
44−import System.Directory
45−import System.Info as SysInfo
46−import System.FilePath
47−import System.IO hiding (putStrLn, print)
48−import System.IO.Error (isEOFError)
49−import qualified Paths_purescript as Paths
50−
51−listenOnLocalhost :: PortNumber -> IO Socket
52−listenOnLocalhost port = do
53− proto <- getProtocolNumber "tcp"
54− localhost <- inet_addr "127.0.0.1"
55− bracketOnError
56− (socket AF_INET Stream proto)
57− sClose
58− (\sock -> do
59− setSocketOption sock ReuseAddr 1
60− bind sock (SockAddrInet port localhost)
61− listen sock maxListenQueue
62− pure sock)
63−
64−data Options = Options
65− { optionsDirectory :: Maybe FilePath
66− , optionsGlobs :: [FilePath]
67− , optionsOutputPath :: FilePath
68− , optionsPort :: PortNumber
69− , optionsNoWatch :: Bool
70− , optionsPolling :: Bool
71− , optionsDebug :: Bool
72− , optionsLoglevel :: IdeLogLevel
73− } deriving (Show)
74−
75−main :: IO ()
76−main = do
77− opts'@(Options dir globs outputPath port noWatch polling debug logLevel) <- Opts.execParser opts
78− when debug (putText "Parsed Options:" *> print opts')
79− maybe (pure ()) setCurrentDirectory dir
80− ideState <- newTVarIO emptyIdeState
81− cwd <- getCurrentDirectory
82− let fullOutputPath = cwd </> outputPath
83−
84− unlessM (doesDirectoryExist fullOutputPath) $ do
85− putStrLn ("Your output directory didn't exist. I'll create it at: " <> fullOutputPath)
86− createDirectory fullOutputPath
87− putText "This usually means you didn't compile your project yet."
88− putText "psc-ide needs you to compile your project (for example by running pulp build)"
89−
90− unless noWatch $
91− void (forkFinally (watcher polling ideState fullOutputPath) print)
92− -- TODO: deprecate and get rid of `debug`
93− let conf = Configuration {confLogLevel = if debug then LogDebug else logLevel, confOutputPath = outputPath, confGlobs = globs}
94− env = IdeEnvironment {ideStateVar = ideState, ideConfiguration = conf}
95− startServer port env
96− where
97− parser =
98− Options
99− <$> optional (Opts.strOption (Opts.long "directory" `mappend` Opts.short 'd'))
100− <*> many (Opts.argument Opts.str (Opts.metavar "Source GLOBS..."))
101− <*> Opts.strOption (Opts.long "output-directory" `mappend` Opts.value "output/")
102− <*> (fromIntegral <$>
103− Opts.option Opts.auto (Opts.long "port" `mappend` Opts.short 'p' `mappend` Opts.value (4242 :: Integer)))
104− <*> Opts.switch (Opts.long "no-watch")
105− <*> flipIfWindows (Opts.switch (Opts.long "polling"))
106− <*> Opts.switch (Opts.long "debug")
107− <*> (parseLogLevel <$> Opts.strOption
108− (Opts.long "log-level"
109− `mappend` Opts.value ""
110− `mappend` Opts.help "One of \"debug\", \"perf\", \"all\" or \"none\""))
111− opts = Opts.info (version <*> Opts.helper <*> parser) mempty
112− parseLogLevel s = case s of
113− "debug" -> LogDebug
114− "perf" -> LogPerf
115− "all" -> LogAll
116− "none" -> LogNone
117− _ -> LogDefault
118− version = Opts.abortOption
119− (InfoMsg (showVersion Paths.version))
120− (Opts.long "version" `mappend` Opts.help "Show the version number")
121−
122− -- polling is the default on Windows and the flag turns it off. See
123− -- #2209 and #2414 for explanations
124− flipIfWindows = map (if SysInfo.os == "mingw32" then not else identity)
125−
126−startServer :: PortNumber -> IdeEnvironment -> IO ()
127−startServer port env = withSocketsDo $ do
128− sock <- listenOnLocalhost port
129− runLogger (confLogLevel (ideConfiguration env)) (runReaderT (forever (loop sock)) env)
130− where
131− loop :: (Ide m, MonadLogger m) => Socket -> m ()
132− loop sock = do
133− accepted <- runExceptT $ acceptCommand sock
134− case accepted of
135− Left err -> $(logDebug) err
136− Right (cmd, h) -> do
137− case decodeT cmd of
138− Just cmd' -> do
139− let message duration =
140− "Command " <> commandName cmd'
141− <> " took "
142− <> displayTimeSpec duration
143− result <- logPerf message (runExceptT (handleCommand cmd'))
144− -- $(logDebug) ("Answer was: " <> T.pack (show result))
145− liftIO (hFlush stdout)
146− case result of
147− Right r -> liftIO $ BS8.hPutStrLn h (Aeson.encode r)
148− Left err -> liftIO $ BS8.hPutStrLn h (Aeson.encode err)
149− Nothing -> do
150− $(logDebug) ("Parsing the command failed. Command: " <> cmd)
151− liftIO $ do
152− T.hPutStrLn h (encodeT (GeneralError "Error parsing Command."))
153− hFlush stdout
154− liftIO (hClose h)
155−
156−acceptCommand :: (MonadIO m, MonadLogger m, MonadError Text m)
157− => Socket -> m (Text, Handle)
158−acceptCommand sock = do
159− h <- acceptConnection
160− $(logDebug) "Accepted a connection"
161− cmd' <- liftIO (catchJust
162− -- this means that the connection was
163− -- terminated without receiving any input
164− (\e -> if isEOFError e then Just () else Nothing)
165− (Just <$> T.hGetLine h)
166− (const (pure Nothing)))
167− case cmd' of
168− Nothing -> throwError "Connection was closed before any input arrived"
169− Just cmd -> do
170− $(logDebug) cmd
171− pure (cmd, h)
172− where
173− acceptConnection = liftIO $ do
174− -- Use low level accept to prevent accidental reverse name resolution
175− (s,_) <- accept sock
176− h <- socketToHandle s ReadWriteMode
177− hSetEncoding h utf8
178− hSetBuffering h LineBuffering
179− pure h
psc-ide-server/PROTOCOL.mddeleted−568
@@ -1,568 +0,0 @@
1−# Protocol
2−
3−Encode the following JSON formats into a single line string and pass them to
4−`psc-ide-client`s stdin. You can then read the result from `psc-ide-client`s
5−stdout as a single line. The result needs to be unwrapped from the "wrapper"
6−which separates success from failure. This wrapper is described at the end of
7−this document.
8−
9−## Command:
10−### Load
11−The `load` command "loads" the requested modules into the server for completion
12−and type info. If the `params` object is left off, the `load` command will try
13−to detect all the compiled modules in your project and load them.
14−
15−**Params:**
16− - `modules :: (optional) [ModuleName]`: A list of modules to load.
17− psc-ide-server will try to parse all the declarations in these modules
18−
19−```json
20−{
21− "command": "load",
22− "params": (optional) {
23− "modules": (optional)["Module.Name1", "Module.Name2"]
24− }
25−}
26−```
27−
28−**Result:**
29−
30−The Load Command returns a string with a summary about the loading process.
31−
32−### Type
33−The `type` command looks up the type for a given identifier. It also returns the
34−definition position, if it can be found in the passed source files.
35−
36−**Params:**
37− - `search :: String`: The identifier to look for. Only matches on equality.
38− - `filters :: (optional) [Filter]`: These filters will be applied before looking for the
39− identifier. These filters get combined with *AND*, so a candidate must match *ALL*
40− of them to be eligible.
41− - `currentModule :: (optional) String`: see *Complete* command
42−```json
43−{
44− "command": "type",
45− "params": {
46− "search": "filterM",
47− "filters": [{..}],
48− "currentModule": "Main"
49− }
50−}
51−```
52−
53−**Result:**
54−The possible types are returned in the same format as completions
55−
56−### Complete
57−The `complete` command looks up possible completions/corrections.
58−
59−**Params**:
60− - `filters :: [Filter]`: The same as for the `type` command. A candidate must
61− match all filters.
62− - `matcher :: (optional) Matcher`: The strategy used for matching candidates
63− after filtering. Results are scored internally and will be returned in the
64− descending order where the nth element is better then the n+1-th.
65− - `currentModule :: (optional) String`: The current modules name. If it matches
66− with the rebuild cache non-exported modules will also be completed. You can
67− fill the rebuild cache by using the "Rebuild" command.
68−
69− If no matcher is given every candidate, that passes the filters, is returned
70− in no particular order.
71−
72−```json
73−{
74− "command": "complete",
75− "params": {
76− "filters": [{..}, {..}],
77− "matcher": {..}
78− "currentModule": "Main"
79− }
80−}
81−```
82−
83−**Result:**
84−
85−The following format is returned as the Result:
86−
87−Both the `definedAt` aswell as the `documentation` field might be `null` if they
88−couldn't be extracted from a source file.
89−
90−```json
91−[
92− {
93− "module": "Data.Array",
94− "identifier": "filter",
95− "type": "forall a. (a -> Boolean) -> Array a -> Array a",
96− "expandedType": "forall a. (a -> Boolean) -> Array a -> Array a",
97− "definedAt":
98− {
99− "name": "/path/to/file",
100− "start": [1, 3],
101− "end": [3, 1]
102− },
103− "documentation": "A filtering function"
104− }
105−]
106−```
107−
108−
109−### CaseSplit
110−
111−The CaseSplit command takes a line of source code, an area in that line of code
112−and replaces it with all patterns for a given type. The parameter `annotations`
113−is used to turn type annotations on or off for the constructor fields.
114−
115−```json
116−{
117− "command": "caseSplit",
118− "params": {
119− "line": "elem a as",
120− "begin": 8,
121− "end": 10,
122− "annotations": true,
123− "type": "List"
124− }
125−}
126−```
127−
128−**Result:**
129−
130−The following format is returned as the Result:
131−
132−```json
133−[
134− "elem a Nil",
135− "elem a (Cons (_ :: a) (_ :: List a))"
136−]
137−```
138−You should then be able to replace the affected line of code in the editor with the new suggestions.
139−
140−### Add Clause
141−
142−The AddClause command takes a typedeclaration and generates a function template for the given type.
143−The `annotations` option turns type annotations on or off for the function arguments.
144−
145−```json
146−{
147− "command": "addClause",
148− "params": {
149− "line": "elem :: forall a. (Eq a) => a -> List a",
150− "annotations": true
151− }
152−}
153−```
154−
155−**Result:**
156−
157−The following format is returned as the Result:
158−
159−```json
160−[
161− "elem :: forall a. (Eq a) => a -> List a",
162− "elem ( _ :: a) = ?elem"
163−]
164−```
165−You should then be able to replace the affected line of code in the editor with the new suggestions.
166−
167−### Import
168−
169−For now all of the import related commands work with a file on the filesystem.
170−
171−You can specify it with the `file` parameter.
172−
173−If you supply the optional `outfile` parameter, the output will be written to
174−that file, and an info message will be returned from the client.
175−
176−If you don't supply `outfile`, the server responds with a list of strings which,
177−when inserted into a file linewise create the module with the applied changes.
178−
179−Arguments:
180−
181−- `file` :: String
182−- `outfile` :: Maybe String
183−- `filters` :: Maybe [Filter]
184−
185−Example:
186−
187−```json
188−{
189− "command": "import",
190− "params": {
191− "file": "/home/creek/Documents/chromacannon/src/Main.purs",
192− "outfile": "/home/creek/Documents/chromacannon/src/Main.purs",
193− "filters": [{
194− "filter": "modules",
195− "params": {
196− "modules": ["My.Module"]
197− }
198− }],
199− "importCommand": {
200− "yadda": "yadda"
201− }
202− }
203−}
204−```
205−
206−
207−#### Subcommand `addImplicitImport`
208−
209−This command just adds an unqualified import for the given modulename.
210−
211−Arguments:
212−- `moduleName :: String`
213−
214−Example:
215−```json
216−{
217− "command": "import",
218− "params": {
219− "file": "/home/creek/Documents/chromacannon/src/Main.purs",
220− "importCommand": {
221− "importCommand": "addImplicitImport",
222− "module": "Data.Array.LOL"
223− }
224− }
225−}
226−```
227−#### Subcommand `addImport`
228−
229−This command takes an identifier and searches the currently loaded modules for
230−it. If it finds no matches it responds with an Error. If it finds exactly one
231−match it adds the import and returns. If it finds more than one match it
232−responds with a list of the found matches as completions like the complete
233−command.
234−
235−You can also supply a list of filters like the ones for completion. This way you
236−can narrow down the search to a certain module and resolve the case in which
237−more then one match was found.
238−
239−Arguments:
240−- `moduleName :: String`
241−- `filters :: [Filter]`
242−
243−Example:
244−```json
245−{
246− "command": "import",
247− "params": {
248− "file": "/home/creek/Documents/chromacannon/src/Demo.purs",
249− "outfile": "/home/creek/Documents/chromacannon/src/Demo.purs",
250− "importCommand": {
251− "importCommand": "addImport",
252− "identifier": "bind"
253− }
254− }
255−}
256−```
257−
258−### Rebuild
259−
260−The `rebuild` command provides a fast rebuild for a single module. It doesn't
261−recompile the entire project though. All the modules dependencies need to be
262−loaded. A successful rebuild will be stored to allow for completions of private
263−identifiers.
264−
265−Arguments:
266− - `file :: String` the path to the module to rebuild
267−
268−```json
269−{
270− "command": "rebuild",
271− "params": {
272− "file": "/path/to/file.purs"
273− }
274−}
275−```
276−
277−**Result**
278−
279−In the Success case you get a list of warnings in the compilers json format.
280−
281−In the Error case you get the errors in the compilers json format
282−
283−### Pursuit
284−The `pursuit` command looks up the packages/completions for a given identifier from Pursuit.
285−
286−**Params:**
287− - `query :: String`: With `type: "package"` this should be a module name. With
288− `type: "completion"` this can be any string to look up.
289− - `type :: String`: Takes the following values:
290− - `package`: Looks for packages that contain the given module name.
291− - `completion` Looks for declarations for the query from Pursuit.
292−
293−```json
294−{
295− "command": "pursuit",
296− "params": {
297− "query": "Data.Array",
298− "type": "package"
299− }
300−}
301−```
302−
303−**Result:**
304−
305−`package` returns:
306−
307−```json
308−[
309− {
310− "module": "Module1.Name",
311− "package": "purescript-packagename"
312− }
313−]
314−```
315−
316−`completion` returns:
317−
318−```json
319−[
320− {
321− "module": "Data.Array",
322− "identifier": "filter",
323− "type": "forall a. (a -> Boolean) -> Array a -> Array a",
324− "package": "purescript-arrays"
325− }
326−]
327−```
328−
329−### List
330−
331−#### Loaded Modules
332−
333−`list` of type `loadedModules` lists all loaded modules (This means they can be searched for completions etc)
334−
335−```json
336−{
337− "command": "list",
338− "params": {
339− "type": "loadedModules"
340− }
341−}
342−```
343−
344−#### Response:
345−
346−The list loadedModules command returns a list of strings.
347−
348−#### Available Modules
349−
350−`list` of type `availableModules` lists all available modules. (This basically
351−means the contents of the `output/` folder.))
352−
353−```json
354−{
355− "command": "list",
356− "params": {
357− "type": "availableModules"
358− }
359−}
360−```
361−
362−#### Response:
363−
364−The list availableModules command returns a list of strings.
365−
366−#### Imports
367−
368−The list commmand can also list the imports for a given file.
369−
370−```json
371−{
372− "command": "list",
373− "params": {
374− "type": "import",
375− "file": "/home/kritzcreek/Documents/psc-ide/examples/Main.purs"
376− }
377−}
378−```
379−
380−#### Response:
381−
382−The list import command returns a list of imports where imports are of the following form:
383−
384−Implicit Import (`import Data.Array`):
385−```json
386−[
387− {
388− "module": "Data.Array",
389− "importType": "implicit"
390− }
391−]
392−```
393−
394−Implicit qualified Import (`import Data.Array as A`):
395−```json
396−[
397− {
398− "module": "Data.Array",
399− "importType": "implicit",
400− "qualifier": "A"
401− }
402−]
403−```
404−
405−Explicit Import (`import Data.Array (filter, filterM, join)`):
406−```json
407−[
408− {
409− "module": "Data.Array",
410− "importType": "explicit",
411− "identifiers": ["filter", "filterM", "join"]
412− }
413−]
414−```
415−
416−Explicit qualified Import (`import Data.Array (filter, filterM, join) as A`):
417−```json
418−[
419− {
420− "module": "Data.Array",
421− "importType": "explicit",
422− "identifiers": ["filter", "filterM", "join"],
423− "qualifier": "A"
424− }
425−]
426−```
427−
428−Hiding Import (`import Data.Array hiding (filter, filterM, join)`):
429−```json
430−[
431− {
432− "module": "Data.Array",
433− "importType": "hiding",
434− "identifiers": ["filter", "filterM", "join"]
435− }
436−]
437−```
438−
439−Qualified Hiding Import (`import Data.Array hiding (filter, filterM, join) as A`):
440−```json
441−[
442− {
443− "module": "Data.Array",
444− "importType": "hiding",
445− "identifiers": ["filter", "filterM", "join"],
446− "qualifier": "A"
447− }
448−]
449−```
450−
451−### Cwd/Quit/Reset
452−`cwd` returns the working directory of the server(should be your project root).
453−
454−`quit` quits the server.
455−
456−`reset` resets all loaded modules.
457−
458−```json
459−{
460− "command": "cwd|quit|reset"
461−}
462−```
463−
464−**Result:**
465−These commands return strings.
466−
467−## Filter:
468−
469−### Exact filter
470−The Exact filter only keeps identifiers that are equal to the search term.
471−
472−```json
473−{
474− "filter": "exact",
475− "params": {
476− "search": "filterM"
477− }
478−}
479−```
480−### Prefix filter
481−The Prefix filter keeps identifiers/modules/data declarations that
482−are prefixed by the search term.
483−
484−```json
485−{
486− "filter": "prefix",
487− "params": {
488− "search": "filt"
489− }
490−}
491−```
492−
493−### Module filter
494−The Module filter only keeps identifiers that appear in the listed modules.
495−
496−```json
497−{
498− "filter": "modules",
499− "params": {
500− "modules": ["My.Module"]
501− }
502−}
503−```
504−
505−### Dependency filter
506−The Dependency filter only keeps identifiers that appear in the listed modules
507−and in any of their dependencies/imports.
508−
509−```json
510−{
511− "filter": "dependencies",
512− "params": {
513− "modules": ["My.Module"]
514− }
515−}
516−```
517−
518−## Matcher:
519−
520−### Flex matcher
521−Matches any occurence of the search string with intersections
522−
523−The scoring measures how far the matches span the string, where
524−closer is better. The matches then get sorted with highest score first.
525−
526−Examples:
527−- flMa matches **fl**ex**Ma**tcher. Score: 14.28
528−- sons matches **so**rtCompletio**ns**. Score: 6.25
529−```json
530−
531−{
532− "matcher": "flex",
533− "params": {
534− "search": "filt"
535− }
536−}
537−```
538−
539−### Distance Matcher
540−
541−The Distance matcher is meant to provide corrections for typos. It calculates
542−the edit distance in between the search and the loaded identifiers.
543−
544−```json
545−{
546− "matcher": "distance",
547− "params": {
548− "search": "dilterM",
549− "maximumDistance": 3
550− }
551−}
552−```
553−
554−## Responses
555−
556−All Responses are wrapped in the following format:
557−
558−```json
559−{
560− "resultType": "success|error",
561− "result": Result|Error
562−}
563−```
564−
565−### Error
566−
567−Errors at this point are merely Error strings. Newlines are escaped like `\n`
568−and should be taken care of by the editor-plugin.
psc-ide-server/README.mddeleted−47
@@ -1,47 +0,0 @@
1−psc-ide
2−===
3−
4−A tool which provides editor support for the PureScript programming language.
5−
6−## Editor Integration
7−* [@epost](https://github.com/epost) wrote a plugin to integrate psc-ide with Emacs at https://github.com/epost/psc-ide-emacs.
8−* Atom integration is available with https://github.com/nwolverson/atom-ide-purescript.
9−* Visual Studio Code integration is available with https://github.com/nwolverson/vscode-ide-purescript.
10−* Vim integration is available here: https://github.com/FrigoEU/psc-ide-vim.
11−
12−## Running the Server
13−
14−Start the server by running the `psc-ide-server [SOURCEGLOBS]` executable, where
15−`SOURCEGLOBS` are (optional) globs that match your PureScript sourcefiles.
16−
17−It supports the following options:
18−
19−- `-p / --port` specify a port. Defaults to 4242
20−- `-d / --directory` specify the toplevel directory of your project. Defaults to
21− the current directory
22−- `--output-directory`: Specify where to look for compiled output inside your
23− project directory. Defaults to `output/`, relative to either the current
24− directory or the directory specified by `-d`.
25−- `--polling`: Uses polling instead of file system events to watch the externs
26− files. This flag is reversed on Windows and polling is the default.
27−- `--debug`: DEPRECATED: use --log-level="debug"
28−- `--log-level`: Can be set to one of "all", "none", "debug" and "perf"
29−- `--no-watch`: Disables the filewatcher
30−- `--version`: Output psc-ide version
31−
32−## Issuing queries
33−
34−After you started the server you can start issuing requests using
35−`psc-ide-client`. Make sure you start by loading the modules before you try to
36−query them.
37−
38−`psc-ide-server` expects the build externs.purs inside the `output/` folder of
39−your project after running `pulp build` or `psc-make` respectively.
40−
41−(If you changed the port of the server you can change the port for
42−`psc-ide-client` by using the -p option accordingly)
43−
44−## Protocol
45−
46−For documentation about the protocol have a look at:
47−[PROTOCOL.md](PROTOCOL.md)
psc-package/Main.hsdeleted−302
@@ -1,302 +0,0 @@
1−{-# LANGUAGE DeriveAnyClass #-}
2−{-# LANGUAGE DeriveGeneric #-}
3−{-# LANGUAGE NamedFieldPuns #-}
4−{-# LANGUAGE OverloadedStrings #-}
5−{-# LANGUAGE RecordWildCards #-}
6−{-# LANGUAGE TupleSections #-}
7−
8−module Main where
9−
10−import qualified Data.Aeson as Aeson
11−import Data.Aeson.Encode.Pretty
12−import Data.Foldable (fold, for_, traverse_)
13−import Data.List (nub)
14−import qualified Data.Map as Map
15−import Data.Maybe (fromMaybe, mapMaybe)
16−import qualified Data.Set as Set
17−import Data.Text (pack)
18−import qualified Data.Text.Lazy as TL
19−import qualified Data.Text.Lazy.Builder as TB
20−import Data.Text.Encoding (encodeUtf8)
21−import Data.Traversable (for)
22−import Data.Version (showVersion)
23−import qualified Filesystem.Path.CurrentOS as Path
24−import GHC.Generics (Generic)
25−import qualified Options.Applicative as Opts
26−import qualified Paths_purescript as Paths
27−import qualified System.IO as IO
28−import Turtle hiding (fold)
29−
30−packageFile :: Path.FilePath
31−packageFile = "psc-package.json"
32−
33−data PackageConfig = PackageConfig
34− { name :: Text
35− , depends :: [Text]
36− , set :: Text
37− , source :: Text
38− } deriving (Show, Generic, Aeson.FromJSON, Aeson.ToJSON)
39−
40−pathToTextUnsafe :: Turtle.FilePath -> Text
41−pathToTextUnsafe = either (error "Path.toText failed") id . Path.toText
42−
43−defaultPackage :: Text -> PackageConfig
44−defaultPackage pkgName =
45− PackageConfig { name = pkgName
46− , depends = [ "prelude" ]
47− , set = "psc-" <> pack (showVersion Paths.version)
48− , source = "https://github.com/purescript/package-sets.git"
49− }
50−
51−readPackageFile :: IO PackageConfig
52−readPackageFile = do
53− exists <- testfile packageFile
54− unless exists $ do
55− echo "psc-package.json does not exist"
56− exit (ExitFailure 1)
57− mpkg <- Aeson.decodeStrict . encodeUtf8 <$> readTextFile packageFile
58− case mpkg of
59− Nothing -> do
60− echo "Unable to parse psc-package.json"
61− exit (ExitFailure 1)
62− Just pkg -> return pkg
63−
64−encodePrettyToText :: Aeson.ToJSON json => json -> Text
65−encodePrettyToText =
66− TL.toStrict
67− . TB.toLazyText
68− . encodePrettyToTextBuilder' config
69− where
70− config = defConfig
71− { confCompare =
72− keyOrder [ "name"
73− , "set"
74− , "source"
75− , "depends"
76− ]
77− }
78−
79−writePackageFile :: PackageConfig -> IO ()
80−writePackageFile =
81− writeTextFile packageFile
82− . encodePrettyToText
83−
84−data PackageInfo = PackageInfo
85− { repo :: Text
86− , version :: Text
87− , dependencies :: [Text]
88− } deriving (Show, Eq, Generic, Aeson.FromJSON, Aeson.ToJSON)
89−
90−type PackageSet = Map.Map Text PackageInfo
91−
92−cloneShallow
93− :: Text
94− -- ^ repo
95− -> Text
96− -- ^ branch/tag
97− -> Turtle.FilePath
98− -- ^ target directory
99− -> IO ExitCode
100−cloneShallow from ref into =
101− proc "git"
102− [ "clone"
103− , "-q"
104− , "-c", "advice.detachedHead=false"
105− , "--depth", "1"
106− , "-b", ref
107− , from
108− , pathToTextUnsafe into
109− ] empty .||. exit (ExitFailure 1)
110−
111−getPackageSet :: PackageConfig -> IO ()
112−getPackageSet PackageConfig{ source, set } = do
113− let pkgDir = ".psc-package" </> fromText set </> ".set"
114− exists <- testdir pkgDir
115− unless exists . void $ cloneShallow source set pkgDir
116−
117−readPackageSet :: PackageConfig -> IO PackageSet
118−readPackageSet PackageConfig{ set } = do
119− let dbFile = ".psc-package" </> fromText set </> ".set" </> "packages.json"
120− exists <- testfile dbFile
121− unless exists $ do
122− echo $ format (fp%" does not exist") dbFile
123− exit (ExitFailure 1)
124− mdb <- Aeson.decodeStrict . encodeUtf8 <$> readTextFile dbFile
125− case mdb of
126− Nothing -> do
127− echo "Unable to parse packages.json"
128− exit (ExitFailure 1)
129− Just db -> return db
130−
131−installOrUpdate :: Text -> Text -> PackageInfo -> IO Turtle.FilePath
132−installOrUpdate set pkgName PackageInfo{ repo, version } = do
133− echo ("Updating " <> pkgName)
134− let pkgDir = ".psc-package" </> fromText set </> fromText pkgName </> fromText version
135− exists <- testdir pkgDir
136− unless exists . void $ cloneShallow repo version pkgDir
137− pure pkgDir
138−
139−getTransitiveDeps :: PackageSet -> [Text] -> IO [(Text, PackageInfo)]
140−getTransitiveDeps db depends = do
141− pkgs <- for depends $ \pkg ->
142− case Map.lookup pkg db of
143− Nothing -> do
144− echo ("Package " <> pkg <> " does not exist in package set")
145− exit (ExitFailure 1)
146− Just PackageInfo{ dependencies } -> return (pkg : dependencies)
147− let unique = Set.toList (foldMap Set.fromList pkgs)
148− return (mapMaybe (\name -> fmap (name, ) (Map.lookup name db)) unique)
149−
150−updateImpl :: PackageConfig -> IO ()
151−updateImpl config@PackageConfig{ depends } = do
152− getPackageSet config
153− db <- readPackageSet config
154− trans <- getTransitiveDeps db depends
155− echo ("Updating " <> pack (show (length trans)) <> " packages...")
156− for_ trans $ \(pkgName, pkg) -> installOrUpdate (set config) pkgName pkg
157−
158−initialize :: IO ()
159−initialize = do
160− exists <- testfile "psc-package.json"
161− when exists $ do
162− echo "psc-package.json already exists"
163− exit (ExitFailure 1)
164− echo "Initializing new project in current directory"
165− pkgName <- pathToTextUnsafe . Path.filename <$> pwd
166− let pkg = defaultPackage pkgName
167− writePackageFile pkg
168− updateImpl pkg
169−
170−update :: IO ()
171−update = do
172− pkg <- readPackageFile
173− updateImpl pkg
174− echo "Update complete"
175−
176−install :: String -> IO ()
177−install pkgName = do
178− pkg <- readPackageFile
179− let pkg' = pkg { depends = nub (pack pkgName : depends pkg) }
180− updateImpl pkg'
181− writePackageFile pkg'
182− echo "psc-package.json file was updated"
183−
184−uninstall :: String -> IO ()
185−uninstall pkgName = do
186− pkg <- readPackageFile
187− let pkg' = pkg { depends = filter (/= pack pkgName) $ depends pkg }
188− updateImpl pkg'
189− writePackageFile pkg'
190− echo "psc-package.json file was updated"
191−
192−listDependencies :: IO ()
193−listDependencies = do
194− pkg@PackageConfig{ depends } <- readPackageFile
195− db <- readPackageSet pkg
196− trans <- getTransitiveDeps db depends
197− traverse_ (echo . fst) trans
198−
199−listPackages :: IO ()
200−listPackages = do
201− pkg <- readPackageFile
202− db <- readPackageSet pkg
203− traverse_ echo (fmt <$> Map.assocs db)
204− where
205− fmt :: (Text, PackageInfo) -> Text
206− fmt (name, PackageInfo{ version }) = name <> " (" <> version <> ")"
207−
208−getSourcePaths :: PackageConfig -> PackageSet -> [Text] -> IO [Turtle.FilePath]
209−getSourcePaths PackageConfig{..} db pkgNames = do
210− trans <- getTransitiveDeps db pkgNames
211− let paths = [ ".psc-package"
212− </> fromText set
213− </> fromText pkgName
214− </> fromText version
215− </> "src" </> "**" </> "*.purs"
216− | (pkgName, PackageInfo{ version }) <- trans
217− ]
218− return paths
219−
220−listSourcePaths :: IO ()
221−listSourcePaths = do
222− pkg@PackageConfig{ depends } <- readPackageFile
223− db <- readPackageSet pkg
224− paths <- getSourcePaths pkg db depends
225− traverse_ (echo . pathToTextUnsafe) paths
226−
227−exec :: Text -> IO ()
228−exec exeName = do
229− pkg@PackageConfig{..} <- readPackageFile
230− db <- readPackageSet pkg
231− paths <- getSourcePaths pkg db depends
232− procs exeName
233− (map pathToTextUnsafe ("src" </> "**" </> "*.purs" : paths))
234− empty
235−
236−verifyPackageSet :: IO ()
237−verifyPackageSet = do
238− pkg <- readPackageFile
239− db <- readPackageSet pkg
240−
241− echo ("Verifying " <> pack (show (Map.size db)) <> " packages.")
242− echo "Warning: this could take some time!"
243−
244− let installOrUpdate' (name, pkgInfo) = (name, ) <$> installOrUpdate (set pkg) name pkgInfo
245− paths <- Map.fromList <$> traverse installOrUpdate' (Map.toList db)
246−
247− for_ (Map.toList db) $ \(name, PackageInfo{..}) -> do
248− let dirFor = fromMaybe (error "verifyPackageSet: no directory") . (`Map.lookup` paths)
249− echo ("Verifying package " <> name)
250− let srcGlobs = map (pathToTextUnsafe . (</> ("src" </> "**" </> "*.purs")) . dirFor) (name : dependencies)
251− procs "psc" srcGlobs empty
252−
253−main :: IO ()
254−main = do
255− IO.hSetEncoding IO.stdout IO.utf8
256− IO.hSetEncoding IO.stderr IO.utf8
257− cmd <- Opts.execParser opts
258− cmd
259− where
260− opts = Opts.info (versionInfo <*> Opts.helper <*> commands) infoModList
261− infoModList = Opts.fullDesc <> headerInfo <> footerInfo
262− headerInfo = Opts.progDesc "Manage package dependencies"
263− footerInfo = Opts.footer $ "psc-package " ++ showVersion Paths.version
264−
265− versionInfo :: Parser (a -> a)
266− versionInfo = Opts.abortOption (Opts.InfoMsg (showVersion Paths.version)) $
267− Opts.long "version" <> Opts.help "Show the version number" <> Opts.hidden
268−
269− commands :: Parser (IO ())
270− commands = (Opts.subparser . fold)
271− [ Opts.command "init"
272− (Opts.info (pure initialize)
273− (Opts.progDesc "Initialize a new package"))
274− , Opts.command "update"
275− (Opts.info (pure update)
276− (Opts.progDesc "Update dependencies"))
277− , Opts.command "uninstall"
278− (Opts.info (uninstall <$> pkg)
279− (Opts.progDesc "Uninstall the named package"))
280− , Opts.command "install"
281− (Opts.info (install <$> pkg)
282− (Opts.progDesc "Install the named package"))
283− , Opts.command "build"
284− (Opts.info (pure (exec "psc"))
285− (Opts.progDesc "Build the current package and dependencies"))
286− , Opts.command "dependencies"
287− (Opts.info (pure listDependencies)
288− (Opts.progDesc "List all (transitive) dependencies for the current package"))
289− , Opts.command "sources"
290− (Opts.info (pure listSourcePaths)
291− (Opts.progDesc "List all (active) source paths for dependencies"))
292− , Opts.command "available"
293− (Opts.info (pure listPackages)
294− (Opts.progDesc "List all packages available in the package set"))
295− , Opts.command "verify-set"
296− (Opts.info (pure verifyPackageSet)
297− (Opts.progDesc "Verify that the packages in the package set build correctly"))
298− ]
299− where
300− pkg = Opts.strArgument $
301− Opts.metavar "PACKAGE"
302− <> Opts.help "The name of the package to install"
psc-package/README.mddeleted−99
@@ -1,99 +0,0 @@
1−# `psc-package`
2−
3−`psc-package` is an executable which helps manage PureScript dependencies via Git. It can be used directly, but it is also designed to be used by external tools.
4−
5−## Concepts
6−
7−### Package Sets
8−
9−A _package set_ is a mapping from package names to:
10−
11−- the Git repository URL for the package
12−- the Git ref which should be passed to `git clone` to clone the appropriate version (usually a tag name, but a SHA is also valid)
13−- the package's transitive dependencies
14−
15−A package set repository contains a `packages.json` file which contains all mapping information. `psc-package` uses this information to decide which repos need to be cloned.
16−
17−The default package set is [purescript/package-sets](https://github.com/purescript/package-sets), but it is possible to create custom package sets by forking an existing package set or creating a new one from scratch. One benefit of using the default package set is that it is verified by a continuous integration process.
18−
19−## The `psc-package.json` format
20−
21−Here is a simple project configuration:
22−
23−```json
24−{
25− "name": "my-project",
26− "set": "psc-0.10.2",
27− "source": "https://github.com/purescript/package-sets.git",
28− "depends": [
29− "prelude"
30− ]
31−}
32−```
33−
34−It defines:
35−
36−- The project name
37−- The package set to use to resolve dependencies (this corresponds to a branch or tag of the package set source repository)
38−- The package set source repository Git URL (change this if you want to host your own package sets)
39−- Any dependencies of the project, as a list of names of packages from the package set
40−
41−## How To
42−
43−### Create a project
44−
45−A new package can be created using `psc-package init`. This will:
46−
47−- Create a simple `psc-package.json` file based on the current compiler version
48−- Add the Prelude as a dependency (this can be removed later)
49−- Sync the local package database (under the `.psc-package/` directory) by cloning any necessary repositories.
50−
51−### Add dependencies
52−
53−To add a dependency, either:
54−
55−- Use the `install` command, which will update the project configuration automatically, or
56−- Modify the `psc-package.json` file, and sync manually by running the `update` command.
57−
58−### Build a project
59−
60−Active project dependencies and project source files under `src` can be compiled using the `build` command.
61−
62−This command is provided as a convenience until external tools add support for `psc-package`. It _might_ be removed in future.
63−
64−### Query the local package database
65−
66−The local package database can be queried using the following commands:
67−
68−- `sources` - list source directories for active package versions. This can be useful when building a command for, say, running PSCi.
69−- `dependencies` - list all transitive dependencies
70−
71−### Add a package to the package set
72−
73−Adding your package to the package set means that others can easily install it as a dependency.
74−
75−Please note that your package will be removed from the set if it is not kept up to date. It can be easily re-added later if this happens.
76−
77−Adding a package is a manual process right now. We would like to add commands to make this process simpler, but for now, please follow these steps:
78−
79−- Tag a release of your library
80−- Run the `dependencies` command to get the list of transitive dependencies
81−- Make a pull request on the package set repository (against `master`) to add a new entry to `packages.json`. Use the dependency information above to fill in the fields, and the name of your new tag.
82−
83−Travis will verify your package builds correctly, and then we will try to merge your pull request. Your package will then be available in the next tagged package set.
84−
85−### Update a package in the set
86−
87−- Tag a new release
88−- Make a pull request on `master` to modify the tag named in the package set repository.
89−
90−Again, once Travis verifies your change, we will merge it into `master` and your change will be available in the next tag.
91−
92−## FAQ
93−
94−### Can I add a dependency which is not in the package set?
95−
96−Not right now. We might add this feature in future, but for now, consider either:
97−
98−- Adding your dependency to the package set if possible, or
99−- Creating your own custom package set
psc-publish/Main.hsdeleted−54
@@ -1,54 +0,0 @@
1−{-# LANGUAGE OverloadedStrings #-}
2−
3−module Main where
4−
5−import Data.Version (Version(..), showVersion)
6−import qualified Data.Aeson as A
7−import qualified Data.ByteString.Lazy.Char8 as BL
8−import Data.Monoid ((<>))
9−
10−import Options.Applicative (Parser, ParseError (..))
11−import qualified Options.Applicative as Opts
12−
13−import System.IO (hSetEncoding, stderr, stdout, utf8)
14−
15−import qualified Paths_purescript as Paths
16−import Language.PureScript.Publish
17−import Language.PureScript.Publish.ErrorsWarnings
18−
19−dryRun :: Parser Bool
20−dryRun = Opts.switch $
21− Opts.long "dry-run"
22− <> Opts.help "Produce no output, and don't require a tagged version to be checked out."
23−
24−dryRunOptions :: PublishOptions
25−dryRunOptions = defaultPublishOptions
26− { publishGetVersion = return dummyVersion
27− , publishWorkingTreeDirty = warn DirtyWorkingTree_Warn
28− }
29− where dummyVersion = ("0.0.0", Version [0,0,0] [])
30−
31−main :: IO ()
32−main = do
33− hSetEncoding stdout utf8
34− hSetEncoding stderr utf8
35− Opts.execParser opts >>= publish
36− where
37− opts = Opts.info (version <*> Opts.helper <*> dryRun) infoModList
38− infoModList = Opts.fullDesc <> headerInfo <> footerInfo
39− headerInfo = Opts.header "psc-publish - Generates documentation packages for upload to http://pursuit.purescript.org"
40− footerInfo = Opts.footer $ "psc-publish " ++ showVersion Paths.version
41−
42− version :: Parser (a -> a)
43− version = Opts.abortOption (InfoMsg (showVersion Paths.version)) $
44− Opts.long "version" <> Opts.help "Show the version number" <> Opts.hidden
45−
46−publish :: Bool -> IO ()
47−publish isDryRun =
48− if isDryRun
49− then do
50− _ <- unsafePreparePackage dryRunOptions
51− putStrLn "Dry run completed, no errors."
52− else do
53− pkg <- unsafePreparePackage defaultPublishOptions
54− BL.putStrLn (A.encode pkg)
psc/Main.hsdeleted−182
@@ -1,182 +0,0 @@
1−{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE FlexibleContexts #-}
3−{-# LANGUAGE RecordWildCards #-}
4−{-# LANGUAGE ScopedTypeVariables #-}
5−{-# LANGUAGE TupleSections #-}
6−
7−module Main where
8−
9−import Control.Applicative
10−import Control.Monad
11−import Control.Monad.Writer.Strict
12−
13−import qualified Data.Aeson as A
14−import Data.Bool (bool)
15−import qualified Data.ByteString.Lazy as B
16−import qualified Data.ByteString.UTF8 as BU8
17−import qualified Data.Map as M
18−import Data.Text (Text)
19−import Data.Version (showVersion)
20−
21−import qualified Language.PureScript as P
22−import Language.PureScript.Errors.JSON
23−import Language.PureScript.Make
24−
25−import Options.Applicative as Opts
26−
27−import qualified Paths_purescript as Paths
28−
29−import qualified System.Console.ANSI as ANSI
30−import System.Exit (exitSuccess, exitFailure)
31−import System.FilePath.Glob (glob)
32−import System.IO (hSetEncoding, hPutStrLn, stdout, stderr, utf8)
33−import System.IO.UTF8 (readUTF8FileT)
34−
35−data PSCMakeOptions = PSCMakeOptions
36− { pscmInput :: [FilePath]
37− , pscmOutputDir :: FilePath
38− , pscmOpts :: P.Options
39− , pscmUsePrefix :: Bool
40− , pscmJSONErrors :: Bool
41− }
42−
43−-- | Argumnets: verbose, use JSON, warnings, errors
44−printWarningsAndErrors :: Bool -> Bool -> P.MultipleErrors -> Either P.MultipleErrors a -> IO ()
45−printWarningsAndErrors verbose False warnings errors = do
46− cc <- bool Nothing (Just P.defaultCodeColor) <$> ANSI.hSupportsANSI stderr
47− let ppeOpts = P.defaultPPEOptions { P.ppeCodeColor = cc, P.ppeFull = verbose }
48− when (P.nonEmpty warnings) $
49− hPutStrLn stderr (P.prettyPrintMultipleWarnings ppeOpts warnings)
50− case errors of
51− Left errs -> do
52− hPutStrLn stderr (P.prettyPrintMultipleErrors ppeOpts errs)
53− exitFailure
54− Right _ -> return ()
55−printWarningsAndErrors verbose True warnings errors = do
56− hPutStrLn stderr . BU8.toString . B.toStrict . A.encode $
57− JSONResult (toJSONErrors verbose P.Warning warnings)
58− (either (toJSONErrors verbose P.Error) (const []) errors)
59− either (const exitFailure) (const (return ())) errors
60−
61−compile :: PSCMakeOptions -> IO ()
62−compile PSCMakeOptions{..} = do
63− input <- globWarningOnMisses (unless pscmJSONErrors . warnFileTypeNotFound) pscmInput
64− when (null input && not pscmJSONErrors) $ do
65− hPutStrLn stderr "psc: No input files."
66− exitFailure
67− moduleFiles <- readInput input
68− (makeErrors, makeWarnings) <- runMake pscmOpts $ do
69− ms <- P.parseModulesFromFiles id moduleFiles
70− let filePathMap = M.fromList $ map (\(fp, P.Module _ _ mn _ _) -> (mn, Right fp)) ms
71− foreigns <- inferForeignModules filePathMap
72− let makeActions = buildMakeActions pscmOutputDir filePathMap foreigns pscmUsePrefix
73− P.make makeActions (map snd ms)
74− printWarningsAndErrors (P.optionsVerboseErrors pscmOpts) pscmJSONErrors makeWarnings makeErrors
75− exitSuccess
76−
77−warnFileTypeNotFound :: String -> IO ()
78−warnFileTypeNotFound = hPutStrLn stderr . ("psc: No files found using pattern: " ++)
79−
80−globWarningOnMisses :: (String -> IO ()) -> [FilePath] -> IO [FilePath]
81−globWarningOnMisses warn = concatMapM globWithWarning
82− where
83− globWithWarning pattern' = do
84− paths <- glob pattern'
85− when (null paths) $ warn pattern'
86− return paths
87− concatMapM f = fmap concat . mapM f
88−
89−readInput :: [FilePath] -> IO [(FilePath, Text)]
90−readInput inputFiles = forM inputFiles $ \inFile -> (inFile, ) <$> readUTF8FileT inFile
91−
92−inputFile :: Parser FilePath
93−inputFile = strArgument $
94− metavar "FILE"
95− <> help "The input .purs file(s)"
96−
97−outputDirectory :: Parser FilePath
98−outputDirectory = strOption $
99− short 'o'
100− <> long "output"
101− <> Opts.value "output"
102− <> showDefault
103− <> help "The output directory"
104−
105−noTco :: Parser Bool
106−noTco = switch $
107− long "no-tco"
108− <> help "Disable tail call optimizations"
109−
110−noMagicDo :: Parser Bool
111−noMagicDo = switch $
112− long "no-magic-do"
113− <> help "Disable the optimization that overloads the do keyword to generate efficient code specifically for the Eff monad"
114−
115−noOpts :: Parser Bool
116−noOpts = switch $
117− long "no-opts"
118− <> help "Skip the optimization phase"
119−
120−comments :: Parser Bool
121−comments = switch $
122− short 'c'
123− <> long "comments"
124− <> help "Include comments in the generated code"
125−
126−verboseErrors :: Parser Bool
127−verboseErrors = switch $
128− short 'v'
129− <> long "verbose-errors"
130− <> help "Display verbose error messages"
131−
132−noPrefix :: Parser Bool
133−noPrefix = switch $
134− short 'p'
135− <> long "no-prefix"
136− <> help "Do not include comment header"
137−
138−jsonErrors :: Parser Bool
139−jsonErrors = switch $
140− long "json-errors"
141− <> help "Print errors to stderr as JSON"
142−sourceMaps :: Parser Bool
143−sourceMaps = switch $
144− long "source-maps"
145− <> help "Generate source maps"
146−
147−dumpCoreFn :: Parser Bool
148−dumpCoreFn = switch $
149− long "dump-corefn"
150− <> help "Dump the (functional) core representation of the compiled code at output/*/corefn.json"
151−
152−
153−options :: Parser P.Options
154−options = P.Options <$> noTco
155− <*> noMagicDo
156− <*> pure Nothing
157− <*> noOpts
158− <*> verboseErrors
159− <*> (not <$> comments)
160− <*> sourceMaps
161− <*> dumpCoreFn
162−
163−pscMakeOptions :: Parser PSCMakeOptions
164−pscMakeOptions = PSCMakeOptions <$> many inputFile
165− <*> outputDirectory
166− <*> options
167− <*> (not <$> noPrefix)
168− <*> jsonErrors
169−
170−main :: IO ()
171−main = do
172− hSetEncoding stdout utf8
173− hSetEncoding stderr utf8
174− execParser opts >>= compile
175− where
176− opts = info (version <*> helper <*> pscMakeOptions) infoModList
177− infoModList = fullDesc <> headerInfo <> footerInfo
178− headerInfo = header "psc - Compiles PureScript to Javascript"
179− footerInfo = footer $ "psc " ++ showVersion Paths.version
180−
181− version :: Parser (a -> a)
182− version = abortOption (InfoMsg (showVersion Paths.version)) $ long "version" <> help "Show the version number" <> hidden
psci/Main.hsdeleted−377
@@ -1,377 +0,0 @@
1−{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE DoAndIfThenElse #-}
3−{-# LANGUAGE GADTs #-}
4−{-# LANGUAGE GeneralizedNewtypeDeriving #-}
5−{-# LANGUAGE MultiParamTypeClasses #-}
6−{-# LANGUAGE OverloadedStrings #-}
7−{-# LANGUAGE PatternGuards #-}
8−{-# LANGUAGE RecordWildCards #-}
9−{-# LANGUAGE ScopedTypeVariables #-}
10−{-# LANGUAGE TemplateHaskell #-}
11−{-# LANGUAGE TupleSections #-}
12−
13−module Main (main) where
14−
15−import Prelude ()
16−import Prelude.Compat
17−
18−import Data.FileEmbed (embedStringFile)
19−import Data.Monoid ((<>))
20−import Data.String (IsString(..))
21−import Data.Text (Text, unpack)
22−import Data.Traversable (for)
23−import Data.Version (showVersion)
24−
25−import Control.Applicative (many, (<|>))
26−import Control.Concurrent (forkIO)
27−import Control.Concurrent.MVar (MVar, newEmptyMVar, putMVar, takeMVar,
28− tryPutMVar)
29−import Control.Concurrent.STM (TVar, atomically, newTVarIO, writeTVar,
30− readTVarIO,
31− TChan, newBroadcastTChanIO, dupTChan,
32− readTChan, writeTChan)
33−import Control.Exception (fromException)
34−import Control.Monad
35−import Control.Monad.IO.Class (liftIO)
36−import Control.Monad.Trans.Class
37−import Control.Monad.Trans.Except (ExceptT(..), runExceptT)
38−import Control.Monad.Trans.State.Strict (StateT, evalStateT)
39−import Control.Monad.Trans.Reader (ReaderT, runReaderT)
40−
41−import qualified Language.PureScript as P
42−import qualified Language.PureScript.Bundle as Bundle
43−import Language.PureScript.Interactive
44−
45−import Network.HTTP.Types.Header (hContentType, hCacheControl,
46− hPragma, hExpires)
47−import Network.HTTP.Types.Status (status200, status404, status503)
48−import qualified Network.Wai as Wai
49−import qualified Network.Wai.Handler.Warp as Warp
50−import qualified Network.Wai.Handler.WebSockets as WS
51−import qualified Network.WebSockets as WS
52−
53−import qualified Options.Applicative as Opts
54−
55−import qualified Paths_purescript as Paths
56−
57−import System.Console.Haskeline
58−import System.IO.UTF8 (readUTF8File)
59−import System.Exit
60−import System.FilePath ((</>))
61−import System.FilePath.Glob (glob)
62−import System.Process (readProcessWithExitCode)
63−
64−-- | Command line options
65−data PSCiOptions = PSCiOptions
66− { psciInputFile :: [FilePath]
67− , psciBackend :: Backend
68− }
69−
70−inputFile :: Opts.Parser FilePath
71−inputFile = Opts.strArgument $
72− Opts.metavar "FILE"
73− <> Opts.help "Optional .purs files to load on start"
74−
75−nodePathOption :: Opts.Parser (Maybe FilePath)
76−nodePathOption = Opts.optional . Opts.strOption $
77− Opts.metavar "FILE"
78− <> Opts.long "node-path"
79− <> Opts.help "Path to the Node executable"
80−
81−nodeFlagsOption :: Opts.Parser [String]
82−nodeFlagsOption = Opts.option parser $
83− Opts.long "node-opts"
84− <> Opts.metavar "OPTS"
85− <> Opts.value []
86− <> Opts.help "Flags to pass to node, separated by spaces"
87− where
88− parser = words <$> Opts.str
89−
90−port :: Opts.Parser Int
91−port = Opts.option Opts.auto $
92− Opts.long "port"
93− <> Opts.short 'p'
94− <> Opts.help "The web server port"
95−
96−backend :: Opts.Parser Backend
97−backend =
98− (browserBackend <$> port)
99− <|> (nodeBackend <$> nodePathOption <*> nodeFlagsOption)
100−
101−psciOptions :: Opts.Parser PSCiOptions
102−psciOptions = PSCiOptions <$> many inputFile
103− <*> backend
104−
105−version :: Opts.Parser (a -> a)
106−version = Opts.abortOption (Opts.InfoMsg (showVersion Paths.version)) $
107− Opts.long "version" <>
108− Opts.help "Show the version number" <>
109− Opts.hidden
110−
111−getOpt :: IO PSCiOptions
112−getOpt = Opts.execParser opts
113− where
114− opts = Opts.info (version <*> Opts.helper <*> psciOptions) infoModList
115− infoModList = Opts.fullDesc <> headerInfo <> footerInfo
116− headerInfo = Opts.header "psci - Interactive mode for PureScript"
117− footerInfo = Opts.footer $ "psci " ++ showVersion Paths.version
118−
119−-- | Parses the input and returns either a command, or an error as a 'String'.
120−getCommand :: forall m. MonadException m => InputT m (Either String (Maybe Command))
121−getCommand = handleInterrupt (return (Right Nothing)) $ do
122− line <- withInterrupt $ getInputLine "> "
123− case line of
124− Nothing -> return (Right (Just QuitPSCi)) -- Ctrl-D when input is empty
125− Just "" -> return (Right Nothing)
126− Just s -> return . fmap Just $ parseCommand s
127−
128−pasteMode :: forall m. MonadException m => InputT m (Either String Command)
129−pasteMode =
130− parseCommand <$> go []
131− where
132− go :: [String] -> InputT m String
133− go ls = maybe (return . unlines $ reverse ls) (go . (:ls)) =<< getInputLine "… "
134−
135−-- | Make a JavaScript bundle for the browser.
136−bundle :: IO (Either Bundle.ErrorMessage String)
137−bundle = runExceptT $ do
138− inputFiles <- liftIO (glob (".psci_modules" </> "node_modules" </> "*" </> "*.js"))
139− input <- for inputFiles $ \filename -> do
140− js <- liftIO (readUTF8File filename)
141− mid <- Bundle.guessModuleIdentifier filename
142− length js `seq` return (mid, js)
143− Bundle.bundle input [] Nothing "PSCI"
144−
145−indexJS :: IsString string => string
146−indexJS = $(embedStringFile "psci/static/index.js")
147−
148−indexPage :: IsString string => string
149−indexPage = $(embedStringFile "psci/static/index.html")
150−
151−-- | All of the functions required to implement a PSCi backend
152−data Backend = forall state. Backend
153− { _backendSetup :: IO state
154− -- ^ Initialize, and call the continuation when the backend is ready
155− , _backendEval :: state -> String -> IO ()
156− -- ^ Evaluate JavaScript code
157− , _backendReload :: state -> IO ()
158− -- ^ Reload the compiled code
159− , _backendShutdown :: state -> IO ()
160− -- ^ Shut down the backend
161− }
162−
163−-- | Commands which can be sent to the browser
164−data BrowserCommand
165− = Eval (MVar String)
166− -- ^ Evaluate the latest JS
167− | Reload
168− -- ^ Reload the page
169−
170−-- | State for the browser backend
171−data BrowserState = BrowserState
172− { browserCommands :: TChan BrowserCommand
173− -- ^ A channel which receives data when the compiled JS has
174− -- been updated
175− , browserShutdownNotice :: MVar ()
176− -- ^ An MVar which becomes full when the server should shut down
177− , browserIndexJS :: TVar (Maybe String)
178− -- ^ A TVar holding the latest compiled JS
179− , browserBundleJS :: TVar (Maybe String)
180− -- ^ A TVar holding the latest bundled JS
181− }
182−
183−browserBackend :: Int -> Backend
184−browserBackend serverPort = Backend setup evaluate reload shutdown
185− where
186− setup :: IO BrowserState
187− setup = do
188− shutdownVar <- newEmptyMVar
189− cmdChan <- newBroadcastTChanIO
190− indexJs <- newTVarIO Nothing
191− bundleJs <- newTVarIO Nothing
192−
193− let
194− handleWebsocket :: WS.PendingConnection -> IO ()
195− handleWebsocket pending = do
196− conn <- WS.acceptRequest pending
197− -- Fork a thread to keep the connection alive
198− WS.forkPingThread conn 10
199− -- Clone the command channel
200− cmdChanCopy <- atomically $ dupTChan cmdChan
201− -- Listen for commands
202− forever $ do
203− cmd <- atomically $ readTChan cmdChanCopy
204− case cmd of
205− Eval resultVar -> void $ do
206− WS.sendTextData conn ("eval" :: Text)
207− result <- WS.receiveData conn
208− -- With many connected clients, all but one of
209− -- these attempts will fail.
210− tryPutMVar resultVar (unpack result)
211− Reload ->
212− WS.sendTextData conn ("reload" :: Text)
213−
214− shutdownHandler :: IO () -> IO ()
215− shutdownHandler stopServer = void . forkIO $ do
216− () <- takeMVar shutdownVar
217− stopServer
218−
219− onException :: Maybe Wai.Request -> SomeException -> IO ()
220− onException req ex
221− | Just (_ :: WS.ConnectionException) <- fromException ex
222− = return () -- ignore websocket disconnects
223− | otherwise = Warp.defaultOnException req ex
224−
225− staticServer :: Wai.Application
226− staticServer req respond =
227− case Wai.pathInfo req of
228− [] ->
229− respond $ Wai.responseLBS status200
230− [(hContentType, "text/html")]
231− indexPage
232− ["js", "index.js"] ->
233− respond $ Wai.responseLBS status200
234− [(hContentType, "application/javascript")]
235− indexJS
236− ["js", "latest.js"] -> do
237− may <- readTVarIO indexJs
238− case may of
239− Nothing ->
240− respond $ Wai.responseLBS status503 [] "Service not available"
241− Just js ->
242− respond $ Wai.responseLBS status200
243− [ (hContentType, "application/javascript")
244− , (hCacheControl, "no-cache, no-store, must-revalidate")
245− , (hPragma, "no-cache")
246− , (hExpires, "0")
247− ]
248− (fromString js)
249− ["js", "bundle.js"] -> do
250− may <- readTVarIO bundleJs
251− case may of
252− Nothing ->
253− respond $ Wai.responseLBS status503 [] "Service not available"
254− Just js ->
255− respond $ Wai.responseLBS status200
256− [ (hContentType, "application/javascript")]
257− (fromString js)
258− _ -> respond $ Wai.responseLBS status404 [] "Not found"
259−
260− let browserState = BrowserState cmdChan shutdownVar indexJs bundleJs
261− createBundle browserState
262−
263− putStrLn $ "Serving http://localhost:" <> show serverPort <> "/. Waiting for connections..."
264− _ <- forkIO $ Warp.runSettings ( Warp.setInstallShutdownHandler shutdownHandler
265− . Warp.setPort serverPort
266− . Warp.setOnException onException
267− $ Warp.defaultSettings
268− ) $
269− WS.websocketsOr WS.defaultConnectionOptions
270− handleWebsocket
271− staticServer
272− return browserState
273−
274− createBundle :: BrowserState -> IO ()
275− createBundle state = do
276− putStrLn "Bundling Javascript..."
277− ejs <- bundle
278− case ejs of
279− Left err -> do
280− putStrLn (unlines (Bundle.printErrorMessage err))
281− exitFailure
282− Right js ->
283− atomically $ writeTVar (browserBundleJS state) (Just js)
284−
285− reload :: BrowserState -> IO ()
286− reload state = do
287− createBundle state
288− atomically $ writeTChan (browserCommands state) Reload
289−
290− shutdown :: BrowserState -> IO ()
291− shutdown state = putMVar (browserShutdownNotice state) ()
292−
293− evaluate :: BrowserState -> String -> IO ()
294− evaluate state js = liftIO $ do
295− resultVar <- newEmptyMVar
296− atomically $ do
297− writeTVar (browserIndexJS state) (Just js)
298− writeTChan (browserCommands state) (Eval resultVar)
299− result <- takeMVar resultVar
300− putStrLn result
301−
302−nodeBackend :: Maybe FilePath -> [String] -> Backend
303−nodeBackend nodePath nodeArgs = Backend setup eval reload shutdown
304− where
305− setup :: IO ()
306− setup = return ()
307−
308− eval :: () -> String -> IO ()
309− eval _ _ = do
310− writeFile indexFile "require('$PSCI')['$main']();"
311− process <- maybe findNodeProcess (pure . pure) nodePath
312− result <- traverse (\node -> readProcessWithExitCode node (nodeArgs ++ [indexFile]) "") process
313− case result of
314− Just (ExitSuccess, out, _) -> putStrLn out
315− Just (ExitFailure _, _, err) -> putStrLn err
316− Nothing -> putStrLn "Couldn't find node.js"
317−
318− reload :: () -> IO ()
319− reload _ = return ()
320−
321− shutdown :: () -> IO ()
322− shutdown _ = return ()
323−
324−-- | Get command line options and drop into the REPL
325−main :: IO ()
326−main = getOpt >>= loop
327− where
328− loop :: PSCiOptions -> IO ()
329− loop PSCiOptions{..} = do
330− inputFiles <- concat <$> traverse glob psciInputFile
331− e <- runExceptT $ do
332− modules <- ExceptT (loadAllModules inputFiles)
333− unless (supportModuleIsDefined (map snd modules)) . liftIO $ do
334− putStrLn supportModuleMessage
335− exitFailure
336− (externs, env) <- ExceptT . runMake . make $ modules
337− return (modules, externs, env)
338− case psciBackend of
339− Backend setup eval reload (shutdown :: state -> IO ()) ->
340− case e of
341− Left errs -> putStrLn (P.prettyPrintMultipleErrors P.defaultPPEOptions errs) >> exitFailure
342− Right (modules, externs, env) -> do
343− historyFilename <- getHistoryFilename
344− let settings = defaultSettings { historyFile = Just historyFilename }
345− initialState = PSCiState [] [] (zip (map snd modules) externs)
346− config = PSCiConfig inputFiles env
347− runner = flip runReaderT config
348− . flip evalStateT initialState
349− . runInputT (setComplete completion settings)
350−
351− go :: state -> InputT (StateT PSCiState (ReaderT PSCiConfig IO)) ()
352− go state = do
353− c <- getCommand
354− case c of
355− Left err -> outputStrLn err >> go state
356− Right Nothing -> go state
357− Right (Just PasteLines) -> do
358− c' <- pasteMode
359− case c' of
360− Left err -> outputStrLn err >> go state
361− Right c'' -> handleCommandWithInterrupts state c''
362− Right (Just QuitPSCi) -> do
363− outputStrLn quitMessage
364− liftIO $ shutdown state
365− Right (Just c') -> handleCommandWithInterrupts state c'
366−
367− handleCommandWithInterrupts
368− :: state
369− -> Command
370− -> InputT (StateT PSCiState (ReaderT PSCiConfig IO)) ()
371− handleCommandWithInterrupts state cmd = do
372− handleInterrupt (outputStrLn "Interrupted.")
373− (withInterrupt (lift (handleCommand (liftIO . eval state) (liftIO (reload state)) cmd)))
374− go state
375−
376− putStrLn prologueMessage
377− setup >>= runner . go
psci/static/index.htmldeleted−10
@@ -1,10 +0,0 @@
1−<!DOCTYPE html>
2−<html>
3−<head>
4− <title>PureScript Interactive</title>
5− <script src='js/bundle.js'></script>
6− <script src='js/index.js'></script>
7−</head>
8−<body>
9−</body>
10−</html>
psci/static/index.jsdeleted−63
@@ -1,63 +0,0 @@
1−var get = function get(uri, callback, onError) {
2− var request = new XMLHttpRequest();
3− request.addEventListener('load', function() {
4− callback(request.responseText);
5− });
6− request.addEventListener('error', onError);
7− request.open('GET', uri);
8− request.send();
9−};
10−var evaluate = function evaluate(js) {
11− var buffer = [];
12− // Save the old console.log function
13− var oldLog = console.log;
14− console.log = function(s) {
15− // Push log output into a temporary buffer
16− // which will be returned to PSCi.
17− buffer.push(s);
18− };
19− // Replace any require(...) statements with lookups on the PSCI object.
20− var replaced = js.replace(/require\("[^"]*"\)/g, function(s) {
21− return "PSCI['" + s.substring(12, s.length - 2) + "']";
22− });
23− // Wrap the module and evaluate it.
24− var wrapped =
25− [ 'var module = {};'
26− , '(function(module) {'
27− , replaced
28− , '})(module);'
29− , 'return module.exports["$main"] && module.exports["$main"]();'
30− ].join('\n');
31− new Function(wrapped)();
32− // Restore console.log
33− console.log = oldLog;
34− return buffer.join('\n');
35−};
36−window.onload = function() {
37− var socket = new WebSocket('ws://localhost:' + location.port);
38− var evalNext = function reload() {
39− get('js/latest.js', function(response) {
40− try {
41− var result = evaluate(response);
42− socket.send(result);
43− } catch (ex) {
44− socket.send(ex.stack);
45− }
46− }, function(err) {
47− socket.send('Error sending JavaScript');
48− });
49− };
50− socket.onopen = function() {
51− console.log('Connected');
52− socket.onmessage = function(event) {
53− switch (event.data) {
54− case 'eval':
55− evalNext();
56− break;
57− case 'reload':
58− location.reload();
59− break;
60− }
61− };
62− };
63−};
psgo.cabalnew file+145
@@ -0,0 +1,145 @@
1+cabal-version: 1.12
2+
3+-- This file has been generated from package.yaml by hpack version 0.35.0.
4+--
5+-- see: https://github.com/sol/hpack
6+
7+name: psgo
8+version: 0.1.0.0
9+description: Please see the README on Github at <https://github.com/andyarvanitis/purescript-native#readme>
10+homepage: https://github.com/andyarvanitis/purescript-native#readme
11+bug-reports: https://github.com/andyarvanitis/purescript-native/issues
12+author: Andy Arvanitis
13+maintainer: example@example.com
14+copyright: 2018 Andy Arvanitis
15+license: BSD3
16+license-file: LICENSE
17+build-type: Simple
18+extra-source-files:
19+ README.md
20+ ChangeLog.md
21+ stack.yaml
22+ support/ffi-loader.go
23+ support/go.mod.ffi-loader
24+ support/go.mod.output
25+ support/go.mod.working
26+
27+source-repository head
28+ type: git
29+ location: https://github.com/andyarvanitis/purescript-native
30+
31+library
32+ exposed-modules:
33+ CodeGen.IL
34+ CodeGen.IL.Common
35+ CodeGen.IL.Optimizer
36+ CodeGen.IL.Optimizer.Common
37+ CodeGen.IL.Optimizer.Inliner
38+ CodeGen.IL.Optimizer.MagicDo
39+ CodeGen.IL.Optimizer.TCO
40+ CodeGen.IL.Printer
41+ Tests
42+ other-modules:
43+ Paths_psgo
44+ hs-source-dirs:
45+ src
46+ default-extensions:
47+ ConstraintKinds
48+ DataKinds
49+ DeriveFunctor
50+ EmptyDataDecls
51+ FlexibleContexts
52+ KindSignatures
53+ LambdaCase
54+ MultiParamTypeClasses
55+ NoImplicitPrelude
56+ PatternGuards
57+ PatternSynonyms
58+ RankNTypes
59+ RecordWildCards
60+ OverloadedStrings
61+ ScopedTypeVariables
62+ TupleSections
63+ ViewPatterns
64+ build-depends:
65+ aeson >=1.0 && <1.5
66+ , base >=4.7 && <5
67+ , base-compat >=0.6.0
68+ , bytestring >=0.10.8.2 && <0.11
69+ , containers
70+ , directory
71+ , file-embed
72+ , filemanip
73+ , filepath
74+ , gitrev
75+ , monad-parallel >=0.7.2.2 && <0.8
76+ , mtl >=2.1.0 && <2.3.0
77+ , pattern-arrows >=0.0.2 && <0.1
78+ , process
79+ , protolude >=0.1.6
80+ , purescript
81+ , safe >=0.3.9 && <0.4
82+ , text
83+ , transformers >=0.3.0 && <0.6
84+ default-language: Haskell2010
85+
86+executable psgo
87+ main-is: Main.hs
88+ other-modules:
89+ Paths_psgo
90+ hs-source-dirs:
91+ app
92+ ghc-options: -threaded -rtsopts -with-rtsopts=-N
93+ build-depends:
94+ aeson >=1.0 && <1.5
95+ , base >=4.7 && <5
96+ , base-compat >=0.6.0
97+ , bytestring >=0.10.8.2 && <0.11
98+ , containers
99+ , directory
100+ , file-embed
101+ , filemanip
102+ , filepath
103+ , gitrev
104+ , monad-parallel >=0.7.2.2 && <0.8
105+ , mtl >=2.1.0 && <2.3.0
106+ , pattern-arrows >=0.0.2 && <0.1
107+ , process
108+ , protolude >=0.1.6
109+ , psgo
110+ , purescript
111+ , safe >=0.3.9 && <0.4
112+ , text
113+ , transformers >=0.3.0 && <0.6
114+ default-language: Haskell2010
115+
116+test-suite psgo-test
117+ type: exitcode-stdio-1.0
118+ main-is: Spec.hs
119+ other-modules:
120+ Paths_psgo
121+ hs-source-dirs:
122+ test
123+ ghc-options: -threaded -rtsopts -with-rtsopts=-N
124+ build-depends:
125+ aeson >=1.0 && <1.5
126+ , base >=4.7 && <5
127+ , base-compat >=0.6.0
128+ , bytestring >=0.10.8.2 && <0.11
129+ , containers
130+ , directory
131+ , file-embed
132+ , filemanip
133+ , filepath
134+ , gitrev
135+ , monad-parallel >=0.7.2.2 && <0.8
136+ , mtl >=2.1.0 && <2.3.0
137+ , pattern-arrows >=0.0.2 && <0.1
138+ , process
139+ , protolude >=0.1.6
140+ , psgo
141+ , purescript
142+ , safe >=0.3.9 && <0.4
143+ , text
144+ , transformers >=0.3.0 && <0.6
145+ default-language: Haskell2010
purescript.cabaldeleted−567
@@ -1,567 +0,0 @@
1−name: purescript
2−version: 0.10.3
3−cabal-version: >=1.8
4−build-type: Simple
5−license: BSD3
6−license-file: LICENSE
7−copyright: (c) 2013-16 Phil Freeman, (c) 2014-16 Gary Burgess
8−maintainer: Phil Freeman <paf31@cantab.net>
9−stability: experimental
10−synopsis: PureScript Programming Language Compiler
11−description: A small strongly, statically typed programming language with expressive types, inspired by Haskell and compiling to Javascript.
12−category: Language
13−Homepage: http://www.purescript.org/
14−author: Phil Freeman <paf31@cantab.net>,
15− Gary Burgess <gary.burgess@gmail.com>,
16− Hardy Jones <jones3.hardy@gmail.com>,
17− Harry Garrood <harry@garrood.me>,
18− Christoph Hegemann <christoph.hegemann1337@gmail.com>
19−
20−tested-with: GHC==7.10.3
21−
22−extra-source-files: examples/passing/*.purs
23− , examples/passing/*.js
24− , examples/passing/2018/*.purs
25− , examples/passing/2138/*.purs
26− , examples/passing/ClassRefSyntax/*.purs
27− , examples/passing/DctorOperatorAlias/*.purs
28− , examples/passing/ExplicitImportReExport/*.purs
29− , examples/passing/ExportExplicit/*.purs
30− , examples/passing/ExportExplicit2/*.purs
31− , examples/passing/ForeignKind/*.purs
32− , examples/passing/Import/*.purs
33− , examples/passing/ImportExplicit/*.purs
34− , examples/passing/ImportQualified/*.purs
35− , examples/passing/Module/*.purs
36− , examples/passing/ModuleDeps/*.purs
37− , examples/passing/ModuleExport/*.purs
38− , examples/passing/ModuleExportDupes/*.purs
39− , examples/passing/ModuleExportExcluded/*.purs
40− , examples/passing/ModuleExportQualified/*.purs
41− , examples/passing/ModuleExportSelf/*.purs
42− , examples/passing/NonConflictingExports/*.purs
43− , examples/passing/OperatorAliasElsewhere/*.purs
44− , examples/passing/Operators/*.purs
45− , examples/passing/PendingConflictingImports/*.purs
46− , examples/passing/PendingConflictingImports2/*.purs
47− , examples/passing/QualifiedNames/*.purs
48− , examples/passing/RedefinedFixity/*.purs
49− , examples/passing/ReExportQualified/*.purs
50− , examples/passing/ResolvableScopeConflict/*.purs
51− , examples/passing/ResolvableScopeConflict2/*.purs
52− , examples/passing/ResolvableScopeConflict3/*.purs
53− , examples/passing/ShadowedModuleName/*.purs
54− , examples/passing/SolvingIsSymbol/*.purs
55− , examples/passing/TransitiveImport/*.purs
56− , examples/passing/TypeOperators/*.purs
57− , examples/passing/TypeWithoutParens/*.purs
58− , examples/failing/*.purs
59− , examples/failing/1733/*.purs
60− , examples/failing/2378/*.purs
61− , examples/failing/2379/*.purs
62− , examples/failing/ConflictingExports/*.purs
63− , examples/failing/ConflictingImports/*.purs
64− , examples/failing/ConflictingImports2/*.purs
65− , examples/failing/ConflictingQualifiedImports/*.purs
66− , examples/failing/ConflictingQualifiedImports2/*.purs
67− , examples/failing/DiffKindsSameName/*.purs
68− , examples/failing/DuplicateModule/*.purs
69− , examples/failing/ExportConflictClass/*.purs
70− , examples/failing/ExportConflictCtor/*.purs
71− , examples/failing/ExportConflictType/*.purs
72− , examples/failing/ExportConflictTypeOp/*.purs
73− , examples/failing/ExportConflictValue/*.purs
74− , examples/failing/ExportConflictValueOp/*.purs
75− , examples/failing/ExportExplicit1/*.purs
76− , examples/failing/ExportExplicit3/*.purs
77− , examples/failing/ImportExplicit/*.purs
78− , examples/failing/ImportExplicit2/*.purs
79− , examples/failing/ImportHidingModule/*.purs
80− , examples/failing/ImportModule/*.purs
81− , examples/failing/InstanceExport/*.purs
82− , examples/failing/OrphanInstance/*.purs
83− , examples/warning/*.purs
84− , examples/warning/*.js
85− , examples/warning/UnusedExplicitImportTypeOp/*.purs
86− , examples/docs/bower_components/purescript-prelude/src/*.purs
87− , examples/docs/bower.json
88− , examples/docs/src/*.purs
89− , psci/static/index.html
90− , psci/static/index.js
91− , tests/support/package.json
92− , tests/support/bower.json
93− , tests/support/setup-win.cmd
94− , tests/support/psci/*.purs
95− , tests/support/pscide/src/*.purs
96− , tests/support/pscide/src/*.js
97− , tests/support/pscide/src/*.fail
98− , stack.yaml
99− , README.md
100− , INSTALL.md
101− , CONTRIBUTORS.md
102− , CONTRIBUTING.md
103−
104−source-repository head
105− type: git
106− location: https://github.com/purescript/purescript.git
107−
108−library
109− build-depends: base >=4.8 && <5,
110− aeson >= 0.8 && < 1.0,
111− aeson-better-errors >= 0.8,
112− ansi-terminal >= 0.6.2 && < 0.7,
113− base-compat >=0.6.0,
114− bower-json >= 0.8,
115− boxes >= 0.1.4 && < 0.2.0,
116− bytestring -any,
117− containers -any,
118− clock -any,
119− data-ordlist >= 0.4.7.0,
120− directory >= 1.2,
121− dlist -any,
122− edit-distance -any,
123− filepath -any,
124− fsnotify >= 0.2.1,
125− Glob >= 0.7 && < 0.8,
126− haskeline >= 0.7.0.0,
127− http-client >= 0.4.30 && <0.5,
128− http-types -any,
129− language-javascript >= 0.6.0.9 && < 0.7,
130− lens == 4.*,
131− lifted-base >= 0.2.3 && < 0.2.4,
132− monad-control >= 1.0.0.0 && < 1.1,
133− monad-logger >= 0.3 && < 0.4,
134− mtl >= 2.1.0 && < 2.3.0,
135− parallel >= 3.2 && < 3.3,
136− parsec >=3.1.10,
137− pattern-arrows >= 0.0.2 && < 0.1,
138− pipes >= 4.0.0 && < 4.3.0,
139− pipes-http -any,
140− process >= 1.2.0 && < 1.5,
141− protolude >= 0.1.6,
142− regex-tdfa -any,
143− safe >= 0.3.9 && < 0.4,
144− semigroups >= 0.16.2 && < 0.19,
145− sourcemap >= 0.1.6,
146− spdx == 0.2.*,
147− split -any,
148− stm >= 0.2.4.0,
149− syb -any,
150− text -any,
151− time -any,
152− transformers >= 0.3.0 && < 0.6,
153− transformers-base >= 0.4.0 && < 0.5,
154− transformers-compat >= 0.3.0,
155− unordered-containers -any,
156− utf8-string >= 1 && < 2,
157− vector -any
158−
159− exposed-modules: Language.PureScript
160− Language.PureScript.AST
161− Language.PureScript.AST.Binders
162− Language.PureScript.AST.Declarations
163− Language.PureScript.AST.Operators
164− Language.PureScript.AST.Literals
165− Language.PureScript.AST.SourcePos
166− Language.PureScript.AST.Traversals
167− Language.PureScript.AST.Exported
168− Language.PureScript.Bundle
169− Language.PureScript.Crash
170− Language.PureScript.Externs
171− Language.PureScript.CodeGen
172− Language.PureScript.CodeGen.JS
173− Language.PureScript.CodeGen.JS.AST
174− Language.PureScript.CodeGen.JS.Common
175− Language.PureScript.CodeGen.JS.Optimizer
176− Language.PureScript.CodeGen.JS.Optimizer.Blocks
177− Language.PureScript.CodeGen.JS.Optimizer.Common
178− Language.PureScript.CodeGen.JS.Optimizer.Inliner
179− Language.PureScript.CodeGen.JS.Optimizer.MagicDo
180− Language.PureScript.CodeGen.JS.Optimizer.TCO
181− Language.PureScript.CodeGen.JS.Optimizer.Unused
182− Language.PureScript.Constants
183− Language.PureScript.CoreFn
184− Language.PureScript.CoreFn.Ann
185− Language.PureScript.CoreFn.Binders
186− Language.PureScript.CoreFn.Desugar
187− Language.PureScript.CoreFn.Expr
188− Language.PureScript.CoreFn.Meta
189− Language.PureScript.CoreFn.Module
190− Language.PureScript.CoreFn.Traversals
191− Language.PureScript.CoreFn.ToJSON
192− Language.PureScript.Comments
193− Language.PureScript.Environment
194− Language.PureScript.Errors
195− Language.PureScript.Errors.JSON
196− Language.PureScript.Kinds
197− Language.PureScript.Linter
198− Language.PureScript.Linter.Exhaustive
199− Language.PureScript.Linter.Imports
200− Language.PureScript.Make
201− Language.PureScript.ModuleDependencies
202− Language.PureScript.Names
203− Language.PureScript.Options
204− Language.PureScript.Parser
205− Language.PureScript.Parser.Lexer
206− Language.PureScript.Parser.Common
207− Language.PureScript.Parser.Declarations
208− Language.PureScript.Parser.Kinds
209− Language.PureScript.Parser.State
210− Language.PureScript.Parser.Types
211− Language.PureScript.Pretty
212− Language.PureScript.Pretty.Common
213− Language.PureScript.Pretty.JS
214− Language.PureScript.Pretty.Kinds
215− Language.PureScript.Pretty.Types
216− Language.PureScript.Pretty.Values
217− Language.PureScript.Renamer
218− Language.PureScript.Sugar
219− Language.PureScript.Sugar.BindingGroups
220− Language.PureScript.Sugar.CaseDeclarations
221− Language.PureScript.Sugar.DoNotation
222− Language.PureScript.Sugar.Names
223− Language.PureScript.Sugar.Names.Common
224− Language.PureScript.Sugar.Names.Env
225− Language.PureScript.Sugar.Names.Exports
226− Language.PureScript.Sugar.Names.Imports
227− Language.PureScript.Sugar.ObjectWildcards
228− Language.PureScript.Sugar.Operators
229− Language.PureScript.Sugar.Operators.Common
230− Language.PureScript.Sugar.Operators.Expr
231− Language.PureScript.Sugar.Operators.Binders
232− Language.PureScript.Sugar.Operators.Types
233− Language.PureScript.Sugar.TypeClasses
234− Language.PureScript.Sugar.TypeClasses.Deriving
235− Language.PureScript.Sugar.TypeDeclarations
236− Language.PureScript.Traversals
237− Language.PureScript.TypeChecker
238− Language.PureScript.TypeChecker.Entailment
239− Language.PureScript.TypeChecker.Kinds
240− Language.PureScript.TypeChecker.Monad
241− Language.PureScript.TypeChecker.Rows
242− Language.PureScript.TypeChecker.Skolems
243− Language.PureScript.TypeChecker.Subsumption
244− Language.PureScript.TypeChecker.Synonyms
245− Language.PureScript.TypeChecker.Types
246− Language.PureScript.TypeChecker.TypeSearch
247− Language.PureScript.TypeChecker.Unify
248− Language.PureScript.TypeClassDictionaries
249− Language.PureScript.Types
250−
251− Language.PureScript.Docs
252− Language.PureScript.Docs.Convert
253− Language.PureScript.Docs.Convert.Single
254− Language.PureScript.Docs.Convert.ReExports
255− Language.PureScript.Docs.Prim
256− Language.PureScript.Docs.Render
257− Language.PureScript.Docs.Types
258− Language.PureScript.Docs.RenderedCode
259− Language.PureScript.Docs.RenderedCode.Types
260− Language.PureScript.Docs.RenderedCode.Render
261− Language.PureScript.Docs.AsMarkdown
262− Language.PureScript.Docs.ParseAndBookmark
263− Language.PureScript.Docs.Utils.MonoidExtras
264−
265− Language.PureScript.Publish
266− Language.PureScript.Publish.Utils
267− Language.PureScript.Publish.ErrorsWarnings
268− Language.PureScript.Publish.BoxesHelpers
269−
270− Language.PureScript.Ide
271− Language.PureScript.Ide.CaseSplit
272− Language.PureScript.Ide.Command
273− Language.PureScript.Ide.Completion
274− Language.PureScript.Ide.Conversions
275− Language.PureScript.Ide.Externs
276− Language.PureScript.Ide.Error
277− Language.PureScript.Ide.Filter
278− Language.PureScript.Ide.Imports
279− Language.PureScript.Ide.Logging
280− Language.PureScript.Ide.Matcher
281− Language.PureScript.Ide.Pursuit
282− Language.PureScript.Ide.Rebuild
283− Language.PureScript.Ide.Reexports
284− Language.PureScript.Ide.SourceFile
285− Language.PureScript.Ide.State
286− Language.PureScript.Ide.Types
287− Language.PureScript.Ide.Util
288− Language.PureScript.Ide.Watcher
289−
290− Language.PureScript.Interactive
291− Language.PureScript.Interactive.Types
292− Language.PureScript.Interactive.Parser
293− Language.PureScript.Interactive.Directive
294− Language.PureScript.Interactive.Completion
295− Language.PureScript.Interactive.IO
296− Language.PureScript.Interactive.Message
297− Language.PureScript.Interactive.Module
298− Language.PureScript.Interactive.Printer
299−
300− Control.Monad.Logger
301− Control.Monad.Supply
302− Control.Monad.Supply.Class
303−
304− System.IO.UTF8
305−
306− extensions: ConstraintKinds
307− DataKinds
308− DeriveFunctor
309− EmptyDataDecls
310− FlexibleContexts
311− KindSignatures
312− LambdaCase
313− MultiParamTypeClasses
314− NoImplicitPrelude
315− PatternGuards
316− PatternSynonyms
317− RankNTypes
318− RecordWildCards
319− OverloadedStrings
320− ScopedTypeVariables
321− TupleSections
322− ViewPatterns
323− exposed: True
324− buildable: True
325− hs-source-dirs: src
326− other-modules: Paths_purescript
327− ghc-options: -Wall -O2
328−
329−executable psc
330− build-depends: base >=4 && <5,
331− purescript -any,
332− aeson >= 0.8 && < 1.0,
333− ansi-terminal >= 0.6.2 && < 0.7,
334− base-compat >=0.6.0,
335− bytestring -any,
336− containers -any,
337− directory -any,
338− filepath -any,
339− Glob >= 0.7 && < 0.8,
340− mtl -any,
341− optparse-applicative >= 0.12.1,
342− parsec -any,
343− text -any,
344− time -any,
345− transformers -any,
346− transformers-compat -any,
347− utf8-string >= 1 && < 2
348− main-is: Main.hs
349− buildable: True
350− hs-source-dirs: psc
351− other-modules: Paths_purescript
352− ghc-options: -Wall -O2 -fno-warn-unused-do-bind -threaded -rtsopts "-with-rtsopts=-N"
353−
354−executable psci
355− build-depends: base >=4 && <5,
356− purescript -any,
357− base-compat >=0.6.0,
358− boxes >= 0.1.4 && < 0.2.0,
359− bytestring -any,
360− containers -any,
361− directory -any,
362− filepath -any,
363− file-embed -any,
364− Glob -any,
365− haskeline >= 0.7.0.0,
366− http-types == 0.9.*,
367− mtl -any,
368− optparse-applicative >= 0.12.1,
369− parsec -any,
370− process -any,
371− stm >= 0.2.4.0,
372− text -any,
373− time -any,
374− transformers -any,
375− transformers-compat -any,
376− wai == 3.*,
377− wai-websockets == 3.*,
378− warp == 3.*,
379− websockets >= 0.9 && <0.10
380− main-is: Main.hs
381− buildable: True
382− hs-source-dirs: psci
383− other-modules: Paths_purescript
384− ghc-options: -Wall -O2
385−
386−executable psc-docs
387− build-depends: base >=4 && <5,
388− purescript -any,
389− ansi-wl-pprint -any,
390− directory -any,
391− filepath -any,
392− Glob -any,
393− mtl -any,
394− optparse-applicative >= 0.12.1,
395− process -any,
396− split -any,
397− text -any,
398− transformers -any,
399− transformers-compat -any
400− main-is: Main.hs
401− other-modules: Paths_purescript
402− buildable: True
403− hs-source-dirs: psc-docs
404− other-modules: Ctags
405− Etags
406− Tags
407− ghc-options: -Wall -O2
408−
409−executable psc-publish
410− build-depends: base >=4 && <5,
411− purescript -any,
412− aeson >= 0.8 && < 1.0,
413− bytestring -any,
414− optparse-applicative -any
415− main-is: Main.hs
416− other-modules: Paths_purescript
417− buildable: True
418− hs-source-dirs: psc-publish
419− ghc-options: -Wall -O2
420−
421−executable psc-package
422− build-depends: base >=4 && <5,
423− purescript -any,
424− aeson -any,
425− aeson-pretty -any,
426− bytestring -any,
427− containers -any,
428− foldl -any,
429− optparse-applicative -any,
430− system-filepath -any,
431− text -any,
432− turtle <1.3
433− main-is: Main.hs
434− other-modules: Paths_purescript
435− buildable: True
436− hs-source-dirs: psc-package
437− ghc-options: -Wall -O2
438−
439−executable psc-hierarchy
440− build-depends: base >=4 && <5,
441− purescript -any,
442− directory -any,
443− filepath -any,
444− Glob -any,
445− mtl -any,
446− optparse-applicative >= 0.12.1,
447− parsec -any,
448− process -any,
449− text -any
450− main-is: Main.hs
451− other-modules: Paths_purescript
452− buildable: True
453− hs-source-dirs: hierarchy
454− other-modules:
455− ghc-options: -Wall -O2
456−
457−executable psc-bundle
458− main-is: Main.hs
459− other-modules: Paths_purescript
460− other-extensions:
461− build-depends: base >=4 && <5,
462− bytestring -any,
463− purescript -any,
464− directory -any,
465− aeson >= 0.8 && < 1.0,
466− filepath -any,
467− Glob -any,
468− mtl -any,
469− optparse-applicative >= 0.12.1,
470− sourcemap >= 0.1.6,
471− transformers -any,
472− transformers-compat -any,
473− utf8-string >= 1 && < 2
474−
475− ghc-options: -Wall -O2
476− hs-source-dirs: psc-bundle
477−
478−executable psc-ide-server
479− main-is: Main.hs
480− other-modules: Paths_purescript
481− other-extensions:
482− build-depends: base >=4 && <5,
483− aeson >= 0.8 && < 1.0,
484− bytestring -any,
485− purescript -any,
486− base-compat >=0.6.0,
487− directory -any,
488− filepath -any,
489− monad-logger -any,
490− mtl -any,
491− network -any,
492− optparse-applicative >= 0.12.1,
493− protolude >= 0.1.6,
494− stm -any,
495− text -any,
496− transformers -any,
497− transformers-compat -any
498− ghc-options: -Wall -O2 -threaded
499− hs-source-dirs: psc-ide-server
500−
501−executable psc-ide-client
502− main-is: Main.hs
503− other-modules: Paths_purescript
504− other-extensions:
505− build-depends: base >=4 && <5,
506− base-compat >=0.6.0,
507− bytestring -any,
508− mtl -any,
509− network -any,
510− optparse-applicative >= 0.12.1,
511− text -any
512− ghc-options: -Wall -O2
513− hs-source-dirs: psc-ide-client
514−
515−test-suite tests
516− build-depends: base >=4 && <5,
517− purescript -any,
518− aeson -any,
519− aeson-better-errors -any,
520− base-compat -any,
521− bower-json -any,
522− boxes -any,
523− bytestring -any,
524− containers -any,
525− directory -any,
526− filepath -any,
527− Glob -any,
528− haskeline >= 0.7.0.0,
529− hspec -any,
530− hspec-discover -any,
531− HUnit -any,
532− mtl -any,
533− optparse-applicative -any,
534− parsec -any,
535− process -any,
536− protolude >= 0.1.6,
537− silently -any,
538− stm -any,
539− text -any,
540− time -any,
541− transformers -any,
542− transformers-compat -any,
543− utf8-string -any,
544− vector -any
545− ghc-options: -Wall
546− type: exitcode-stdio-1.0
547− main-is: Main.hs
548− other-modules: TestUtils
549− TestCompiler
550− TestDocs
551− TestPrimDocs
552− TestPscPublish
553− TestPsci
554− TestPscIde
555− PscIdeSpec
556− Language.PureScript.Ide.FilterSpec
557− Language.PureScript.Ide.ImportsSpec
558− Language.PureScript.Ide.Imports.IntegrationSpec
559− Language.PureScript.Ide.Integration
560− Language.PureScript.Ide.MatcherSpec
561− Language.PureScript.Ide.RebuildSpec
562− Language.PureScript.Ide.ReexportsSpec
563− Language.PureScript.Ide.SourceFile.IntegrationSpec
564− Language.PureScript.Ide.SourceFileSpec
565− Language.PureScript.Ide.StateSpec
566− buildable: True
567− hs-source-dirs: tests
src/CodeGen/IL.hsnew file+321
@@ -0,0 +1,321 @@
1+-- | This module generates code in the core imperative representation from
2+-- elaborated PureScript code.
3+module CodeGen.IL
4+ ( module AST
5+ , module Common
6+ , moduleToIL
7+ ) where
8+
9+import Prelude.Compat
10+import Protolude (ordNub)
11+
12+import Control.Arrow ((&&&))
13+import Control.Monad (forM, liftM, replicateM, void)
14+import Control.Monad.Supply.Class
15+
16+import Data.List ((\\), delete, intersect, nub)
17+import qualified Data.Foldable as F
18+import qualified Data.Map as M
19+import Data.Maybe (fromMaybe, isNothing, mapMaybe)
20+import Data.Monoid ((<>))
21+import Data.String (fromString)
22+import Data.Text (Text)
23+import qualified Data.Text as T
24+
25+import Language.PureScript.AST.SourcePos
26+import Language.PureScript.CoreImp.AST (AST)
27+import qualified Language.PureScript.CoreImp.AST as AST
28+import Language.PureScript.CoreFn
29+import Language.PureScript.Crash
30+import Language.PureScript.Names
31+import Language.PureScript.Options
32+import Language.PureScript.PSString (PSString, mkString)
33+import Language.PureScript.Traversals (sndM)
34+import qualified Language.PureScript.Constants as C
35+
36+import System.FilePath.Posix ((</>))
37+
38+import CodeGen.IL.Common as Common
39+import CodeGen.IL.Optimizer
40+import CodeGen.IL.Printer
41+
42+data DeclType = ModuleDecl | LetDecl | RecLetDecl deriving (Eq)
43+
44+-- | Generate code in the simplified intermediate representation for all declarations in a
45+-- module.
46+moduleToIL
47+ :: forall m
48+ -- . (Monad m, MonadReader Options m, MonadSupply m, MonadError MultipleErrors m)
49+ . (Monad m, MonadSupply m)
50+ => Module Ann
51+ -> Text
52+ -> m (Text, [Text], [AST], Text, Text)
53+moduleToIL (Module _ coms mn _ imps _ foreigns decls) project =
54+ do
55+ ilDecls <- mapM (bindToIL ModuleDecl) decls
56+ optimized <- traverse (traverse (optimize modName')) ilDecls
57+ let optimized' = concat optimized
58+ values = annotValue <$> optimized'
59+ foreigns' = moduleIdentToIL <$> foreigns
60+ interface = interfaceSource modName values foreigns
61+ imports = nub . concat $ importToIL <$> optimized'
62+ implHeader = implHeaderSource modName imports project
63+ implFooter = implFooterSource (runModuleName mn) foreigns
64+ return $ (interface, foreigns', optimized', implHeader, implFooter)
65+ where
66+ modName = moduleNameToIL mn
67+ modName' = AST.Var Nothing modName
68+
69+ annotValue :: AST -> (Text, Bool)
70+ annotValue (AST.Function _ (Just name) [] (AST.Block _ [AST.Return _ ret]))
71+ | isLiteral ret = (name, True)
72+ annotValue (AST.Function _ (Just name) [] _) = (name, False)
73+ annotValue _ = error "Unexpected top-level value form"
74+
75+ -- | Extracts all declaration names from a binding group.
76+ getNames :: Bind Ann -> [Ident]
77+ getNames (NonRec _ ident _) = [ident]
78+ getNames (Rec vals) = map (snd . fst) vals
79+
80+ -- | Generates IL code for a module import
81+ --
82+ importToIL :: AST -> [Text]
83+ importToIL = AST.everything (++) modRef
84+ where
85+ modRef (AST.Indexer _ (AST.Var _ _) (AST.Var _ mname))
86+ | not $ T.null mname = [extract mname]
87+ modRef _ = []
88+ extract :: Text -> Text
89+ extract = T.replace "_" "." . T.dropWhileEnd (=='_')
90+
91+ -- |
92+ -- Generate code in the simplified intermediate representation for a declaration
93+ --
94+ bindToIL :: DeclType -> Bind Ann -> m [AST]
95+ bindToIL dt (NonRec ann ident val) = return <$> nonRecToIL dt ann ident val
96+ bindToIL dt (Rec vals) = forM vals (uncurry . uncurry $ nonRecToIL dt')
97+ where
98+ dt' = if dt == LetDecl then RecLetDecl else dt
99+
100+ -- | Generate code in the simplified intermediate representation for a single non-recursive
101+ -- declaration.
102+ --
103+ -- The main purpose of this function is to handle code generation for comments.
104+ nonRecToIL :: DeclType -> Ann -> Ident -> Expr Ann -> m AST
105+ nonRecToIL dt a i e@(extractAnn -> (_, com, _, _)) | not (null com) = do
106+ -- withoutComment <- asks optionsNoComments
107+ let withoutComment = False
108+ if withoutComment
109+ then nonRecToIL dt a i (modifyAnn removeComments e)
110+ else AST.Comment Nothing com <$> nonRecToIL dt a i (modifyAnn removeComments e)
111+ nonRecToIL ModuleDecl (ss, _, _, _) ident val = do
112+ il <- valueToIL val
113+ pure $ AST.Function Nothing (Just $ moduleIdentToIL ident) [] (AST.Block Nothing [AST.Return Nothing il])
114+ nonRecToIL RecLetDecl (ss, _, _, _) ident val = do
115+ ilExpr <- valueToIL val
116+ pure $ AST.Assignment Nothing (AST.Var Nothing $ identToIL ident) ilExpr
117+ nonRecToIL _ (ss, _, _, _) ident val = do
118+ il <- valueToIL val
119+ pure $ AST.VariableIntroduction Nothing (identToIL ident) (Just il)
120+
121+ -- | Generate code in the simplified intermediate representation for a variable based on a
122+ -- PureScript identifier.
123+ var :: Ident -> AST
124+ var = AST.Var Nothing . identToIL
125+
126+ accessorString :: PSString -> AST -> AST
127+ accessorString prop = AST.Indexer Nothing (AST.StringLiteral Nothing prop)
128+
129+ -- | Generate code in the simplified intermediate representation for a value or expression.
130+
131+ valueToIL :: Expr Ann -> m AST
132+ valueToIL (Literal (pos, _, _, _) l) = literalToValueIL pos l
133+ valueToIL (Accessor _ prop val) =
134+ accessorString prop <$> valueToIL val
135+ valueToIL (ObjectUpdate _ o ps) = do
136+ obj <- valueToIL o
137+ updates <- mapM (sndM valueToIL) ps
138+ obj' <- freshName'
139+ let objVar = AST.Var Nothing obj'
140+ copy = AST.VariableIntroduction Nothing obj' (Just $ copyDict obj)
141+ assign (k, v) = AST.Assignment Nothing (accessorString k objVar) v
142+ sts = copy : (assign <$> updates) ++ [AST.Return Nothing objVar]
143+ return $ AST.App Nothing (AST.Function Nothing Nothing [] (AST.Block Nothing sts)) []
144+ valueToIL (Abs _ arg val) = do
145+ ret <- valueToIL val
146+ let ilArg = case arg of
147+ UnusedIdent -> []
148+ _ -> [identToIL arg]
149+ return $ AST.Function Nothing Nothing ilArg (AST.Block Nothing [AST.Return Nothing ret])
150+ valueToIL e@App{} = do
151+ let (f, args) = unApp e []
152+ args' <- mapM valueToIL args
153+ fn <- valueToIL f
154+ case f of
155+ Var (_, _, _, Just IsNewtype) _ -> return (head args')
156+ _ -> flip (foldl (\fn a -> AST.App Nothing fn [a])) args' <$> valueToIL f
157+ where
158+ unApp :: Expr Ann -> [Expr Ann] -> (Expr Ann, [Expr Ann])
159+ unApp (App _ val arg) args = unApp val (arg : args)
160+ unApp other args = (other, args)
161+ valueToIL (Var _ ident) = return $ varToIL ident
162+ valueToIL (Case (ss, _, _, _) values binders) = do
163+ vals <- mapM valueToIL values
164+ bindersToIL ss binders vals
165+ valueToIL (Let _ ds val) = do
166+ let recurs = concatMap getNames $ filter isRec ds
167+ recurDs = (\v -> AST.VariableIntroduction Nothing (identToIL v) Nothing) <$> recurs
168+ ds' <- concat <$> mapM (bindToIL LetDecl) ds
169+ ret <- valueToIL val
170+ return $ AST.App Nothing (AST.Function Nothing Nothing [] (AST.Block Nothing (recurDs ++ ds' ++ [AST.Return Nothing ret]))) []
171+ where
172+ isRec :: Bind Ann -> Bool
173+ isRec (Rec _) = True
174+ isRec _ = False
175+ valueToIL (Constructor (_, _, _, Just IsNewtype) _ (ProperName ctor) _) = error "IsNewtype"
176+ valueToIL (Constructor _ _ (ProperName ctor) fields) =
177+ let body = AST.ObjectLiteral Nothing $ (mkString ctor, AST.BooleanLiteral Nothing True) :
178+ ((\field -> (mkString (identToIL field), var field)) `map` fields)
179+ fn = foldr (\f inner -> AST.Function Nothing Nothing [identToIL f] (AST.Block Nothing [AST.Return Nothing inner])) body fields
180+ in return fn
181+
182+
183+ iife :: Text -> [AST] -> AST
184+ iife v exprs = AST.App Nothing (AST.Function Nothing Nothing [] (AST.Block Nothing $ exprs ++ [AST.Return Nothing $ AST.Var Nothing v])) []
185+
186+ literalToValueIL :: SourceSpan -> Literal (Expr Ann) -> m AST
187+ literalToValueIL ss (NumericLiteral (Left i)) = return $ AST.NumericLiteral (Just ss) (Left i)
188+ literalToValueIL ss (NumericLiteral (Right n)) = return $ AST.NumericLiteral (Just ss) (Right n)
189+ literalToValueIL ss (StringLiteral s) = return $ AST.StringLiteral (Just ss) s
190+ literalToValueIL ss (CharLiteral c) = return $ AST.StringLiteral (Just ss) (fromString [c])
191+ literalToValueIL ss (BooleanLiteral b) = return $ AST.BooleanLiteral (Just ss) b
192+ literalToValueIL ss (ArrayLiteral xs) = AST.ArrayLiteral (Just ss) <$> mapM valueToIL xs
193+ literalToValueIL ss (ObjectLiteral ps) = AST.ObjectLiteral (Just ss) <$> mapM (sndM valueToIL) ps
194+
195+ -- | Generate code in the simplified intermediate representation for a reference to a
196+ -- variable.
197+ varToIL :: Qualified Ident -> AST
198+ varToIL (Qualified Nothing ident) = var ident
199+ varToIL qual = qualifiedToIL id qual
200+
201+ -- | Generate code in the simplified intermediate representation for a reference to a
202+ -- variable that may have a qualified name.
203+ qualifiedToIL :: (a -> Ident) -> Qualified a -> AST
204+ qualifiedToIL f (Qualified (Just (ModuleName mn')) a) | mn' == C.prim = AST.Var Nothing . moduleIdentToIL $ f a
205+ qualifiedToIL f (Qualified (Just mn') a) | mn /= mn' = AST.Indexer Nothing (AST.Var Nothing . moduleIdentToIL $ f a) (AST.Var Nothing (moduleNameToIL mn'))
206+ qualifiedToIL f (Qualified _ a) = AST.Indexer Nothing (AST.Var Nothing . moduleIdentToIL $ f a) (AST.Var Nothing "")
207+
208+ -- foreignIdent :: Ident -> AST
209+ -- foreignIdent ident = accessorString (mkString $ runIdent ident) (AST.Var Nothing "$foreign")
210+
211+ -- | Generate code in the simplified intermediate representation for pattern match binders
212+ -- and guards.
213+ bindersToIL :: SourceSpan -> [CaseAlternative Ann] -> [AST] -> m AST
214+ bindersToIL ss binders vals = do
215+ valNames <- replicateM (length vals) freshName'
216+ let assignments = zipWith (AST.VariableIntroduction Nothing) valNames (map Just vals)
217+ ils <- forM binders $ \(CaseAlternative bs result) -> do
218+ ret <- guardsToIL result
219+ go valNames ret bs
220+ return $ AST.App Nothing (AST.Function Nothing Nothing [] (AST.Block Nothing (assignments ++ concat ils ++ [AST.Throw Nothing (AST.StringLiteral Nothing $ mkString failedPatternMessage)])))
221+ []
222+ where
223+ go :: [Text] -> [AST] -> [Binder Ann] -> m [AST]
224+ go _ done [] = return done
225+ go (v:vs) done' (b:bs) = do
226+ done'' <- go vs done' bs
227+ binderToIL v done'' b
228+ go _ _ _ = internalError "Invalid arguments to bindersToIL"
229+
230+ failedPatternMessage :: Text
231+ failedPatternMessage = "Failed pattern match at " <> runModuleName mn <> " " <> displayStartEndPos ss
232+
233+ guardsToIL :: Either [(Guard Ann, Expr Ann)] (Expr Ann) -> m [AST]
234+ guardsToIL (Left gs) = traverse genGuard gs where
235+ genGuard (cond, val) = do
236+ cond' <- valueToIL cond
237+ val' <- valueToIL val
238+ return
239+ (AST.IfElse Nothing (AST.Binary Nothing AST.EqualTo cond' (AST.BooleanLiteral Nothing True))
240+ (AST.Block Nothing [AST.Return Nothing val']) Nothing)
241+
242+ guardsToIL (Right v) = return . AST.Return Nothing <$> valueToIL v
243+
244+ -- | Generate code in the simplified intermediate representation for a pattern match
245+ -- binder.
246+ binderToIL :: Text -> [AST] -> Binder Ann -> m [AST]
247+ binderToIL _ done NullBinder{} = return done
248+ binderToIL varName done (LiteralBinder _ l) =
249+ literalToBinderIL varName done l
250+ binderToIL varName done (VarBinder _ ident) =
251+ return (AST.VariableIntroduction Nothing (identToIL ident) (Just (AST.Var Nothing varName)) : done)
252+ binderToIL varName done (ConstructorBinder (_, _, _, Just IsNewtype) _ _ [b]) =
253+ binderToIL varName done b
254+ binderToIL varName done (ConstructorBinder (_, _, _, Just (IsConstructor ctorType fields)) _ (Qualified _ (ProperName ctor)) bs) = do
255+ il <- go (zip fields bs) done
256+ return $ case ctorType of
257+ ProductType -> il
258+ SumType ->
259+ [AST.IfElse Nothing (AST.InstanceOf Nothing (AST.Var Nothing varName) (AST.StringLiteral Nothing (mkString ctor)))
260+ (AST.Block Nothing il)
261+ Nothing]
262+ where
263+ go :: [(Ident, Binder Ann)] -> [AST] -> m [AST]
264+ go [] done' = return done'
265+ go ((field, binder) : remain) done' = do
266+ argVar <- freshName'
267+ done'' <- go remain done'
268+ il <- binderToIL argVar done'' binder
269+ return (AST.VariableIntroduction Nothing argVar (Just $ accessorString (mkString $ identToIL field) $ AST.Var Nothing varName) : il)
270+
271+ binderToIL _ _ ConstructorBinder{} =
272+ internalError "binderToIL: Invalid ConstructorBinder in binderToIL"
273+ binderToIL varName done (NamedBinder _ ident binder) = do
274+ il <- binderToIL varName done binder
275+ return (AST.VariableIntroduction Nothing (identToIL ident) (Just (AST.Var Nothing varName)) : il)
276+
277+ literalToBinderIL :: Text -> [AST] -> Literal (Binder Ann) -> m [AST]
278+ literalToBinderIL varName done (NumericLiteral num) =
279+ return [AST.IfElse Nothing (AST.Binary Nothing AST.EqualTo (AST.Var Nothing varName) (AST.NumericLiteral Nothing num)) (AST.Block Nothing done) Nothing]
280+ literalToBinderIL varName done (CharLiteral c) =
281+ return [AST.IfElse Nothing (AST.Binary Nothing AST.EqualTo (AST.Var Nothing varName) (AST.StringLiteral Nothing (fromString [c]))) (AST.Block Nothing done) Nothing]
282+ literalToBinderIL varName done (StringLiteral str) =
283+ return [AST.IfElse Nothing (AST.Binary Nothing AST.EqualTo (AST.Var Nothing varName) (AST.StringLiteral Nothing str)) (AST.Block Nothing done) Nothing]
284+ literalToBinderIL varName done (BooleanLiteral True) =
285+ return [AST.IfElse Nothing (AST.Binary Nothing AST.EqualTo (AST.Var Nothing varName) (AST.BooleanLiteral Nothing True)) (AST.Block Nothing done) Nothing]
286+ literalToBinderIL varName done (BooleanLiteral False) =
287+ return [AST.IfElse Nothing (AST.Binary Nothing AST.EqualTo (AST.Var Nothing varName) (AST.BooleanLiteral Nothing False)) (AST.Block Nothing done) Nothing]
288+ -- return [AST.IfElse Nothing (AST.Unary Nothing AST.Not (AST.Var Nothing varName)) (AST.Block Nothing done) Nothing]
289+ literalToBinderIL varName done (ObjectLiteral bs) = go done bs
290+ where
291+ go :: [AST] -> [(PSString, Binder Ann)] -> m [AST]
292+ go done' [] = return done'
293+ go done' ((prop, binder):bs') = do
294+ propVar <- freshName'
295+ done'' <- go done' bs'
296+ il <- binderToIL propVar done'' binder
297+ return (AST.VariableIntroduction Nothing propVar (Just (accessorString prop (AST.Var Nothing varName))) : il)
298+ literalToBinderIL varName done (ArrayLiteral bs) = do
299+ il <- go done 0 bs
300+ return [AST.IfElse Nothing (AST.Binary Nothing AST.EqualTo
301+ (arrayLength $ AST.Var Nothing varName)
302+ (AST.NumericLiteral Nothing (Left (fromIntegral $ length bs))))
303+ (AST.Block Nothing il) Nothing]
304+ where
305+ go :: [AST] -> Integer -> [Binder Ann] -> m [AST]
306+ go done' _ [] = return done'
307+ go done' index (binder:bs') = do
308+ elVar <- freshName'
309+ done'' <- go done' (index + 1) bs'
310+ il <- binderToIL elVar done'' binder
311+ return (AST.VariableIntroduction Nothing elVar (Just (AST.Indexer Nothing (AST.NumericLiteral Nothing (Left index)) (AST.Var Nothing varName))) : il)
312+
313+emptyAnn :: Ann
314+emptyAnn = (SourceSpan "" (SourcePos 0 0) (SourcePos 0 0), [], Nothing, Nothing)
315+
316+arrayLength :: AST -> AST
317+arrayLength a = AST.App Nothing (AST.Var Nothing arrayLengthFn) [a]
318+-- arrayLength a = AST.Var Nothing (arrayLengthFn <> "(" <> prettyPrintIL1 a <> ")")
319+
320+copyDict :: AST -> AST
321+copyDict a = AST.App Nothing (AST.Var Nothing copyDictFn) [a]
src/CodeGen/IL/Common.hsnew file+196
@@ -0,0 +1,196 @@
1+-- | Common code generation utility functions
2+module CodeGen.IL.Common where
3+
4+import Prelude.Compat
5+
6+import Control.Monad.Supply.Class (MonadSupply, freshName)
7+import Data.Char
8+import Data.Maybe (maybe)
9+import Data.Monoid ((<>))
10+import Data.Text (Text)
11+import qualified Data.Text as T
12+
13+import Language.PureScript.Crash
14+import Language.PureScript.Names
15+
16+import qualified Language.PureScript.Constants as C
17+
18+moduleNameToIL :: ModuleName -> Text
19+moduleNameToIL (ModuleName mn) =
20+ let name = T.replace "." "_" mn
21+ in if nameIsILBuiltIn name then (name <> moduleRenamerMarker) else name
22+
23+moduleNameToIL' :: ModuleName -> Text
24+moduleNameToIL' (ModuleName mn) = T.replace "_" "." mn
25+
26+-- | Convert an 'Ident' into a valid IL identifier:
27+--
28+-- * Alphanumeric characters are kept unmodified.
29+--
30+-- * Reserved IL identifiers are wrapped with '_'.
31+--
32+identToIL :: Ident -> Text
33+identToIL UnusedIdent = unusedName
34+identToIL (Ident "$__unused") = unusedName
35+identToIL (Ident name) | name == C.undefined = undefinedName -- Note: done in Printer.hs too
36+identToIL (Ident name) = properToIL name
37+identToIL (GenIdent _ _) = internalError "GenIdent in identToIL"
38+
39+moduleIdentToIL :: Ident -> Text
40+moduleIdentToIL UnusedIdent = unusedName
41+moduleIdentToIL (Ident name) | name == C.undefined = undefinedName
42+moduleIdentToIL (Ident name) = moduleProperToIL name
43+moduleIdentToIL (GenIdent _ _) = internalError "GenIdent in identToIL"
44+
45+undefinedName :: Text
46+undefinedName = "Undefined"
47+
48+unusedName :: Text
49+unusedName = "_"
50+
51+properToIL :: Text -> Text
52+properToIL name
53+ | nameIsILReserved name = "ˉ" <> name
54+ | otherwise = T.concatMap identCharToText name
55+
56+-- | Attempts to find a human-readable name for a symbol, if none has been specified returns the
57+-- ordinal value.
58+identCharToText :: Char -> Text
59+identCharToText 'ṩ' = "_ṩ"
60+identCharToText c | isAlphaNum c = T.singleton c
61+identCharToText '_' = "_"
62+identCharToText '\'' = "ꞌ" -- lowercase saltillo
63+identCharToText c = error (show (ord c)) -- TODO: should never occur now(?)
64+
65+moduleProperToIL :: Text -> Text
66+moduleProperToIL = T.concatMap identCharToText
67+
68+-- | Checks whether an identifier name is reserved in IL.
69+nameIsILReserved :: Text -> Bool
70+nameIsILReserved name =
71+ name `elem` ilAnyReserved
72+
73+-- | Checks whether a name matches a built-in value in IL.
74+nameIsILBuiltIn :: Text -> Bool
75+nameIsILBuiltIn name =
76+ name `elem`
77+ [ "Any"
78+ , "Apply"
79+ , "Contains"
80+ , "CopyDict"
81+ , "Dict"
82+ , "EffFn"
83+ , "Fn"
84+ , "Foreign"
85+ , "Get"
86+ , "Index"
87+ , "Is"
88+ , "Length"
89+ , "Once"
90+ , "Run"
91+ , "Undefined"
92+ ]
93+
94+ilAnyReserved :: [Text]
95+ilAnyReserved =
96+ concat
97+ [ ilKeywords
98+ , ilLiterals
99+ ]
100+
101+ilKeywords :: [Text]
102+ilKeywords =
103+ [ "break"
104+ , "case"
105+ , "chan"
106+ , "const"
107+ , "continue"
108+ , "default"
109+ , "defer"
110+ , "else"
111+ , "fallthrough"
112+ , "for"
113+ , "func"
114+ , "go"
115+ , "goto"
116+ , "if"
117+ , "import"
118+ , "interface"
119+ , "map"
120+ , "package"
121+ , "range"
122+ , "return"
123+ , "select"
124+ , "struct"
125+ , "switch"
126+ , "type"
127+ , "var"
128+ ]
129+
130+ilLiterals :: [Text]
131+ilLiterals =
132+ [ "init"
133+ , "nil"
134+ , "int"
135+ , "int8"
136+ , "int16"
137+ , "int32"
138+ , "int64"
139+ , "uint"
140+ , "uint8"
141+ , "uint16"
142+ , "uint32"
143+ , "uint64"
144+ , "uintptr"
145+ , "float32"
146+ , "float64"
147+ , "complex64"
148+ , "complex128"
149+ , "byte"
150+ , "rune"
151+ , "string"
152+ ]
153+
154+withPrefix :: Text -> Text
155+withPrefix s = "Ꞌ" <> s -- uppercase saltillo
156+
157+anyType :: Text
158+anyType = "Any"
159+
160+dictType :: Text
161+dictType = "Dict"
162+
163+arrayType :: Text
164+arrayType = "[]" <> anyType
165+
166+uncurriedFnType :: Int -> Text
167+uncurriedFnType i = "Fn" <> (T.pack . show $ i)
168+
169+int :: Text
170+int = "int"
171+
172+float :: Text
173+float = "float64"
174+
175+bool :: Text
176+bool = "bool"
177+
178+string :: Text
179+string = "string"
180+
181+arrayLengthFn :: Text
182+arrayLengthFn = "Length"
183+
184+indexFn :: Text
185+indexFn = "Index"
186+
187+copyDictFn :: Text
188+copyDictFn = "CopyDict"
189+
190+freshName' :: MonadSupply m => m Text
191+freshName' = do
192+ name <- freshName
193+ return $ T.replace "$" "ṩ" name
194+
195+moduleRenamerMarker :: Text
196+moduleRenamerMarker = "__"
src/CodeGen/IL/Optimizer.hsnew file+81
@@ -0,0 +1,81 @@
1+-- | This module optimizes code in the intermediate representation.
2+module CodeGen.IL.Optimizer (optimize) where
3+
4+import Prelude.Compat
5+
6+import Control.Monad.Supply.Class (MonadSupply)
7+import Data.Text (Text)
8+import Language.PureScript.CoreImp.AST
9+import Language.PureScript.CoreImp.Optimizer.Blocks
10+import Language.PureScript.CoreImp.Optimizer.Common hiding (isDict)
11+import Language.PureScript.CoreImp.Optimizer.Inliner (etaConvert, evaluateIifes, inlineVariables, unThunk)
12+import Language.PureScript.CoreImp.Optimizer.Unused
13+
14+import CodeGen.IL.Common (unusedName)
15+import CodeGen.IL.Optimizer.Inliner
16+import CodeGen.IL.Optimizer.MagicDo
17+import CodeGen.IL.Optimizer.TCO
18+
19+import qualified Language.PureScript.Constants as C
20+
21+-- | Apply a series of optimizer passes to simplified IL code
22+optimize :: MonadSupply m => AST -> AST -> m AST
23+optimize mn il = do
24+ il' <- untilFixedPoint (inlineFnComposition . inlineUnsafeCoerce . inlineUnsafePartial . tidyUp) il
25+ il'' <- untilFixedPoint (return . ignoreUnusedResults . inlineCommonValues . inlineCommonOperators . tidyUp) . tco mn . inlineST
26+ =<< untilFixedPoint (return . magicDoST)
27+ =<< untilFixedPoint (return . magicDoEff)
28+ =<< untilFixedPoint (return . magicDoEffect) il'
29+ untilFixedPoint (return . collapseVarDeclarations) il''
30+ where
31+ tidyUp :: AST -> AST
32+ tidyUp = applyAll
33+ [ collapseNestedBlocks
34+ , collapseNestedIfs
35+ , collapseIfChecks
36+ , removeCodeAfterReturnStatements
37+ , unThunk
38+ , etaConvert
39+ , evaluateIifes
40+ , inlineVariables
41+ ]
42+
43+untilFixedPoint :: (Monad m, Eq a) => (a -> m a) -> a -> m a
44+untilFixedPoint f = go
45+ where
46+ go a = do
47+ a' <- f a
48+ if a' == a then return a' else go a'
49+
50+collapseIfChecks :: AST -> AST
51+collapseIfChecks = everywhere collapse where
52+ collapse :: AST -> AST
53+ collapse (IfElse _ (Binary _ EqualTo (BooleanLiteral _ True) (BooleanLiteral _ True)) (Block _ [exprs]) _) = exprs
54+ collapse (IfElse _ (Binary _ EqualTo (Indexer _ (Var _ prop) (Var _ val)) (BooleanLiteral _ True)) (Block _ [exprs]) _)
55+ | prop == "otherwise" && val == "Data_Boolean" = exprs
56+ collapse exprs = exprs
57+
58+collapseVarDeclarations :: AST -> AST
59+collapseVarDeclarations = everywhere collapse where
60+ collapse :: AST -> AST
61+ collapse (Block ss sts) = Block ss (go Nothing sts)
62+ collapse s = s
63+
64+ go :: Maybe Text -> [AST] -> [AST]
65+ go _ [] = []
66+ go Nothing (decl@(VariableIntroduction _ var (Just _)) : sts) = decl : go (Just var) (go Nothing sts)
67+ go (Just var') ((VariableIntroduction ss var (Just val)) : sts)
68+ | var == var' = (Assignment ss (Var Nothing var) val) : go (Just var') sts
69+ go var' (s:sts) = s : go var' sts
70+
71+ignoreUnusedResults :: AST -> AST
72+ignoreUnusedResults = everywhere $ removeFromBlock go
73+ where
74+ go :: [AST] -> [AST]
75+ go [] = []
76+ go (VariableIntroduction ss var (Just s) : sts)
77+ | not $ any (everything (||) (isUsed var)) sts = sts'
78+ where
79+ sts' | App{} <- s = s : (go sts)
80+ | otherwise = go sts
81+ go (s:sts) = s : go sts
src/CodeGen/IL/Optimizer/Common.hsnew file+18
@@ -0,0 +1,18 @@
1+-- | Common functions used by the various optimizer phases
2+module CodeGen.IL.Optimizer.Common where
3+
4+import Prelude.Compat
5+
6+import Data.Text (Text)
7+
8+import Language.PureScript.CoreImp.AST
9+import Language.PureScript.PSString (PSString, decodeString)
10+
11+isDict :: (Text, PSString) -> AST -> Bool
12+isDict (moduleName, dictName) (Indexer _ (Var _ x) (Var _ y)) =
13+ Just x == decodeString dictName && y == moduleName
14+isDict _ _ = False
15+
16+isDict' :: [(Text, PSString)] -> AST -> Bool
17+isDict' xs il = any (`isDict` il) xs
18+
src/CodeGen/IL/Optimizer/Inliner.hsnew file+435
@@ -0,0 +1,435 @@
1+-- | This module performs basic inlining of known functions
2+module CodeGen.IL.Optimizer.Inliner
3+ ( inlineCommonValues
4+ , inlineCommonOperators
5+ , inlineFnComposition
6+ , inlineUnsafeCoerce
7+ , inlineUnsafePartial
8+ ) where
9+
10+import Prelude.Compat
11+
12+import Control.Monad.Supply.Class (MonadSupply)
13+
14+import Data.Either (rights)
15+import Data.Maybe (fromMaybe)
16+import Data.String (IsString, fromString)
17+import Data.Text (Text)
18+import qualified Data.Text as T
19+
20+import Language.PureScript.PSString (PSString, decodeString, mkString)
21+import Language.PureScript.CoreImp.AST
22+import Language.PureScript.CoreImp.Optimizer.Common hiding (isDict, isDict')
23+import Language.PureScript.AST (SourceSpan(..))
24+import qualified Language.PureScript.Constants as C
25+
26+import CodeGen.IL.Common
27+import CodeGen.IL.Optimizer.Common
28+
29+-- TODO: Potential bug:
30+-- Shouldn't just inline this case: { var x = 0; x.toFixed(10); }
31+-- Needs to be: { 0..toFixed(10); }
32+-- Probably needs to be fixed in pretty-printer instead.
33+shouldInline :: AST -> Bool
34+shouldInline (Var _ _) = True
35+shouldInline (NumericLiteral _ _) = True
36+shouldInline (StringLiteral _ _) = True
37+shouldInline (BooleanLiteral _ _) = True
38+shouldInline (Indexer _ index val) = shouldInline index && shouldInline val
39+shouldInline _ = False
40+
41+inlineCommonValues :: AST -> AST
42+inlineCommonValues = everywhere convert
43+ where
44+ convert :: AST -> AST
45+ convert (App ss fn [dict])
46+ | isDict' [semiringNumber, semiringInt] dict && isDict fnZero fn = NumericLiteral ss (Left 0)
47+ | isDict' [semiringNumber, semiringInt] dict && isDict fnOne fn = NumericLiteral ss (Left 1)
48+ | isDict boundedBoolean dict && isDict fnBottom fn = BooleanLiteral ss False
49+ | isDict boundedBoolean dict && isDict fnTop fn = BooleanLiteral ss True
50+ convert (App ss (App _ fn [dict]) [x])
51+ | isDict ringInt dict && isDict fnNegate fn = Unary ss Negate (unbox x $ snd ringInt)
52+ convert (App ss (App _ (App _ fn [dict]) [x]) [y])
53+ | isDict semiringInt dict && isDict fnAdd fn = intOp ss Add semiringInt x y
54+ | isDict semiringInt dict && isDict fnMultiply fn = intOp ss Multiply semiringInt x y
55+ | isDict ringInt dict && isDict fnSubtract fn = intOp ss Subtract ringInt x y
56+ convert other = other
57+ fnZero = (C.dataSemiring, C.zero)
58+ fnOne = (C.dataSemiring, C.one)
59+ fnBottom = (C.dataBounded, C.bottom)
60+ fnTop = (C.dataBounded, C.top)
61+ fnAdd = (C.dataSemiring, C.add)
62+ fnMultiply = (C.dataSemiring, C.mul)
63+ fnSubtract = (C.dataRing, C.sub)
64+ fnNegate = (C.dataRing, C.negate)
65+ intOp ss op (_, d) x y = Binary ss op (unbox x d) (unbox y d)
66+
67+inlineCommonOperators :: AST -> AST
68+inlineCommonOperators = everywhereTopDown $ applyAll $
69+ [ binary semiringNumber opAdd Add
70+ , binary semiringNumber opMul Multiply
71+
72+ , binary ringNumber opSub Subtract
73+ , unary ringNumber opNegate Negate
74+
75+ , binary euclideanRingNumber opDiv Divide
76+
77+ -- , binary eqNumber opEq EqualTo
78+ -- , binary eqNumber opNotEq NotEqualTo
79+ , binary eqInt opEq EqualTo
80+ , binary eqInt opNotEq NotEqualTo
81+ , binary eqString opEq EqualTo
82+ , binary eqString opNotEq NotEqualTo
83+ , binary eqChar opEq EqualTo
84+ , binary eqChar opNotEq NotEqualTo
85+ , binary eqBoolean opEq EqualTo
86+ , binary eqBoolean opNotEq NotEqualTo
87+
88+ , binary ordBoolean opLessThan LessThan
89+ , binary ordBoolean opLessThanOrEq LessThanOrEqualTo
90+ , binary ordBoolean opGreaterThan GreaterThan
91+ , binary ordBoolean opGreaterThanOrEq GreaterThanOrEqualTo
92+ , binary ordChar opLessThan LessThan
93+ , binary ordChar opLessThanOrEq LessThanOrEqualTo
94+ , binary ordChar opGreaterThan GreaterThan
95+ , binary ordChar opGreaterThanOrEq GreaterThanOrEqualTo
96+ , binary ordInt opLessThan LessThan
97+ , binary ordInt opLessThanOrEq LessThanOrEqualTo
98+ , binary ordInt opGreaterThan GreaterThan
99+ , binary ordInt opGreaterThanOrEq GreaterThanOrEqualTo
100+ , binary ordNumber opLessThan LessThan
101+ , binary ordNumber opLessThanOrEq LessThanOrEqualTo
102+ , binary ordNumber opGreaterThan GreaterThan
103+ , binary ordNumber opGreaterThanOrEq GreaterThanOrEqualTo
104+ , binary ordString opLessThan LessThan
105+ , binary ordString opLessThanOrEq LessThanOrEqualTo
106+ , binary ordString opGreaterThan GreaterThan
107+ , binary ordString opGreaterThanOrEq GreaterThanOrEqualTo
108+
109+ , binary semigroupString opAppend Add
110+
111+ , binary heytingAlgebraBoolean opConj And
112+ , binary heytingAlgebraBoolean opDisj Or
113+ , unary heytingAlgebraBoolean opNot Not
114+
115+ , binary' C.dataIntBits C.or BitwiseOr
116+ , binary' C.dataIntBits C.and BitwiseAnd
117+ , binary' C.dataIntBits C.xor BitwiseXor
118+ , binary' C.dataIntBits C.shl ShiftLeft
119+ , binary' C.dataIntBits C.shr ShiftRight
120+ , unary' C.dataIntBits C.complement BitwiseNot
121+
122+ , inlineNonClassFunction (isModFn (C.dataFunction, C.apply)) $ \f x -> App Nothing f [x]
123+ , inlineNonClassFunction (isModFn (C.dataFunction, C.applyFlipped)) $ \x f -> App Nothing f [x]
124+ , inlineUnsafeIndex (isModFnWithDict (C.dataArray, C.unsafeIndex)) $ flip (Indexer Nothing)
125+ ] ++
126+ [ fn | i <- [0..10], fn <- [ mkFn i, runFn i ] ] ++
127+ [ fn | i <- [0..10], fn <- [ mkEffFn C.controlMonadEffUncurried C.mkEffFn i, runEffFn C.controlMonadEffUncurried C.runEffFn i ] ] ++
128+ [ fn | i <- [0..10], fn <- [ mkEffFn C.effectUncurried C.mkEffectFn i, runEffFn C.effectUncurried C.runEffectFn i ] ]
129+ where
130+ binary :: (Text, PSString) -> (Text, PSString) -> BinaryOperator -> AST -> AST
131+ binary dict@(_, d) fns op = convert where
132+ convert :: AST -> AST
133+ convert (App ss (App _ (App _ fn [dict']) [x]) [y])
134+ | isDict dict dict' && isDict fns fn = Binary ss op (unbox x d) (unbox y d)
135+ convert other = other
136+ binary' :: Text -> PSString -> BinaryOperator -> AST -> AST
137+ binary' moduleName opString op = convert where
138+ convert :: AST -> AST
139+ convert (App ss (App _ fn [x]) [y]) | isDict (moduleName, opString) fn = Binary ss op (unbox x mn) (unbox y mn)
140+ convert other = other
141+ mn :: PSString
142+ mn = mkString moduleName
143+ unary :: (Text, PSString) -> (Text, PSString) -> UnaryOperator -> AST -> AST
144+ unary dicts@(_, d) fns op = convert where
145+ convert :: AST -> AST
146+ convert (App ss (App _ fn [dict']) [x]) | isDict dicts dict' && isDict fns fn = Unary ss op (unbox x d)
147+ convert other = other
148+ unary' :: Text -> PSString -> UnaryOperator -> AST -> AST
149+ unary' moduleName fnName op = convert where
150+ convert :: AST -> AST
151+ convert (App ss fn [x]) | isDict (moduleName, fnName) fn = Unary ss op (unbox x fnName)
152+ convert other = other
153+
154+ mkFn :: Int -> AST -> AST
155+ mkFn = mkFn' C.dataFunctionUncurried C.mkFn $ \ss1 ss2 ss3 args il ->
156+ Function ss1 Nothing args (Block ss2 [Return ss3 il])
157+
158+ mkEffFn :: Text -> Text -> Int -> AST -> AST
159+ mkEffFn modName fnName = mkFn' modName fnName $ \ss1 ss2 ss3 args il ->
160+ Function ss1 Nothing args (Block ss2 [Return ss3 (App ss3 il [])])
161+
162+ mkFn' :: Text -> Text -> (Maybe SourceSpan -> Maybe SourceSpan -> Maybe SourceSpan -> [Text] -> AST -> AST) -> Int -> AST -> AST
163+ mkFn' modName fnName res 0 = convert where
164+ convert :: AST -> AST
165+ convert (App _ mkFnN [Function s1 Nothing [_] (Block s2 [Return s3 il])]) | isNFn modName fnName 0 mkFnN =
166+ res s1 s2 s3 [] il
167+ convert other = other
168+ mkFn' modName fnName res n = convert where
169+ convert :: AST -> AST
170+ convert orig@(App ss mkFnN [fn]) | isNFn modName fnName n mkFnN =
171+ case collectArgs n [] fn of
172+ Just (args, [Return ss' ret]) -> res ss ss ss' args ret
173+ _ -> orig
174+ convert other = other
175+ collectArgs :: Int -> [Text] -> AST -> Maybe ([Text], [AST])
176+ collectArgs 1 acc (Function _ Nothing [oneArg] (Block _ il)) | length acc == n - 1 = Just (reverse (oneArg : acc), il)
177+ collectArgs m acc (Function _ Nothing [oneArg] (Block _ [Return _ ret])) = collectArgs (m - 1) (oneArg : acc) ret
178+ collectArgs _ _ _ = Nothing
179+
180+ isNFn :: Text -> Text -> Int -> AST -> Bool
181+ isNFn expectMod prefix n (Indexer _ (Var _ name) (Var _ modName)) | modName == expectMod =
182+ name == fromString (T.unpack prefix <> show n)
183+ isNFn _ _ _ _ = False
184+
185+ runFn :: Int -> AST -> AST
186+ runFn = runFn' C.dataFunctionUncurried C.runFn (\ss f args ->
187+ let len = length args
188+ typ = mkString $ uncurriedFnType len in
189+ if len > 0
190+ then App ss (App Nothing (StringLiteral Nothing typ) [f]) args
191+ else App ss f args)
192+ runEffFn :: Text -> Text -> Int -> AST -> AST
193+ runEffFn modName fnName = runFn' modName fnName $ \ss fn acc ->
194+ let typ = mkString . uncurriedFnType $ length acc in
195+ Function ss Nothing [] (Block ss [Return ss (App ss (App Nothing (StringLiteral Nothing typ) [fn]) acc)])
196+
197+ runFn' :: Text -> Text -> (Maybe SourceSpan -> AST -> [AST] -> AST) -> Int -> AST -> AST
198+ runFn' modName runFnName res n = convert where
199+ convert :: AST -> AST
200+ convert il = fromMaybe il $ go n [] il
201+
202+ go :: Int -> [AST] -> AST -> Maybe AST
203+ go 0 acc (App ss runFnN [fn]) | isNFn modName runFnName n runFnN && length acc == n =
204+ Just $ res ss fn acc
205+ go m acc (App _ lhs [arg]) = go (m - 1) (arg : acc) lhs
206+ go _ _ _ = Nothing
207+
208+ inlineNonClassFunction :: (AST -> Bool) -> (AST -> AST -> AST) -> AST -> AST
209+ inlineNonClassFunction p f = convert where
210+ convert :: AST -> AST
211+ convert (App _ (App _ op' [x]) [y]) | p op' = f x y
212+ convert other = other
213+
214+ inlineUnsafeIndex :: (AST -> Bool) -> (AST -> AST -> AST) -> AST -> AST
215+ inlineUnsafeIndex p _ = convert where
216+ convert :: AST -> AST
217+ convert (App _ (App ss op' [x]) [y@NumericLiteral{}])
218+ | p op' = Indexer ss y x
219+ convert (App _ (App ss op' [x]) [y])
220+ | p op' = App ss (Var Nothing indexFn) [x, y]
221+ convert other = other
222+
223+ isModFn :: (Text, PSString) -> AST -> Bool
224+ isModFn (m, op) (Indexer _ (Var _ op') (Var _ m')) =
225+ m == m' && decodeString op == Just op'
226+ isModFn _ _ = False
227+
228+ isModFnWithDict :: (Text, PSString) -> AST -> Bool
229+ isModFnWithDict (m, op) (App _ (Indexer _ (Var _ op') (Var _ m')) [Var _ _]) =
230+ m == m' && decodeString op == Just op'
231+ isModFnWithDict _ _ = False
232+
233+-- (f <<< g $ x) = f (g x)
234+-- (f <<< g) = \x -> f (g x)
235+inlineFnComposition :: forall m. MonadSupply m => AST -> m AST
236+inlineFnComposition = everywhereTopDownM convert where
237+ convert :: AST -> m AST
238+ convert (App s1 (App s2 (App _ (App _ fn [dict']) [x]) [y]) [z])
239+ | isFnCompose dict' fn = return $ App s1 x [App s2 y [z]]
240+ | isFnComposeFlipped dict' fn = return $ App s2 y [App s1 x [z]]
241+ convert app@(App ss (App _ (App _ fn [dict']) _) _)
242+ | isFnCompose dict' fn || isFnComposeFlipped dict' fn = mkApps ss <$> goApps app <*> freshName'
243+ convert other = return other
244+
245+ mkApps :: Maybe SourceSpan -> [Either AST (Text, AST)] -> Text -> AST
246+ mkApps ss fns a = App ss (Function ss Nothing [] (Block ss $ vars <> [Return Nothing comp])) []
247+ where
248+ vars = uncurry (VariableIntroduction ss) . fmap Just <$> rights fns
249+ comp = Function ss Nothing [a] (Block ss [Return Nothing apps])
250+ apps = foldr (\fn acc -> App ss (mkApp fn) [acc]) (Var ss a) fns
251+
252+ mkApp :: Either AST (Text, AST) -> AST
253+ mkApp = either id $ \(name, arg) -> Var (getSourceSpan arg) name
254+
255+ goApps :: AST -> m [Either AST (Text, AST)]
256+ goApps (App _ (App _ (App _ fn [dict']) [x]) [y])
257+ | isFnCompose dict' fn = mappend <$> goApps x <*> goApps y
258+ | isFnComposeFlipped dict' fn = mappend <$> goApps y <*> goApps x
259+ goApps app@(App {}) = pure . Right . (,app) <$> freshName'
260+ goApps other = pure [Left other]
261+
262+ isFnCompose :: AST -> AST -> Bool
263+ isFnCompose dict' fn = isDict semigroupoidFn dict' && isDict fnCompose fn
264+
265+ isFnComposeFlipped :: AST -> AST -> Bool
266+ isFnComposeFlipped dict' fn = isDict semigroupoidFn dict' && isDict fnComposeFlipped fn
267+
268+ fnCompose :: forall a b. (IsString a, IsString b) => (a, b)
269+ fnCompose = (C.controlSemigroupoid, C.compose)
270+
271+ fnComposeFlipped :: forall a b. (IsString a, IsString b) => (a, b)
272+ fnComposeFlipped = (C.controlSemigroupoid, C.composeFlipped)
273+
274+inlineUnsafeCoerce :: AST -> AST
275+inlineUnsafeCoerce = everywhereTopDown convert where
276+ convert (App _ (Indexer _ (Var _ unsafeCoerceFn) (Var _ unsafeCoerce)) [ comp ])
277+ | unsafeCoerceFn == C.unsafeCoerceFn && unsafeCoerce == C.unsafeCoerce
278+ = comp
279+ convert other = other
280+
281+inlineUnsafePartial :: AST -> AST
282+inlineUnsafePartial = everywhereTopDown convert where
283+ convert (App ss fn [ comp ])
284+ | isDict fnUnsafePartial fn
285+ = App ss comp []
286+ where
287+ fnUnsafePartial :: forall a b. (IsString a, IsString b) => (a, b)
288+ fnUnsafePartial = (C.partialUnsafe, C.unsafePartial)
289+ convert other = other
290+
291+semiringNumber :: forall a b. (IsString a, IsString b) => (a, b)
292+semiringNumber = (C.dataSemiring, C.semiringNumber)
293+
294+semiringInt :: forall a b. (IsString a, IsString b) => (a, b)
295+semiringInt = (C.dataSemiring, C.semiringInt)
296+
297+ringNumber :: forall a b. (IsString a, IsString b) => (a, b)
298+ringNumber = (C.dataRing, C.ringNumber)
299+
300+ringInt :: forall a b. (IsString a, IsString b) => (a, b)
301+ringInt = (C.dataRing, C.ringInt)
302+
303+euclideanRingNumber :: forall a b. (IsString a, IsString b) => (a, b)
304+euclideanRingNumber = (C.dataEuclideanRing, C.euclideanRingNumber)
305+
306+-- eqNumber :: forall a b. (IsString a, IsString b) => (a, b)
307+-- eqNumber = (C.dataEq, C.eqNumber)
308+
309+eqInt :: forall a b. (IsString a, IsString b) => (a, b)
310+eqInt = (C.dataEq, C.eqInt)
311+
312+eqString :: forall a b. (IsString a, IsString b) => (a, b)
313+eqString = (C.dataEq, C.eqString)
314+
315+eqChar :: forall a b. (IsString a, IsString b) => (a, b)
316+eqChar = (C.dataEq, C.eqChar)
317+
318+eqBoolean :: forall a b. (IsString a, IsString b) => (a, b)
319+eqBoolean = (C.dataEq, C.eqBoolean)
320+
321+ordBoolean :: forall a b. (IsString a, IsString b) => (a, b)
322+ordBoolean = (C.dataOrd, C.ordBoolean)
323+
324+ordNumber :: forall a b. (IsString a, IsString b) => (a, b)
325+ordNumber = (C.dataOrd, C.ordNumber)
326+
327+ordInt :: forall a b. (IsString a, IsString b) => (a, b)
328+ordInt = (C.dataOrd, C.ordInt)
329+
330+ordString :: forall a b. (IsString a, IsString b) => (a, b)
331+ordString = (C.dataOrd, C.ordString)
332+
333+ordChar :: forall a b. (IsString a, IsString b) => (a, b)
334+ordChar = (C.dataOrd, C.ordChar)
335+
336+semigroupString :: forall a b. (IsString a, IsString b) => (a, b)
337+semigroupString = (C.dataSemigroup, C.semigroupString)
338+
339+boundedBoolean :: forall a b. (IsString a, IsString b) => (a, b)
340+boundedBoolean = (C.dataBounded, C.boundedBoolean)
341+
342+heytingAlgebraBoolean :: forall a b. (IsString a, IsString b) => (a, b)
343+heytingAlgebraBoolean = (C.dataHeytingAlgebra, C.heytingAlgebraBoolean)
344+
345+semigroupoidFn :: forall a b. (IsString a, IsString b) => (a, b)
346+semigroupoidFn = (C.controlSemigroupoid, C.semigroupoidFn)
347+
348+opAdd :: forall a b. (IsString a, IsString b) => (a, b)
349+opAdd = (C.dataSemiring, C.add)
350+
351+opMul :: forall a b. (IsString a, IsString b) => (a, b)
352+opMul = (C.dataSemiring, C.mul)
353+
354+opEq :: forall a b. (IsString a, IsString b) => (a, b)
355+opEq = (C.dataEq, C.eq)
356+
357+opNotEq :: forall a b. (IsString a, IsString b) => (a, b)
358+opNotEq = (C.dataEq, C.notEq)
359+
360+opLessThan :: forall a b. (IsString a, IsString b) => (a, b)
361+opLessThan = (C.dataOrd, C.lessThan)
362+
363+opLessThanOrEq :: forall a b. (IsString a, IsString b) => (a, b)
364+opLessThanOrEq = (C.dataOrd, C.lessThanOrEq)
365+
366+opGreaterThan :: forall a b. (IsString a, IsString b) => (a, b)
367+opGreaterThan = (C.dataOrd, C.greaterThan)
368+
369+opGreaterThanOrEq :: forall a b. (IsString a, IsString b) => (a, b)
370+opGreaterThanOrEq = (C.dataOrd, C.greaterThanOrEq)
371+
372+opAppend :: forall a b. (IsString a, IsString b) => (a, b)
373+opAppend = (C.dataSemigroup, C.append)
374+
375+opSub :: forall a b. (IsString a, IsString b) => (a, b)
376+opSub = (C.dataRing, C.sub)
377+
378+opNegate :: forall a b. (IsString a, IsString b) => (a, b)
379+opNegate = (C.dataRing, C.negate)
380+
381+opDiv :: forall a b. (IsString a, IsString b) => (a, b)
382+opDiv = (C.dataEuclideanRing, C.div)
383+
384+opConj :: forall a b. (IsString a, IsString b) => (a, b)
385+opConj = (C.dataHeytingAlgebra, C.conj)
386+
387+opDisj :: forall a b. (IsString a, IsString b) => (a, b)
388+opDisj = (C.dataHeytingAlgebra, C.disj)
389+
390+opNot :: forall a b. (IsString a, IsString b) => (a, b)
391+opNot = (C.dataHeytingAlgebra, C.not)
392+
393+unbox :: AST -> PSString -> AST
394+unbox e d = select . inlineCommonValues $ inlineCommonOperators e
395+ where
396+ select :: AST -> AST
397+ select e' =
398+ case e' of
399+ Var{} -> unbox' e'
400+ App{} -> unbox' e'
401+ Indexer{} -> unbox' e'
402+ _ -> e'
403+ unbox' :: AST -> AST
404+ unbox' e' = maybe e' (\t -> App Nothing (StringLiteral Nothing t) [e']) $ unboxType d
405+
406+unboxType :: PSString -> Maybe PSString
407+unboxType s = do
408+ t <- decodeString s
409+ t' <- unboxType' t
410+ return $ mkString t'
411+ where
412+ unboxType' :: Text -> Maybe Text
413+ unboxType' t
414+ | t == C.eqInt ||
415+ t == C.semiringInt ||
416+ t == C.ringInt ||
417+ t == C.ordInt ||
418+ t == C.dataIntBits
419+ = Just int
420+ | t == C.semiringNumber ||
421+ t == C.ringNumber ||
422+ t == C.ordNumber ||
423+ t == C.euclideanRingNumber
424+ = Just float
425+ | t == C.eqBoolean ||
426+ t == C.ordBoolean ||
427+ t == C.heytingAlgebraBoolean
428+ = Just bool
429+ | t == C.eqChar ||
430+ t == C.eqString ||
431+ t == C.ordChar ||
432+ t == C.ordString ||
433+ t == C.semigroupString
434+ = Just string
435+ | otherwise = Nothing
src/CodeGen/IL/Optimizer/MagicDo.hsnew file+146
@@ -0,0 +1,146 @@
1+-- | This module implements the "Magic Do" optimization, which inlines calls to return
2+-- and bind for the Eff monad, as well as some of its actions.
3+module CodeGen.IL.Optimizer.MagicDo (magicDoEffect, magicDoEff, magicDoST, inlineST) where
4+
5+import Prelude.Compat
6+import Protolude (ordNub)
7+
8+import Data.Maybe (fromJust, isJust)
9+import Data.Text (Text)
10+
11+import Language.PureScript.CoreImp.AST
12+import Language.PureScript.CoreImp.Optimizer.Common hiding (isDict)
13+import Language.PureScript.PSString (PSString, decodeString, mkString)
14+import qualified Language.PureScript.Constants as C
15+
16+import CodeGen.IL.Common (undefinedName, unusedName)
17+import CodeGen.IL.Optimizer.Common
18+
19+-- | Inline type class dictionaries for >>= and return for the Eff monad
20+--
21+-- E.g.
22+--
23+-- Prelude[">>="](dict)(m1)(function(x) {
24+-- return ...;
25+-- })
26+--
27+-- becomes
28+--
29+-- function __do {
30+-- var x = m1();
31+-- ...
32+-- }
33+magicDoEff :: AST -> AST
34+magicDoEff = magicDo C.eff C.effDictionaries
35+
36+magicDoEffect :: AST -> AST
37+magicDoEffect = magicDo C.effect C.effectDictionaries
38+
39+magicDoST :: AST -> AST
40+magicDoST = magicDo C.st C.stDictionaries
41+
42+magicDo :: Text -> C.EffectDictionaries -> AST -> AST
43+magicDo effectModule C.EffectDictionaries{..} = everywhereTopDown convert
44+ where
45+ -- Desugar monomorphic calls to >>= and return for the Eff monad
46+ convert :: AST -> AST
47+ -- Desugar pure
48+ convert (App _ (App _ pure' [val]) []) | isPure pure' = val
49+ -- Desugar discard
50+ convert (App _ (App _ bind [m]) [Function s1 Nothing [unused] (Block s2 il)]) | isDiscard bind && unused == unusedName =
51+ Function s1 Nothing [] $ Block s2 (App s2 m [] : map applyReturns il )
52+ -- Desugar bind
53+ convert (App _ (App _ bind [m]) [Function s1 Nothing [arg] (Block s2 il)]) | isBind bind =
54+ Function s1 Nothing [] $ Block s2 (VariableIntroduction s2 arg (Just (App s2 m [])) : map applyReturns il)
55+ -- Desugar untilE
56+ convert (App s1 (App _ f [arg]) []) | isEffFunc edUntil f =
57+ App s1 (Function s1 Nothing [] (Block s1 [ While s1 (Unary s1 Not (App s1 arg [])) (Block s1 []), Return s1 $ ObjectLiteral s1 []])) []
58+ -- Desugar whileE
59+ convert (App _ (App _ (App s1 f [arg1]) [arg2]) []) | isEffFunc edWhile f =
60+ App s1 (Function s1 Nothing [] (Block s1 [ While s1 (App s1 arg1 []) (Block s1 [ App s1 arg2 [] ]), Return s1 $ ObjectLiteral s1 []])) []
61+ -- -- Inline __do returns
62+ -- convert (Return _ (App _ (Function _ (Just ident) [] body) [])) | ident == fnName = body
63+ -- Inline double applications
64+ convert (App _ (App s1 (Function s2 Nothing [] (Block ss body)) []) []) =
65+ App s1 (Function s2 Nothing [] (Block ss (applyReturns `fmap` body))) []
66+ convert other = other
67+ -- Check if an expression represents a monomorphic call to >>= for the Eff monad
68+ isBind (App _ fn [dict]) | isDict (effectModule, edBindDict) dict && isBindPoly fn = True
69+ isBind _ = False
70+ -- Check if an expression represents a call to @discard@
71+ isDiscard (App _ (App _ fn [dict1]) [dict2])
72+ | isDict (C.controlBind, C.discardUnitDictionary) dict1 &&
73+ isDict (effectModule, edBindDict) dict2 &&
74+ isDiscardPoly fn = True
75+ isDiscard _ = False
76+
77+ -- Check if an expression represents a monomorphic call to pure or return for the Eff applicative
78+ isPure (App _ fn [dict]) | isDict (effectModule, edApplicativeDict) dict && isPurePoly fn = True
79+ isPure _ = False
80+ -- Check if an expression represents the polymorphic >>= function
81+ isBindPoly = isDict (C.controlBind, C.bind)
82+ -- Check if an expression represents the polymorphic pure function
83+ isPurePoly = isDict (C.controlApplicative, C.pure')
84+ -- Check if an expression represents the polymorphic discard function
85+ isDiscardPoly = isDict (C.controlBind, C.discard)
86+ -- Check if an expression represents a function in the Effect module
87+ isEffFunc name (Indexer _ (StringLiteral _ name') (Var _ eff)) = eff == effectModule && name == name'
88+ isEffFunc _ _ = False
89+
90+ applyReturns :: AST -> AST
91+ applyReturns (Return ss ret) = Return ss (App ss ret [])
92+ applyReturns (Block ss ils) = Block ss (map applyReturns ils)
93+ applyReturns (While ss cond il) = While ss cond (applyReturns il)
94+ applyReturns (For ss v lo hi il) = For ss v lo hi (applyReturns il)
95+ applyReturns (ForIn ss v xs il) = ForIn ss v xs (applyReturns il)
96+ applyReturns (IfElse ss cond t f) = IfElse ss cond (applyReturns t) (applyReturns `fmap` f)
97+ applyReturns other = other
98+
99+-- | Inline functions in the ST module
100+inlineST :: AST -> AST
101+inlineST = everywhere convertBlock
102+ where
103+ -- Look for runST blocks and inline the STRefs there.
104+ -- If all STRefs are used in the scope of the same runST, only using { read, write, modify }STRef then
105+ -- we can be more aggressive about inlining, and actually turn STRefs into local variables.
106+ convertBlock (App s1 f [arg]) | isSTFunc C.runST f =
107+ let refs = ordNub . findSTRefsIn $ arg
108+ usages = findAllSTUsagesIn arg
109+ allUsagesAreLocalVars = all (\u -> let v = toVar u in isJust v && fromJust v `elem` refs) usages
110+ localVarsDoNotEscape = all (\r -> length (r `appearingIn` arg) == length (filter (\u -> let v = toVar u in v == Just r) usages)) refs
111+ in App s1 (everywhere (convert (allUsagesAreLocalVars && localVarsDoNotEscape)) arg) []
112+ convertBlock other = other
113+ -- Convert a block in a safe way, preserving object wrappers of references,
114+ -- or in a more aggressive way, turning wrappers into local variables depending on the
115+ -- agg(ressive) parameter.
116+ convert agg (App s1 f [arg]) | isSTFunc C.newSTRef f =
117+ Function s1 Nothing [] (Block s1 [Return s1 $ if agg then arg else ObjectLiteral s1 [(mkString C.stRefValue, arg)]])
118+ convert agg (App _ (App s1 f [ref]) []) | isSTFunc C.readSTRef f =
119+ if agg then ref else Indexer s1 (StringLiteral s1 C.stRefValue) ref
120+ convert agg (App _ (App _ (App s1 f [arg]) [ref]) []) | isSTFunc C.writeSTRef f =
121+ if agg then Assignment s1 ref arg else Assignment s1 (Indexer s1 (StringLiteral s1 C.stRefValue) ref) arg
122+ convert agg (App _ (App _ (App s1 f [func]) [ref]) []) | isSTFunc C.modifySTRef f =
123+ if agg then Assignment s1 ref (App s1 func [ref]) else Assignment s1 (Indexer s1 (StringLiteral s1 C.stRefValue) ref) (App s1 func [Indexer s1 (StringLiteral s1 C.stRefValue) ref])
124+ convert _ other = other
125+ -- Check if an expression represents a function in the ST module
126+ isSTFunc name (Indexer _ (StringLiteral _ name') (Var _ st)) = st == C.st && name == name'
127+ isSTFunc _ _ = False
128+ -- Find all ST Refs initialized in this block
129+ findSTRefsIn = everything (++) isSTRef
130+ where
131+ isSTRef (VariableIntroduction _ ident (Just (App _ (App _ f [_]) []))) | isSTFunc C.newSTRef f = [ident]
132+ isSTRef _ = []
133+ -- Find all STRefs used as arguments to readSTRef, writeSTRef, modifySTRef
134+ findAllSTUsagesIn = everything (++) isSTUsage
135+ where
136+ isSTUsage (App _ (App _ f [ref]) []) | isSTFunc C.readSTRef f = [ref]
137+ isSTUsage (App _ (App _ (App _ f [_]) [ref]) []) | isSTFunc C.writeSTRef f || isSTFunc C.modifySTRef f = [ref]
138+ isSTUsage _ = []
139+ -- Find all uses of a variable
140+ appearingIn ref = everything (++) isVar
141+ where
142+ isVar e@(Var _ v) | v == ref = [e]
143+ isVar _ = []
144+ -- Convert a AST value to a String if it is a Var
145+ toVar (Var _ v) = Just v
146+ toVar _ = Nothing
src/CodeGen/IL/Optimizer/TCO.hsnew file+141
@@ -0,0 +1,141 @@
1+module CodeGen.IL.Optimizer.TCO (tco, tcoLoop) where
2+
3+import Prelude.Compat
4+
5+import Data.Text (Text)
6+import Data.Monoid ((<>))
7+import Language.PureScript.CoreImp.AST
8+import Language.PureScript.AST.SourcePos (SourceSpan)
9+import Safe (headDef, tailSafe)
10+import CodeGen.IL.Common
11+
12+import qualified Language.PureScript.Constants as C
13+
14+tcoLoop :: Text
15+tcoLoop = "ṩtco_loop"
16+
17+tco :: AST -> AST -> AST
18+tco mn = everywhere convert where
19+ tcoVar :: Text -> Text
20+ tcoVar arg = "ṩtco_var_" <> arg
21+
22+ copyVar :: Text -> Text
23+ copyVar arg = "ṩcopy_" <> arg
24+
25+ tcoDone :: Text
26+ tcoDone = "ṩtco_done"
27+
28+ tcoResult :: Text
29+ tcoResult = "ṩtco_result"
30+
31+ convert :: AST -> AST
32+ convert fn@(Function ss (Just name) args _)
33+ | isTailRecursive name body'
34+ = replace (toLoop name outerArgs innerArgs body')
35+ where
36+ innerArgs = headDef [] argss
37+ outerArgs = concat . reverse $ tailSafe argss
38+ (argss, body', replace) = collectAllFunctionArgs [] id fn
39+ convert (Assignment ss (Var _ name) fn@(Function _ Nothing _ _))
40+ | isTailRecursive name body'
41+ = Assignment ss (Var ss name) (replace (toLoop name outerArgs innerArgs body'))
42+ where
43+ innerArgs = headDef [] argss
44+ outerArgs = concat . reverse $ tailSafe argss
45+ (argss, body', replace) = collectAllFunctionArgs [] id fn
46+ convert js = js
47+
48+ collectAllFunctionArgs :: [[Text]] -> (AST -> AST) -> AST -> ([[Text]], AST, AST -> AST)
49+ collectAllFunctionArgs allArgs f (Function s1 ident args (Block s2 (body@(Return _ _):_))) =
50+ collectAllFunctionArgs (args : allArgs) (\b -> f (Function s1 ident (map copyVar args) (Block s2 [b]))) body
51+ collectAllFunctionArgs allArgs f (Function ss ident args body@(Block _ _)) =
52+ (args : allArgs, body, f . Function ss ident (map copyVar args))
53+ collectAllFunctionArgs allArgs f (Return s1 (Function s2 ident args (Block s3 [body]))) =
54+ collectAllFunctionArgs (args : allArgs) (\b -> f (Return s1 (Function s2 ident (map copyVar args) (Block s3 [b])))) body
55+ collectAllFunctionArgs allArgs f (Return s1 (Function s2 ident args body@(Block _ _))) =
56+ (args : allArgs, body, f . Return s1 . Function s2 ident (map copyVar args))
57+ collectAllFunctionArgs allArgs f body = (allArgs, body, f)
58+
59+ isTailRecursive :: Text -> AST -> Bool
60+ isTailRecursive ident js = countSelfReferences js > 0 && allInTailPosition js where
61+ countSelfReferences = everything (+) match where
62+ match :: AST -> Int
63+ match (Var _ ident') | ident == ident' = 1
64+ match _ = 0
65+
66+ allInTailPosition (Return _ expr)
67+ | isSelfCall ident expr = countSelfReferences expr == 1
68+ | otherwise = countSelfReferences expr == 0
69+ allInTailPosition (While _ js1 body)
70+ = countSelfReferences js1 == 0 && allInTailPosition body
71+ allInTailPosition (For _ _ js1 js2 body)
72+ = countSelfReferences js1 == 0 && countSelfReferences js2 == 0 && allInTailPosition body
73+ allInTailPosition (ForIn _ _ js1 body)
74+ = countSelfReferences js1 == 0 && allInTailPosition body
75+ allInTailPosition (IfElse _ js1 body el)
76+ = countSelfReferences js1 == 0 && allInTailPosition body && all allInTailPosition el
77+ allInTailPosition (Block _ body)
78+ = all allInTailPosition body
79+ allInTailPosition (Throw _ js1)
80+ = countSelfReferences js1 == 0
81+ allInTailPosition (ReturnNoResult _)
82+ = True
83+ allInTailPosition (VariableIntroduction _ _ js1)
84+ = all ((== 0) . countSelfReferences) js1
85+ allInTailPosition (Assignment _ _ js1)
86+ = countSelfReferences js1 == 0
87+ allInTailPosition (Comment _ _ js1)
88+ = allInTailPosition js1
89+ allInTailPosition _
90+ = False
91+
92+ toLoop :: Text -> [Text] -> [Text] -> AST -> AST
93+ toLoop ident outerArgs innerArgs js =
94+ Block rootSS $
95+ concatMap (\arg -> [ VariableIntroduction rootSS (tcoVar arg) . Just $
96+ Var rootSS (copyVar arg) ]) (outerArgs ++ innerArgs) ++
97+ [ Assignment rootSS (Var rootSS $ "var " <> tcoDone) $ BooleanLiteral Nothing False
98+ , VariableIntroduction rootSS tcoResult Nothing
99+ , Assignment rootSS (Var rootSS $ "var " <> tcoLoop) (Function rootSS (Just tcoLoop) (outerArgs ++ innerArgs) (Block rootSS [loopify js]))
100+ , While rootSS (Unary Nothing Not (Var rootSS tcoDone))
101+ (Block rootSS
102+ [(Assignment rootSS (Var rootSS tcoResult) (App rootSS (Var rootSS tcoLoop) ((map (Var rootSS . tcoVar) outerArgs) ++ (map (Var rootSS . copyVar) innerArgs))))])
103+ , Return rootSS (Var rootSS tcoResult)
104+ ]
105+ where
106+ rootSS = Nothing
107+
108+ loopify :: AST -> AST
109+ loopify (Return ss ret)
110+ | isSelfCall ident ret =
111+ let
112+ allArgumentValues = concat $ collectArgs [] ret
113+ in
114+ Block ss $
115+ zipWith (\val arg ->
116+ Assignment ss (Var ss (tcoVar arg)) val) allArgumentValues outerArgs
117+ ++ zipWith (\val arg ->
118+ Assignment ss (Var ss (copyVar arg)) val) (drop (length outerArgs) allArgumentValues) innerArgs
119+ ++ [ ReturnNoResult ss ]
120+ | otherwise = Block ss [ markDone ss, Return ss ret ]
121+ loopify (ReturnNoResult ss) = Block ss [ markDone ss, ReturnNoResult ss ]
122+ loopify (While ss cond body) = While ss cond (loopify body)
123+ loopify (For ss i js1 js2 body) = For ss i js1 js2 (loopify body)
124+ loopify (ForIn ss i js1 body) = ForIn ss i js1 (loopify body)
125+ loopify (IfElse ss cond body el) = IfElse ss cond (loopify body) (fmap loopify el)
126+ loopify (Block ss body) = Block ss (map loopify body)
127+ loopify other = other
128+
129+ markDone :: Maybe SourceSpan -> AST
130+ markDone ss = Assignment ss (Var ss tcoDone) (BooleanLiteral ss True)
131+
132+ collectArgs :: [[AST]] -> AST -> [[AST]]
133+ collectArgs acc (App _ fn args') = collectArgs (args' : acc) fn
134+ collectArgs acc _ = acc
135+
136+ isSelfCall :: Text -> AST -> Bool
137+ isSelfCall ident (App _ (Var _ ident') _) = ident == ident'
138+ isSelfCall ident (App _ (Indexer _ (Var _ ident') (Var _ mn')) _) = mn' == "" && ident == ident'
139+ isSelfCall ident (App _ (Indexer _ (Var _ ident') mn') _) = mn' == mn && ident == ident'
140+ isSelfCall ident (App _ fn _) = isSelfCall ident fn
141+ isSelfCall _ _ = False
src/CodeGen/IL/Printer.hsnew file+527
@@ -0,0 +1,527 @@
1+-- | Pretty printer for the AST
2+module CodeGen.IL.Printer
3+ ( prettyPrintIL
4+ , prettyPrintIL1
5+ , prettyPrintILWithSourceMaps
6+ , interfaceSource
7+ , implHeaderSource
8+ , implFooterSource
9+ , isLiteral
10+ , modLabel
11+ , modPrefix
12+ , ffiLoader
13+ ) where
14+
15+import Prelude.Compat
16+
17+import Control.Arrow ((<+>))
18+import Control.Monad (forM, mzero)
19+import Control.Monad.State (StateT, evalStateT)
20+import Control.PatternArrows
21+import Data.List (filter, (\\))
22+import qualified Control.Arrow as A
23+
24+import Data.Maybe (fromMaybe)
25+import Data.Monoid ((<>))
26+import Data.Text (Text)
27+import qualified Data.Text as T
28+
29+import Language.PureScript.AST (SourceSpan(..))
30+import Language.PureScript.CoreImp.AST
31+import Language.PureScript.Comments
32+import Language.PureScript.Crash
33+import Language.PureScript.Names (Ident, runIdent)
34+import Language.PureScript.Pretty.Common
35+import Language.PureScript.PSString (PSString, decodeString, mkString)
36+
37+import CodeGen.IL.Common
38+import CodeGen.IL.Optimizer.TCO (tcoLoop)
39+
40+import qualified Language.PureScript.Constants as C
41+
42+-- TODO (Christoph): Get rid of T.unpack / pack
43+
44+literals :: (Emit gen) => Pattern PrinterState AST gen
45+literals = mkPattern' match'
46+ where
47+ match' :: (Emit gen) => AST -> StateT PrinterState Maybe gen
48+ match' il = (addMapping' (getSourceSpan il) <>) <$> match il
49+
50+ match :: (Emit gen) => AST -> StateT PrinterState Maybe gen
51+ match (NumericLiteral _ n) = return $ emit $ T.pack $ either show show n
52+ match (StringLiteral _ s) = return $ emit $ stringLiteral s
53+ match (BooleanLiteral _ True) = return $ emit "true"
54+ match (BooleanLiteral _ False) = return $ emit "false"
55+ match (ArrayLiteral _ xs) = mconcat <$> sequence
56+ [ return . emit $ arrayType <> "{"
57+ , intercalate (emit ", ") <$> forM xs prettyPrintIL'
58+ , return $ emit "}"
59+ ]
60+ -- match (ObjectLiteral _ []) = return $ emit "std::initializer_list<std::pair<const string, boxed>>{}"
61+ match (ObjectLiteral _ ps) = mconcat <$> sequence
62+ [ return . emit $ dictType <> "{"
63+ , withIndent $ do
64+ ils <- forM ps $ \(key, value) -> do
65+ value' <- prettyPrintIL' value
66+ return $ objectPropertyToString key <> value'
67+ return $ intercalate (emit " ") $ map (<> emit ",") ils
68+ , return $ emit "}"
69+ ]
70+ where
71+ objectPropertyToString :: (Emit gen) => PSString -> gen
72+ objectPropertyToString s = emit $ stringLiteral s <> ": "
73+ match (Block _ sts) = mconcat <$> sequence
74+ [ return $ emit "{\n"
75+ , withIndent $ prettyStatements sts
76+ , return $ emit "\n"
77+ , currentIndent
78+ , return $ emit "}"
79+ ]
80+ match (Var _ ident) | ident == C.undefined = return $ emit undefinedName
81+ match (Var _ ident) = return $ emit ident
82+ match (VariableIntroduction _ ident value) = mconcat <$> sequence
83+ [ return . emit $ varDecl <> " " <> ident <> " " <> anyType
84+ , maybe (return mempty) (fmap (emit " = " <>) . prettyPrintIL') value
85+ ]
86+ match (Assignment _ target value) = mconcat <$> sequence
87+ [ prettyPrintIL' target
88+ , return $ emit " = "
89+ , prettyPrintIL' value
90+ ]
91+ match (App _ val []) = mconcat <$> sequence
92+ [ return $ emit "Run("
93+ , prettyPrintIL' val
94+ , return $ emit ")"
95+ ]
96+ match (App _ (StringLiteral _ u) [arg])
97+ | Just ty <- decodeString u = mconcat <$> sequence
98+ [ prettyPrintIL' arg
99+ , return $ emit ".("
100+ , return $ emit ty
101+ , return $ emit ")"
102+ ]
103+ match (App _ (Var _ fn) [arg]) | fn == arrayLengthFn = mconcat <$> sequence
104+ [ return $ emit fn
105+ , return $ emit "("
106+ , prettyPrintIL' arg
107+ , return $ emit ")"
108+ ]
109+ match (App _ (Var _ fn) args) | fn == indexFn = mconcat <$> sequence
110+ [ return $ emit fn
111+ , return $ emit "("
112+ , intercalate (emit ", ") <$> forM args prettyPrintIL'
113+ , return $ emit ")"
114+ ]
115+ match (App _ (Var _ fn) args) | fn == tcoLoop = mconcat <$> sequence
116+ [ return $ emit fn
117+ , return $ emit "("
118+ , intercalate (emit ", ") <$> forM args prettyPrintIL'
119+ , return $ emit ")"
120+ ]
121+ match (App _ (App Nothing (StringLiteral Nothing fnx) [fn@Function{}]) args)
122+ | Just ftype <- decodeString fnx
123+ , "Fn" `T.isPrefixOf` ftype = mconcat <$> sequence
124+ [ prettyPrintIL' fn
125+ , return $ emit "("
126+ , intercalate (emit ", ") <$> forM args prettyPrintIL'
127+ , return $ emit ")"
128+ ]
129+ match (App _ (App Nothing (StringLiteral Nothing fnx) [fn]) args)
130+ | Just ftype <- decodeString fnx
131+ , "Fn" `T.isPrefixOf` ftype = mconcat <$> sequence
132+ [ prettyPrintIL' fn
133+ , return $ emit ".("
134+ , return $ emit ftype
135+ , return $ emit ")("
136+ , intercalate (emit ", ") <$> forM args prettyPrintIL'
137+ , return $ emit ")"
138+ ]
139+ match app@(App{})
140+ | (val, args) <- unApp app []
141+ , length args > 1
142+ = mconcat <$> sequence
143+ [ return $ emit "Apply("
144+ , prettyPrintIL' val
145+ , return $ emit ", "
146+ , intercalate (emit ", ") <$> forM args prettyPrintIL'
147+ , return $ emit ")"
148+ ]
149+ match (App _ val args) = mconcat <$> sequence
150+ [ return $ emit "Apply("
151+ , prettyPrintIL' val
152+ , return $ emit ", "
153+ , intercalate (emit ", ") <$> forM args prettyPrintIL'
154+ , return $ emit ")"
155+ ]
156+ match (Function _ (Just name) [] (Block _ [Return _ ret]))
157+ | isComplexLiteral ret = mconcat <$> sequence
158+ [ return $ emit "\n"
159+ , return . emit $ varDecl <> " " <> initName name <> " Once\n"
160+ , prettyPrintIL' $ VariableIntroduction Nothing (valueName name) Nothing
161+ , return $ emit "\n\n"
162+ , return $ emit "func "
163+ , return . emit $ withPrefix name
164+ , return . emit $ "() " <> anyType <> " "
165+ , return $ emit "{\n"
166+ , withIndent $ do
167+ indentString <- currentIndent
168+ return $ indentString <> (emit $ initName name <> ".Do(func() {\n") <>
169+ indentString <> indentString <> (emit $ valueName name <> " = ")
170+ , withIndent $ do
171+ case ret of
172+ Function _ Nothing args body -> mconcat <$> sequence
173+ [ return $ emit "func("
174+ , return . emit $ intercalate ", " (renderArg anyType <$> args)
175+ , return . emit $ ") " <> anyType <> " "
176+ , prettyPrintIL' body
177+ ]
178+ _ -> do
179+ prettyPrintIL' ret
180+ , return $ emit "\n"
181+ , withIndent $ do
182+ indentString <- currentIndent
183+ return $ indentString <> (emit $ "})\n" <> "return " <> valueName name <>"\n")
184+ , return $ emit "}\n\n"
185+ ]
186+ match (Function _ (Just name) [] ret) = mconcat <$> sequence
187+ [ return $ emit "func "
188+ , return . emit $ withPrefix name
189+ , return . emit $ "() " <> anyType <> " "
190+ , prettyPrintIL' ret
191+ ]
192+ match (Function _ _ args ret) = mconcat <$> sequence
193+ [ return $ emit "func("
194+ , return . emit $ intercalate ", " (renderArg anyType <$> args)
195+ , return . emit $ ") " <> anyType <> " "
196+ , prettyPrintIL' ret
197+ ]
198+ match (Indexer _ (Var _ name) (Var _ "")) = mconcat <$> sequence
199+ [ prettyPrintIL' (Var Nothing $ withPrefix name)
200+ , return $ emit "()"
201+ ]
202+ match (Indexer _ (Var _ name) val) = mconcat <$> sequence
203+ [ prettyPrintIL' val
204+ , return $ emit "."
205+ , prettyPrintIL' (Var Nothing $ withPrefix name)
206+ , return $ emit "()"
207+ ]
208+ match (Indexer _ prop@StringLiteral{} val@ObjectLiteral{}) = mconcat <$> sequence
209+ [ prettyPrintIL' val
210+ , return $ emit "["
211+ , prettyPrintIL' prop
212+ , return $ emit "]"
213+ ]
214+ match (Indexer _ prop@StringLiteral{} val) = mconcat <$> sequence
215+ [ prettyPrintIL' val
216+ , return $ emit ".("
217+ , return $ emit dictType
218+ , return $ emit ")["
219+ , prettyPrintIL' prop
220+ , return $ emit "]"
221+ ]
222+ match (Indexer _ index val@ArrayLiteral{}) = mconcat <$> sequence
223+ [ prettyPrintIL' val
224+ , return $ emit "["
225+ , prettyPrintIL' index
226+ , return $ emit "]"
227+ ]
228+ match (Indexer _ index val) = mconcat <$> sequence
229+ [ prettyPrintIL' val
230+ , return $ emit ".("
231+ , return $ emit arrayType
232+ , return $ emit ")["
233+ , prettyPrintIL' index
234+ , return $ emit "]"
235+ ]
236+ match (InstanceOf _ val ty) = mconcat <$> sequence
237+ [ return $ emit "Is("
238+ , prettyPrintIL' val
239+ , return $ emit ", "
240+ , prettyPrintIL' ty
241+ , return $ emit ")"
242+ ]
243+ match (While _ cond sts) = mconcat <$> sequence
244+ [ return $ emit "for "
245+ , prettyPrintIL' cond
246+ , return $ emit " "
247+ , prettyPrintIL' sts
248+ ]
249+ match (For _ ident start end sts) = mconcat <$> sequence
250+ [ return $ emit $ "for var " <> ident <> " = "
251+ , prettyPrintIL' start
252+ , return $ emit $ "; " <> ident <> " < "
253+ , prettyPrintIL' end
254+ , return $ emit $ "; " <> ident <> "++ "
255+ , prettyPrintIL' sts
256+ ]
257+ match (ForIn _ ident obj sts) = mconcat <$> sequence
258+ [ return $ emit $ "for var " <> ident <> " in "
259+ , prettyPrintIL' obj
260+ , return $ emit " "
261+ , prettyPrintIL' sts
262+ ]
263+ match (IfElse _ (Binary _ EqualTo cond@Binary{} (BooleanLiteral Nothing True)) thens elses) = mconcat <$> sequence
264+ [ return $ emit "if "
265+ , prettyPrintIL' cond
266+ , return $ emit " "
267+ , prettyPrintIL' thens
268+ , maybe (return mempty) (fmap (emit " else " <>) . prettyPrintIL') elses
269+ ]
270+ match (IfElse _ (Binary _ EqualTo cond@Binary{} (BooleanLiteral Nothing False)) thens elses) = mconcat <$> sequence
271+ [ return $ emit "if !("
272+ , prettyPrintIL' cond
273+ , return $ emit ") "
274+ , prettyPrintIL' thens
275+ , maybe (return mempty) (fmap (emit " else " <>) . prettyPrintIL') elses
276+ ]
277+ match (IfElse _ cond thens elses) = mconcat <$> sequence
278+ [ return $ emit "if "
279+ , prettyPrintIL' cond
280+ , return $ emit " "
281+ , prettyPrintIL' thens
282+ , maybe (return mempty) (fmap (emit " else " <>) . prettyPrintIL') elses
283+ ]
284+ match (Return _ value) = mconcat <$> sequence
285+ [ return $ emit "return "
286+ , prettyPrintIL' value
287+ ]
288+ match (ReturnNoResult _) = return . emit $ "return " <> undefinedName
289+ -- match (Throw _ _) = return mempty
290+ match (Throw _ value) = mconcat <$> sequence
291+ [ return $ emit "panic("
292+ , prettyPrintIL' value
293+ , return $ emit ")"
294+ ]
295+ match (Comment _ com il) = mconcat <$> sequence
296+ [ return $ emit "\n"
297+ , mconcat <$> forM com comment
298+ , prettyPrintIL' il
299+ ]
300+ match _ = mzero
301+
302+ comment :: (Emit gen) => Comment -> StateT PrinterState Maybe gen
303+ comment (LineComment com) = fmap mconcat $ sequence $
304+ [ currentIndent
305+ , return $ emit "//" <> emit com <> emit "\n"
306+ ]
307+ comment (BlockComment com) = fmap mconcat $ sequence $
308+ [ currentIndent
309+ , return $ emit "/**\n"
310+ ] ++
311+ map asLine (T.lines com) ++
312+ [ currentIndent
313+ , return $ emit " */\n"
314+ , currentIndent
315+ ]
316+ where
317+ asLine :: (Emit gen) => Text -> StateT PrinterState Maybe gen
318+ asLine s = do
319+ i <- currentIndent
320+ return $ i <> emit " * " <> (emit . removeComments) s <> emit "\n"
321+
322+ removeComments :: Text -> Text
323+ removeComments t =
324+ case T.stripPrefix "*/" t of
325+ Just rest -> removeComments rest
326+ Nothing -> case T.uncons t of
327+ Just (x, xs) -> x `T.cons` removeComments xs
328+ Nothing -> ""
329+
330+unary' :: (Emit gen) => UnaryOperator -> (AST -> Text) -> Operator PrinterState AST gen
331+unary' op mkStr = Wrap match (<>)
332+ where
333+ match :: (Emit gen) => Pattern PrinterState AST (gen, AST)
334+ match = mkPattern match'
335+ where
336+ match' (Unary _ op' val) | op' == op = Just (emit $ mkStr val, val)
337+ match' _ = Nothing
338+
339+unary :: (Emit gen) => UnaryOperator -> Text -> Operator PrinterState AST gen
340+unary op str = unary' op (const str)
341+
342+negateOperator :: (Emit gen) => Operator PrinterState AST gen
343+negateOperator = unary' Negate (\v -> if isNegate v then "- " else "-")
344+ where
345+ isNegate (Unary _ Negate _) = True
346+ isNegate _ = False
347+
348+binary :: (Emit gen) => BinaryOperator -> Text -> Operator PrinterState AST gen
349+binary op str = AssocL match (\v1 v2 -> v1 <> emit (" " <> str <> " ") <> v2)
350+ where
351+ match :: Pattern PrinterState AST (AST, AST)
352+ match = mkPattern match'
353+ where
354+ match' (Binary _ op' v1 v2) | op' == op = Just (v1, v2)
355+ match' _ = Nothing
356+
357+isLiteral :: AST -> Bool
358+isLiteral Function{} = True
359+isLiteral NumericLiteral{} = True
360+isLiteral StringLiteral{} = True
361+isLiteral BooleanLiteral{} = True
362+isLiteral ObjectLiteral{} = True
363+isLiteral ArrayLiteral{} = True
364+isLiteral _ = False
365+
366+isComplexLiteral :: AST -> Bool
367+-- isComplexLiteral Function{} = True
368+isComplexLiteral ObjectLiteral{} = True
369+isComplexLiteral ArrayLiteral{} = True
370+isComplexLiteral _ = False
371+
372+unApp :: AST -> [AST] -> (AST, [AST])
373+unApp (App _ val [arg]) args = unApp val (arg : args)
374+unApp other args = (other, args)
375+
376+prettyStatements :: (Emit gen) => [AST] -> StateT PrinterState Maybe gen
377+prettyStatements sts = do
378+ ils <- forM sts prettyPrintIL'
379+ indentString <- currentIndent
380+ return $ intercalate (emit "\n") $ map (indentString <>) ils
381+
382+-- | Generate a pretty-printed string representing a collection of C++ expressions at the same indentation level
383+prettyPrintILWithSourceMaps :: [AST] -> (Text, [SMap])
384+prettyPrintILWithSourceMaps il =
385+ let StrPos (_, s, mp) = (fromMaybe (internalError "Incomplete pattern") . flip evalStateT (PrinterState 0) . prettyStatements) il
386+ in (s, mp)
387+
388+prettyPrintIL :: [AST] -> Text
389+prettyPrintIL = maybe (internalError "Incomplete pattern") runPlainString . flip evalStateT (PrinterState 0) . prettyStatements
390+
391+-- | Generate an indented, pretty-printed string representing a C++ expression
392+prettyPrintIL' :: (Emit gen) => AST -> StateT PrinterState Maybe gen
393+prettyPrintIL' = A.runKleisli $ runPattern matchValue
394+ where
395+ matchValue :: (Emit gen) => Pattern PrinterState AST gen
396+ matchValue = buildPrettyPrinter operators (literals <+> fmap parensPos matchValue)
397+ operators :: (Emit gen) => OperatorTable PrinterState AST gen
398+ operators =
399+ OperatorTable [ [ unary New "?" ]
400+ , [ unary Not "!"
401+ , unary BitwiseNot "~"
402+ , unary Positive "+"
403+ , negateOperator ]
404+ , [ binary Multiply "*"
405+ , binary Divide "/"
406+ , binary Modulus "%" ]
407+ , [ binary Add "+"
408+ , binary Subtract "-" ]
409+ , [ binary ShiftLeft "<<"
410+ , binary ShiftRight ">>" ]
411+ , [ binary LessThan "<"
412+ , binary LessThanOrEqualTo "<="
413+ , binary GreaterThan ">"
414+ , binary GreaterThanOrEqualTo ">=" ]
415+ , [ binary EqualTo "=="
416+ , binary NotEqualTo "!=" ]
417+ , [ binary BitwiseAnd "&" ]
418+ , [ binary BitwiseXor "^" ]
419+ , [ binary BitwiseOr "|" ]
420+ , [ binary And "&&" ]
421+ , [ binary Or "||" ]
422+ ]
423+
424+prettyPrintIL1 :: AST -> Text
425+prettyPrintIL1 = maybe (internalError "Incomplete pattern") runPlainString . flip evalStateT (PrinterState 0) . prettyPrintIL'
426+
427+stringLiteral :: PSString -> Text
428+stringLiteral pss | Just s <- decodeString pss = stringLiteral' s
429+ where
430+ stringLiteral' :: Text -> Text
431+ stringLiteral' s = "\"" <> T.concatMap encodeChar s <> "\""
432+ encodeChar :: Char -> Text
433+ encodeChar '\0' = "\\x00"
434+ encodeChar '\b' = "\\b"
435+ encodeChar '\t' = "\\t"
436+ encodeChar '\n' = "\\n"
437+ encodeChar '\v' = "\\v"
438+ encodeChar '\f' = "\\f"
439+ encodeChar '\r' = "\\r"
440+ encodeChar '"' = "\\\""
441+ encodeChar '\\' = "\\\\"
442+ encodeChar c = T.singleton $ c
443+stringLiteral _ = "\"\\uFFFD\""
444+
445+interfaceSource :: Text -> [(Text,Bool)] -> [Ident] -> Text
446+interfaceSource _ _ _ = ""
447+
448+implHeaderSource :: Text -> [Text] -> Text -> Text
449+implHeaderSource mn imports otherPrefix =
450+ "// Code generated by psgo. DO NOT EDIT.\n\n" <>
451+ "package " <> (if mn == "Main" || mn == "Test_Main" then "main" else mn) <> "\n\n" <>
452+ "import . \"" <> runtime <> "\"\n" <>
453+ (if mn == "Main" || mn == "Test_Main"
454+ then "import _ \"" <> otherPrefix <> "/" <> ffiLoader <> "\"\n"
455+ else "\n") <>
456+ "import (\n" <>
457+ (T.concat $ formatImport <$> imports) <> ")\n\n" <>
458+ "type _ = Any\n\n"
459+ where
460+ formatImport :: Text -> Text
461+ formatImport s =
462+ "\t\"" <> otherPrefix <> "/" <> modPrefix <> "/" <> moduleRenamer s <> "\"\n"
463+ moduleRenamer :: Text -> Text
464+ moduleRenamer s
465+ | (s', sfx) <- T.breakOn moduleRenamerMarker s,
466+ not $ T.null sfx = s'
467+ moduleRenamer s = s
468+
469+implFooterSource :: Text -> [Ident] -> Text
470+implFooterSource mn foreigns =
471+ "\n\n\n" <>
472+ (if null foreigns
473+ then ""
474+ else ("// Foreign values\n\n" <>
475+ "var " <> foreignDict <> " = "<> foreignMod <> "(\"" <> mn <> "\")\n\n" <>
476+ (T.concat $ (\foreign' ->
477+ let name = moduleIdentToIL foreign' in
478+ varDecl <> " " <> initName name <> " Once\n" <>
479+ varDecl <> " " <> valueName name <> " " <> anyType <> "\n\n" <>
480+ "func " <>
481+ withPrefix name <>
482+ "() Any { \n" <>
483+ " " <> initName name <> ".Do(func() {\n" <>
484+ " " <> valueName name <> " = " <>
485+ "Get(" <> foreignDict <> ", " <>
486+ (stringLiteral . mkString $ runIdent foreign') <> ")\n" <>
487+ " })\n" <>
488+ " return " <> valueName name <> "\n" <>
489+ "}\n\n") <$> foreigns))) <>
490+ if mn == "Main" || mn == "Test.Main" then mainSource else "\n"
491+ where
492+ mainSource :: Text
493+ mainSource = "\
494+ \func main() {\n\
495+ \ Run(Ꞌmain())\n\
496+ \}\n\n\
497+ \"
498+
499+varDecl :: Text
500+varDecl = "var"
501+
502+renderArg :: Text -> Text -> Text
503+renderArg decl arg = arg <> " " <> decl
504+
505+foreignMod :: Text
506+foreignMod = "Foreign"
507+
508+foreignDict :: Text
509+foreignDict = "foreign"
510+
511+modLabel :: Text
512+modLabel = "purescript-native"
513+
514+modPrefix :: Text
515+modPrefix = modLabel <> "/output"
516+
517+runtime :: Text
518+runtime = "github.com/" <> modLabel <> "/go-runtime"
519+
520+ffiLoader :: Text
521+ffiLoader = modLabel <> "/ffi-loader"
522+
523+initName :: Text -> Text
524+initName s = "ᛌ" <> s <> "_once"
525+
526+valueName :: Text -> Text
527+valueName s = "ᛧ" <> s
src/Control/Monad/Logger.hsdeleted−59
@@ -1,59 +0,0 @@
1−{-# LANGUAGE FlexibleInstances #-}
2−{-# LANGUAGE TypeFamilies #-}
3−
4−-- |
5−-- A replacement for WriterT IO which uses mutable references.
6−--
7−module Control.Monad.Logger where
8−
9−import Prelude.Compat
10−
11−import Control.Monad (ap)
12−import Control.Monad.Base (MonadBase(..))
13−import Control.Monad.IO.Class
14−import Control.Monad.Trans.Control (MonadBaseControl(..))
15−import Control.Monad.Writer.Class
16−
17−import Data.IORef
18−
19−-- | A replacement for WriterT IO which uses mutable references.
20−newtype Logger w a = Logger { runLogger :: IORef w -> IO a }
21−
22−-- | Run a Logger computation, starting with an empty log.
23−runLogger' :: (Monoid w) => Logger w a -> IO (a, w)
24−runLogger' l = do
25− r <- newIORef mempty
26− a <- runLogger l r
27− w <- readIORef r
28− return (a, w)
29−
30−instance Functor (Logger w) where
31− fmap f (Logger l) = Logger $ \r -> fmap f (l r)
32−
33−instance (Monoid w) => Applicative (Logger w) where
34− pure = Logger . const . pure
35− (<*>) = ap
36−
37−instance (Monoid w) => Monad (Logger w) where
38− return = pure
39− Logger l >>= f = Logger $ \r -> l r >>= \a -> runLogger (f a) r
40−
41−instance (Monoid w) => MonadIO (Logger w) where
42− liftIO = Logger . const
43−
44−instance (Monoid w) => MonadWriter w (Logger w) where
45− tell w = Logger $ \r -> atomicModifyIORef' r $ \w' -> (mappend w' w, ())
46− listen l = Logger $ \r -> do
47− (a, w) <- liftIO (runLogger' l)
48− atomicModifyIORef' r $ \w' -> (mappend w' w, (a, w))
49− pass l = Logger $ \r -> do
50− ((a, f), w) <- liftIO (runLogger' l)
51− atomicModifyIORef' r $ \w' -> (mappend w' (f w), a)
52−
53−instance (Monoid w) => MonadBase IO (Logger w) where
54− liftBase = liftIO
55−
56−instance (Monoid w) => MonadBaseControl IO (Logger w) where
57− type StM (Logger w) a = a
58− liftBaseWith f = Logger $ \r -> liftBaseWith $ \q -> f (q . flip runLogger r)
59− restoreM = return
src/Control/Monad/Supply.hsdeleted−33
@@ -1,33 +0,0 @@
1−{-# LANGUAGE GeneralizedNewtypeDeriving #-}
2−
3−-- |
4−-- Fresh variable supply
5−--
6−module Control.Monad.Supply where
7−
8−import Prelude.Compat
9−
10−import Control.Applicative
11−import Control.Monad.Error.Class (MonadError(..))
12−import Control.Monad.Reader
13−import Control.Monad.State
14−import Control.Monad.Writer
15−
16−import Data.Functor.Identity
17−
18−newtype SupplyT m a = SupplyT { unSupplyT :: StateT Integer m a }
19− deriving (Functor, Applicative, Monad, MonadTrans, MonadError e, MonadWriter w, MonadReader r, Alternative, MonadPlus)
20−
21−runSupplyT :: Integer -> SupplyT m a -> m (a, Integer)
22−runSupplyT n = flip runStateT n . unSupplyT
23−
24−evalSupplyT :: (Functor m) => Integer -> SupplyT m a -> m a
25−evalSupplyT n = fmap fst . runSupplyT n
26−
27−type Supply = SupplyT Identity
28−
29−runSupply :: Integer -> Supply a -> (a, Integer)
30−runSupply n = runIdentity . runSupplyT n
31−
32−evalSupply :: Integer -> Supply a -> a
33−evalSupply n = runIdentity . evalSupplyT n
src/Control/Monad/Supply/Class.hsdeleted−36
@@ -1,36 +0,0 @@
1−-- |
2−-- A class for monads supporting a supply of fresh names
3−--
4−
5−{-# LANGUAGE DefaultSignatures #-}
6−{-# LANGUAGE TypeFamilies #-}
7−
8−module Control.Monad.Supply.Class where
9−
10−import Prelude.Compat
11−
12−import Control.Monad.Supply
13−import Control.Monad.State
14−import Control.Monad.Writer
15−import Data.Text (Text, pack)
16−
17−class Monad m => MonadSupply m where
18− fresh :: m Integer
19− peek :: m Integer
20− default fresh :: (MonadTrans t, MonadSupply n, m ~ t n) => m Integer
21− fresh = lift fresh
22− default peek :: (MonadTrans t, MonadSupply n, m ~ t n) => m Integer
23− peek = lift peek
24−
25−instance Monad m => MonadSupply (SupplyT m) where
26− fresh = SupplyT $ do
27− n <- get
28− put (n + 1)
29− return n
30− peek = SupplyT get
31−
32−instance MonadSupply m => MonadSupply (StateT s m)
33−instance (Monoid w, MonadSupply m) => MonadSupply (WriterT w m)
34−
35−freshName :: MonadSupply m => m Text
36−freshName = fmap (("$" <> ) . pack . show) fresh
src/Language/PureScript.hsdeleted−36
@@ -1,36 +0,0 @@
1−-- |
2−-- The main compiler module
3−--
4−module Language.PureScript
5− ( module P
6− , version
7− ) where
8−
9−
10−import Control.Monad.Supply as P
11−
12−import Data.Version (Version)
13−
14−import Language.PureScript.AST as P
15−import Language.PureScript.Comments as P
16−import Language.PureScript.Crash as P
17−import Language.PureScript.Environment as P
18−import Language.PureScript.Errors as P hiding (indent)
19−import Language.PureScript.Externs as P
20−import Language.PureScript.Kinds as P
21−import Language.PureScript.Linter as P
22−import Language.PureScript.Make as P
23−import Language.PureScript.ModuleDependencies as P
24−import Language.PureScript.Names as P
25−import Language.PureScript.Options as P
26−import Language.PureScript.Parser as P
27−import Language.PureScript.Pretty as P
28−import Language.PureScript.Renamer as P
29−import Language.PureScript.Sugar as P
30−import Language.PureScript.TypeChecker as P
31−import Language.PureScript.Types as P
32−
33−import qualified Paths_purescript as Paths
34−
35−version :: Version
36−version = Paths.version
src/Language/PureScript/AST.hsdeleted−14
@@ -1,14 +0,0 @@
1−-- |
2−-- The initial PureScript AST
3−--
4−module Language.PureScript.AST (
5− module AST
6−) where
7−
8−import Language.PureScript.AST.Binders as AST
9−import Language.PureScript.AST.Declarations as AST
10−import Language.PureScript.AST.Exported as AST
11−import Language.PureScript.AST.Literals as AST
12−import Language.PureScript.AST.Operators as AST
13−import Language.PureScript.AST.SourcePos as AST
14−import Language.PureScript.AST.Traversals as AST
src/Language/PureScript/AST/Binders.hsdeleted−83
@@ -1,83 +0,0 @@
1−-- |
2−-- Case binders
3−--
4−module Language.PureScript.AST.Binders where
5−
6−import Prelude.Compat
7−
8−import Language.PureScript.AST.SourcePos
9−import Language.PureScript.AST.Literals
10−import Language.PureScript.Names
11−import Language.PureScript.Comments
12−import Language.PureScript.Types
13−
14−-- |
15−-- Data type for binders
16−--
17−data Binder
18− -- |
19− -- Wildcard binder
20− --
21− = NullBinder
22− -- |
23− -- A binder which matches a literal
24− --
25− | LiteralBinder (Literal Binder)
26− -- |
27− -- A binder which binds an identifier
28− --
29− | VarBinder Ident
30− -- |
31− -- A binder which matches a data constructor
32− --
33− | ConstructorBinder (Qualified (ProperName 'ConstructorName)) [Binder]
34− -- |
35− -- A operator alias binder. During the rebracketing phase of desugaring,
36− -- this data constructor will be removed.
37− --
38− | OpBinder (Qualified (OpName 'ValueOpName))
39− -- |
40− -- Binary operator application. During the rebracketing phase of desugaring,
41− -- this data constructor will be removed.
42− --
43− | BinaryNoParensBinder Binder Binder Binder
44− -- |
45− -- Explicit parentheses. During the rebracketing phase of desugaring, this
46− -- data constructor will be removed.
47− --
48− -- Note: although it seems this constructor is not used, it _is_ useful,
49− -- since it prevents certain traversals from matching.
50− --
51− | ParensInBinder Binder
52− -- |
53− -- A binder which binds its input to an identifier
54− --
55− | NamedBinder Ident Binder
56− -- |
57− -- A binder with source position information
58− --
59− | PositionedBinder SourceSpan [Comment] Binder
60− -- |
61− -- A binder with a type annotation
62− --
63− | TypedBinder Type Binder
64− deriving (Show, Eq)
65−
66−-- |
67−-- Collect all names introduced in binders in an expression
68−--
69−binderNames :: Binder -> [Ident]
70−binderNames = go []
71− where
72− go ns (LiteralBinder b) = lit ns b
73− go ns (VarBinder name) = name : ns
74− go ns (ConstructorBinder _ bs) = foldl go ns bs
75− go ns (BinaryNoParensBinder b1 b2 b3) = foldl go ns [b1, b2, b3]
76− go ns (ParensInBinder b) = go ns b
77− go ns (NamedBinder name b) = go (name : ns) b
78− go ns (PositionedBinder _ _ b) = go ns b
79− go ns (TypedBinder _ b) = go ns b
80− go ns _ = ns
81− lit ns (ObjectLiteral bs) = foldl go ns (map snd bs)
82− lit ns (ArrayLiteral bs) = foldl go ns bs
83− lit ns _ = ns
src/Language/PureScript/AST/Declarations.hsdeleted−697
@@ -1,697 +0,0 @@
1−{-# LANGUAGE TemplateHaskell #-}
2−
3−-- |
4−-- Data types for modules and declarations
5−--
6−module Language.PureScript.AST.Declarations where
7−
8−import Prelude.Compat
9−
10−import Control.Monad.Identity
11−
12−import Data.Aeson.TH
13−import qualified Data.Map as M
14−import Data.Text (Text)
15−
16−import Language.PureScript.AST.Binders
17−import Language.PureScript.AST.Literals
18−import Language.PureScript.AST.Operators
19−import Language.PureScript.AST.SourcePos
20−import Language.PureScript.Types
21−import Language.PureScript.Names
22−import Language.PureScript.Kinds
23−import Language.PureScript.TypeClassDictionaries
24−import Language.PureScript.Comments
25−import Language.PureScript.Environment
26−import qualified Language.PureScript.Bundle as Bundle
27−
28−import qualified Text.Parsec as P
29−
30−-- | A map of locally-bound names in scope.
31−type Context = [(Ident, Type)]
32−
33−-- | Holds the data necessary to do type directed search for typed holes
34−data TypeSearch
35− = TSBefore Environment
36− -- ^ An Environment captured for later consumption by type directed search
37− | TSAfter [(Qualified Ident, Type)]
38− -- ^ Results of applying type directed search to the previously captured
39− -- Environment
40− deriving Show
41−
42−-- | A type of error messages
43−data SimpleErrorMessage
44− = ErrorParsingFFIModule FilePath (Maybe Bundle.ErrorMessage)
45− | ErrorParsingModule P.ParseError
46− | MissingFFIModule ModuleName
47− | MultipleFFIModules ModuleName [FilePath]
48− | UnnecessaryFFIModule ModuleName FilePath
49− | MissingFFIImplementations ModuleName [Ident]
50− | UnusedFFIImplementations ModuleName [Ident]
51− | InvalidFFIIdentifier ModuleName Text
52− | CannotGetFileInfo FilePath
53− | CannotReadFile FilePath
54− | CannotWriteFile FilePath
55− | InfiniteType Type
56− | InfiniteKind Kind
57− | MultipleValueOpFixities (OpName 'ValueOpName)
58− | MultipleTypeOpFixities (OpName 'TypeOpName)
59− | OrphanTypeDeclaration Ident
60− | RedefinedIdent Ident
61− | OverlappingNamesInLet
62− | UnknownName (Qualified Name)
63− | UnknownImport ModuleName Name
64− | UnknownImportDataConstructor ModuleName (ProperName 'TypeName) (ProperName 'ConstructorName)
65− | UnknownExport Name
66− | UnknownExportDataConstructor (ProperName 'TypeName) (ProperName 'ConstructorName)
67− | ScopeConflict Name [ModuleName]
68− | ScopeShadowing Name (Maybe ModuleName) [ModuleName]
69− | DeclConflict Name Name
70− | ExportConflict (Qualified Name) (Qualified Name)
71− | DuplicateModule ModuleName [SourceSpan]
72− | DuplicateTypeArgument Text
73− | InvalidDoBind
74− | InvalidDoLet
75− | CycleInDeclaration Ident
76− | CycleInTypeSynonym (Maybe (ProperName 'TypeName))
77− | CycleInModules [ModuleName]
78− | NameIsUndefined Ident
79− | UndefinedTypeVariable (ProperName 'TypeName)
80− | PartiallyAppliedSynonym (Qualified (ProperName 'TypeName))
81− | EscapedSkolem (Maybe Expr)
82− | TypesDoNotUnify Type Type
83− | KindsDoNotUnify Kind Kind
84− | ConstrainedTypeUnified Type Type
85− | OverlappingInstances (Qualified (ProperName 'ClassName)) [Type] [Qualified Ident]
86− | NoInstanceFound Constraint
87− | AmbiguousTypeVariables Type Constraint
88− | UnknownClass (Qualified (ProperName 'ClassName))
89− | PossiblyInfiniteInstance (Qualified (ProperName 'ClassName)) [Type]
90− | CannotDerive (Qualified (ProperName 'ClassName)) [Type]
91− | InvalidNewtypeInstance (Qualified (ProperName 'ClassName)) [Type]
92− | CannotFindDerivingType (ProperName 'TypeName)
93− | DuplicateLabel Text (Maybe Expr)
94− | DuplicateValueDeclaration Ident
95− | ArgListLengthsDiffer Ident
96− | OverlappingArgNames (Maybe Ident)
97− | MissingClassMember Ident
98− | ExtraneousClassMember Ident (Qualified (ProperName 'ClassName))
99− | ExpectedType Type Kind
100− | IncorrectConstructorArity (Qualified (ProperName 'ConstructorName))
101− | ExprDoesNotHaveType Expr Type
102− | PropertyIsMissing Text
103− | AdditionalProperty Text
104− | TypeSynonymInstance
105− | OrphanInstance Ident (Qualified (ProperName 'ClassName)) [Type]
106− | InvalidNewtype (ProperName 'TypeName)
107− | InvalidInstanceHead Type
108− | TransitiveExportError DeclarationRef [DeclarationRef]
109− | TransitiveDctorExportError DeclarationRef (ProperName 'ConstructorName)
110− | ShadowedName Ident
111− | ShadowedTypeVar Text
112− | UnusedTypeVar Text
113− | WildcardInferredType Type Context
114− | HoleInferredType Text Type Context TypeSearch
115− | MissingTypeDeclaration Ident Type
116− | OverlappingPattern [[Binder]] Bool
117− | IncompleteExhaustivityCheck
118− | MisleadingEmptyTypeImport ModuleName (ProperName 'TypeName)
119− | ImportHidingModule ModuleName
120− | UnusedImport ModuleName
121− | UnusedExplicitImport ModuleName [Name] (Maybe ModuleName) [DeclarationRef]
122− | UnusedDctorImport ModuleName (ProperName 'TypeName) (Maybe ModuleName) [DeclarationRef]
123− | UnusedDctorExplicitImport ModuleName (ProperName 'TypeName) [ProperName 'ConstructorName] (Maybe ModuleName) [DeclarationRef]
124− | DuplicateSelectiveImport ModuleName
125− | DuplicateImport ModuleName ImportDeclarationType (Maybe ModuleName)
126− | DuplicateImportRef Name
127− | DuplicateExportRef Name
128− | IntOutOfRange Integer Text Integer Integer
129− | ImplicitQualifiedImport ModuleName ModuleName [DeclarationRef]
130− | ImplicitImport ModuleName [DeclarationRef]
131− | HidingImport ModuleName [DeclarationRef]
132− | CaseBinderLengthDiffers Int [Binder]
133− | IncorrectAnonymousArgument
134− | InvalidOperatorInBinder (Qualified (OpName 'ValueOpName)) (Qualified Ident)
135− | DeprecatedRequirePath
136− | CannotGeneralizeRecursiveFunction Ident Type
137− | CannotDeriveNewtypeForData (ProperName 'TypeName)
138− | ExpectedWildcard (ProperName 'TypeName)
139− deriving (Show)
140−
141−-- | Error message hints, providing more detailed information about failure.
142−data ErrorMessageHint
143− = ErrorUnifyingTypes Type Type
144− | ErrorInExpression Expr
145− | ErrorInModule ModuleName
146− | ErrorInInstance (Qualified (ProperName 'ClassName)) [Type]
147− | ErrorInSubsumption Type Type
148− | ErrorCheckingAccessor Expr Text
149− | ErrorCheckingType Expr Type
150− | ErrorCheckingKind Type
151− | ErrorCheckingGuard
152− | ErrorInferringType Expr
153− | ErrorInApplication Expr Type Expr
154− | ErrorInDataConstructor (ProperName 'ConstructorName)
155− | ErrorInTypeConstructor (ProperName 'TypeName)
156− | ErrorInBindingGroup [Ident]
157− | ErrorInDataBindingGroup [ProperName 'TypeName]
158− | ErrorInTypeSynonym (ProperName 'TypeName)
159− | ErrorInValueDeclaration Ident
160− | ErrorInTypeDeclaration Ident
161− | ErrorInTypeClassDeclaration (ProperName 'ClassName)
162− | ErrorInForeignImport Ident
163− | ErrorSolvingConstraint Constraint
164− | PositionedError SourceSpan
165− deriving (Show)
166−
167−-- | Categories of hints
168−data HintCategory
169− = ExprHint
170− | KindHint
171− | CheckHint
172− | PositionHint
173− | SolverHint
174− | OtherHint
175− deriving (Show, Eq)
176−
177−data ErrorMessage = ErrorMessage
178− [ErrorMessageHint]
179− SimpleErrorMessage
180− deriving (Show)
181−
182−-- |
183−-- A module declaration, consisting of comments about the module, a module name,
184−-- a list of declarations, and a list of the declarations that are
185−-- explicitly exported. If the export list is Nothing, everything is exported.
186−--
187−data Module = Module SourceSpan [Comment] ModuleName [Declaration] (Maybe [DeclarationRef])
188− deriving (Show)
189−
190−-- | Return a module's name.
191−getModuleName :: Module -> ModuleName
192−getModuleName (Module _ _ name _ _) = name
193−
194−-- | Return a module's source span.
195−getModuleSourceSpan :: Module -> SourceSpan
196−getModuleSourceSpan (Module ss _ _ _ _) = ss
197−
198−-- |
199−-- Add an import declaration for a module if it does not already explicitly import it.
200−--
201−addDefaultImport :: ModuleName -> Module -> Module
202−addDefaultImport toImport m@(Module ss coms mn decls exps) =
203− if isExistingImport `any` decls || mn == toImport then m
204− else Module ss coms mn (ImportDeclaration toImport Implicit Nothing : decls) exps
205− where
206− isExistingImport (ImportDeclaration mn' _ _) | mn' == toImport = True
207− isExistingImport (PositionedDeclaration _ _ d) = isExistingImport d
208− isExistingImport _ = False
209−
210−-- |
211−-- An item in a list of explicit imports or exports
212−--
213−data DeclarationRef
214− -- |
215− -- A type constructor with data constructors
216− --
217− = TypeRef (ProperName 'TypeName) (Maybe [ProperName 'ConstructorName])
218− -- |
219− -- A type operator
220− --
221− | TypeOpRef (OpName 'TypeOpName)
222− -- |
223− -- A value
224− --
225− | ValueRef Ident
226− -- |
227− -- A value-level operator
228− --
229− | ValueOpRef (OpName 'ValueOpName)
230− -- |
231− -- A type class
232− --
233− | TypeClassRef (ProperName 'ClassName)
234− -- |
235− -- A type class instance, created during typeclass desugaring (name, class name, instance types)
236− --
237− | TypeInstanceRef Ident
238− -- |
239− -- A module, in its entirety
240− --
241− | ModuleRef ModuleName
242− -- |
243− -- A named kind
244− --
245− | KindRef (ProperName 'KindName)
246− -- |
247− -- A value re-exported from another module. These will be inserted during
248− -- elaboration in name desugaring.
249− --
250− | ReExportRef ModuleName DeclarationRef
251− -- |
252− -- A declaration reference with source position information
253− --
254− | PositionedDeclarationRef SourceSpan [Comment] DeclarationRef
255− deriving (Show)
256−
257−instance Eq DeclarationRef where
258− (TypeRef name dctors) == (TypeRef name' dctors') = name == name' && dctors == dctors'
259− (TypeOpRef name) == (TypeOpRef name') = name == name'
260− (ValueRef name) == (ValueRef name') = name == name'
261− (ValueOpRef name) == (ValueOpRef name') = name == name'
262− (TypeClassRef name) == (TypeClassRef name') = name == name'
263− (TypeInstanceRef name) == (TypeInstanceRef name') = name == name'
264− (ModuleRef name) == (ModuleRef name') = name == name'
265− (KindRef name) == (KindRef name') = name == name'
266− (ReExportRef mn ref) == (ReExportRef mn' ref') = mn == mn' && ref == ref'
267− (PositionedDeclarationRef _ _ r) == r' = r == r'
268− r == (PositionedDeclarationRef _ _ r') = r == r'
269− _ == _ = False
270−
271−-- enable sorting lists of explicitly imported refs when suggesting imports in linting, IDE, etc.
272−-- not an Ord because this implementation is not consistent with its Eq instance.
273−-- think of it as a notion of contextual, not inherent, ordering.
274−compDecRef :: DeclarationRef -> DeclarationRef -> Ordering
275−compDecRef (TypeRef name _) (TypeRef name' _) = compare name name'
276−compDecRef (TypeOpRef name) (TypeOpRef name') = compare name name'
277−compDecRef (ValueRef ident) (ValueRef ident') = compare ident ident'
278−compDecRef (ValueOpRef name) (ValueOpRef name') = compare name name'
279−compDecRef (TypeClassRef name) (TypeClassRef name') = compare name name'
280−compDecRef (TypeInstanceRef ident) (TypeInstanceRef ident') = compare ident ident'
281−compDecRef (ModuleRef name) (ModuleRef name') = compare name name'
282−compDecRef (KindRef name) (KindRef name') = compare name name'
283−compDecRef (ReExportRef name _) (ReExportRef name' _) = compare name name'
284−compDecRef (PositionedDeclarationRef _ _ ref) ref' = compDecRef ref ref'
285−compDecRef ref (PositionedDeclarationRef _ _ ref') = compDecRef ref ref'
286−compDecRef ref ref' = compare
287− (orderOf ref) (orderOf ref')
288− where
289− orderOf :: DeclarationRef -> Int
290− orderOf (TypeClassRef _) = 0
291− orderOf (TypeOpRef _) = 1
292− orderOf (TypeRef _ _) = 2
293− orderOf (ValueRef _) = 3
294− orderOf (ValueOpRef _) = 4
295− orderOf (KindRef _) = 5
296− orderOf _ = 6
297−
298−getTypeRef :: DeclarationRef -> Maybe (ProperName 'TypeName, Maybe [ProperName 'ConstructorName])
299−getTypeRef (TypeRef name dctors) = Just (name, dctors)
300−getTypeRef (PositionedDeclarationRef _ _ r) = getTypeRef r
301−getTypeRef _ = Nothing
302−
303−getTypeOpRef :: DeclarationRef -> Maybe (OpName 'TypeOpName)
304−getTypeOpRef (TypeOpRef op) = Just op
305−getTypeOpRef (PositionedDeclarationRef _ _ r) = getTypeOpRef r
306−getTypeOpRef _ = Nothing
307−
308−getValueRef :: DeclarationRef -> Maybe Ident
309−getValueRef (ValueRef name) = Just name
310−getValueRef (PositionedDeclarationRef _ _ r) = getValueRef r
311−getValueRef _ = Nothing
312−
313−getValueOpRef :: DeclarationRef -> Maybe (OpName 'ValueOpName)
314−getValueOpRef (ValueOpRef op) = Just op
315−getValueOpRef (PositionedDeclarationRef _ _ r) = getValueOpRef r
316−getValueOpRef _ = Nothing
317−
318−getTypeClassRef :: DeclarationRef -> Maybe (ProperName 'ClassName)
319−getTypeClassRef (TypeClassRef name) = Just name
320−getTypeClassRef (PositionedDeclarationRef _ _ r) = getTypeClassRef r
321−getTypeClassRef _ = Nothing
322−
323−getKindRef :: DeclarationRef -> Maybe (ProperName 'KindName)
324−getKindRef (KindRef name) = Just name
325−getKindRef (PositionedDeclarationRef _ _ r) = getKindRef r
326−getKindRef _ = Nothing
327−
328−isModuleRef :: DeclarationRef -> Bool
329−isModuleRef (PositionedDeclarationRef _ _ r) = isModuleRef r
330−isModuleRef (ModuleRef _) = True
331−isModuleRef _ = False
332−
333−-- |
334−-- The data type which specifies type of import declaration
335−--
336−data ImportDeclarationType
337− -- |
338− -- An import with no explicit list: `import M`.
339− --
340− = Implicit
341− -- |
342− -- An import with an explicit list of references to import: `import M (foo)`
343− --
344− | Explicit [DeclarationRef]
345− -- |
346− -- An import with a list of references to hide: `import M hiding (foo)`
347− --
348− | Hiding [DeclarationRef]
349− deriving (Eq, Show)
350−
351−isImplicit :: ImportDeclarationType -> Bool
352−isImplicit Implicit = True
353−isImplicit _ = False
354−
355−isExplicit :: ImportDeclarationType -> Bool
356−isExplicit (Explicit _) = True
357−isExplicit _ = False
358−
359−-- |
360−-- The data type of declarations
361−--
362−data Declaration
363− -- |
364− -- A data type declaration (data or newtype, name, arguments, data constructors)
365− --
366− = DataDeclaration DataDeclType (ProperName 'TypeName) [(Text, Maybe Kind)] [(ProperName 'ConstructorName, [Type])]
367− -- |
368− -- A minimal mutually recursive set of data type declarations
369− --
370− | DataBindingGroupDeclaration [Declaration]
371− -- |
372− -- A type synonym declaration (name, arguments, type)
373− --
374− | TypeSynonymDeclaration (ProperName 'TypeName) [(Text, Maybe Kind)] Type
375− -- |
376− -- A type declaration for a value (name, ty)
377− --
378− | TypeDeclaration Ident Type
379− -- |
380− -- A value declaration (name, top-level binders, optional guard, value)
381− --
382− | ValueDeclaration Ident NameKind [Binder] (Either [(Guard, Expr)] Expr)
383− -- |
384− -- A minimal mutually recursive set of value declarations
385− --
386− | BindingGroupDeclaration [(Ident, NameKind, Expr)]
387− -- |
388− -- A foreign import declaration (name, type)
389− --
390− | ExternDeclaration Ident Type
391− -- |
392− -- A data type foreign import (name, kind)
393− --
394− | ExternDataDeclaration (ProperName 'TypeName) Kind
395− -- |
396− -- A foreign kind import (name)
397− --
398− | ExternKindDeclaration (ProperName 'KindName)
399− -- |
400− -- A fixity declaration
401− --
402− | FixityDeclaration (Either ValueFixity TypeFixity)
403− -- |
404− -- A module import (module name, qualified/unqualified/hiding, optional "qualified as" name)
405− --
406− | ImportDeclaration ModuleName ImportDeclarationType (Maybe ModuleName)
407− -- |
408− -- A type class declaration (name, argument, implies, member declarations)
409− --
410− | TypeClassDeclaration (ProperName 'ClassName) [(Text, Maybe Kind)] [Constraint] [FunctionalDependency] [Declaration]
411− -- |
412− -- A type instance declaration (name, dependencies, class name, instance types, member
413− -- declarations)
414− --
415− | TypeInstanceDeclaration Ident [Constraint] (Qualified (ProperName 'ClassName)) [Type] TypeInstanceBody
416− -- |
417− -- A declaration with source position information
418− --
419− | PositionedDeclaration SourceSpan [Comment] Declaration
420− deriving (Show)
421−
422−data ValueFixity = ValueFixity Fixity (Qualified (Either Ident (ProperName 'ConstructorName))) (OpName 'ValueOpName)
423− deriving (Eq, Ord, Show)
424−
425−data TypeFixity = TypeFixity Fixity (Qualified (ProperName 'TypeName)) (OpName 'TypeOpName)
426− deriving (Eq, Ord, Show)
427−
428−pattern ValueFixityDeclaration :: Fixity -> Qualified (Either Ident (ProperName 'ConstructorName)) -> OpName 'ValueOpName -> Declaration
429−pattern ValueFixityDeclaration fixity name op = FixityDeclaration (Left (ValueFixity fixity name op))
430−
431−pattern TypeFixityDeclaration :: Fixity -> Qualified (ProperName 'TypeName) -> OpName 'TypeOpName -> Declaration
432−pattern TypeFixityDeclaration fixity name op = FixityDeclaration (Right (TypeFixity fixity name op))
433−
434−-- | The members of a type class instance declaration
435−data TypeInstanceBody
436− = DerivedInstance
437− -- ^ This is a derived instance
438− | NewtypeInstance
439− -- ^ This is an instance derived from a newtype
440− | NewtypeInstanceWithDictionary Expr
441− -- ^ This is an instance derived from a newtype, desugared to include a
442− -- dictionary for the type under the newtype.
443− | ExplicitInstance [Declaration]
444− -- ^ This is a regular (explicit) instance
445− deriving (Show)
446−
447−mapTypeInstanceBody :: ([Declaration] -> [Declaration]) -> TypeInstanceBody -> TypeInstanceBody
448−mapTypeInstanceBody f = runIdentity . traverseTypeInstanceBody (Identity . f)
449−
450−-- | A traversal for TypeInstanceBody
451−traverseTypeInstanceBody :: (Applicative f) => ([Declaration] -> f [Declaration]) -> TypeInstanceBody -> f TypeInstanceBody
452−traverseTypeInstanceBody f (ExplicitInstance ds) = ExplicitInstance <$> f ds
453−traverseTypeInstanceBody _ other = pure other
454−
455−-- |
456−-- Test if a declaration is a value declaration
457−--
458−isValueDecl :: Declaration -> Bool
459−isValueDecl ValueDeclaration{} = True
460−isValueDecl (PositionedDeclaration _ _ d) = isValueDecl d
461−isValueDecl _ = False
462−
463−-- |
464−-- Test if a declaration is a data type or type synonym declaration
465−--
466−isDataDecl :: Declaration -> Bool
467−isDataDecl DataDeclaration{} = True
468−isDataDecl TypeSynonymDeclaration{} = True
469−isDataDecl (PositionedDeclaration _ _ d) = isDataDecl d
470−isDataDecl _ = False
471−
472−-- |
473−-- Test if a declaration is a module import
474−--
475−isImportDecl :: Declaration -> Bool
476−isImportDecl ImportDeclaration{} = True
477−isImportDecl (PositionedDeclaration _ _ d) = isImportDecl d
478−isImportDecl _ = False
479−
480−-- |
481−-- Test if a declaration is a data type foreign import
482−--
483−isExternDataDecl :: Declaration -> Bool
484−isExternDataDecl ExternDataDeclaration{} = True
485−isExternDataDecl (PositionedDeclaration _ _ d) = isExternDataDecl d
486−isExternDataDecl _ = False
487−
488−-- |
489−-- Test if a declaration is a foreign kind import
490−--
491−isExternKindDecl :: Declaration -> Bool
492−isExternKindDecl ExternKindDeclaration{} = True
493−isExternKindDecl (PositionedDeclaration _ _ d) = isExternKindDecl d
494−isExternKindDecl _ = False
495−
496−-- |
497−-- Test if a declaration is a fixity declaration
498−--
499−isFixityDecl :: Declaration -> Bool
500−isFixityDecl FixityDeclaration{} = True
501−isFixityDecl (PositionedDeclaration _ _ d) = isFixityDecl d
502−isFixityDecl _ = False
503−
504−getFixityDecl :: Declaration -> Maybe (Either ValueFixity TypeFixity)
505−getFixityDecl (FixityDeclaration fixity) = Just fixity
506−getFixityDecl (PositionedDeclaration _ _ d) = getFixityDecl d
507−getFixityDecl _ = Nothing
508−
509−-- |
510−-- Test if a declaration is a foreign import
511−--
512−isExternDecl :: Declaration -> Bool
513−isExternDecl ExternDeclaration{} = True
514−isExternDecl (PositionedDeclaration _ _ d) = isExternDecl d
515−isExternDecl _ = False
516−
517−-- |
518−-- Test if a declaration is a type class instance declaration
519−--
520−isTypeClassInstanceDeclaration :: Declaration -> Bool
521−isTypeClassInstanceDeclaration TypeInstanceDeclaration{} = True
522−isTypeClassInstanceDeclaration (PositionedDeclaration _ _ d) = isTypeClassInstanceDeclaration d
523−isTypeClassInstanceDeclaration _ = False
524−
525−-- |
526−-- Test if a declaration is a type class declaration
527−--
528−isTypeClassDeclaration :: Declaration -> Bool
529−isTypeClassDeclaration TypeClassDeclaration{} = True
530−isTypeClassDeclaration (PositionedDeclaration _ _ d) = isTypeClassDeclaration d
531−isTypeClassDeclaration _ = False
532−
533−-- |
534−-- Recursively flatten data binding groups in the list of declarations
535−flattenDecls :: [Declaration] -> [Declaration]
536−flattenDecls = concatMap flattenOne
537− where flattenOne :: Declaration -> [Declaration]
538− flattenOne (DataBindingGroupDeclaration decls) = concatMap flattenOne decls
539− flattenOne d = [d]
540−
541−-- |
542−-- A guard is just a boolean-valued expression that appears alongside a set of binders
543−--
544−type Guard = Expr
545−
546−-- |
547−-- Data type for expressions and terms
548−--
549−data Expr
550− -- |
551− -- A literal value
552− --
553− = Literal (Literal Expr)
554− -- |
555− -- A prefix -, will be desugared
556− --
557− | UnaryMinus Expr
558− -- |
559− -- Binary operator application. During the rebracketing phase of desugaring, this data constructor
560− -- will be removed.
561− --
562− | BinaryNoParens Expr Expr Expr
563− -- |
564− -- Explicit parentheses. During the rebracketing phase of desugaring, this data constructor
565− -- will be removed.
566− --
567− -- Note: although it seems this constructor is not used, it _is_ useful, since it prevents
568− -- certain traversals from matching.
569− --
570− | Parens Expr
571− -- |
572− -- An record property accessor expression (e.g. `obj.x` or `_.x`).
573− -- Anonymous arguments will be removed during desugaring and expanded
574− -- into a lambda that reads a property from a record.
575− --
576− | Accessor Text Expr
577− -- |
578− -- Partial record update
579− --
580− | ObjectUpdate Expr [(Text, Expr)]
581− -- |
582− -- Function introduction
583− --
584− | Abs (Either Ident Binder) Expr
585− -- |
586− -- Function application
587− --
588− | App Expr Expr
589− -- |
590− -- Variable
591− --
592− | Var (Qualified Ident)
593− -- |
594− -- An operator. This will be desugared into a function during the "operators"
595− -- phase of desugaring.
596− --
597− | Op (Qualified (OpName 'ValueOpName))
598− -- |
599− -- Conditional (if-then-else expression)
600− --
601− | IfThenElse Expr Expr Expr
602− -- |
603− -- A data constructor
604− --
605− | Constructor (Qualified (ProperName 'ConstructorName))
606− -- |
607− -- A case expression. During the case expansion phase of desugaring, top-level binders will get
608− -- desugared into case expressions, hence the need for guards and multiple binders per branch here.
609− --
610− | Case [Expr] [CaseAlternative]
611− -- |
612− -- A value with a type annotation
613− --
614− | TypedValue Bool Expr Type
615− -- |
616− -- A let binding
617− --
618− | Let [Declaration] Expr
619− -- |
620− -- A do-notation block
621− --
622− | Do [DoNotationElement]
623− -- |
624− -- An application of a typeclass dictionary constructor. The value should be
625− -- an ObjectLiteral.
626− --
627− | TypeClassDictionaryConstructorApp (Qualified (ProperName 'ClassName)) Expr
628− -- |
629− -- A placeholder for a type class dictionary to be inserted later. At the end of type checking, these
630− -- placeholders will be replaced with actual expressions representing type classes dictionaries which
631− -- can be evaluated at runtime. The constructor arguments represent (in order): whether or not to look
632− -- at superclass implementations when searching for a dictionary, the type class name and
633− -- instance type, and the type class dictionaries in scope.
634− --
635− | TypeClassDictionary Constraint
636− (M.Map (Maybe ModuleName) (M.Map (Qualified (ProperName 'ClassName)) (M.Map (Qualified Ident) NamedDict)))
637− [ErrorMessageHint]
638− -- |
639− -- A typeclass dictionary accessor, the implementation is left unspecified until CoreFn desugaring.
640− --
641− | TypeClassDictionaryAccessor (Qualified (ProperName 'ClassName)) Ident
642− -- |
643− -- A placeholder for a superclass dictionary to be turned into a TypeClassDictionary during typechecking
644− --
645− | DeferredDictionary (Qualified (ProperName 'ClassName)) [Type]
646− -- |
647− -- A placeholder for an anonymous function argument
648− --
649− | AnonymousArgument
650− -- |
651− -- A typed hole that will be turned into a hint/error duing typechecking
652− --
653− | Hole Text
654− -- |
655− -- A value with source position information
656− --
657− | PositionedValue SourceSpan [Comment] Expr
658− deriving (Show)
659−
660−-- |
661−-- An alternative in a case statement
662−--
663−data CaseAlternative = CaseAlternative
664− { -- |
665− -- A collection of binders with which to match the inputs
666− --
667− caseAlternativeBinders :: [Binder]
668− -- |
669− -- The result expression or a collect of guarded expressions
670− --
671− , caseAlternativeResult :: Either [(Guard, Expr)] Expr
672− } deriving (Show)
673−
674−-- |
675−-- A statement in a do-notation block
676−--
677−data DoNotationElement
678− -- |
679− -- A monadic value without a binder
680− --
681− = DoNotationValue Expr
682− -- |
683− -- A monadic value with a binder
684− --
685− | DoNotationBind Binder Expr
686− -- |
687− -- A let statement, i.e. a pure value with a binder
688− --
689− | DoNotationLet [Declaration]
690− -- |
691− -- A do notation element with source position information
692− --
693− | PositionedDoNotationElement SourceSpan [Comment] DoNotationElement
694− deriving (Show)
695−
696−$(deriveJSON (defaultOptions { sumEncoding = ObjectWithSingleField }) ''DeclarationRef)
697−$(deriveJSON (defaultOptions { sumEncoding = ObjectWithSingleField }) ''ImportDeclarationType)
src/Language/PureScript/AST/Exported.hsdeleted−155
@@ -1,155 +0,0 @@
1−module Language.PureScript.AST.Exported
2− ( exportedDeclarations
3− , isExported
4− ) where
5−
6−import Prelude.Compat
7−
8−import Control.Category ((>>>))
9−
10−import Data.Maybe (mapMaybe)
11−
12−import Language.PureScript.AST.Declarations
13−import Language.PureScript.Types
14−import Language.PureScript.Names
15−
16−-- |
17−-- Return a list of all declarations which are exported from a module.
18−-- This function descends into data declarations to filter out unexported
19−-- data constructors, and also filters out type instance declarations if
20−-- they refer to classes or types which are not themselves exported.
21−--
22−-- Note that this function assumes that the module has already had its imports
23−-- desugared using 'Language.PureScript.Sugar.Names.desugarImports'. It will
24−-- produce incorrect results if this is not the case - for example, type class
25−-- instances will be incorrectly removed in some cases.
26−--
27−exportedDeclarations :: Module -> [Declaration]
28−exportedDeclarations (Module _ _ mn decls exps) = go decls
29− where
30− go = flattenDecls
31− >>> filter (isExported exps)
32− >>> map (filterDataConstructors exps)
33− >>> filterInstances mn exps
34−
35−-- |
36−-- Filter out all data constructors from a declaration which are not exported.
37−-- If the supplied declaration is not a data declaration, this function returns
38−-- it unchanged.
39−--
40−filterDataConstructors :: Maybe [DeclarationRef] -> Declaration -> Declaration
41−filterDataConstructors exps (DataDeclaration dType tyName tyArgs dctors) =
42− DataDeclaration dType tyName tyArgs $
43− filter (isDctorExported tyName exps . fst) dctors
44−filterDataConstructors exps (PositionedDeclaration srcSpan coms d) =
45− PositionedDeclaration srcSpan coms (filterDataConstructors exps d)
46−filterDataConstructors _ other = other
47−
48−-- |
49−-- Filter out all the type instances from a list of declarations which
50−-- reference a type or type class which is both local and not exported.
51−--
52−-- Note that this function assumes that the module has already had its imports
53−-- desugared using "Language.PureScript.Sugar.Names.desugarImports". It will
54−-- produce incorrect results if this is not the case - for example, type class
55−-- instances will be incorrectly removed in some cases.
56−--
57−filterInstances
58− :: ModuleName
59− -> Maybe [DeclarationRef]
60− -> [Declaration]
61− -> [Declaration]
62−filterInstances _ Nothing = id
63−filterInstances mn (Just exps) =
64− let refs = Left `map` mapMaybe typeClassName exps
65− ++ Right `map` mapMaybe typeName exps
66− in filter (all (visibleOutside refs) . typeInstanceConstituents)
67− where
68− -- Given a Qualified ProperName, and a list of all exported types and type
69− -- classes, returns whether the supplied Qualified ProperName is visible
70− -- outside this module. This is true if one of the following hold:
71− --
72− -- * the name is defined in the same module and is exported,
73− -- * the name is defined in a different module (and must be exported from
74− -- that module; the code would fail to compile otherwise).
75− visibleOutside
76− :: [Either (ProperName 'ClassName) (ProperName 'TypeName)]
77− -> Either (Qualified (ProperName 'ClassName)) (Qualified (ProperName 'TypeName))
78− -> Bool
79− visibleOutside refs q
80− | either checkQual checkQual q = True
81− | otherwise = either (Left . disqualify) (Right . disqualify) q `elem` refs
82−
83− -- Check that a qualified name is qualified for a different module
84− checkQual :: Qualified a -> Bool
85− checkQual q = isQualified q && not (isQualifiedWith mn q)
86−
87− typeName :: DeclarationRef -> Maybe (ProperName 'TypeName)
88− typeName (TypeRef n _) = Just n
89− typeName (PositionedDeclarationRef _ _ r) = typeName r
90− typeName _ = Nothing
91−
92− typeClassName :: DeclarationRef -> Maybe (ProperName 'ClassName)
93− typeClassName (TypeClassRef n) = Just n
94− typeClassName (PositionedDeclarationRef _ _ r) = typeClassName r
95− typeClassName _ = Nothing
96−
97−-- |
98−-- Get all type and type class names referenced by a type instance declaration.
99−--
100−typeInstanceConstituents :: Declaration -> [Either (Qualified (ProperName 'ClassName)) (Qualified (ProperName 'TypeName))]
101−typeInstanceConstituents (TypeInstanceDeclaration _ constraints className tys _) =
102− Left className : (concatMap fromConstraint constraints ++ concatMap fromType tys)
103− where
104−
105− fromConstraint c = Left (constraintClass c) : concatMap fromType (constraintArgs c)
106− fromType = everythingOnTypes (++) go
107−
108− -- Note that type synonyms are disallowed in instance declarations, so
109− -- we don't need to handle them here.
110− go (TypeConstructor n) = [Right n]
111− go (ConstrainedType cs _) = concatMap fromConstraint cs
112− go _ = []
113−
114−typeInstanceConstituents (PositionedDeclaration _ _ d) = typeInstanceConstituents d
115−typeInstanceConstituents _ = []
116−
117−
118−-- |
119−-- Test if a declaration is exported, given a module's export list. Note that
120−-- this function does not account for type instance declarations of
121−-- non-exported types, or non-exported data constructors. Therefore, you should
122−-- prefer 'exportedDeclarations' to this function, where possible.
123−--
124−isExported :: Maybe [DeclarationRef] -> Declaration -> Bool
125−isExported Nothing _ = True
126−isExported _ TypeInstanceDeclaration{} = True
127−isExported exps (PositionedDeclaration _ _ d) = isExported exps d
128−isExported (Just exps) decl = any (matches decl) exps
129− where
130− matches (TypeDeclaration ident _) (ValueRef ident') = ident == ident'
131− matches (ValueDeclaration ident _ _ _) (ValueRef ident') = ident == ident'
132− matches (ExternDeclaration ident _) (ValueRef ident') = ident == ident'
133− matches (DataDeclaration _ ident _ _) (TypeRef ident' _) = ident == ident'
134− matches (ExternDataDeclaration ident _) (TypeRef ident' _) = ident == ident'
135− matches (ExternKindDeclaration ident) (KindRef ident') = ident == ident'
136− matches (TypeSynonymDeclaration ident _ _) (TypeRef ident' _) = ident == ident'
137− matches (TypeClassDeclaration ident _ _ _ _) (TypeClassRef ident') = ident == ident'
138− matches (ValueFixityDeclaration _ _ op) (ValueOpRef op') = op == op'
139− matches (TypeFixityDeclaration _ _ op) (TypeOpRef op') = op == op'
140− matches (PositionedDeclaration _ _ d) r = d `matches` r
141− matches d (PositionedDeclarationRef _ _ r) = d `matches` r
142− matches _ _ = False
143−
144−-- |
145−-- Test if a data constructor for a given type is exported, given a module's
146−-- export list. Prefer 'exportedDeclarations' to this function, where possible.
147−--
148−isDctorExported :: ProperName 'TypeName -> Maybe [DeclarationRef] -> ProperName 'ConstructorName -> Bool
149−isDctorExported _ Nothing _ = True
150−isDctorExported ident (Just exps) ctor = test `any` exps
151− where
152− test (PositionedDeclarationRef _ _ d) = test d
153− test (TypeRef ident' Nothing) = ident == ident'
154− test (TypeRef ident' (Just ctors)) = ident == ident' && ctor `elem` ctors
155− test _ = False
src/Language/PureScript/AST/Literals.hsdeleted−38
@@ -1,38 +0,0 @@
1−-- |
2−-- The core functional representation for literal values.
3−--
4−module Language.PureScript.AST.Literals where
5−
6−import Prelude.Compat
7−import Data.Text (Text)
8−
9−-- |
10−-- Data type for literal values. Parameterised so it can be used for Exprs and
11−-- Binders.
12−--
13−data Literal a
14− -- |
15− -- A numeric literal
16− --
17− = NumericLiteral (Either Integer Double)
18− -- |
19− -- A string literal
20− --
21− | StringLiteral Text
22− -- |
23− -- A character literal
24− --
25− | CharLiteral Char
26− -- |
27− -- A boolean literal
28− --
29− | BooleanLiteral Bool
30− -- |
31− -- An array literal
32− --
33− | ArrayLiteral [a]
34− -- |
35− -- An object literal
36− --
37− | ObjectLiteral [(Text, a)]
38− deriving (Eq, Ord, Show, Functor)
src/Language/PureScript/AST/Operators.hsdeleted−51
@@ -1,51 +0,0 @@
1−-- |
2−-- Operators fixity and associativity
3−--
4−module Language.PureScript.AST.Operators where
5−
6−import Prelude.Compat
7−
8−import Data.Aeson ((.=))
9−import qualified Data.Aeson as A
10−
11−import Language.PureScript.Crash
12−
13−-- |
14−-- A precedence level for an infix operator
15−--
16−type Precedence = Integer
17−
18−-- |
19−-- Associativity for infix operators
20−--
21−data Associativity = Infixl | Infixr | Infix
22− deriving (Show, Eq, Ord)
23−
24−showAssoc :: Associativity -> String
25−showAssoc Infixl = "infixl"
26−showAssoc Infixr = "infixr"
27−showAssoc Infix = "infix"
28−
29−readAssoc :: String -> Associativity
30−readAssoc "infixl" = Infixl
31−readAssoc "infixr" = Infixr
32−readAssoc "infix" = Infix
33−readAssoc _ = internalError "readAssoc: no parse"
34−
35−instance A.ToJSON Associativity where
36− toJSON = A.toJSON . showAssoc
37−
38−instance A.FromJSON Associativity where
39− parseJSON = fmap readAssoc . A.parseJSON
40−
41−-- |
42−-- Fixity data for infix operators
43−--
44−data Fixity = Fixity Associativity Precedence
45− deriving (Show, Eq, Ord)
46−
47−instance A.ToJSON Fixity where
48− toJSON (Fixity associativity precedence) =
49− A.object [ "associativity" .= associativity
50− , "precedence" .= precedence
51− ]
src/Language/PureScript/AST/SourcePos.hsdeleted−81
@@ -1,81 +0,0 @@
1−-- |
2−-- Source position information
3−--
4−module Language.PureScript.AST.SourcePos where
5−
6−import Prelude.Compat
7−
8−import Data.Aeson ((.=), (.:))
9−import qualified Data.Aeson as A
10−import Data.Monoid
11−import qualified Data.Text as T
12−import Data.Text (Text)
13−
14−-- |
15−-- Source position information
16−--
17−data SourcePos = SourcePos
18− { -- |
19− -- Line number
20− --
21− sourcePosLine :: Int
22− -- |
23− -- Column number
24− --
25− , sourcePosColumn :: Int
26− } deriving (Show, Eq, Ord)
27−
28−displaySourcePos :: SourcePos -> Text
29−displaySourcePos sp =
30− "line " <> T.pack (show (sourcePosLine sp)) <>
31− ", column " <> T.pack (show (sourcePosColumn sp))
32−
33−instance A.ToJSON SourcePos where
34− toJSON SourcePos{..} =
35− A.toJSON [sourcePosLine, sourcePosColumn]
36−
37−instance A.FromJSON SourcePos where
38− parseJSON arr = do
39− [line, col] <- A.parseJSON arr
40− return $ SourcePos line col
41−
42−data SourceSpan = SourceSpan
43− { -- |
44− -- Source name
45− --
46− spanName :: String
47− -- |
48− -- Start of the span
49− --
50− , spanStart :: SourcePos
51− -- End of the span
52− --
53− , spanEnd :: SourcePos
54− } deriving (Show, Eq, Ord)
55−
56−displayStartEndPos :: SourceSpan -> Text
57−displayStartEndPos sp =
58− displaySourcePos (spanStart sp) <> " - " <>
59− displaySourcePos (spanEnd sp)
60−
61−displaySourceSpan :: SourceSpan -> Text
62−displaySourceSpan sp =
63− T.pack (spanName sp) <> " " <>
64− displayStartEndPos sp
65−
66−instance A.ToJSON SourceSpan where
67− toJSON SourceSpan{..} =
68− A.object [ "name" .= spanName
69− , "start" .= spanStart
70− , "end" .= spanEnd
71− ]
72−
73−instance A.FromJSON SourceSpan where
74− parseJSON = A.withObject "SourceSpan" $ \o ->
75− SourceSpan <$>
76− o .: "name" <*>
77− o .: "start" <*>
78− o .: "end"
79−
80−internalModuleSourceSpan :: String -> SourceSpan
81−internalModuleSourceSpan name = SourceSpan name (SourcePos 0 0) (SourcePos 0 0)
src/Language/PureScript/AST/Traversals.hsdeleted−638

This diff is too big to show here.

src/Language/PureScript/Bundle.hsdeleted−710

This diff is too big to show here.

src/Language/PureScript/CodeGen.hsdeleted−8

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS.hsdeleted−451

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/AST.hsdeleted−405

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Common.hsdeleted−237

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Optimizer.hsdeleted−73

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Optimizer/Blocks.hsdeleted−32

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Optimizer/Common.hsdeleted−84

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Optimizer/Inliner.hsdeleted−377

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Optimizer/MagicDo.hsdeleted−136

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Optimizer/TCO.hsdeleted−121

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Optimizer/Unused.hsdeleted−35

This diff is too big to show here.

src/Language/PureScript/Comments.hsdeleted−18

This diff is too big to show here.

src/Language/PureScript/Constants.hsdeleted−443

This diff is too big to show here.

src/Language/PureScript/CoreFn.hsdeleted−15

This diff is too big to show here.

src/Language/PureScript/CoreFn/Ann.hsdeleted−25

This diff is too big to show here.

src/Language/PureScript/CoreFn/Binders.hsdeleted−42

This diff is too big to show here.

src/Language/PureScript/CoreFn/Desugar.hsdeleted−278

This diff is too big to show here.

src/Language/PureScript/CoreFn/Expr.hsdeleted−122

This diff is too big to show here.

src/Language/PureScript/CoreFn/Meta.hsdeleted−42

This diff is too big to show here.

src/Language/PureScript/CoreFn/Module.hsdeleted−22

This diff is too big to show here.

src/Language/PureScript/CoreFn/ToJSON.hsdeleted−118

This diff is too big to show here.

src/Language/PureScript/CoreFn/Traversals.hsdeleted−77

This diff is too big to show here.

src/Language/PureScript/Crash.hsdeleted−11

This diff is too big to show here.

src/Language/PureScript/Docs.hsdeleted−15

This diff is too big to show here.

src/Language/PureScript/Docs/AsMarkdown.hsdeleted−140

This diff is too big to show here.

src/Language/PureScript/Docs/Convert.hsdeleted−203

This diff is too big to show here.

src/Language/PureScript/Docs/Convert/ReExports.hsdeleted−535

This diff is too big to show here.

src/Language/PureScript/Docs/Convert/Single.hsdeleted−204

This diff is too big to show here.

src/Language/PureScript/Docs/ParseAndBookmark.hsdeleted−97

This diff is too big to show here.

src/Language/PureScript/Docs/Prim.hsdeleted−244

This diff is too big to show here.

src/Language/PureScript/Docs/Render.hsdeleted−162

This diff is too big to show here.

src/Language/PureScript/Docs/RenderedCode.hsdeleted−8

This diff is too big to show here.

src/Language/PureScript/Docs/RenderedCode/Render.hsdeleted−213

This diff is too big to show here.

src/Language/PureScript/Docs/RenderedCode/Types.hsdeleted−206

This diff is too big to show here.

src/Language/PureScript/Docs/Types.hsdeleted−645

This diff is too big to show here.

src/Language/PureScript/Docs/Utils/MonoidExtras.hsdeleted−9

This diff is too big to show here.

src/Language/PureScript/Environment.hsdeleted−371

This diff is too big to show here.

src/Language/PureScript/Errors.hsdeleted−1331

This diff is too big to show here.

src/Language/PureScript/Errors/JSON.hsdeleted−76

This diff is too big to show here.

src/Language/PureScript/Externs.hsdeleted−238

This diff is too big to show here.

src/Language/PureScript/Ide.hsdeleted−193

This diff is too big to show here.

src/Language/PureScript/Ide/CaseSplit.hsdeleted−148

This diff is too big to show here.

src/Language/PureScript/Ide/Command.hsdeleted−160

This diff is too big to show here.

src/Language/PureScript/Ide/Completion.hsdeleted−30

This diff is too big to show here.

src/Language/PureScript/Ide/Conversions.hsdeleted−29

This diff is too big to show here.

src/Language/PureScript/Ide/Error.hsdeleted−53

This diff is too big to show here.

src/Language/PureScript/Ide/Externs.hsdeleted−149

This diff is too big to show here.

src/Language/PureScript/Ide/Filter.hsdeleted−91

This diff is too big to show here.

src/Language/PureScript/Ide/Imports.hsdeleted−331

This diff is too big to show here.

src/Language/PureScript/Ide/Logging.hsdeleted−37

This diff is too big to show here.

src/Language/PureScript/Ide/Matcher.hsdeleted−123

This diff is too big to show here.

src/Language/PureScript/Ide/Pursuit.hsdeleted−73

This diff is too big to show here.

src/Language/PureScript/Ide/Rebuild.hsdeleted−160

This diff is too big to show here.

src/Language/PureScript/Ide/Reexports.hsdeleted−110

This diff is too big to show here.

src/Language/PureScript/Ide/SourceFile.hsdeleted−126

This diff is too big to show here.

src/Language/PureScript/Ide/State.hsdeleted−262

This diff is too big to show here.

src/Language/PureScript/Ide/Types.hsdeleted−306

This diff is too big to show here.

src/Language/PureScript/Ide/Util.hsdeleted−116

This diff is too big to show here.

src/Language/PureScript/Ide/Watcher.hsdeleted−53

This diff is too big to show here.

src/Language/PureScript/Interactive.hsdeleted−290

This diff is too big to show here.

src/Language/PureScript/Interactive/Completion.hsdeleted−223

This diff is too big to show here.

src/Language/PureScript/Interactive/Directive.hsdeleted−103

This diff is too big to show here.

src/Language/PureScript/Interactive/IO.hsdeleted−34

This diff is too big to show here.

src/Language/PureScript/Interactive/Message.hsdeleted−56

This diff is too big to show here.

src/Language/PureScript/Interactive/Module.hsdeleted−99

This diff is too big to show here.

src/Language/PureScript/Interactive/Parser.hsdeleted−125

This diff is too big to show here.

src/Language/PureScript/Interactive/Printer.hsdeleted−131

This diff is too big to show here.

src/Language/PureScript/Interactive/Types.hsdeleted−128

This diff is too big to show here.

src/Language/PureScript/Kinds.hsdeleted−44

This diff is too big to show here.

src/Language/PureScript/Linter.hsdeleted−103

This diff is too big to show here.

src/Language/PureScript/Linter/Exhaustive.hsdeleted−348

This diff is too big to show here.

src/Language/PureScript/Linter/Imports.hsdeleted−365

This diff is too big to show here.

src/Language/PureScript/Make.hsdeleted−478

This diff is too big to show here.

src/Language/PureScript/ModuleDependencies.hsdeleted−100

This diff is too big to show here.

src/Language/PureScript/Names.hsdeleted−213

This diff is too big to show here.

src/Language/PureScript/Options.hsdeleted−42

This diff is too big to show here.

src/Language/PureScript/Parser.hsdeleted−23

This diff is too big to show here.

src/Language/PureScript/Parser/Common.hsdeleted−162

This diff is too big to show here.

src/Language/PureScript/Parser/Declarations.hsdeleted−592

This diff is too big to show here.

src/Language/PureScript/Parser/Kinds.hsdeleted−40

This diff is too big to show here.

src/Language/PureScript/Parser/Lexer.hsdeleted−611

This diff is too big to show here.

src/Language/PureScript/Parser/State.hsdeleted−18

This diff is too big to show here.

src/Language/PureScript/Parser/Types.hsdeleted−128

This diff is too big to show here.

src/Language/PureScript/Pretty.hsdeleted−17

This diff is too big to show here.

src/Language/PureScript/Pretty/Common.hsdeleted−167

This diff is too big to show here.

src/Language/PureScript/Pretty/JS.hsdeleted−315

This diff is too big to show here.

src/Language/PureScript/Pretty/Kinds.hsdeleted−55

This diff is too big to show here.

src/Language/PureScript/Pretty/Types.hsdeleted−188

This diff is too big to show here.

src/Language/PureScript/Pretty/Values.hsdeleted−197

This diff is too big to show here.

src/Language/PureScript/Publish.hsdeleted−412

This diff is too big to show here.

src/Language/PureScript/Publish/BoxesHelpers.hsdeleted−44

This diff is too big to show here.

src/Language/PureScript/Publish/ErrorsWarnings.hsdeleted−428

This diff is too big to show here.

src/Language/PureScript/Publish/Utils.hsdeleted−41

This diff is too big to show here.

src/Language/PureScript/Renamer.hsdeleted−193

This diff is too big to show here.

src/Language/PureScript/Sugar.hsdeleted−67

This diff is too big to show here.

src/Language/PureScript/Sugar/BindingGroups.hsdeleted−222

This diff is too big to show here.

src/Language/PureScript/Sugar/CaseDeclarations.hsdeleted−188

This diff is too big to show here.

src/Language/PureScript/Sugar/DoNotation.hsdeleted−63

This diff is too big to show here.

src/Language/PureScript/Sugar/Names.hsdeleted−367

This diff is too big to show here.

src/Language/PureScript/Sugar/Names/Common.hsdeleted−68

This diff is too big to show here.

src/Language/PureScript/Sugar/Names/Env.hsdeleted−425

This diff is too big to show here.

src/Language/PureScript/Sugar/Names/Exports.hsdeleted−322

This diff is too big to show here.

src/Language/PureScript/Sugar/Names/Imports.hsdeleted−243

This diff is too big to show here.

src/Language/PureScript/Sugar/ObjectWildcards.hsdeleted−100

This diff is too big to show here.

src/Language/PureScript/Sugar/Operators.hsdeleted−415

This diff is too big to show here.

src/Language/PureScript/Sugar/Operators/Binders.hsdeleted−26

This diff is too big to show here.

src/Language/PureScript/Sugar/Operators/Common.hsdeleted−79

This diff is too big to show here.

src/Language/PureScript/Sugar/Operators/Expr.hsdeleted−46

This diff is too big to show here.

src/Language/PureScript/Sugar/Operators/Types.hsdeleted−27

This diff is too big to show here.

src/Language/PureScript/Sugar/TypeClasses.hsdeleted−334

This diff is too big to show here.

src/Language/PureScript/Sugar/TypeClasses/Deriving.hsdeleted−704

This diff is too big to show here.

src/Language/PureScript/Sugar/TypeDeclarations.hsdeleted−63

This diff is too big to show here.

src/Language/PureScript/Traversals.hsdeleted−27

This diff is too big to show here.

src/Language/PureScript/TypeChecker.hsdeleted−457

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Entailment.hsdeleted−486

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Kinds.hsdeleted−265

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Monad.hsdeleted−304

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Rows.hsdeleted−53

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Skolems.hsdeleted−128

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Subsumption.hsdeleted−145

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Synonyms.hsdeleted−47

This diff is too big to show here.

src/Language/PureScript/TypeChecker/TypeSearch.hsdeleted−90

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Types.hsdeleted−779

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Unify.hsdeleted−189

This diff is too big to show here.

src/Language/PureScript/TypeClassDictionaries.hsdeleted−29

This diff is too big to show here.

src/Language/PureScript/Types.hsdeleted−325

This diff is too big to show here.

src/System/IO/UTF8.hsdeleted−24

This diff is too big to show here.

src/Tests.hsnew file+141

This diff is too big to show here.

stack-ghc-8.0.yamldeleted−7

This diff is too big to show here.

stack.nixnew file+23

This diff is too big to show here.

stack.yaml+23−2

This diff is too big to show here.

support/ffi-loader.gonew file+30

This diff is too big to show here.

support/go.mod.ffi-loadernew file+2

This diff is too big to show here.

support/go.mod.outputnew file+2

This diff is too big to show here.

support/go.mod.workingnew file+1

This diff is too big to show here.

test/Spec.hsnew file+2

This diff is too big to show here.

tests/Language/PureScript/Ide/FilterSpec.hsdeleted−52

This diff is too big to show here.

tests/Language/PureScript/Ide/Imports/IntegrationSpec.hsdeleted−83

This diff is too big to show here.

tests/Language/PureScript/Ide/ImportsSpec.hsdeleted−173

This diff is too big to show here.

tests/Language/PureScript/Ide/Integration.hsdeleted−273

This diff is too big to show here.

tests/Language/PureScript/Ide/MatcherSpec.hsdeleted−49

This diff is too big to show here.

tests/Language/PureScript/Ide/RebuildSpec.hsdeleted−57

This diff is too big to show here.

tests/Language/PureScript/Ide/ReexportsSpec.hsdeleted−63

This diff is too big to show here.

tests/Language/PureScript/Ide/SourceFile/IntegrationSpec.hsdeleted−41

This diff is too big to show here.

tests/Language/PureScript/Ide/SourceFileSpec.hsdeleted−54

This diff is too big to show here.

tests/Language/PureScript/Ide/StateSpec.hsdeleted−51

This diff is too big to show here.

tests/Main.hsdeleted−46

This diff is too big to show here.

tests/PscIdeSpec.hsdeleted−1

This diff is too big to show here.

tests/TestCompiler.hsdeleted−309

This diff is too big to show here.

tests/TestDocs.hsdeleted−370

This diff is too big to show here.

tests/TestPrimDocs.hsdeleted−30

This diff is too big to show here.

tests/TestPscIde.hsdeleted−15

This diff is too big to show here.

tests/TestPscPublish.hsdeleted−70

This diff is too big to show here.

tests/TestPsci.hsdeleted−138

This diff is too big to show here.

tests/TestUtils.hsdeleted−148

This diff is too big to show here.

tests/support/.gitignoredeleted−2

This diff is too big to show here.

tests/support/bower.jsondeleted−17

This diff is too big to show here.

tests/support/package.jsondeleted−8

This diff is too big to show here.

tests/support/psci/Sample.pursdeleted

No changes to the content.

tests/support/pscide/.gitignoredeleted−7

This diff is too big to show here.

tests/support/pscide/src/ImportsSpec.pursdeleted−3

This diff is too big to show here.

tests/support/pscide/src/ImportsSpec1.pursdeleted−32

This diff is too big to show here.

tests/support/pscide/src/MatcherSpec.pursdeleted−7

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecDep.pursdeleted−3

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecSingleModule.faildeleted−3

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecSingleModule.pursdeleted−4

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecWithDeps.pursdeleted−5

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecWithForeign.jsdeleted−1

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecWithForeign.pursdeleted−3

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecWithHiddenIdent.pursdeleted−6

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecWithMissingForeign.faildeleted−3

This diff is too big to show here.

tests/support/pscide/src/SourceFileSpec.pursdeleted−10

This diff is too big to show here.

tests/support/setup-win.cmddeleted−3

This diff is too big to show here.

travis/build.shdeleted−59

This diff is too big to show here.

travis/convert-os-name.shdeleted−14

This diff is too big to show here.