git.iko.soy/rowtype-yoga/purescript-native
on b85a92f help sign in
821 files changed+52348−2589
since splitsnapshots
unifiedsplit
.gitignore−3 .travis.yml+86 CONTRIBUTING.md+38 CONTRIBUTORS.md+97 ChangeLog.md−3 INSTALL.md+56 LICENSE+5567−20 README-go.md−48 README.markdown+123 README.md+17−33 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+16 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/2445.purs+6 examples/failing/2534.purs+8 examples/failing/2542.purs+9 examples/failing/2601.purs+7 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/BindInDo-2.purs+9 examples/failing/BindInDo.purs+9 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/DeclConflictDuplicateCtor.purs+5 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/OrphanInstanceFunDepCycle.purs+5 examples/failing/OrphanInstanceFunDepCycle/Lib.purs+4 examples/failing/OrphanInstanceNullary.purs+4 examples/failing/OrphanInstanceNullary/Lib.purs+2 examples/failing/OrphanInstanceWithDetermined.purs+5 examples/failing/OrphanInstanceWithDetermined/Lib.purs+5 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/TooFewClassInstanceArgs.purs+8 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/2136.purs+9 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/2288.purs+19 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+29 examples/passing/DeriveWithNestedSynonyms.purs+29 examples/passing/Deriving.purs+36 examples/passing/DerivingFunctor.purs+28 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+55 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/NestedRecordUpdate.purs+24 examples/passing/NestedRecordUpdateWildcards.purs+20 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+43 examples/passing/NewtypeWithRecordUpdate.purs+16 examples/passing/NonConflictingExports.purs+10 examples/passing/NonConflictingExports/A.purs+4 examples/passing/NonOrphanInstanceFunDepExtra.purs+8 examples/passing/NonOrphanInstanceFunDepExtra/Lib.purs+4 examples/passing/NonOrphanInstanceMulti.purs+7 examples/passing/NonOrphanInstanceMulti/Lib.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/StringEdgeCases.purs+9 examples/passing/StringEdgeCases/Records.purs+66 examples/passing/StringEdgeCases/Symbols.purs+30 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/2542.purs+16 examples/warning/CustomWarning.purs+9 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 pcc/Main.hs+275 pcc/Make.hs+199 pcc/Makefile.hs+81 src/Tests.hs → pcc/TestMain.hs+40−31 pcc/runtime/purescript.cc+239 pcc/runtime/purescript.hh+581 pcc/runtime/purescript_memory.hh+61 pcc/support/Makefile+91 pcc/support/psc-package.json+9 pcc/support/psc-xcode.sh+53 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+50 psc-ide-server/Main.hs+187 psc-ide-server/PROTOCOL.md+568 psc-ide-server/README.md+47 psc-package/Main.hs+423 psc-package/README.md+99 psc-publish/Main.hs+57 psc/Main.hs+182 psci/Main.hs+377 psci/static/index.html+10 psci/static/index.js+63 psgo.cabal−145 purescript.cabal+638 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+744 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+645 src/Language/PureScript/Bundle.hs+710 src/Language/PureScript/CodeGen.hs+8 src/Language/PureScript/CodeGen/Cpp.hs+826 src/Language/PureScript/CodeGen/Cpp/AST.hs+415 src/Language/PureScript/CodeGen/Cpp/Common.hs+270 src/Language/PureScript/CodeGen/Cpp/File.hs+191 src/Language/PureScript/CodeGen/Cpp/Optimizer.hs+97 src/Language/PureScript/CodeGen/Cpp/Optimizer/Blocks.hs+108 src/Language/PureScript/CodeGen/Cpp/Optimizer/Common.hs+93 src/Language/PureScript/CodeGen/Cpp/Optimizer/Inliner.hs+450 src/Language/PureScript/CodeGen/Cpp/Optimizer/MagicDo.hs+154 src/Language/PureScript/CodeGen/Cpp/Optimizer/TCO.hs+159 src/Language/PureScript/CodeGen/Cpp/Optimizer/Uncurry.hs+50 src/Language/PureScript/CodeGen/Cpp/Optimizer/Unused.hs+47 src/Language/PureScript/CodeGen/Cpp/Recursion.hs+135 src/Language/PureScript/CodeGen/Cpp/Types.hs+150 src/Language/PureScript/CodeGen/Cpp/Unicode.hs+69 src/Language/PureScript/CodeGen/JS.hs+452 src/Language/PureScript/CodeGen/JS/AST.hs+398 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+78 src/Language/PureScript/CodeGen/JS/Optimizer/Inliner.hs+385 src/Language/PureScript/CodeGen/JS/Optimizer/MagicDo.hs+137 src/Language/PureScript/CodeGen/JS/Optimizer/TCO.hs+120 src/Language/PureScript/CodeGen/JS/Optimizer/Unused.hs+35 src/Language/PureScript/Comments.hs+18 src/Language/PureScript/Constants.hs+455 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+279 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+129 src/Language/PureScript/CoreFn/Traversals.hs+77 src/Language/PureScript/Crash.hs+27 src/Language/PureScript/Docs.hs+14 src/Language/PureScript/Docs/AsHtml.hs+299 src/Language/PureScript/Docs/AsMarkdown.hs+138 src/Language/PureScript/Docs/Convert.hs+215 src/Language/PureScript/Docs/Convert/ReExports.hs+532 src/Language/PureScript/Docs/Convert/Single.hs+185 src/Language/PureScript/Docs/ParseInPackage.hs+73 src/Language/PureScript/Docs/Prim.hs+253 src/Language/PureScript/Docs/Render.hs+152 src/Language/PureScript/Docs/RenderedCode.hs+9 src/Language/PureScript/Docs/RenderedCode/RenderKind.hs+57 src/Language/PureScript/Docs/RenderedCode/RenderType.hs+208 src/Language/PureScript/Docs/RenderedCode/Types.hs+383 src/Language/PureScript/Docs/Types.hs+819 src/Language/PureScript/Docs/Utils/MonoidExtras.hs+9 src/Language/PureScript/Environment.hs+407 src/Language/PureScript/Errors.hs+1335 src/Language/PureScript/Errors/JSON.hs+76 src/Language/PureScript/Externs.hs+238 src/Language/PureScript/Ide.hs+217 src/Language/PureScript/Ide/CaseSplit.hs+148 src/Language/PureScript/Ide/Command.hs+164 src/Language/PureScript/Ide/Completion.hs+33 src/Language/PureScript/Ide/Error.hs+54 src/Language/PureScript/Ide/Externs.hs+152 src/Language/PureScript/Ide/Filter.hs+93 src/Language/PureScript/Ide/Imports.hs+331 src/Language/PureScript/Ide/Logging.hs+41 src/Language/PureScript/Ide/Matcher.hs+123 src/Language/PureScript/Ide/Pursuit.hs+73 src/Language/PureScript/Ide/Rebuild.hs+190 src/Language/PureScript/Ide/Reexports.hs+122 src/Language/PureScript/Ide/SourceFile.hs+129 src/Language/PureScript/Ide/State.hs+309 src/Language/PureScript/Ide/Types.hs+321 src/Language/PureScript/Ide/Util.hs+147 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+106 src/Language/PureScript/Label.hs+16 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+476 src/Language/PureScript/ModuleDependencies.hs+64 src/Language/PureScript/Names.hs+213 src/Language/PureScript/Options.hs+42 src/Language/PureScript/PSString.hs+197 src/Language/PureScript/Parser.hs+23 src/Language/PureScript/Parser/Common.hs+145 src/Language/PureScript/Parser/Declarations.hs+569 src/Language/PureScript/Parser/Kinds.hs+40 src/Language/PureScript/Parser/Lexer.hs+600 src/Language/PureScript/Parser/State.hs+18 src/Language/PureScript/Parser/Types.hs+128 src/Language/PureScript/Pretty.hs+18 src/Language/PureScript/Pretty/Common.hs+163 src/Language/PureScript/Pretty/Cpp.hs+622 src/Language/PureScript/Pretty/JS.hs+303 src/Language/PureScript/Pretty/Kinds.hs+58 src/Language/PureScript/Pretty/Types.hs+234 src/Language/PureScript/Pretty/Values.hs+206 src/Language/PureScript/Publish.hs+409 src/Language/PureScript/Publish/BoxesHelpers.hs+49 src/Language/PureScript/Publish/ErrorsWarnings.hs+431 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+70 src/Language/PureScript/Sugar/Names.hs+367 src/Language/PureScript/Sugar/Names/Common.hs+68 src/Language/PureScript/Sugar/Names/Env.hs+430 src/Language/PureScript/Sugar/Names/Exports.hs+322 src/Language/PureScript/Sugar/Names/Imports.hs+243 src/Language/PureScript/Sugar/ObjectWildcards.hs+121 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+336 src/Language/PureScript/Sugar/TypeClasses/Deriving.hs+825 src/Language/PureScript/Sugar/TypeDeclarations.hs+63 src/Language/PureScript/Traversals.hs+27 src/Language/PureScript/TypeChecker.hs+481 src/Language/PureScript/TypeChecker/Entailment.hs+496 src/Language/PureScript/TypeChecker/Kinds.hs+266 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+62 src/Language/PureScript/TypeChecker/TypeSearch.hs+90 src/Language/PureScript/TypeChecker/Types.hs+805 src/Language/PureScript/TypeChecker/Unify.hs+190 src/Language/PureScript/TypeClassDictionaries.hs+29 src/Language/PureScript/Types.hs+329 src/System/IO/UTF8.hs+24 stack-ghc-8.0.yaml+14 stack.nix−23 stack.yaml+6−22 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+54 tests/Language/PureScript/Ide/ImportsSpec.hs+238 tests/Language/PureScript/Ide/MatcherSpec.hs+36 tests/Language/PureScript/Ide/RebuildSpec.hs+61 tests/Language/PureScript/Ide/ReexportsSpec.hs+65 tests/Language/PureScript/Ide/SourceFileSpec.hs+122 tests/Language/PureScript/Ide/StateSpec.hs+91 tests/Language/PureScript/Ide/Test.hs+135 tests/Main.hs+46 tests/PscIdeSpec.hs+1 tests/TestCompiler.hs+309 tests/TestDocs.hs+416 tests/TestPrimDocs.hs+30 tests/TestPscIde.hs+13 tests/TestPscPublish.hs+64 tests/TestPsci.hs+138 tests/TestUtils.hs+167 tests/support/.gitignore+2 tests/support/bower.json+18 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/setup-win.cmd+3 travis/build.sh+59 travis/convert-os-name.sh+14
.gitignore−3
@@ -14,10 +14,7 @@ bower_components/
1414node_modules
1515tmp/
1616.stack-work/
17−stack.yaml.lock
1817output
1918examples/docs/docs/
2019core-tests/full-core-docs.md
2120.psc-ide-port
22−.vscode/
23−result
.travis.ymlnew file+86
@@ -0,0 +1,86 @@
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.mdnew file+38
@@ -0,0 +1,38 @@
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.mdnew file+97
@@ -0,0 +1,97 @@
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+- [@taktoa](https://github.com/taktoa) (Remy Goldschmidt) My existing contributions and all future contributions until further notice are Copyright Remy Goldschmidt, 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+- [@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).
81+- [@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).
82+- [@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).
83+- [@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).
84+- [@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).
85+- [@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.
86+- [@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).
87+- [@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).
88+- [@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).
89+- [@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).
90+- [@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).
91+- [@matthewleon](https://github.com/matthewleon) (Matthew Leon) My existing contributions and all future contributions until further notice are Copyright Matthew Leon, 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).
92+- [@alexbiehl](https://github.com/alexbiehl) (Alexander Biehl) My existing contributions and all future contributions until further notice are Copyright Alexander Biehl, 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).
93+- [@noraesae](https://github.com/noraesae) (Hyunje Jun) My existing contributions and all future contributions until further notice are Copyright Hyunje Jun, 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).
94+
95+### Companies
96+
97+- [@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.mddeleted−3
@@ -1,3 +0,0 @@
1−# Changelog for pscpp
2−
3−## Unreleased changes
INSTALL.mdnew file+56
@@ -0,0 +1,56 @@
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+5567−20
@@ -1,30 +1,5577 @@
1−Copyright Andy Arvanitis (c) 2018
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+ cheapskate
52+ clock
53+ cmdargs
54+ comonad
55+ conduit
56+ conduit-extra
57+ connection
58+ containers
59+ contravariant
60+ cookie
61+ cryptonite
62+ css-text
63+ data-default
64+ data-default-class
65+ data-default-instances-base
66+ data-default-instances-containers
67+ data-default-instances-dlist
68+ data-default-instances-old-locale
69+ data-ordlist
70+ deepseq
71+ directory
72+ distributive
73+ dlist
74+ easy-file
75+ edit-distance
76+ entropy
77+ exceptions
78+ fail
79+ fast-logger
80+ file-embed
81+ filepath
82+ foldl
83+ free
84+ fsnotify
85+ ghc-prim
86+ hashable
87+ haskeline
88+ hex
89+ hinotify
90+ hostname
91+ hourglass
92+ http-client
93+ http-client-tls
94+ http-date
95+ http-types
96+ http2
97+ integer-gmp
98+ iproute
99+ kan-extensions
100+ language-javascript
101+ lens
102+ lifted-base
103+ managed
104+ memory
105+ mime-types
106+ mmorph
107+ monad-control
108+ monad-logger
109+ monad-loops
110+ mtl
111+ mwc-random
112+ network
113+ network-uri
114+ old-locale
115+ old-time
116+ optional-args
117+ optparse-applicative
118+ parallel
119+ parsec
120+ pattern-arrows
121+ pem
122+ pipes
123+ pipes-http
124+ prelude-extras
125+ primitive
126+ process
127+ profunctors
128+ protolude
129+ psqueues
130+ random
131+ reflection
132+ regex-base
133+ regex-tdfa
134+ resourcet
135+ safe
136+ scientific
137+ semigroupoids
138+ semigroups
139+ simple-sendfile
140+ socks
141+ sourcemap
142+ spdx
143+ split
144+ stm
145+ stm-chans
146+ streaming-commons
147+ stringsearch
148+ syb
149+ system-fileio
150+ system-filepath
151+ tagged
152+ tagsoup
153+ template-haskell
154+ temporary
155+ terminfo
156+ text
157+ time
158+ tls
159+ transformers
160+ transformers-base
161+ transformers-compat
162+ turtle
163+ uniplate
164+ unix
165+ unix-compat
166+ unix-time
167+ unordered-containers
168+ utf8-string
169+ vault
170+ vector
171+ void
172+ wai
173+ wai-app-static
174+ wai-extra
175+ wai-logger
176+ wai-websockets
177+ warp
178+ websockets
179+ word8
180+ x509
181+ x509-store
182+ x509-system
183+ x509-validation
184+ xss-sanitize
185+ zlib
186+
187+Glob LICENSE file:
188+
189+ The code in Glob is released under the license below. Copyrights to parts of
190+ the code are held by whoever wrote the code in question: see CREDITS.txt for a
191+ list of authors.
192+
193+ Copyright (c) 2008-2016 <authors>
194+ All rights reserved.
195+
196+ Redistribution and use in source and binary forms, with or without
197+ modification, are permitted provided that the following conditions are met:
198+ * Redistributions of source code must retain the above copyright
199+ notice, this list of conditions and the following disclaimer.
200+ * Redistributions in binary form must reproduce the above copyright
201+ notice, this list of conditions and the following disclaimer in the
202+ documentation and/or other materials provided with the distribution.
203+ * Neither the name of the project nor the names of its contributors may be
204+ used to endorse or promote products derived from this software without
205+ specific prior written permission.
206+
207+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
208+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
209+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
210+ EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
211+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
212+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
213+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
214+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
215+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
216+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
217+
218+SHA LICENSE file:
219+
220+ Copyright (c) 2008, Galois, Inc.
221+ All rights reserved.
222+
223+ Redistribution and use in source and binary forms, with or without
224+ modification, are permitted provided that the following conditions
225+ are met:
226+
227+ * Redistributions of source code must retain the above copyright
228+ notice, this list of conditions and the following disclaimer.
229+ * Redistributions in binary form must reproduce the above copyright
230+ notice, this list of conditions and the following disclaimer in
231+ the documentation and/or other materials provided with the
232+ distribution.
233+ * Neither the name of the Galois, Inc. nor the names of its
234+ contributors may be used to endorse or promote products derived
235+ from this software without specific prior written permission.
236+
237+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
238+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
239+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
240+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
241+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
242+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
243+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
244+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
245+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
246+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
247+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
248+ POSSIBILITY OF SUCH DAMAGE.
249+
250+StateVar LICENSE file:
251+
252+ Copyright (c) 2014-2015, Edward Kmett
253+ Copyright (c) 2009-2016, Sven Panne
254+ All rights reserved.
255+
256+ Redistribution and use in source and binary forms, with or without
257+ modification, are permitted provided that the following conditions are met:
258+
259+ 1. Redistributions of source code must retain the above copyright notice,
260+ this list of conditions and the following disclaimer.
261+
262+ 2. Redistributions in binary form must reproduce the above copyright
263+ notice, this list of conditions and the following disclaimer in the
264+ documentation and/or other materials provided with the distribution.
265+
266+ 3. Neither the name of the author nor the names of its contributors may be
267+ used to endorse or promote products derived from this software without
268+ specific prior written permission.
269+
270+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
271+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
272+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
273+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
274+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
275+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
276+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
277+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
278+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
279+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
280+ POSSIBILITY OF SUCH DAMAGE.
281+
282+adjunctions LICENSE file:
283+
284+ Copyright 2011-2014 Edward Kmett
285+
286+ All rights reserved.
287+
288+ Redistribution and use in source and binary forms, with or without
289+ modification, are permitted provided that the following conditions
290+ are met:
291+
292+ 1. Redistributions of source code must retain the above copyright
293+ notice, this list of conditions and the following disclaimer.
294+
295+ 2. Redistributions in binary form must reproduce the above copyright
296+ notice, this list of conditions and the following disclaimer in the
297+ documentation and/or other materials provided with the distribution.
298+
299+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
300+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
301+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
302+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
303+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
304+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
305+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
306+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
307+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
308+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
309+ POSSIBILITY OF SUCH DAMAGE.
310+
311+aeson LICENSE file:
312+
313+ Copyright (c) 2011, MailRank, Inc.
314+
315+ All rights reserved.
316+
317+ Redistribution and use in source and binary forms, with or without
318+ modification, are permitted provided that the following conditions
319+ are met:
320+
321+ 1. Redistributions of source code must retain the above copyright
322+ notice, this list of conditions and the following disclaimer.
323+
324+ 2. Redistributions in binary form must reproduce the above copyright
325+ notice, this list of conditions and the following disclaimer in the
326+ documentation and/or other materials provided with the distribution.
327+
328+ 3. Neither the name of the author nor the names of his contributors
329+ may be used to endorse or promote products derived from this software
330+ without specific prior written permission.
331+
332+ THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
333+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
334+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
335+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
336+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
337+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
338+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
339+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
340+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
341+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
342+ POSSIBILITY OF SUCH DAMAGE.
343+
344+aeson-better-errors LICENSE file:
345+
346+ Copyright (c) 2015 Harry Garrood
347+
348+ Permission is hereby granted, free of charge, to any person obtaining
349+ a copy of this software and associated documentation files (the
350+ "Software"), to deal in the Software without restriction, including
351+ without limitation the rights to use, copy, modify, merge, publish,
352+ distribute, sublicense, and/or sell copies of the Software, and to
353+ permit persons to whom the Software is furnished to do so, subject to
354+ the following conditions:
355+
356+ The above copyright notice and this permission notice shall be included
357+ in all copies or substantial portions of the Software.
358+
359+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
360+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
361+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
362+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
363+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
364+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
365+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
366+
367+aeson-pretty LICENSE file:
368+
369+ Copyright (c)2011, Falko Peters
370+
371+ All rights reserved.
372+
373+ Redistribution and use in source and binary forms, with or without
374+ modification, are permitted provided that the following conditions are met:
375+
376+ * Redistributions of source code must retain the above copyright
377+ notice, this list of conditions and the following disclaimer.
378+
379+ * Redistributions in binary form must reproduce the above
380+ copyright notice, this list of conditions and the following
381+ disclaimer in the documentation and/or other materials provided
382+ with the distribution.
383+
384+ * Neither the name of Falko Peters nor the names of other
385+ contributors may be used to endorse or promote products derived
386+ from this software without specific prior written permission.
387+
388+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
389+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
390+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
391+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
392+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
393+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
394+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
395+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
396+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
397+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
398+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
399+
400+ansi-terminal LICENSE file:
401+
402+ Copyright (c) 2008, Maximilian Bolingbroke
403+ All rights reserved.
404+
405+ Redistribution and use in source and binary forms, with or without modification, are permitted
406+ provided that the following conditions are met:
407+
408+ * Redistributions of source code must retain the above copyright notice, this list of
409+ conditions and the following disclaimer.
410+ * Redistributions in binary form must reproduce the above copyright notice, this list of
411+ conditions and the following disclaimer in the documentation and/or other materials
412+ provided with the distribution.
413+ * Neither the name of Maximilian Bolingbroke nor the names of other contributors may be used to
414+ endorse or promote products derived from this software without specific prior written permission.
415+
416+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
417+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
418+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
419+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
420+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
421+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
422+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
423+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
424+
425+ansi-wl-pprint LICENSE file:
426+
427+ Copyright 2008, Daan Leijen and Max Bolingbroke. All rights reserved.
428+
429+ Redistribution and use in source and binary forms, with or without
430+ modification, are permitted provided that the following conditions are
431+ met:
432+
433+ * Redistributions of source code must retain the above copyright
434+ notice, this list of conditions and the following disclaimer.
435+
436+ * Redistributions in binary form must reproduce the above copyright
437+ notice, this list of conditions and the following disclaimer in
438+ the documentation and/or other materials provided with the
439+ distribution.
440+
441+ This software is provided by the copyright holders "as is" and any
442+ express or implied warranties, including, but not limited to, the
443+ implied warranties of merchantability and fitness for a particular
444+ purpose are disclaimed. In no event shall the copyright holders be
445+ liable for any direct, indirect, incidental, special, exemplary, or
446+ consequential damages (including, but not limited to, procurement of
447+ substitute goods or services; loss of use, data, or profits; or
448+ business interruption) however caused and on any theory of liability,
449+ whether in contract, strict liability, or tort (including negligence
450+ or otherwise) arising in any way out of the use of this software, even
451+ if advised of the possibility of such damage.
452+
453+appar LICENSE file:
454+
455+ Copyright (c) 2009, IIJ Innovation Institute Inc.
456+ All rights reserved.
457+
458+ Redistribution and use in source and binary forms, with or without
459+ modification, are permitted provided that the following conditions
460+ are met:
461+
462+ * Redistributions of source code must retain the above copyright
463+ notice, this list of conditions and the following disclaimer.
464+ * Redistributions in binary form must reproduce the above copyright
465+ notice, this list of conditions and the following disclaimer in
466+ the documentation and/or other materials provided with the
467+ distribution.
468+ * Neither the name of the copyright holders nor the names of its
469+ contributors may be used to endorse or promote products derived
470+ from this software without specific prior written permission.
471+
472+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
473+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
474+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
475+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
476+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
477+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
478+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
479+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
480+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
481+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
482+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
483+ POSSIBILITY OF SUCH DAMAGE.
484+
485+array LICENSE file:
486+
487+ This library (libraries/base) is derived from code from several
488+ sources:
489+
490+ * Code from the GHC project which is largely (c) The University of
491+ Glasgow, and distributable under a BSD-style license (see below),
492+
493+ * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
494+ and freely redistributable (but see the full license for
495+ restrictions).
496+
497+ * Code from the Haskell Foreign Function Interface specification,
498+ which is (c) Manuel M. T. Chakravarty and freely redistributable
499+ (but see the full license for restrictions).
500+
501+ The full text of these licenses is reproduced below. All of the
502+ licenses are BSD-style or compatible.
503+
504+ -----------------------------------------------------------------------------
505+
506+ The Glasgow Haskell Compiler License
507+
508+ Copyright 2004, The University Court of the University of Glasgow.
509+ All rights reserved.
510+
511+ Redistribution and use in source and binary forms, with or without
512+ modification, are permitted provided that the following conditions are met:
513+
514+ - Redistributions of source code must retain the above copyright notice,
515+ this list of conditions and the following disclaimer.
516+
517+ - Redistributions in binary form must reproduce the above copyright notice,
518+ this list of conditions and the following disclaimer in the documentation
519+ and/or other materials provided with the distribution.
520+
521+ - Neither name of the University nor the names of its contributors may be
522+ used to endorse or promote products derived from this software without
523+ specific prior written permission.
524+
525+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
526+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
527+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
528+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
529+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
530+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
531+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
532+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
533+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
534+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
535+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
536+ DAMAGE.
537+
538+ -----------------------------------------------------------------------------
539+
540+ Code derived from the document "Report on the Programming Language
541+ Haskell 98", is distributed under the following license:
542+
543+ Copyright (c) 2002 Simon Peyton Jones
544+
545+ The authors intend this Report to belong to the entire Haskell
546+ community, and so we grant permission to copy and distribute it for
547+ any purpose, provided that it is reproduced in its entirety,
548+ including this Notice. Modified versions of this Report may also be
549+ copied and distributed for any purpose, provided that the modified
550+ version is clearly presented as such, and that it does not claim to
551+ be a definition of the Haskell 98 Language.
552+
553+ -----------------------------------------------------------------------------
554+
555+ Code derived from the document "The Haskell 98 Foreign Function
556+ Interface, An Addendum to the Haskell 98 Report" is distributed under
557+ the following license:
558+
559+ Copyright (c) 2002 Manuel M. T. Chakravarty
560+
561+ The authors intend this Report to belong to the entire Haskell
562+ community, and so we grant permission to copy and distribute it for
563+ any purpose, provided that it is reproduced in its entirety,
564+ including this Notice. Modified versions of this Report may also be
565+ copied and distributed for any purpose, provided that the modified
566+ version is clearly presented as such, and that it does not claim to
567+ be a definition of the Haskell 98 Foreign Function Interface.
568+
569+ -----------------------------------------------------------------------------
570+
571+asn1-encoding LICENSE file:
572+
573+ Copyright (c) 2010-2013 Vincent Hanquez <vincent@snarc.org>
574+
575+ All rights reserved.
576+
577+ Redistribution and use in source and binary forms, with or without
578+ modification, are permitted provided that the following conditions
579+ are met:
580+ 1. Redistributions of source code must retain the above copyright
581+ notice, this list of conditions and the following disclaimer.
582+ 2. Redistributions in binary form must reproduce the above copyright
583+ notice, this list of conditions and the following disclaimer in the
584+ documentation and/or other materials provided with the distribution.
585+ 3. Neither the name of the author nor the names of his contributors
586+ may be used to endorse or promote products derived from this software
587+ without specific prior written permission.
588+
589+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
590+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
591+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
592+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
593+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
594+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
595+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
596+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
597+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
598+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
599+ SUCH DAMAGE.
600+
601+asn1-parse LICENSE file:
602+
603+ Copyright (c) 2010-2013 Vincent Hanquez <vincent@snarc.org>
604+
605+ All rights reserved.
606+
607+ Redistribution and use in source and binary forms, with or without
608+ modification, are permitted provided that the following conditions
609+ are met:
610+ 1. Redistributions of source code must retain the above copyright
611+ notice, this list of conditions and the following disclaimer.
612+ 2. Redistributions in binary form must reproduce the above copyright
613+ notice, this list of conditions and the following disclaimer in the
614+ documentation and/or other materials provided with the distribution.
615+ 3. Neither the name of the author nor the names of his contributors
616+ may be used to endorse or promote products derived from this software
617+ without specific prior written permission.
618+
619+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
620+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
621+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
622+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
623+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
624+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
625+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
626+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
627+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
628+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
629+ SUCH DAMAGE.
630+
631+asn1-types LICENSE file:
632+
633+ Copyright (c) 2010-2013 Vincent Hanquez <vincent@snarc.org>
634+
635+ All rights reserved.
636+
637+ Redistribution and use in source and binary forms, with or without
638+ modification, are permitted provided that the following conditions
639+ are met:
640+ 1. Redistributions of source code must retain the above copyright
641+ notice, this list of conditions and the following disclaimer.
642+ 2. Redistributions in binary form must reproduce the above copyright
643+ notice, this list of conditions and the following disclaimer in the
644+ documentation and/or other materials provided with the distribution.
645+ 3. Neither the name of the author nor the names of his contributors
646+ may be used to endorse or promote products derived from this software
647+ without specific prior written permission.
648+
649+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
650+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
651+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
652+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
653+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
654+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
655+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
656+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
657+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
658+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
659+ SUCH DAMAGE.
660+
661+async LICENSE file:
662+
663+ Copyright (c) 2012, Simon Marlow
664+
665+ All rights reserved.
666+
667+ Redistribution and use in source and binary forms, with or without
668+ modification, are permitted provided that the following conditions are met:
669+
670+ * Redistributions of source code must retain the above copyright
671+ notice, this list of conditions and the following disclaimer.
672+
673+ * Redistributions in binary form must reproduce the above
674+ copyright notice, this list of conditions and the following
675+ disclaimer in the documentation and/or other materials provided
676+ with the distribution.
677+
678+ * Neither the name of Simon Marlow nor the names of other
679+ contributors may be used to endorse or promote products derived
680+ from this software without specific prior written permission.
681+
682+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
683+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
684+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
685+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
686+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
687+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
688+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
689+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
690+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
691+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
692+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
693+
694+attoparsec LICENSE file:
695+
696+ Copyright (c) Lennart Kolmodin
697+
698+ All rights reserved.
699+
700+ Redistribution and use in source and binary forms, with or without
701+ modification, are permitted provided that the following conditions
702+ are met:
703+
704+ 1. Redistributions of source code must retain the above copyright
705+ notice, this list of conditions and the following disclaimer.
706+
707+ 2. Redistributions in binary form must reproduce the above copyright
708+ notice, this list of conditions and the following disclaimer in the
709+ documentation and/or other materials provided with the distribution.
710+
711+ 3. Neither the name of the author nor the names of his contributors
712+ may be used to endorse or promote products derived from this software
713+ without specific prior written permission.
714+
715+ THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
716+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
717+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
718+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
719+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
720+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
721+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
722+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
723+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
724+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
725+ POSSIBILITY OF SUCH DAMAGE.
726+
727+auto-update LICENSE file:
728+
729+ Copyright (c) 2014 Michael Snoyman
730+
731+ Permission is hereby granted, free of charge, to any person obtaining
732+ a copy of this software and associated documentation files (the
733+ "Software"), to deal in the Software without restriction, including
734+ without limitation the rights to use, copy, modify, merge, publish,
735+ distribute, sublicense, and/or sell copies of the Software, and to
736+ permit persons to whom the Software is furnished to do so, subject to
737+ the following conditions:
738+
739+ The above copyright notice and this permission notice shall be included
740+ in all copies or substantial portions of the Software.
741+
742+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
743+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
744+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
745+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
746+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
747+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
748+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
749+
750+base LICENSE file:
751+
752+ This library (libraries/base) is derived from code from several
753+ sources:
754+
755+ * Code from the GHC project which is largely (c) The University of
756+ Glasgow, and distributable under a BSD-style license (see below),
757+
758+ * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
759+ and freely redistributable (but see the full license for
760+ restrictions).
761+
762+ * Code from the Haskell Foreign Function Interface specification,
763+ which is (c) Manuel M. T. Chakravarty and freely redistributable
764+ (but see the full license for restrictions).
765+
766+ The full text of these licenses is reproduced below. All of the
767+ licenses are BSD-style or compatible.
768+
769+ -----------------------------------------------------------------------------
770+
771+ The Glasgow Haskell Compiler License
772+
773+ Copyright 2004, The University Court of the University of Glasgow.
774+ All rights reserved.
775+
776+ Redistribution and use in source and binary forms, with or without
777+ modification, are permitted provided that the following conditions are met:
778+
779+ - Redistributions of source code must retain the above copyright notice,
780+ this list of conditions and the following disclaimer.
781+
782+ - Redistributions in binary form must reproduce the above copyright notice,
783+ this list of conditions and the following disclaimer in the documentation
784+ and/or other materials provided with the distribution.
785+
786+ - Neither name of the University nor the names of its contributors may be
787+ used to endorse or promote products derived from this software without
788+ specific prior written permission.
789+
790+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
791+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
792+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
793+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
794+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
795+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
796+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
797+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
798+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
799+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
800+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
801+ DAMAGE.
802+
803+ -----------------------------------------------------------------------------
804+
805+ Code derived from the document "Report on the Programming Language
806+ Haskell 98", is distributed under the following license:
807+
808+ Copyright (c) 2002 Simon Peyton Jones
809+
810+ The authors intend this Report to belong to the entire Haskell
811+ community, and so we grant permission to copy and distribute it for
812+ any purpose, provided that it is reproduced in its entirety,
813+ including this Notice. Modified versions of this Report may also be
814+ copied and distributed for any purpose, provided that the modified
815+ version is clearly presented as such, and that it does not claim to
816+ be a definition of the Haskell 98 Language.
817+
818+ -----------------------------------------------------------------------------
819+
820+ Code derived from the document "The Haskell 98 Foreign Function
821+ Interface, An Addendum to the Haskell 98 Report" is distributed under
822+ the following license:
823+
824+ Copyright (c) 2002 Manuel M. T. Chakravarty
825+
826+ The authors intend this Report to belong to the entire Haskell
827+ community, and so we grant permission to copy and distribute it for
828+ any purpose, provided that it is reproduced in its entirety,
829+ including this Notice. Modified versions of this Report may also be
830+ copied and distributed for any purpose, provided that the modified
831+ version is clearly presented as such, and that it does not claim to
832+ be a definition of the Haskell 98 Foreign Function Interface.
833+
834+ -----------------------------------------------------------------------------
835+
836+base-compat LICENSE file:
837+
838+ Copyright (c) 2012-2016 Simon Hengel <sol@typeful.net> and Ryan Scott <ryan.gl.scott@gmail.com>
839+
840+ Permission is hereby granted, free of charge, to any person obtaining a copy
841+ of this software and associated documentation files (the "Software"), to deal
842+ in the Software without restriction, including without limitation the rights
843+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
844+ copies of the Software, and to permit persons to whom the Software is
845+ furnished to do so, subject to the following conditions:
846+
847+ The above copyright notice and this permission notice shall be included in
848+ all copies or substantial portions of the Software.
849+
850+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
851+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
852+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
853+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
854+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
855+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
856+ THE SOFTWARE.
857+
858+base-orphans LICENSE file:
859+
860+ Copyright (c) 2015-2016 Simon Hengel <sol@typeful.net>, João Cristóvão <jmacristovao@gmail.com>, Ryan Scott <ryan.gl.scott@gmail.com>
861+
862+ Permission is hereby granted, free of charge, to any person obtaining
863+ a copy of this software and associated documentation files (the
864+ "Software"), to deal in the Software without restriction, including
865+ without limitation the rights to use, copy, modify, merge, publish,
866+ distribute, sublicense, and/or sell copies of the Software, and to
867+ permit persons to whom the Software is furnished to do so, subject to
868+ the following conditions:
869+
870+ The above copyright notice and this permission notice shall be included
871+ in all copies or substantial portions of the Software.
872+
873+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
874+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
875+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
876+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
877+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
878+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
879+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
880+
881+base64-bytestring LICENSE file:
882+
883+ Copyright (c) 2010 Bryan O'Sullivan <bos@serpentine.com>
884+
885+ All rights reserved.
886+
887+ Redistribution and use in source and binary forms, with or without
888+ modification, are permitted provided that the following conditions
889+ are met:
890+
891+ 1. Redistributions of source code must retain the above copyright
892+ notice, this list of conditions and the following disclaimer.
893+
894+ 2. Redistributions in binary form must reproduce the above copyright
895+ notice, this list of conditions and the following disclaimer in the
896+ documentation and/or other materials provided with the distribution.
897+
898+ 3. Neither the name of the author nor the names of his contributors
899+ may be used to endorse or promote products derived from this software
900+ without specific prior written permission.
901+
902+ THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
903+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
904+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
905+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
906+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
907+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
908+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
909+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
910+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
911+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
912+ POSSIBILITY OF SUCH DAMAGE.
913+
914+bifunctors LICENSE file:
915+
916+ Copyright 2008-2016 Edward Kmett
917+
918+ All rights reserved.
919+
920+ Redistribution and use in source and binary forms, with or without
921+ modification, are permitted provided that the following conditions
922+ are met:
923+
924+ 1. Redistributions of source code must retain the above copyright
925+ notice, this list of conditions and the following disclaimer.
926+
927+ 2. Redistributions in binary form must reproduce the above copyright
928+ notice, this list of conditions and the following disclaimer in the
929+ documentation and/or other materials provided with the distribution.
930+
931+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
932+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
933+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
934+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
935+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
936+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
937+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
938+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
939+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
940+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
941+ POSSIBILITY OF SUCH DAMAGE.
942+
943+binary LICENSE file:
944+
945+ Copyright (c) Lennart Kolmodin
946+
947+ All rights reserved.
948+
949+ Redistribution and use in source and binary forms, with or without
950+ modification, are permitted provided that the following conditions
951+ are met:
952+
953+ 1. Redistributions of source code must retain the above copyright
954+ notice, this list of conditions and the following disclaimer.
955+
956+ 2. Redistributions in binary form must reproduce the above copyright
957+ notice, this list of conditions and the following disclaimer in the
958+ documentation and/or other materials provided with the distribution.
959+
960+ 3. Neither the name of the author nor the names of his contributors
961+ may be used to endorse or promote products derived from this software
962+ without specific prior written permission.
963+
964+ THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
965+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
966+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
967+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
968+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
969+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
970+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
971+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
972+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
973+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
974+ POSSIBILITY OF SUCH DAMAGE.
975+
976+blaze-builder LICENSE file:
977+
978+ Copyright Jasper Van der Jeugt 2010, Simon Meier 2010 & 2011
979+
980+ All rights reserved.
981+
982+ Redistribution and use in source and binary forms, with or without
983+ modification, are permitted provided that the following conditions are met:
984+
985+ * Redistributions of source code must retain the above copyright
986+ notice, this list of conditions and the following disclaimer.
987+
988+ * Redistributions in binary form must reproduce the above
989+ copyright notice, this list of conditions and the following
990+ disclaimer in the documentation and/or other materials provided
991+ with the distribution.
992+
993+ * Neither the name of Jasper Van der Jeugt nor the names of other
994+ contributors may be used to endorse or promote products derived
995+ from this software without specific prior written permission.
996+
997+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
998+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
999+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1000+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1001+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1002+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1003+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1004+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1005+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1006+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1007+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1008+
1009+blaze-html LICENSE file:
1010+
1011+ Copyright Jasper Van der Jeugt 2010
1012+
1013+ All rights reserved.
1014+
1015+ Redistribution and use in source and binary forms, with or without
1016+ modification, are permitted provided that the following conditions are met:
1017+
1018+ * Redistributions of source code must retain the above copyright
1019+ notice, this list of conditions and the following disclaimer.
1020+
1021+ * Redistributions in binary form must reproduce the above
1022+ copyright notice, this list of conditions and the following
1023+ disclaimer in the documentation and/or other materials provided
1024+ with the distribution.
1025+
1026+ * Neither the name of Jasper Van der Jeugt nor the names of other
1027+ contributors may be used to endorse or promote products derived
1028+ from this software without specific prior written permission.
1029+
1030+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1031+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1032+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1033+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1034+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1035+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1036+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1037+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1038+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1039+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1040+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1041+
1042+blaze-markup LICENSE file:
1043+
1044+ Copyright Jasper Van der Jeugt 2010
1045+
1046+ All rights reserved.
1047+
1048+ Redistribution and use in source and binary forms, with or without
1049+ modification, are permitted provided that the following conditions are met:
1050+
1051+ * Redistributions of source code must retain the above copyright
1052+ notice, this list of conditions and the following disclaimer.
1053+
1054+ * Redistributions in binary form must reproduce the above
1055+ copyright notice, this list of conditions and the following
1056+ disclaimer in the documentation and/or other materials provided
1057+ with the distribution.
1058+
1059+ * Neither the name of Jasper Van der Jeugt nor the names of other
1060+ contributors may be used to endorse or promote products derived
1061+ from this software without specific prior written permission.
1062+
1063+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1064+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1065+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1066+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1067+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1068+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1069+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1070+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1071+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1072+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1073+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1074+
1075+bower-json LICENSE file:
1076+
1077+ Copyright (c) 2015 Harry Garrood
1078+
1079+ Permission is hereby granted, free of charge, to any person obtaining
1080+ a copy of this software and associated documentation files (the
1081+ "Software"), to deal in the Software without restriction, including
1082+ without limitation the rights to use, copy, modify, merge, publish,
1083+ distribute, sublicense, and/or sell copies of the Software, and to
1084+ permit persons to whom the Software is furnished to do so, subject to
1085+ the following conditions:
1086+
1087+ The above copyright notice and this permission notice shall be included
1088+ in all copies or substantial portions of the Software.
1089+
1090+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1091+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1092+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1093+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
1094+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
1095+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
1096+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1097+
1098+boxes LICENSE file:
1099+
1100+ Copyright (c) Brent Yorgey 2008
1101+
1102+ Redistribution and use in source and binary forms, with or without
1103+ modification, are permitted provided that the following conditions
1104+ are met:
1105+ 1. Redistributions of source code must retain the above copyright
1106+ notice, this list of conditions and the following disclaimer.
1107+ 2. Redistributions in binary form must reproduce the above copyright
1108+ notice, this list of conditions and the following disclaimer in the
1109+ documentation and/or other materials provided with the distribution.
1110+ 3. Neither the name of the author nor the names of other contributors
1111+ may be used to endorse or promote products derived from this software
1112+ without specific prior written permission.
1113+
1114+ All other rights are reserved.
1115+
1116+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND
1117+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1118+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1119+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
1120+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1121+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1122+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1123+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1124+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1125+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1126+ SUCH DAMAGE.
1127+
1128+byteable LICENSE file:
1129+
1130+ Copyright (c) 2013 Vincent Hanquez <vincent@snarc.org>
1131+
1132+ All rights reserved.
1133+
1134+ Redistribution and use in source and binary forms, with or without
1135+ modification, are permitted provided that the following conditions
1136+ are met:
1137+ 1. Redistributions of source code must retain the above copyright
1138+ notice, this list of conditions and the following disclaimer.
1139+ 2. Redistributions in binary form must reproduce the above copyright
1140+ notice, this list of conditions and the following disclaimer in the
1141+ documentation and/or other materials provided with the distribution.
1142+ 3. Neither the name of the author nor the names of his contributors
1143+ may be used to endorse or promote products derived from this software
1144+ without specific prior written permission.
1145+
1146+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS AS IS'' AND
1147+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1148+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1149+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
1150+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1151+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1152+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1153+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1154+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1155+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1156+ SUCH DAMAGE.
1157+
1158+byteorder LICENSE file:
1159+
1160+ Copyright 2009, Antoine Latter
1161+
1162+ All rights reserved.
1163+
1164+ Redistribution and use in source and binary forms, with or without
1165+ modification, are permitted provided that the following conditions are met:
1166+
1167+ * Redistributions of source code must retain the above copyright
1168+ notice, this list of conditions and the following disclaimer.
1169+
1170+ * Redistributions in binary form must reproduce the above
1171+ copyright notice, this list of conditions and the following
1172+ disclaimer in the documentation and/or other materials provided
1173+ with the distribution.
1174+
1175+ * Neither the name of the author nor the names of other
1176+ contributors may be used to endorse or promote products derived
1177+ from this software without specific prior written permission.
1178+
1179+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1180+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1181+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1182+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1183+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1184+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1185+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1186+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1187+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1188+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1189+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1190+
1191+bytestring LICENSE file:
1192+
1193+ Copyright (c) Don Stewart 2005-2009
1194+ (c) Duncan Coutts 2006-2015
1195+ (c) David Roundy 2003-2005
1196+ (c) Simon Meier 2010-2011
1197+
1198+ All rights reserved.
1199+
1200+ Redistribution and use in source and binary forms, with or without
1201+ modification, are permitted provided that the following conditions
1202+ are met:
1203+ 1. Redistributions of source code must retain the above copyright
1204+ notice, this list of conditions and the following disclaimer.
1205+ 2. Redistributions in binary form must reproduce the above copyright
1206+ notice, this list of conditions and the following disclaimer in the
1207+ documentation and/or other materials provided with the distribution.
1208+ 3. Neither the name of the author nor the names of his contributors
1209+ may be used to endorse or promote products derived from this software
1210+ without specific prior written permission.
1211+
1212+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1213+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1214+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1215+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
1216+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1217+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1218+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1219+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1220+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1221+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1222+ SUCH DAMAGE.
1223+
1224+bytestring-builder LICENSE file:
1225+
1226+ Copyright Jasper Van der Jeugt 2010, Simon Meier 2010-2013
1227+
1228+ All rights reserved.
1229+
1230+ Redistribution and use in source and binary forms, with or without
1231+ modification, are permitted provided that the following conditions are met:
1232+
1233+ * Redistributions of source code must retain the above copyright
1234+ notice, this list of conditions and the following disclaimer.
1235+
1236+ * Redistributions in binary form must reproduce the above
1237+ copyright notice, this list of conditions and the following
1238+ disclaimer in the documentation and/or other materials provided
1239+ with the distribution.
1240+
1241+ * Neither the name of Jasper Van der Jeugt nor the names of other
1242+ contributors may be used to endorse or promote products derived
1243+ from this software without specific prior written permission.
1244+
1245+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1246+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1247+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1248+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1249+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1250+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1251+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1252+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1253+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1254+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1255+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1256+
1257+case-insensitive LICENSE file:
1258+
1259+ Copyright (c) 2011-2013 Bas van Dijk
1260+
1261+ All rights reserved.
1262+
1263+ Redistribution and use in source and binary forms, with or without
1264+ modification, are permitted provided that the following conditions are
1265+ met:
1266+
1267+ * Redistributions of source code must retain the above copyright
1268+ notice, this list of conditions and the following disclaimer.
1269+
1270+ * Redistributions in binary form must reproduce the above
1271+ copyright notice, this list of conditions and the following
1272+ disclaimer in the documentation and/or other materials provided
1273+ with the distribution.
1274+
1275+ * The name of Bas van Dijk and the names of contributors may NOT
1276+ be used to endorse or promote products derived from this
1277+ software without specific prior written permission.
1278+
1279+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1280+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1281+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1282+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1283+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1284+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1285+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1286+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1287+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1288+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1289+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1290+
1291+cereal LICENSE file:
1292+
1293+ Copyright (c) Lennart Kolmodin, Galois, Inc.
1294+
1295+ All rights reserved.
1296+
1297+ Redistribution and use in source and binary forms, with or without
1298+ modification, are permitted provided that the following conditions
1299+ are met:
1300+
1301+ 1. Redistributions of source code must retain the above copyright
1302+ notice, this list of conditions and the following disclaimer.
1303+
1304+ 2. Redistributions in binary form must reproduce the above copyright
1305+ notice, this list of conditions and the following disclaimer in the
1306+ documentation and/or other materials provided with the distribution.
1307+
1308+ 3. Neither the name of the author nor the names of his contributors
1309+ may be used to endorse or promote products derived from this software
1310+ without specific prior written permission.
1311+
1312+ THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
1313+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1314+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1315+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
1316+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1317+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1318+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1319+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
1320+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
1321+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1322+ POSSIBILITY OF SUCH DAMAGE.
1323+
1324+cheapskate LICENSE file:
1325+
1326+ Copyright (c) 2013, John MacFarlane
1327+
1328+ All rights reserved.
1329+
1330+ Redistribution and use in source and binary forms, with or without
1331+ modification, are permitted provided that the following conditions are met:
1332+
1333+ * Redistributions of source code must retain the above copyright
1334+ notice, this list of conditions and the following disclaimer.
1335+
1336+ * Redistributions in binary form must reproduce the above
1337+ copyright notice, this list of conditions and the following
1338+ disclaimer in the documentation and/or other materials provided
1339+ with the distribution.
1340+
1341+ * Neither the name of John MacFarlane nor the names of other
1342+ contributors may be used to endorse or promote products derived
1343+ from this software without specific prior written permission.
1344+
1345+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1346+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1347+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1348+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1349+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1350+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1351+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1352+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1353+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1354+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1355+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1356+
1357+clock LICENSE file:
1358+
1359+ Copyright (c) 2009-2012, Cetin Sert
1360+ Copyright (c) 2010, Eugene Kirpichov
1361+
1362+ All rights reserved.
1363+
1364+ Redistribution and use in source and binary forms, with or without
1365+ modification, are permitted provided that the following conditions are
1366+ met:
1367+
1368+ * Redistributions of source code must retain the above copyright
1369+ notice, this list of conditions and the following disclaimer.
1370+
1371+ * Redistributions in binary form must reproduce the above
1372+ copyright notice, this list of conditions and the following
1373+ disclaimer in the documentation and/or other materials provided
1374+ with the distribution.
1375+
1376+ * The names of contributors may not be used to endorse or promote
1377+ products derived from this software without specific prior
1378+ written permission.
1379+
1380+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1381+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1382+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1383+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1384+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1385+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1386+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1387+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1388+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1389+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1390+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1391+
1392+cmdargs LICENSE file:
1393+
1394+ Copyright Neil Mitchell 2009-2016.
1395+ All rights reserved.
1396+
1397+ Redistribution and use in source and binary forms, with or without
1398+ modification, are permitted provided that the following conditions are
1399+ met:
1400+
1401+ * Redistributions of source code must retain the above copyright
1402+ notice, this list of conditions and the following disclaimer.
1403+
1404+ * Redistributions in binary form must reproduce the above
1405+ copyright notice, this list of conditions and the following
1406+ disclaimer in the documentation and/or other materials provided
1407+ with the distribution.
1408+
1409+ * Neither the name of Neil Mitchell nor the names of other
1410+ contributors may be used to endorse or promote products derived
1411+ from this software without specific prior written permission.
1412+
1413+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1414+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1415+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1416+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1417+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1418+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1419+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1420+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1421+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1422+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1423+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1424+
1425+comonad LICENSE file:
1426+
1427+ Copyright 2008-2014 Edward Kmett
1428+ Copyright 2004-2008 Dave Menendez
1429+
1430+ All rights reserved.
1431+
1432+ Redistribution and use in source and binary forms, with or without
1433+ modification, are permitted provided that the following conditions
1434+ are met:
1435+
1436+ 1. Redistributions of source code must retain the above copyright
1437+ notice, this list of conditions and the following disclaimer.
1438+
1439+ 2. Redistributions in binary form must reproduce the above copyright
1440+ notice, this list of conditions and the following disclaimer in the
1441+ documentation and/or other materials provided with the distribution.
1442+
1443+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
1444+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1445+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1446+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
1447+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1448+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1449+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1450+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
1451+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
1452+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1453+ POSSIBILITY OF SUCH DAMAGE.
1454+
1455+conduit LICENSE file:
1456+
1457+ Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
1458+
1459+ Permission is hereby granted, free of charge, to any person obtaining
1460+ a copy of this software and associated documentation files (the
1461+ "Software"), to deal in the Software without restriction, including
1462+ without limitation the rights to use, copy, modify, merge, publish,
1463+ distribute, sublicense, and/or sell copies of the Software, and to
1464+ permit persons to whom the Software is furnished to do so, subject to
1465+ the following conditions:
1466+
1467+ The above copyright notice and this permission notice shall be
1468+ included in all copies or substantial portions of the Software.
1469+
1470+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1471+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1472+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1473+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1474+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1475+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1476+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1477+
1478+conduit-extra LICENSE file:
1479+
1480+ Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
1481+
1482+ Permission is hereby granted, free of charge, to any person obtaining
1483+ a copy of this software and associated documentation files (the
1484+ "Software"), to deal in the Software without restriction, including
1485+ without limitation the rights to use, copy, modify, merge, publish,
1486+ distribute, sublicense, and/or sell copies of the Software, and to
1487+ permit persons to whom the Software is furnished to do so, subject to
1488+ the following conditions:
1489+
1490+ The above copyright notice and this permission notice shall be
1491+ included in all copies or substantial portions of the Software.
1492+
1493+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1494+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1495+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1496+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1497+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1498+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1499+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1500+
1501+connection LICENSE file:
1502+
1503+ Copyright (c) 2012 Vincent Hanquez <vincent@snarc.org>
1504+
1505+ All rights reserved.
1506+
1507+ Redistribution and use in source and binary forms, with or without
1508+ modification, are permitted provided that the following conditions
1509+ are met:
1510+ 1. Redistributions of source code must retain the above copyright
1511+ notice, this list of conditions and the following disclaimer.
1512+ 2. Redistributions in binary form must reproduce the above copyright
1513+ notice, this list of conditions and the following disclaimer in the
1514+ documentation and/or other materials provided with the distribution.
1515+ 3. Neither the name of the author nor the names of his contributors
1516+ may be used to endorse or promote products derived from this software
1517+ without specific prior written permission.
1518+
1519+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1520+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1521+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1522+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
1523+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1524+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1525+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1526+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1527+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1528+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1529+ SUCH DAMAGE.
1530+
1531+containers LICENSE file:
1532+
1533+ The Glasgow Haskell Compiler License
1534+
1535+ Copyright 2004, The University Court of the University of Glasgow.
1536+ All rights reserved.
1537+
1538+ Redistribution and use in source and binary forms, with or without
1539+ modification, are permitted provided that the following conditions are met:
1540+
1541+ - Redistributions of source code must retain the above copyright notice,
1542+ this list of conditions and the following disclaimer.
1543+
1544+ - Redistributions in binary form must reproduce the above copyright notice,
1545+ this list of conditions and the following disclaimer in the documentation
1546+ and/or other materials provided with the distribution.
1547+
1548+ - Neither name of the University nor the names of its contributors may be
1549+ used to endorse or promote products derived from this software without
1550+ specific prior written permission.
1551+
1552+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
1553+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1554+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
1555+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
1556+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
1557+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1558+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1559+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1560+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1561+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1562+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
1563+ DAMAGE.
1564+
1565+contravariant LICENSE file:
1566+
1567+ Copyright 2007-2015 Edward Kmett
1568+
1569+ All rights reserved.
1570+
1571+ Redistribution and use in source and binary forms, with or without
1572+ modification, are permitted provided that the following conditions
1573+ are met:
1574+
1575+ 1. Redistributions of source code must retain the above copyright
1576+ notice, this list of conditions and the following disclaimer.
1577+
1578+ 2. Redistributions in binary form must reproduce the above copyright
1579+ notice, this list of conditions and the following disclaimer in the
1580+ documentation and/or other materials provided with the distribution.
1581+
1582+ 3. Neither the name of the author nor the names of his contributors
1583+ may be used to endorse or promote products derived from this software
1584+ without specific prior written permission.
1585+
1586+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
1587+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1588+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1589+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
1590+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1591+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1592+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1593+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
1594+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
1595+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1596+ POSSIBILITY OF SUCH DAMAGE.
1597+
1598+cookie LICENSE file:
1599+
1600+ Copyright (c) 2010 Michael Snoyman, http://www.yesodweb.com/
1601+
1602+ Permission is hereby granted, free of charge, to any person obtaining
1603+ a copy of this software and associated documentation files (the
1604+ "Software"), to deal in the Software without restriction, including
1605+ without limitation the rights to use, copy, modify, merge, publish,
1606+ distribute, sublicense, and/or sell copies of the Software, and to
1607+ permit persons to whom the Software is furnished to do so, subject to
1608+ the following conditions:
1609+
1610+ The above copyright notice and this permission notice shall be
1611+ included in all copies or substantial portions of the Software.
1612+
1613+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1614+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1615+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1616+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1617+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1618+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1619+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1620+
1621+cryptonite LICENSE file:
1622+
1623+ Copyright (c) 2006-2015 Vincent Hanquez <vincent@snarc.org>
1624+
1625+ All rights reserved.
1626+
1627+ Redistribution and use in source and binary forms, with or without
1628+ modification, are permitted provided that the following conditions
1629+ are met:
1630+
1631+ 1. Redistributions of source code must retain the above copyright
1632+ notice, this list of conditions and the following disclaimer.
1633+ 2. Redistributions in binary form must reproduce the above copyright
1634+ notice, this list of conditions and the following disclaimer in the
1635+ documentation and/or other materials provided with the distribution.
1636+ 3. Neither the name of the author nor the names of his contributors
1637+ may be used to endorse or promote products derived from this software
1638+ without specific prior written permission.
1639+
1640+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS AS IS'' AND
1641+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1642+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1643+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
1644+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1645+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1646+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1647+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1648+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1649+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1650+ SUCH DAMAGE.
1651+
1652+css-text LICENSE file:
1653+
1654+ The following license covers this documentation, and the source code, except
1655+ where otherwise indicated.
1656+
1657+ Copyright 2010, Michael Snoyman. All rights reserved.
1658+
1659+ Redistribution and use in source and binary forms, with or without
1660+ modification, are permitted provided that the following conditions are met:
1661+
1662+ * Redistributions of source code must retain the above copyright notice, this
1663+ list of conditions and the following disclaimer.
1664+
1665+ * Redistributions in binary form must reproduce the above copyright notice,
1666+ this list of conditions and the following disclaimer in the documentation
1667+ and/or other materials provided with the distribution.
1668+
1669+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR
1670+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1671+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
1672+ EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
1673+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
1674+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
1675+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
1676+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
1677+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
1678+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1679+
1680+data-default LICENSE file:
1681+
1682+ Copyright (c) 2013 Lukas Mai
1683+
1684+ All rights reserved.
1685+
1686+ Redistribution and use in source and binary forms, with or without modification,
1687+ are permitted provided that the following conditions are met:
1688+
1689+ * Redistributions of source code must retain the above copyright notice, this
1690+ list of conditions and the following disclaimer.
1691+ * Redistributions in binary form must reproduce the above copyright notice,
1692+ this list of conditions and the following disclaimer in the documentation
1693+ and/or other materials provided with the distribution.
1694+ * Neither the name of the author nor the names of his contributors
1695+ may be used to endorse or promote products derived from this software
1696+ without specific prior written permission.
1697+
1698+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1699+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1700+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1701+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
1702+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1703+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1704+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1705+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1706+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1707+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1708+
1709+data-default-class LICENSE file:
1710+
1711+ Copyright (c) 2013 Lukas Mai
1712+
1713+ All rights reserved.
1714+
1715+ Redistribution and use in source and binary forms, with or without modification,
1716+ are permitted provided that the following conditions are met:
1717+
1718+ * Redistributions of source code must retain the above copyright notice, this
1719+ list of conditions and the following disclaimer.
1720+ * Redistributions in binary form must reproduce the above copyright notice,
1721+ this list of conditions and the following disclaimer in the documentation
1722+ and/or other materials provided with the distribution.
1723+ * Neither the name of the author nor the names of his contributors
1724+ may be used to endorse or promote products derived from this software
1725+ without specific prior written permission.
1726+
1727+ THIS SOFTWARE IS PROVIDED BY LUKAS MAI AND CONTRIBUTORS "AS IS" AND ANY
1728+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1729+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1730+ DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
1731+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1732+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1733+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
1734+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1735+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
1736+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1737+
1738+data-default-instances-base LICENSE file:
1739+
1740+ Copyright (c) 2013 Lukas Mai
1741+
1742+ All rights reserved.
1743+
1744+ Redistribution and use in source and binary forms, with or without modification,
1745+ are permitted provided that the following conditions are met:
1746+
1747+ * Redistributions of source code must retain the above copyright notice, this
1748+ list of conditions and the following disclaimer.
1749+ * Redistributions in binary form must reproduce the above copyright notice,
1750+ this list of conditions and the following disclaimer in the documentation
1751+ and/or other materials provided with the distribution.
1752+ * Neither the name of the author nor the names of his contributors
1753+ may be used to endorse or promote products derived from this software
1754+ without specific prior written permission.
1755+
1756+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1757+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1758+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1759+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
1760+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1761+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1762+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1763+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1764+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1765+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1766+
1767+data-default-instances-containers LICENSE file:
1768+
1769+ Copyright (c) 2013 Lukas Mai
1770+
1771+ All rights reserved.
1772+
1773+ Redistribution and use in source and binary forms, with or without modification,
1774+ are permitted provided that the following conditions are met:
1775+
1776+ * Redistributions of source code must retain the above copyright notice, this
1777+ list of conditions and the following disclaimer.
1778+ * Redistributions in binary form must reproduce the above copyright notice,
1779+ this list of conditions and the following disclaimer in the documentation
1780+ and/or other materials provided with the distribution.
1781+ * Neither the name of the author nor the names of his contributors
1782+ may be used to endorse or promote products derived from this software
1783+ without specific prior written permission.
1784+
1785+ THIS SOFTWARE IS PROVIDED BY LUKAS MAI AND CONTRIBUTORS "AS IS" AND ANY
1786+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1787+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1788+ DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
1789+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1790+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1791+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
1792+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1793+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
1794+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1795+
1796+data-default-instances-dlist LICENSE file:
1797+
1798+ Copyright (c) 2013 Lukas Mai
1799+
1800+ All rights reserved.
1801+
1802+ Redistribution and use in source and binary forms, with or without modification,
1803+ are permitted provided that the following conditions are met:
1804+
1805+ * Redistributions of source code must retain the above copyright notice, this
1806+ list of conditions and the following disclaimer.
1807+ * Redistributions in binary form must reproduce the above copyright notice,
1808+ this list of conditions and the following disclaimer in the documentation
1809+ and/or other materials provided with the distribution.
1810+ * Neither the name of the author nor the names of his contributors
1811+ may be used to endorse or promote products derived from this software
1812+ without specific prior written permission.
1813+
1814+ THIS SOFTWARE IS PROVIDED BY LUKAS MAI AND CONTRIBUTORS "AS IS" AND ANY
1815+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1816+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1817+ DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
1818+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1819+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1820+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
1821+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1822+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
1823+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1824+
1825+data-default-instances-old-locale LICENSE file:
1826+
1827+ Copyright (c) 2013 Lukas Mai
1828+
1829+ All rights reserved.
1830+
1831+ Redistribution and use in source and binary forms, with or without modification,
1832+ are permitted provided that the following conditions are met:
1833+
1834+ * Redistributions of source code must retain the above copyright notice, this
1835+ list of conditions and the following disclaimer.
1836+ * Redistributions in binary form must reproduce the above copyright notice,
1837+ this list of conditions and the following disclaimer in the documentation
1838+ and/or other materials provided with the distribution.
1839+ * Neither the name of the author nor the names of his contributors
1840+ may be used to endorse or promote products derived from this software
1841+ without specific prior written permission.
1842+
1843+ THIS SOFTWARE IS PROVIDED BY LUKAS MAI AND CONTRIBUTORS "AS IS" AND ANY
1844+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1845+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1846+ DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
1847+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1848+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1849+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
1850+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1851+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
1852+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1853+
1854+data-ordlist LICENSE file:
1855+
1856+ Copyright (c) 2009-2010, Melding Monads
1857+ All rights reserved.
1858+
1859+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1860+
1861+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
1862+ * 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.
1863+ * 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.
1864+
1865+ 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.
1866+
1867+deepseq LICENSE file:
1868+
1869+ This library (deepseq) is derived from code from the GHC project which
1870+ is largely (c) The University of Glasgow, and distributable under a
1871+ BSD-style license (see below).
1872+
1873+ -----------------------------------------------------------------------------
1874+
1875+ The Glasgow Haskell Compiler License
1876+
1877+ Copyright 2001-2009, The University Court of the University of Glasgow.
1878+ All rights reserved.
1879+
1880+ Redistribution and use in source and binary forms, with or without
1881+ modification, are permitted provided that the following conditions are met:
1882+
1883+ - Redistributions of source code must retain the above copyright notice,
1884+ this list of conditions and the following disclaimer.
1885+
1886+ - Redistributions in binary form must reproduce the above copyright notice,
1887+ this list of conditions and the following disclaimer in the documentation
1888+ and/or other materials provided with the distribution.
1889+
1890+ - Neither name of the University nor the names of its contributors may be
1891+ used to endorse or promote products derived from this software without
1892+ specific prior written permission.
1893+
1894+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
1895+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1896+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
1897+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
1898+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
1899+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1900+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1901+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1902+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1903+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1904+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
1905+ DAMAGE.
1906+
1907+ -----------------------------------------------------------------------------
1908+
1909+directory LICENSE file:
1910+
1911+ This library (libraries/base) is derived from code from two
1912+ sources:
1913+
1914+ * Code from the GHC project which is largely (c) The University of
1915+ Glasgow, and distributable under a BSD-style license (see below),
1916+
1917+ * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
1918+ and freely redistributable (but see the full license for
1919+ restrictions).
1920+
1921+ The full text of these licenses is reproduced below. Both of the
1922+ licenses are BSD-style or compatible.
1923+
1924+ -----------------------------------------------------------------------------
1925+
1926+ The Glasgow Haskell Compiler License
1927+
1928+ Copyright 2004, The University Court of the University of Glasgow.
1929+ All rights reserved.
1930+
1931+ Redistribution and use in source and binary forms, with or without
1932+ modification, are permitted provided that the following conditions are met:
1933+
1934+ - Redistributions of source code must retain the above copyright notice,
1935+ this list of conditions and the following disclaimer.
1936+
1937+ - Redistributions in binary form must reproduce the above copyright notice,
1938+ this list of conditions and the following disclaimer in the documentation
1939+ and/or other materials provided with the distribution.
1940+
1941+ - Neither name of the University nor the names of its contributors may be
1942+ used to endorse or promote products derived from this software without
1943+ specific prior written permission.
1944+
1945+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
1946+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1947+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
1948+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
1949+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
1950+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1951+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1952+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1953+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1954+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1955+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
1956+ DAMAGE.
1957+
1958+ -----------------------------------------------------------------------------
1959+
1960+ Code derived from the document "Report on the Programming Language
1961+ Haskell 98", is distributed under the following license:
1962+
1963+ Copyright (c) 2002 Simon Peyton Jones
1964+
1965+ The authors intend this Report to belong to the entire Haskell
1966+ community, and so we grant permission to copy and distribute it for
1967+ any purpose, provided that it is reproduced in its entirety,
1968+ including this Notice. Modified versions of this Report may also be
1969+ copied and distributed for any purpose, provided that the modified
1970+ version is clearly presented as such, and that it does not claim to
1971+ be a definition of the Haskell 98 Language.
1972+
1973+ -----------------------------------------------------------------------------
1974+
1975+distributive LICENSE file:
1976+
1977+ Copyright 2011-2016 Edward Kmett
1978+
1979+ All rights reserved.
1980+
1981+ Redistribution and use in source and binary forms, with or without
1982+ modification, are permitted provided that the following conditions
1983+ are met:
1984+
1985+ 1. Redistributions of source code must retain the above copyright
1986+ notice, this list of conditions and the following disclaimer.
1987+
1988+ 2. Redistributions in binary form must reproduce the above copyright
1989+ notice, this list of conditions and the following disclaimer in the
1990+ documentation and/or other materials provided with the distribution.
1991+
1992+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
1993+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1994+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1995+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
1996+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1997+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1998+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1999+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
2000+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2001+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2002+ POSSIBILITY OF SUCH DAMAGE.
2003+
2004+dlist LICENSE file:
2005+
2006+ Copyright (c) 2006-2009 Don Stewart, 2013-2014 Sean Leather
2007+
2008+ All rights reserved.
2009+
2010+ Redistribution and use in source and binary forms, with or without
2011+ modification, are permitted provided that the following conditions are
2012+ met:
2013+
2014+ * Redistributions of source code must retain the above copyright
2015+ notice, this list of conditions and the following disclaimer.
2016+
2017+ * Redistributions in binary form must reproduce the above
2018+ copyright notice, this list of conditions and the following
2019+ disclaimer in the documentation and/or other materials provided
2020+ with the distribution.
2021+
2022+ * Neither the name of Don Stewart nor the names of other
2023+ contributors may be used to endorse or promote products derived
2024+ from this software without specific prior written permission.
2025+
2026+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2027+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2028+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2029+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2030+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2031+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2032+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2033+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2034+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2035+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2036+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2037+
2038+easy-file LICENSE file:
2039+
2040+ Copyright (c) 2009, IIJ Innovation Institute Inc.
2041+ All rights reserved.
2042+
2043+ Redistribution and use in source and binary forms, with or without
2044+ modification, are permitted provided that the following conditions
2045+ are met:
2046+
2047+ * Redistributions of source code must retain the above copyright
2048+ notice, this list of conditions and the following disclaimer.
2049+ * Redistributions in binary form must reproduce the above copyright
2050+ notice, this list of conditions and the following disclaimer in
2051+ the documentation and/or other materials provided with the
2052+ distribution.
2053+ * Neither the name of the copyright holders nor the names of its
2054+ contributors may be used to endorse or promote products derived
2055+ from this software without specific prior written permission.
2056+
2057+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2058+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2059+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
2060+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
2061+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
2062+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
2063+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2064+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2065+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2066+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2067+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2068+ POSSIBILITY OF SUCH DAMAGE.
2069+
2070+edit-distance LICENSE file:
2071+
2072+ Copyright (c) 2008-2013 Maximilian Bolingbroke
2073+ All rights reserved.
2074+
2075+ Redistribution and use in source and binary forms, with or without modification, are permitted
2076+ provided that the following conditions are met:
2077+
2078+ * Redistributions of source code must retain the above copyright notice, this list of
2079+ conditions and the following disclaimer.
2080+ * Redistributions in binary form must reproduce the above copyright notice, this list of
2081+ conditions and the following disclaimer in the documentation and/or other materials
2082+ provided with the distribution.
2083+ * Neither the name of Maximilian Bolingbroke nor the names of other contributors may be used to
2084+ endorse or promote products derived from this software without specific prior written permission.
2085+
2086+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
2087+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
2088+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
2089+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2090+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2091+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
2092+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
2093+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2094+
2095+entropy LICENSE file:
2096+
2097+ Copyright (c) Thomas DuBuisson
2098+
2099+ All rights reserved.
2100+
2101+ Redistribution and use in source and binary forms, with or without
2102+ modification, are permitted provided that the following conditions
2103+ are met:
2104+
2105+ 1. Redistributions of source code must retain the above copyright
2106+ notice, this list of conditions and the following disclaimer.
2107+
2108+ 2. Redistributions in binary form must reproduce the above copyright
2109+ notice, this list of conditions and the following disclaimer in the
2110+ documentation and/or other materials provided with the distribution.
2111+
2112+ 3. Neither the name of the author nor the names of his contributors
2113+ may be used to endorse or promote products derived from this software
2114+ without specific prior written permission.
2115+
2116+ THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
2117+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2118+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2119+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
2120+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2121+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2122+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2123+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
2124+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2125+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2126+ POSSIBILITY OF SUCH DAMAGE.
2127+
2128+exceptions LICENSE file:
2129+
2130+ Copyright 2013-2015 Edward Kmett
2131+ Copyright 2012 Google Inc.
2132+
2133+ All rights reserved.
2134+
2135+ Redistribution and use in source and binary forms, with or without
2136+ modification, are permitted provided that the following conditions
2137+ are met:
2138+
2139+ 1. Redistributions of source code must retain the above copyright
2140+ notice, this list of conditions and the following disclaimer.
2141+
2142+ 2. Redistributions in binary form must reproduce the above copyright
2143+ notice, this list of conditions and the following disclaimer in the
2144+ documentation and/or other materials provided with the distribution.
2145+
2146+ 3. Neither the name of the author nor the names of his contributors
2147+ may be used to endorse or promote products derived from this software
2148+ without specific prior written permission.
2149+
2150+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
2151+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2152+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2153+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
2154+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2155+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2156+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2157+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
2158+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2159+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2160+ POSSIBILITY OF SUCH DAMAGE.
2161+
2162+fail LICENSE file:
2163+
2164+ Copyright (c) 2015, David Luposchainsky & Herbert Valerio Riedel
2165+
2166+ All rights reserved.
2167+
2168+ Redistribution and use in source and binary forms, with or without
2169+ modification, are permitted provided that the following conditions are met:
2170+
2171+ * Redistributions of source code must retain the above copyright
2172+ notice, this list of conditions and the following disclaimer.
2173+
2174+ * Redistributions in binary form must reproduce the above
2175+ copyright notice, this list of conditions and the following
2176+ disclaimer in the documentation and/or other materials provided
2177+ with the distribution.
2178+
2179+ * Neither the name of Herbert Valerio Riedel nor the names of other
2180+ contributors may be used to endorse or promote products derived
2181+ from this software without specific prior written permission.
2182+
2183+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2184+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2185+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2186+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2187+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2188+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2189+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2190+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2191+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2192+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2193+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2194+
2195+fast-logger LICENSE file:
2196+
2197+ Copyright (c) 2009, IIJ Innovation Institute Inc.
2198+ All rights reserved.
2199+
2200+ Redistribution and use in source and binary forms, with or without
2201+ modification, are permitted provided that the following conditions
2202+ are met:
2203+
2204+ * Redistributions of source code must retain the above copyright
2205+ notice, this list of conditions and the following disclaimer.
2206+ * Redistributions in binary form must reproduce the above copyright
2207+ notice, this list of conditions and the following disclaimer in
2208+ the documentation and/or other materials provided with the
2209+ distribution.
2210+ * Neither the name of the copyright holders nor the names of its
2211+ contributors may be used to endorse or promote products derived
2212+ from this software without specific prior written permission.
2213+
2214+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2215+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2216+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
2217+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
2218+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
2219+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
2220+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2221+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2222+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2223+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2224+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2225+ POSSIBILITY OF SUCH DAMAGE.
2226+
2227+file-embed LICENSE file:
2228+
2229+ The following license covers this documentation, and the source code, except
2230+ where otherwise indicated.
2231+
2232+ Copyright 2008, Michael Snoyman. All rights reserved.
2233+
2234+ Redistribution and use in source and binary forms, with or without
2235+ modification, are permitted provided that the following conditions are met:
2236+
2237+ * Redistributions of source code must retain the above copyright notice, this
2238+ list of conditions and the following disclaimer.
2239+
2240+ * Redistributions in binary form must reproduce the above copyright notice,
2241+ this list of conditions and the following disclaimer in the documentation
2242+ and/or other materials provided with the distribution.
2243+
2244+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR
2245+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2246+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
2247+ EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
2248+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2249+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
2250+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
2251+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
2252+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
2253+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2254+
2255+filepath LICENSE file:
2256+
2257+ Copyright Neil Mitchell 2005-2015.
2258+ All rights reserved.
2259+
2260+ Redistribution and use in source and binary forms, with or without
2261+ modification, are permitted provided that the following conditions are
2262+ met:
2263+
2264+ * Redistributions of source code must retain the above copyright
2265+ notice, this list of conditions and the following disclaimer.
2266+
2267+ * Redistributions in binary form must reproduce the above
2268+ copyright notice, this list of conditions and the following
2269+ disclaimer in the documentation and/or other materials provided
2270+ with the distribution.
2271+
2272+ * Neither the name of Neil Mitchell nor the names of other
2273+ contributors may be used to endorse or promote products derived
2274+ from this software without specific prior written permission.
2275+
2276+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2277+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2278+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2279+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2280+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2281+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2282+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2283+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2284+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2285+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2286+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2287+
2288+foldl LICENSE file:
2289+
2290+ Copyright (c) 2013 Gabriel Gonzalez
2291+ All rights reserved.
2292+
2293+ Redistribution and use in source and binary forms, with or without modification,
2294+ are permitted provided that the following conditions are met:
2295+ * Redistributions of source code must retain the above copyright notice,
2296+ this list of conditions and the following disclaimer.
2297+ * Redistributions in binary form must reproduce the above copyright notice,
2298+ this list of conditions and the following disclaimer in the documentation
2299+ and/or other materials provided with the distribution.
2300+ * Neither the name of Gabriel Gonzalez nor the names of other contributors
2301+ may be used to endorse or promote products derived from this software
2302+ without specific prior written permission.
2303+
2304+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2305+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2306+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2307+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
2308+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2309+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2310+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2311+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2312+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2313+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2314+
2315+free LICENSE file:
2316+
2317+ Copyright 2008-2013 Edward Kmett
2318+
2319+ All rights reserved.
2320+
2321+ Redistribution and use in source and binary forms, with or without
2322+ modification, are permitted provided that the following conditions
2323+ are met:
2324+
2325+ 1. Redistributions of source code must retain the above copyright
2326+ notice, this list of conditions and the following disclaimer.
2327+
2328+ 2. Redistributions in binary form must reproduce the above copyright
2329+ notice, this list of conditions and the following disclaimer in the
2330+ documentation and/or other materials provided with the distribution.
2331+
2332+ 3. Neither the name of the author nor the names of his contributors
2333+ may be used to endorse or promote products derived from this software
2334+ without specific prior written permission.
2335+
2336+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
2337+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2338+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2339+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
2340+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2341+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2342+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2343+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
2344+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2345+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2346+ POSSIBILITY OF SUCH DAMAGE.
2347+
2348+fsnotify LICENSE file:
2349+
2350+ Copyright (c) 2012, Mark Dittmer
2351+
2352+ All rights reserved.
2353+
2354+ Redistribution and use in source and binary forms, with or without
2355+ modification, are permitted provided that the following conditions are met:
2356+
2357+ * Redistributions of source code must retain the above copyright
2358+ notice, this list of conditions and the following disclaimer.
2359+
2360+ * Redistributions in binary form must reproduce the above
2361+ copyright notice, this list of conditions and the following
2362+ disclaimer in the documentation and/or other materials provided
2363+ with the distribution.
2364+
2365+ * Neither the name of Mark Dittmer nor the names of other
2366+ contributors may be used to endorse or promote products derived
2367+ from this software without specific prior written permission.
2368+
2369+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2370+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2371+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2372+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2373+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2374+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2375+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2376+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2377+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2378+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2379+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2380+
2381+ghc-prim LICENSE file:
2382+
2383+ This library (libraries/ghc-prim) is derived from code from several
2384+ sources:
2385+
2386+ * Code from the GHC project which is largely (c) The University of
2387+ Glasgow, and distributable under a BSD-style license (see below),
2388+
2389+ * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
2390+ and freely redistributable (but see the full license for
2391+ restrictions).
2392+
2393+ The full text of these licenses is reproduced below. All of the
2394+ licenses are BSD-style or compatible.
2395+
2396+ -----------------------------------------------------------------------------
2397+
2398+ The Glasgow Haskell Compiler License
2399+
2400+ Copyright 2004, The University Court of the University of Glasgow.
2401+ All rights reserved.
2402+
2403+ Redistribution and use in source and binary forms, with or without
2404+ modification, are permitted provided that the following conditions are met:
2405+
2406+ - Redistributions of source code must retain the above copyright notice,
2407+ this list of conditions and the following disclaimer.
2408+
2409+ - Redistributions in binary form must reproduce the above copyright notice,
2410+ this list of conditions and the following disclaimer in the documentation
2411+ and/or other materials provided with the distribution.
2412+
2413+ - Neither name of the University nor the names of its contributors may be
2414+ used to endorse or promote products derived from this software without
2415+ specific prior written permission.
2416+
2417+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
2418+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
2419+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
2420+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
2421+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
2422+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2423+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2424+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2425+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2426+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2427+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
2428+ DAMAGE.
2429+
2430+ -----------------------------------------------------------------------------
2431+
2432+ Code derived from the document "Report on the Programming Language
2433+ Haskell 98", is distributed under the following license:
2434+
2435+ Copyright (c) 2002 Simon Peyton Jones
2436+
2437+ The authors intend this Report to belong to the entire Haskell
2438+ community, and so we grant permission to copy and distribute it for
2439+ any purpose, provided that it is reproduced in its entirety,
2440+ including this Notice. Modified versions of this Report may also be
2441+ copied and distributed for any purpose, provided that the modified
2442+ version is clearly presented as such, and that it does not claim to
2443+ be a definition of the Haskell 98 Language.
2444+
2445+
2446+hashable LICENSE file:
2447+
2448+ Copyright Milan Straka 2010
2449+
2450+ All rights reserved.
2451+
2452+ Redistribution and use in source and binary forms, with or without
2453+ modification, are permitted provided that the following conditions are met:
2454+
2455+ * Redistributions of source code must retain the above copyright
2456+ notice, this list of conditions and the following disclaimer.
2457+
2458+ * Redistributions in binary form must reproduce the above
2459+ copyright notice, this list of conditions and the following
2460+ disclaimer in the documentation and/or other materials provided
2461+ with the distribution.
2462+
2463+ * Neither the name of Milan Straka nor the names of other
2464+ contributors may be used to endorse or promote products derived
2465+ from this software without specific prior written permission.
2466+
2467+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2468+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2469+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2470+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2471+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2472+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2473+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2474+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2475+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2476+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2477+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2478+
2479+haskeline LICENSE file:
2480+
2481+ Copyright 2007-2009, Judah Jacobson.
2482+ All Rights Reserved.
2483+
2484+ Redistribution and use in source and binary forms, with or without
2485+ modification, are permitted provided that the following conditions are met:
2486+
2487+ - Redistribution of source code must retain the above copyright notice,
2488+ this list of conditions and the following disclaimer.
2489+
2490+ - Redistribution in binary form must reproduce the above copyright notice,
2491+ this list of conditions and the following disclaimer in the documentation
2492+ and/or other materials provided with the distribution.
2493+
2494+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY
2495+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2496+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2497+ DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE CONTRIBUTORS BE LIABLE
2498+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2499+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2500+ SERVICES; LOSS OF USE, DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2501+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2502+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
2503+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2504+
2505+hex LICENSE file:
2506+
2507+ Copyright (c) 2008, Taru Karttunen
2508+ All rights reserved.
2509+
2510+ Redistribution and use in source and binary forms, with or without
2511+ modification, are permitted provided that the following conditions
2512+ are met:
2513+
2514+ Redistributions of source code must retain the above copyright
2515+ notice, this list of conditions and the following disclaimer.
2516+
2517+ Redistributions in binary form must reproduce the above copyright
2518+ notice, this list of conditions and the following disclaimer in the
2519+ documentation and/or other materials provided with the distribution.
2520+
2521+ Neither the name of the Taru Karttunen; nor the names of its contributors
2522+ may be used to endorse or promote products derived from this software
2523+ without specific prior written permission.
2524+
2525+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2526+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2527+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2528+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
2529+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
2530+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
2531+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
2532+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
2533+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
2534+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2535+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2536+
2537+hinotify LICENSE file:
2538+
2539+ Copyright (c) Lennart Kolmodin
2540+
2541+ All rights reserved.
2542+
2543+ Redistribution and use in source and binary forms, with or without
2544+ modification, are permitted provided that the following conditions
2545+ are met:
2546+
2547+ 1. Redistributions of source code must retain the above copyright
2548+ notice, this list of conditions and the following disclaimer.
2549+
2550+ 2. Redistributions in binary form must reproduce the above copyright
2551+ notice, this list of conditions and the following disclaimer in the
2552+ documentation and/or other materials provided with the distribution.
2553+
2554+ 3. Neither the name of the author nor the names of his contributors
2555+ may be used to endorse or promote products derived from this software
2556+ without specific prior written permission.
2557+
2558+ THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
2559+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2560+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2561+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
2562+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2563+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2564+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2565+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
2566+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2567+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2568+ POSSIBILITY OF SUCH DAMAGE.
2569+
2570+hostname LICENSE file:
2571+
2572+ Copyright (c) 2008, Maximilian Bolingbroke
2573+ All rights reserved.
2574+
2575+ Redistribution and use in source and binary forms, with or without modification, are permitted
2576+ provided that the following conditions are met:
2577+
2578+ * Redistributions of source code must retain the above copyright notice, this list of
2579+ conditions and the following disclaimer.
2580+ * Redistributions in binary form must reproduce the above copyright notice, this list of
2581+ conditions and the following disclaimer in the documentation and/or other materials
2582+ provided with the distribution.
2583+ * Neither the name of Maximilian Bolingbroke nor the names of other contributors may be used to
2584+ endorse or promote products derived from this software without specific prior written permission.
2585+
2586+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
2587+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
2588+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
2589+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2590+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2591+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
2592+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
2593+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2594+
2595+hourglass LICENSE file:
2596+
2597+ Copyright (c) 2014 Vincent Hanquez <vincent@snarc.org>
2598+
2599+ All rights reserved.
2600+
2601+ Redistribution and use in source and binary forms, with or without
2602+ modification, are permitted provided that the following conditions
2603+ are met:
2604+ 1. Redistributions of source code must retain the above copyright
2605+ notice, this list of conditions and the following disclaimer.
2606+ 2. Redistributions in binary form must reproduce the above copyright
2607+ notice, this list of conditions and the following disclaimer in the
2608+ documentation and/or other materials provided with the distribution.
2609+ 3. Neither the name of the author nor the names of his contributors
2610+ may be used to endorse or promote products derived from this software
2611+ without specific prior written permission.
2612+
2613+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS AS IS'' AND
2614+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2615+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2616+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
2617+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2618+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2619+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2620+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2621+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2622+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2623+ SUCH DAMAGE.
2624+
2625+http-client LICENSE file:
2626+
2627+ The MIT License (MIT)
2628+
2629+ Copyright (c) 2013 Michael Snoyman
2630+
2631+ Permission is hereby granted, free of charge, to any person obtaining a copy of
2632+ this software and associated documentation files (the "Software"), to deal in
2633+ the Software without restriction, including without limitation the rights to
2634+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
2635+ the Software, and to permit persons to whom the Software is furnished to do so,
2636+ subject to the following conditions:
2637+
2638+ The above copyright notice and this permission notice shall be included in all
2639+ copies or substantial portions of the Software.
2640+
2641+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2642+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
2643+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
2644+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
2645+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2646+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2647+
2648+http-client-tls LICENSE file:
2649+
2650+ The MIT License (MIT)
2651+
2652+ Copyright (c) 2013 Michael Snoyman
2653+
2654+ Permission is hereby granted, free of charge, to any person obtaining a copy of
2655+ this software and associated documentation files (the "Software"), to deal in
2656+ the Software without restriction, including without limitation the rights to
2657+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
2658+ the Software, and to permit persons to whom the Software is furnished to do so,
2659+ subject to the following conditions:
2660+
2661+ The above copyright notice and this permission notice shall be included in all
2662+ copies or substantial portions of the Software.
2663+
2664+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2665+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
2666+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
2667+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
2668+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2669+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2670+
2671+http-date LICENSE file:
2672+
2673+ Copyright (c) 2009, IIJ Innovation Institute Inc.
2674+ All rights reserved.
2675+
2676+ Redistribution and use in source and binary forms, with or without
2677+ modification, are permitted provided that the following conditions
2678+ are met:
2679+
2680+ * Redistributions of source code must retain the above copyright
2681+ notice, this list of conditions and the following disclaimer.
2682+ * Redistributions in binary form must reproduce the above copyright
2683+ notice, this list of conditions and the following disclaimer in
2684+ the documentation and/or other materials provided with the
2685+ distribution.
2686+ * Neither the name of the copyright holders nor the names of its
2687+ contributors may be used to endorse or promote products derived
2688+ from this software without specific prior written permission.
2689+
2690+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2691+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2692+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
2693+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
2694+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
2695+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
2696+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2697+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2698+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2699+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2700+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2701+ POSSIBILITY OF SUCH DAMAGE.
2702+
2703+http-types LICENSE file:
2704+
2705+ Copyright (c) 2011, Aristid Breitkreuz
2706+ Copyright (c) 2011, Michael Snoyman
2707+
2708+ All rights reserved.
2709+
2710+ Redistribution and use in source and binary forms, with or without
2711+ modification, are permitted provided that the following conditions are met:
2712+
2713+ * Redistributions of source code must retain the above copyright
2714+ notice, this list of conditions and the following disclaimer.
2715+
2716+ * Redistributions in binary form must reproduce the above
2717+ copyright notice, this list of conditions and the following
2718+ disclaimer in the documentation and/or other materials provided
2719+ with the distribution.
2720+
2721+ * Neither the name of Aristid Breitkreuz nor the names of other
2722+ contributors may be used to endorse or promote products derived
2723+ from this software without specific prior written permission.
2724+
2725+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2726+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2727+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2728+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2729+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2730+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2731+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2732+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2733+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2734+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2735+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2736+
2737+http2 LICENSE file:
2738+
2739+ Copyright (c) 2013, IIJ Innovation Institute Inc.
2740+ All rights reserved.
2741+
2742+ Redistribution and use in source and binary forms, with or without
2743+ modification, are permitted provided that the following conditions
2744+ are met:
2745+
2746+ * Redistributions of source code must retain the above copyright
2747+ notice, this list of conditions and the following disclaimer.
2748+ * Redistributions in binary form must reproduce the above copyright
2749+ notice, this list of conditions and the following disclaimer in
2750+ the documentation and/or other materials provided with the
2751+ distribution.
2752+ * Neither the name of the copyright holders nor the names of its
2753+ contributors may be used to endorse or promote products derived
2754+ from this software without specific prior written permission.
2755+
2756+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2757+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2758+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
2759+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
2760+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
2761+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
2762+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2763+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2764+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2765+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2766+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2767+ POSSIBILITY OF SUCH DAMAGE.
2768+
2769+integer-gmp LICENSE file:
2770+
2771+ Copyright (c) 2014, Herbert Valerio Riedel
2772+
2773+ All rights reserved.
2774+
2775+ Redistribution and use in source and binary forms, with or without
2776+ modification, are permitted provided that the following conditions are met:
2777+
2778+ * Redistributions of source code must retain the above copyright
2779+ notice, this list of conditions and the following disclaimer.
2780+
2781+ * Redistributions in binary form must reproduce the above
2782+ copyright notice, this list of conditions and the following
2783+ disclaimer in the documentation and/or other materials provided
2784+ with the distribution.
2785+
2786+ * Neither the name of Herbert Valerio Riedel nor the names of other
2787+ contributors may be used to endorse or promote products derived
2788+ from this software without specific prior written permission.
2789+
2790+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2791+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2792+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2793+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2794+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2795+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2796+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2797+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2798+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2799+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2800+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2801+
2802+iproute LICENSE file:
2803+
2804+ Copyright (c) 2009, IIJ Innovation Institute Inc.
2805+ All rights reserved.
2806+
2807+ Redistribution and use in source and binary forms, with or without
2808+ modification, are permitted provided that the following conditions
2809+ are met:
2810+
2811+ * Redistributions of source code must retain the above copyright
2812+ notice, this list of conditions and the following disclaimer.
2813+ * Redistributions in binary form must reproduce the above copyright
2814+ notice, this list of conditions and the following disclaimer in
2815+ the documentation and/or other materials provided with the
2816+ distribution.
2817+ * Neither the name of the copyright holders nor the names of its
2818+ contributors may be used to endorse or promote products derived
2819+ from this software without specific prior written permission.
2820+
2821+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2822+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2823+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
2824+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
2825+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
2826+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
2827+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2828+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2829+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2830+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2831+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2832+ POSSIBILITY OF SUCH DAMAGE.
2833+
2834+kan-extensions LICENSE file:
2835+
2836+ Copyright 2008-2013 Edward Kmett
2837+
2838+ All rights reserved.
2839+
2840+ Redistribution and use in source and binary forms, with or without
2841+ modification, are permitted provided that the following conditions
2842+ are met:
2843+
2844+ 1. Redistributions of source code must retain the above copyright
2845+ notice, this list of conditions and the following disclaimer.
2846+
2847+ 2. Redistributions in binary form must reproduce the above copyright
2848+ notice, this list of conditions and the following disclaimer in the
2849+ documentation and/or other materials provided with the distribution.
2850+
2851+ 3. Neither the name of the author nor the names of his contributors
2852+ may be used to endorse or promote products derived from this software
2853+ without specific prior written permission.
2854+
2855+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
2856+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2857+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2858+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
2859+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2860+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2861+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2862+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
2863+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2864+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2865+ POSSIBILITY OF SUCH DAMAGE.
2866+
2867+language-javascript LICENSE file:
2868+
2869+ Copyright (c)2010, Alan Zimmerman
2870+
2871+ All rights reserved.
2872+
2873+ Redistribution and use in source and binary forms, with or without
2874+ modification, are permitted provided that the following conditions are met:
2875+
2876+ * Redistributions of source code must retain the above copyright
2877+ notice, this list of conditions and the following disclaimer.
2878+
2879+ * Redistributions in binary form must reproduce the above
2880+ copyright notice, this list of conditions and the following
2881+ disclaimer in the documentation and/or other materials provided
2882+ with the distribution.
2883+
2884+ * Neither the name of Alan Zimmerman nor the names of other
2885+ contributors may be used to endorse or promote products derived
2886+ from this software without specific prior written permission.
2887+
2888+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2889+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2890+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2891+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2892+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2893+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2894+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2895+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2896+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2897+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2898+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2899+
2900+lens LICENSE file:
2901+
2902+ Copyright 2012-2015 Edward Kmett
2903+
2904+ All rights reserved.
2905+
2906+ Redistribution and use in source and binary forms, with or without
2907+ modification, are permitted provided that the following conditions
2908+ are met:
2909+
2910+ 1. Redistributions of source code must retain the above copyright
2911+ notice, this list of conditions and the following disclaimer.
2912+
2913+ 2. Redistributions in binary form must reproduce the above copyright
2914+ notice, this list of conditions and the following disclaimer in the
2915+ documentation and/or other materials provided with the distribution.
2916+
2917+ 3. Neither the name of the author nor the names of his contributors
2918+ may be used to endorse or promote products derived from this software
2919+ without specific prior written permission.
2920+
2921+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
2922+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2923+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2924+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
2925+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2926+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2927+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2928+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
2929+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2930+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2931+ POSSIBILITY OF SUCH DAMAGE.
2932+
2933+lifted-base LICENSE file:
2934+
2935+ Copyright © 2010-2012, Bas van Dijk, Anders Kaseorg
2936+ All rights reserved.
2937+
2938+ Redistribution and use in source and binary forms, with or without
2939+ modification, are permitted provided that the following conditions are
2940+ met:
2941+
2942+ • Redistributions of source code must retain the above copyright
2943+ notice, this list of conditions and the following disclaimer.
2944+
2945+ • Redistributions in binary form must reproduce the above copyright
2946+ notice, this list of conditions and the following disclaimer in the
2947+ documentation and/or other materials provided with the distribution.
2948+
2949+ • Neither the name of the author nor the names of other contributors
2950+ may be used to endorse or promote products derived from this
2951+ software without specific prior written permission.
2952+
2953+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2954+ “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2955+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2956+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2957+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2958+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2959+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2960+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2961+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2962+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2963+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2964+
2965+managed LICENSE file:
2966+
2967+ Copyright (c) 2014 Gabriel Gonzalez
2968+ All rights reserved.
2969+
2970+ Redistribution and use in source and binary forms, with or without modification,
2971+ are permitted provided that the following conditions are met:
2972+ * Redistributions of source code must retain the above copyright notice,
2973+ this list of conditions and the following disclaimer.
2974+ * Redistributions in binary form must reproduce the above copyright notice,
2975+ this list of conditions and the following disclaimer in the documentation
2976+ and/or other materials provided with the distribution.
2977+ * Neither the name of Gabriel Gonzalez nor the names of other contributors
2978+ may be used to endorse or promote products derived from this software
2979+ without specific prior written permission.
2980+
2981+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2982+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2983+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2984+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
2985+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2986+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2987+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2988+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2989+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2990+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2991+
2992+memory LICENSE file:
2993+
2994+ Copyright (c) 2015 Vincent Hanquez <vincent@snarc.org>
2995+
2996+ All rights reserved.
2997+
2998+ Redistribution and use in source and binary forms, with or without
2999+ modification, are permitted provided that the following conditions
3000+ are met:
3001+
3002+ 1. Redistributions of source code must retain the above copyright
3003+ notice, this list of conditions and the following disclaimer.
3004+ 2. Redistributions in binary form must reproduce the above copyright
3005+ notice, this list of conditions and the following disclaimer in the
3006+ documentation and/or other materials provided with the distribution.
3007+ 3. Neither the name of the author nor the names of his contributors
3008+ may be used to endorse or promote products derived from this software
3009+ without specific prior written permission.
3010+
3011+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS AS IS'' AND
3012+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3013+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3014+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
3015+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3016+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3017+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3018+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3019+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3020+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3021+ SUCH DAMAGE.
3022+
3023+mime-types LICENSE file:
3024+
3025+ Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
3026+
3027+ Permission is hereby granted, free of charge, to any person obtaining
3028+ a copy of this software and associated documentation files (the
3029+ "Software"), to deal in the Software without restriction, including
3030+ without limitation the rights to use, copy, modify, merge, publish,
3031+ distribute, sublicense, and/or sell copies of the Software, and to
3032+ permit persons to whom the Software is furnished to do so, subject to
3033+ the following conditions:
3034+
3035+ The above copyright notice and this permission notice shall be
3036+ included in all copies or substantial portions of the Software.
3037+
3038+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3039+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
3040+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3041+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
3042+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
3043+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
3044+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3045+
3046+mmorph LICENSE file:
3047+
3048+ Copyright (c) 2013, Gabriel Gonzalez
3049+ All rights reserved.
3050+
3051+ Redistribution and use in source and binary forms, with or without modification,
3052+ are permitted provided that the following conditions are met:
3053+
3054+ * Redistributions of source code must retain the above copyright notice, this
3055+ list of conditions and the following disclaimer.
3056+ * Redistributions in binary form must reproduce the above copyright notice, this
3057+ list of conditions and the following disclaimer in the documentation and/or
3058+ other materials provided with the distribution.
3059+ * Neither the name of Gabriel Gonzalez nor the names of other contributors may
3060+ be used to endorse or promote products derived from this software without
3061+ specific prior written permission.
3062+
3063+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3064+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3065+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3066+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
3067+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3068+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3069+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
3070+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3071+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3072+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3073+
3074+monad-control LICENSE file:
3075+
3076+ Copyright © 2010, Bas van Dijk, Anders Kaseorg
3077+ All rights reserved.
3078+
3079+ Redistribution and use in source and binary forms, with or without
3080+ modification, are permitted provided that the following conditions are
3081+ met:
3082+
3083+ • Redistributions of source code must retain the above copyright
3084+ notice, this list of conditions and the following disclaimer.
3085+
3086+ • Redistributions in binary form must reproduce the above copyright
3087+ notice, this list of conditions and the following disclaimer in the
3088+ documentation and/or other materials provided with the distribution.
3089+
3090+ • Neither the name of the author nor the names of other contributors
3091+ may be used to endorse or promote products derived from this
3092+ software without specific prior written permission.
3093+
3094+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3095+ “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3096+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3097+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3098+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3099+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3100+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3101+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3102+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3103+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3104+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3105+
3106+monad-logger LICENSE file:
3107+
3108+ Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
3109+
3110+ Permission is hereby granted, free of charge, to any person obtaining
3111+ a copy of this software and associated documentation files (the
3112+ "Software"), to deal in the Software without restriction, including
3113+ without limitation the rights to use, copy, modify, merge, publish,
3114+ distribute, sublicense, and/or sell copies of the Software, and to
3115+ permit persons to whom the Software is furnished to do so, subject to
3116+ the following conditions:
3117+
3118+ The above copyright notice and this permission notice shall be
3119+ included in all copies or substantial portions of the Software.
3120+
3121+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3122+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
3123+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3124+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
3125+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
3126+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
3127+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3128+
3129+mtl LICENSE file:
3130+
3131+ The Glasgow Haskell Compiler License
3132+
3133+ Copyright 2004, The University Court of the University of Glasgow.
3134+ All rights reserved.
3135+
3136+ Redistribution and use in source and binary forms, with or without
3137+ modification, are permitted provided that the following conditions are met:
3138+
3139+ - Redistributions of source code must retain the above copyright notice,
3140+ this list of conditions and the following disclaimer.
3141+
3142+ - Redistributions in binary form must reproduce the above copyright notice,
3143+ this list of conditions and the following disclaimer in the documentation
3144+ and/or other materials provided with the distribution.
3145+
3146+ - Neither name of the University nor the names of its contributors may be
3147+ used to endorse or promote products derived from this software without
3148+ specific prior written permission.
3149+
3150+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3151+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3152+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3153+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3154+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3155+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3156+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3157+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3158+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3159+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3160+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3161+ DAMAGE.
3162+
3163+mwc-random LICENSE file:
3164+
3165+ Copyright (c) 2009, Bryan O'Sullivan
3166+ All rights reserved.
3167+
3168+ Redistribution and use in source and binary forms, with or without
3169+ modification, are permitted provided that the following conditions
3170+ are met:
3171+
3172+ * Redistributions of source code must retain the above copyright
3173+ notice, this list of conditions and the following disclaimer.
3174+
3175+ * Redistributions in binary form must reproduce the above
3176+ copyright notice, this list of conditions and the following
3177+ disclaimer in the documentation and/or other materials provided
3178+ with the distribution.
3179+
3180+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3181+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3182+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3183+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3184+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3185+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3186+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3187+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3188+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3189+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3190+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3191+
3192+network LICENSE file:
3193+
3194+ Copyright (c) 2002-2010, The University Court of the University of Glasgow.
3195+ Copyright (c) 2007-2010, Johan Tibell
3196+
3197+ Redistribution and use in source and binary forms, with or without
3198+ modification, are permitted provided that the following conditions are met:
3199+
3200+ - Redistributions of source code must retain the above copyright notice,
3201+ this list of conditions and the following disclaimer.
3202+
3203+ - Redistributions in binary form must reproduce the above copyright notice,
3204+ this list of conditions and the following disclaimer in the documentation
3205+ and/or other materials provided with the distribution.
3206+
3207+ - Neither name of the University nor the names of its contributors may be
3208+ used to endorse or promote products derived from this software without
3209+ specific prior written permission.
3210+
3211+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3212+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3213+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3214+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3215+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3216+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3217+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3218+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3219+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3220+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3221+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3222+ DAMAGE.
3223+
3224+network-uri LICENSE file:
3225+
3226+ Copyright (c) 2002-2010, The University Court of the University of Glasgow.
3227+ Copyright (c) 2007-2010, Johan Tibell
3228+
3229+ Redistribution and use in source and binary forms, with or without
3230+ modification, are permitted provided that the following conditions are met:
3231+
3232+ - Redistributions of source code must retain the above copyright notice,
3233+ this list of conditions and the following disclaimer.
3234+
3235+ - Redistributions in binary form must reproduce the above copyright notice,
3236+ this list of conditions and the following disclaimer in the documentation
3237+ and/or other materials provided with the distribution.
3238+
3239+ - Neither name of the University nor the names of its contributors may be
3240+ used to endorse or promote products derived from this software without
3241+ specific prior written permission.
3242+
3243+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3244+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3245+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3246+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3247+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3248+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3249+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3250+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3251+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3252+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3253+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3254+ DAMAGE.
3255+
3256+old-locale LICENSE file:
3257+
3258+ This library (libraries/base) is derived from code from two
3259+ sources:
3260+
3261+ * Code from the GHC project which is largely (c) The University of
3262+ Glasgow, and distributable under a BSD-style license (see below),
3263+
3264+ * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
3265+ and freely redistributable (but see the full license for
3266+ restrictions).
3267+
3268+ The full text of these licenses is reproduced below. Both of the
3269+ licenses are BSD-style or compatible.
3270+
3271+ -----------------------------------------------------------------------------
3272+
3273+ The Glasgow Haskell Compiler License
3274+
3275+ Copyright 2004, The University Court of the University of Glasgow.
3276+ 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+
3284+ - Redistributions in binary form must reproduce the above copyright notice,
3285+ this list of conditions and the following disclaimer in the documentation
3286+ and/or other materials provided with the distribution.
3287+
3288+ - Neither name of the University nor the names of its contributors may be
3289+ used to endorse or promote products derived from this software without
3290+ specific prior written permission.
3291+
3292+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3293+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3294+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3295+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3296+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3297+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3298+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3299+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3300+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3301+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3302+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3303+ DAMAGE.
3304+
3305+ -----------------------------------------------------------------------------
3306+
3307+ Code derived from the document "Report on the Programming Language
3308+ Haskell 98", is distributed under the following license:
3309+
3310+ Copyright (c) 2002 Simon Peyton Jones
3311+
3312+ The authors intend this Report to belong to the entire Haskell
3313+ community, and so we grant permission to copy and distribute it for
3314+ any purpose, provided that it is reproduced in its entirety,
3315+ including this Notice. Modified versions of this Report may also be
3316+ copied and distributed for any purpose, provided that the modified
3317+ version is clearly presented as such, and that it does not claim to
3318+ be a definition of the Haskell 98 Language.
3319+
3320+ -----------------------------------------------------------------------------
3321+
3322+old-time LICENSE file:
3323+
3324+ This library (libraries/base) is derived from code from two
3325+ sources:
3326+
3327+ * Code from the GHC project which is largely (c) The University of
3328+ Glasgow, and distributable under a BSD-style license (see below),
3329+
3330+ * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
3331+ and freely redistributable (but see the full license for
3332+ restrictions).
3333+
3334+ The full text of these licenses is reproduced below. Both of the
3335+ licenses are BSD-style or compatible.
3336+
3337+ -----------------------------------------------------------------------------
3338+
3339+ The Glasgow Haskell Compiler License
3340+
3341+ Copyright 2004, The University Court of the University of Glasgow.
3342+ All rights reserved.
3343+
3344+ Redistribution and use in source and binary forms, with or without
3345+ modification, are permitted provided that the following conditions are met:
3346+
3347+ - Redistributions of source code must retain the above copyright notice,
3348+ this list of conditions and the following disclaimer.
3349+
3350+ - Redistributions in binary form must reproduce the above copyright notice,
3351+ this list of conditions and the following disclaimer in the documentation
3352+ and/or other materials provided with the distribution.
3353+
3354+ - Neither name of the University nor the names of its contributors may be
3355+ used to endorse or promote products derived from this software without
3356+ specific prior written permission.
3357+
3358+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3359+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3360+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3361+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3362+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3363+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3364+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3365+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3366+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3367+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3368+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3369+ DAMAGE.
3370+
3371+ -----------------------------------------------------------------------------
3372+
3373+ Code derived from the document "Report on the Programming Language
3374+ Haskell 98", is distributed under the following license:
3375+
3376+ Copyright (c) 2002 Simon Peyton Jones
3377+
3378+ The authors intend this Report to belong to the entire Haskell
3379+ community, and so we grant permission to copy and distribute it for
3380+ any purpose, provided that it is reproduced in its entirety,
3381+ including this Notice. Modified versions of this Report may also be
3382+ copied and distributed for any purpose, provided that the modified
3383+ version is clearly presented as such, and that it does not claim to
3384+ be a definition of the Haskell 98 Language.
3385+
3386+ -----------------------------------------------------------------------------
3387+
3388+optional-args LICENSE file:
3389+
3390+ Copyright (c) 2015 Gabriel Gonzalez
3391+ All rights reserved.
3392+
3393+ Redistribution and use in source and binary forms, with or without modification,
3394+ are permitted provided that the following conditions are met:
3395+ * Redistributions of source code must retain the above copyright notice,
3396+ this list of conditions and the following disclaimer.
3397+ * Redistributions in binary form must reproduce the above copyright notice,
3398+ this list of conditions and the following disclaimer in the documentation
3399+ and/or other materials provided with the distribution.
3400+ * Neither the name of Gabriel Gonzalez nor the names of other contributors
3401+ may be used to endorse or promote products derived from this software
3402+ without specific prior written permission.
3403+
3404+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3405+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3406+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3407+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
3408+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3409+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3410+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
3411+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3412+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3413+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3414+
3415+optparse-applicative LICENSE file:
3416+
3417+ Copyright (c) 2012, Paolo Capriotti
3418+
3419+ All rights reserved.
3420+
3421+ Redistribution and use in source and binary forms, with or without
3422+ modification, are permitted provided that the following conditions are met:
3423+
3424+ * Redistributions of source code must retain the above copyright
3425+ notice, this list of conditions and the following disclaimer.
3426+
3427+ * Redistributions in binary form must reproduce the above
3428+ copyright notice, this list of conditions and the following
3429+ disclaimer in the documentation and/or other materials provided
3430+ with the distribution.
3431+
3432+ * Neither the name of Paolo Capriotti nor the names of other
3433+ contributors may be used to endorse or promote products derived
3434+ from this software without specific prior written permission.
3435+
3436+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3437+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3438+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3439+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3440+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3441+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3442+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3443+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3444+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3445+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3446+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3447+
3448+parallel LICENSE file:
3449+
3450+ This library (libraries/parallel) is derived from code from
3451+ the GHC project which is largely (c) The University of
3452+ Glasgow, and distributable under a BSD-style license (see below).
3453+
3454+ -----------------------------------------------------------------------------
3455+
3456+ The Glasgow Haskell Compiler License
3457+
3458+ Copyright 2004, The University Court of the University of Glasgow.
3459+ All rights reserved.
3460+
3461+ Redistribution and use in source and binary forms, with or without
3462+ modification, are permitted provided that the following conditions are met:
3463+
3464+ - Redistributions of source code must retain the above copyright notice,
3465+ this list of conditions and the following disclaimer.
3466+
3467+ - Redistributions in binary form must reproduce the above copyright notice,
3468+ this list of conditions and the following disclaimer in the documentation
3469+ and/or other materials provided with the distribution.
3470+
3471+ - Neither name of the University nor the names of its contributors may be
3472+ used to endorse or promote products derived from this software without
3473+ specific prior written permission.
3474+
3475+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3476+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3477+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3478+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3479+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3480+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3481+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3482+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3483+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3484+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3485+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3486+ DAMAGE.
3487+
3488+ -----------------------------------------------------------------------------
3489+
3490+parsec LICENSE file:
3491+
3492+ Copyright 1999-2000, Daan Leijen; 2007, Paolo Martini. All rights reserved.
3493+
3494+ Redistribution and use in source and binary forms, with or without
3495+ modification, are permitted provided that the following conditions are met:
3496+
3497+ * Redistributions of source code must retain the above copyright notice,
3498+ this list of conditions and the following disclaimer.
3499+ * Redistributions in binary form must reproduce the above copyright
3500+ notice, this list of conditions and the following disclaimer in the
3501+ documentation and/or other materials provided with the distribution.
3502+
3503+ This software is provided by the copyright holders "as is" and any express or
3504+ implied warranties, including, but not limited to, the implied warranties of
3505+ merchantability and fitness for a particular purpose are disclaimed. In no
3506+ event shall the copyright holders be liable for any direct, indirect,
3507+ incidental, special, exemplary, or consequential damages (including, but not
3508+ limited to, procurement of substitute goods or services; loss of use, data,
3509+ or profits; or business interruption) however caused and on any theory of
3510+ liability, whether in contract, strict liability, or tort (including
3511+ negligence or otherwise) arising in any way out of the use of this software,
3512+ even if advised of the possibility of such damage.
3513+
3514+pattern-arrows LICENSE file:
3515+
3516+ The MIT License (MIT)
3517+
3518+ Copyright (c) 2013 Phil Freeman
3519+
3520+ Permission is hereby granted, free of charge, to any person obtaining a copy of
3521+ this software and associated documentation files (the "Software"), to deal in
3522+ the Software without restriction, including without limitation the rights to
3523+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
3524+ the Software, and to permit persons to whom the Software is furnished to do so,
3525+ subject to the following conditions:
3526+
3527+ The above copyright notice and this permission notice shall be included in all
3528+ copies or substantial portions of the Software.
3529+
3530+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3531+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
3532+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
3533+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
3534+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
3535+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3536+
3537+pem LICENSE file:
3538+
3539+ Copyright (c) 2010-2012 Vincent Hanquez <vincent@snarc.org>
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+ 1. Redistributions of source code must retain the above copyright
3547+ notice, this list of conditions and the following disclaimer.
3548+ 2. Redistributions in binary form must reproduce the above copyright
3549+ notice, this list of conditions and the following disclaimer in the
3550+ documentation and/or other materials provided with the distribution.
3551+ 3. Neither the name of the author nor the names of his contributors
3552+ may be used to endorse or promote products derived from this software
3553+ without specific prior written permission.
3554+
3555+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
3556+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3557+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3558+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
3559+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3560+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3561+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3562+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3563+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3564+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3565+ SUCH DAMAGE.
3566+
3567+pipes LICENSE file:
3568+
3569+ Copyright (c) 2012-2014 Gabriel Gonzalez
3570+ All rights reserved.
3571+
3572+ Redistribution and use in source and binary forms, with or without modification,
3573+ are permitted provided that the following conditions are met:
3574+ * Redistributions of source code must retain the above copyright notice,
3575+ this list of conditions and the following disclaimer.
3576+ * Redistributions in binary form must reproduce the above copyright notice,
3577+ this list of conditions and the following disclaimer in the documentation
3578+ and/or other materials provided with the distribution.
3579+ * Neither the name of Gabriel Gonzalez nor the names of other contributors
3580+ may be used to endorse or promote products derived from this software
3581+ without specific prior written permission.
3582+
3583+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3584+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3585+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3586+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
3587+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3588+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3589+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
3590+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3591+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3592+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3593+
3594+pipes-http LICENSE file:
3595+
3596+ Copyright (c) 2016 Gabriel Gonzalez
3597+ All rights reserved.
3598+
3599+ Redistribution and use in source and binary forms, with or without modification,
3600+ are permitted provided that the following conditions are met:
3601+ * Redistributions of source code must retain the above copyright notice,
3602+ this list of conditions and the following disclaimer.
3603+ * Redistributions in binary form must reproduce the above copyright notice,
3604+ this list of conditions and the following disclaimer in the documentation
3605+ and/or other materials provided with the distribution.
3606+ * Neither the name of Gabriel Gonzalez nor the names of other contributors
3607+ may be used to endorse or promote products derived from this software
3608+ without specific prior written permission.
3609+
3610+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3611+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3612+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3613+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
3614+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3615+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3616+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
3617+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3618+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3619+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3620+
3621+prelude-extras LICENSE file:
3622+
3623+ Copyright 2011-2016 Edward Kmett
3624+
3625+ All rights reserved.
3626+
3627+ Redistribution and use in source and binary forms, with or without
3628+ modification, are permitted provided that the following conditions
3629+ are met:
3630+
3631+ 1. Redistributions of source code must retain the above copyright
3632+ notice, this list of conditions and the following disclaimer.
3633+
3634+ 2. Redistributions in binary form must reproduce the above copyright
3635+ notice, this list of conditions and the following disclaimer in the
3636+ documentation and/or other materials provided with the distribution.
3637+
3638+ 3. Neither the name of the author nor the names of his contributors
3639+ may be used to endorse or promote products derived from this software
3640+ without specific prior written permission.
3641+
3642+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
3643+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3644+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3645+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
3646+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3647+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3648+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3649+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
3650+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
3651+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3652+ POSSIBILITY OF SUCH DAMAGE.
3653+
3654+primitive LICENSE file:
3655+
3656+ Copyright (c) 2008-2009, Roman Leshchinskiy
3657+ All rights reserved.
3658+
3659+ Redistribution and use in source and binary forms, with or without
3660+ modification, are permitted provided that the following conditions are met:
3661+
3662+ - Redistributions of source code must retain the above copyright notice,
3663+ this list of conditions and the following disclaimer.
3664+
3665+ - Redistributions in binary form must reproduce the above copyright notice,
3666+ this list of conditions and the following disclaimer in the documentation
3667+ and/or other materials provided with the distribution.
3668+
3669+ - Neither name of the University nor the names of its contributors may be
3670+ used to endorse or promote products derived from this software without
3671+ specific prior written permission.
3672+
3673+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3674+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3675+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3676+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3677+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3678+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3679+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3680+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3681+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3682+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3683+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3684+ DAMAGE.
3685+
3686+
3687+process LICENSE file:
3688+
3689+ This library (libraries/process) is derived from code from two
3690+ sources:
3691+
3692+ * Code from the GHC project which is largely (c) The University of
3693+ Glasgow, and distributable under a BSD-style license (see below),
3694+
3695+ * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
3696+ and freely redistributable (but see the full license for
3697+ restrictions).
3698+
3699+ The full text of these licenses is reproduced below. Both of the
3700+ licenses are BSD-style or compatible.
3701+
3702+ -----------------------------------------------------------------------------
3703+
3704+ The Glasgow Haskell Compiler License
3705+
3706+ Copyright 2004, The University Court of the University of Glasgow.
3707+ All rights reserved.
3708+
3709+ Redistribution and use in source and binary forms, with or without
3710+ modification, are permitted provided that the following conditions are met:
3711+
3712+ - Redistributions of source code must retain the above copyright notice,
3713+ this list of conditions and the following disclaimer.
3714+
3715+ - Redistributions in binary form must reproduce the above copyright notice,
3716+ this list of conditions and the following disclaimer in the documentation
3717+ and/or other materials provided with the distribution.
3718+
3719+ - Neither name of the University nor the names of its contributors may be
3720+ used to endorse or promote products derived from this software without
3721+ specific prior written permission.
3722+
3723+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3724+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3725+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3726+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3727+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3728+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3729+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3730+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3731+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3732+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3733+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3734+ DAMAGE.
3735+
3736+ -----------------------------------------------------------------------------
3737+
3738+ Code derived from the document "Report on the Programming Language
3739+ Haskell 98", is distributed under the following license:
3740+
3741+ Copyright (c) 2002 Simon Peyton Jones
3742+
3743+ The authors intend this Report to belong to the entire Haskell
3744+ community, and so we grant permission to copy and distribute it for
3745+ any purpose, provided that it is reproduced in its entirety,
3746+ including this Notice. Modified versions of this Report may also be
3747+ copied and distributed for any purpose, provided that the modified
3748+ version is clearly presented as such, and that it does not claim to
3749+ be a definition of the Haskell 98 Language.
3750+
3751+ -----------------------------------------------------------------------------
3752+
3753+profunctors LICENSE file:
3754+
3755+ Copyright 2011-2015 Edward Kmett
3756+
3757+ All rights reserved.
3758+
3759+ Redistribution and use in source and binary forms, with or without
3760+ modification, are permitted provided that the following conditions
3761+ are met:
3762+
3763+ 1. Redistributions of source code must retain the above copyright
3764+ notice, this list of conditions and the following disclaimer.
3765+
3766+ 2. Redistributions in binary form must reproduce the above copyright
3767+ notice, this list of conditions and the following disclaimer in the
3768+ documentation and/or other materials provided with the distribution.
3769+
3770+ 3. Neither the name of the author nor the names of his contributors
3771+ may be used to endorse or promote products derived from this software
3772+ without specific prior written permission.
3773+
3774+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
3775+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3776+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3777+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
3778+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3779+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3780+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3781+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
3782+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
3783+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3784+ POSSIBILITY OF SUCH DAMAGE.
3785+
3786+protolude LICENSE file:
3787+
3788+ Copyright (c) 2016, Stephen Diehl
3789+
3790+ Permission is hereby granted, free of charge, to any person obtaining a copy
3791+ of this software and associated documentation files (the "Software"), to
3792+ deal in the Software without restriction, including without limitation the
3793+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
3794+ sell copies of the Software, and to permit persons to whom the Software is
3795+ furnished to do so, subject to the following conditions:
3796+
3797+ The above copyright notice and this permission notice shall be included in
3798+ all copies or substantial portions of the Software.
3799+
3800+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3801+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
3802+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3803+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
3804+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
3805+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3806+ IN THE SOFTWARE.
3807+
3808+psqueues LICENSE file:
3809+
3810+ The Glasgow Haskell Compiler License
3811+
3812+ Copyright 2004, The University Court of the University of Glasgow.
3813+ All rights reserved.
3814+
3815+ Redistribution and use in source and binary forms, with or without
3816+ modification, are permitted provided that the following conditions are met:
3817+
3818+ - Redistributions of source code must retain the above copyright notice,
3819+ this list of conditions and the following disclaimer.
3820+
3821+ - Redistributions in binary form must reproduce the above copyright notice,
3822+ this list of conditions and the following disclaimer in the documentation
3823+ and/or other materials provided with the distribution.
3824+
3825+ - Neither name of the University nor the names of its contributors may be
3826+ used to endorse or promote products derived from this software without
3827+ specific prior written permission.
3828+
3829+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3830+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3831+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3832+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3833+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3834+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3835+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3836+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3837+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3838+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3839+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3840+ DAMAGE.
3841+
3842+random LICENSE file:
3843+
3844+ This library (libraries/base) is derived from code from two
3845+ sources:
3846+
3847+ * Code from the GHC project which is largely (c) The University of
3848+ Glasgow, and distributable under a BSD-style license (see below),
3849+
3850+ * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
3851+ and freely redistributable (but see the full license for
3852+ restrictions).
3853+
3854+ The full text of these licenses is reproduced below. Both of the
3855+ licenses are BSD-style or compatible.
3856+
3857+ -----------------------------------------------------------------------------
3858+
3859+ The Glasgow Haskell Compiler License
3860+
3861+ Copyright 2004, The University Court of the University of Glasgow.
3862+ All rights reserved.
3863+
3864+ Redistribution and use in source and binary forms, with or without
3865+ modification, are permitted provided that the following conditions are met:
3866+
3867+ - Redistributions of source code must retain the above copyright notice,
3868+ this list of conditions and the following disclaimer.
3869+
3870+ - Redistributions in binary form must reproduce the above copyright notice,
3871+ this list of conditions and the following disclaimer in the documentation
3872+ and/or other materials provided with the distribution.
3873+
3874+ - Neither name of the University nor the names of its contributors may be
3875+ used to endorse or promote products derived from this software without
3876+ specific prior written permission.
3877+
3878+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
3879+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3880+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
3881+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3882+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
3883+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3884+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3885+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3886+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3887+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3888+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3889+ DAMAGE.
3890+
3891+ -----------------------------------------------------------------------------
3892+
3893+ Code derived from the document "Report on the Programming Language
3894+ Haskell 98", is distributed under the following license:
3895+
3896+ Copyright (c) 2002 Simon Peyton Jones
3897+
3898+ The authors intend this Report to belong to the entire Haskell
3899+ community, and so we grant permission to copy and distribute it for
3900+ any purpose, provided that it is reproduced in its entirety,
3901+ including this Notice. Modified versions of this Report may also be
3902+ copied and distributed for any purpose, provided that the modified
3903+ version is clearly presented as such, and that it does not claim to
3904+ be a definition of the Haskell 98 Language.
3905+
3906+ -----------------------------------------------------------------------------
3907+
3908+reflection LICENSE file:
3909+
3910+ Copyright (c) 2009-2013 Edward Kmett
3911+ Copyright (c) 2004 Oleg Kiselyov and Chung-chieh Shan
3912+ All rights reserved.
3913+
3914+ Redistribution and use in source and binary forms, with or without
3915+ modification, are permitted provided that the following conditions are
3916+ met:
3917+
3918+ * Redistributions of source code must retain the above copyright
3919+ notice, this list of conditions and the following disclaimer.
3920+
3921+ * Redistributions in binary form must reproduce the above
3922+ copyright notice, this list of conditions and the following
3923+ disclaimer in the documentation and/or other materials provided
3924+ with the distribution.
3925+
3926+ * Neither the name of Edward Kmett nor the names of other
3927+ contributors may be used to endorse or promote products derived
3928+ from this software without specific prior written permission.
3929+
3930+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3931+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3932+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3933+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3934+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3935+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3936+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3937+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3938+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3939+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3940+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3941+
3942+regex-base LICENSE file:
3943+
3944+ This modile is under this "3 clause" BSD license:
3945+
3946+ Copyright (c) 2007, Christopher Kuklewicz
3947+ All rights reserved.
3948+
3949+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
3950+
3951+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
3952+ * 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.
3953+ * The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission.
3954+
3955+ 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.
3956+
3957+regex-tdfa LICENSE file:
3958+
3959+ This modile is under this "3 clause" BSD license:
3960+
3961+ Copyright (c) 2007-2009, Christopher Kuklewicz
3962+ All rights reserved.
3963+
3964+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
3965+
3966+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
3967+ * 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.
3968+ * The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission.
3969+
3970+ 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.
3971+
3972+resourcet LICENSE file:
3973+
3974+ Copyright (c)2011, Michael Snoyman
3975+
3976+ All rights reserved.
3977+
3978+ Redistribution and use in source and binary forms, with or without
3979+ modification, are permitted provided that the following conditions are met:
3980+
3981+ * Redistributions of source code must retain the above copyright
3982+ notice, this list of conditions and the following disclaimer.
3983+
3984+ * Redistributions in binary form must reproduce the above
3985+ copyright notice, this list of conditions and the following
3986+ disclaimer in the documentation and/or other materials provided
3987+ with the distribution.
3988+
3989+ * Neither the name of Michael Snoyman nor the names of other
3990+ contributors may be used to endorse or promote products derived
3991+ from this software without specific prior written permission.
3992+
3993+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3994+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3995+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3996+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3997+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3998+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3999+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4000+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4001+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4002+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4003+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4004+
4005+safe LICENSE file:
4006+
4007+ Copyright Neil Mitchell 2007-2016.
4008+ All rights reserved.
4009+
4010+ Redistribution and use in source and binary forms, with or without
4011+ modification, are permitted provided that the following conditions are
4012+ met:
4013+
4014+ * Redistributions of source code must retain the above copyright
4015+ notice, this list of conditions and the following disclaimer.
4016+
4017+ * Redistributions in binary form must reproduce the above
4018+ copyright notice, this list of conditions and the following
4019+ disclaimer in the documentation and/or other materials provided
4020+ with the distribution.
4021+
4022+ * Neither the name of Neil Mitchell nor the names of other
4023+ contributors may be used to endorse or promote products derived
4024+ from this software without specific prior written permission.
4025+
4026+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4027+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4028+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4029+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4030+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4031+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4032+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4033+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4034+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4035+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4036+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4037+
4038+scientific LICENSE file:
4039+
4040+ Copyright (c) 2013, Bas van Dijk
4041+
4042+ All rights reserved.
4043+
4044+ Redistribution and use in source and binary forms, with or without
4045+ modification, are permitted provided that the following conditions are met:
4046+
4047+ * Redistributions of source code must retain the above copyright
4048+ notice, this list of conditions and the following disclaimer.
4049+
4050+ * Redistributions in binary form must reproduce the above
4051+ copyright notice, this list of conditions and the following
4052+ disclaimer in the documentation and/or other materials provided
4053+ with the distribution.
4054+
4055+ * Neither the name of Bas van Dijk nor the names of other
4056+ contributors may be used to endorse or promote products derived
4057+ from this software without specific prior written permission.
4058+
4059+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4060+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4061+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4062+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4063+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4064+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4065+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4066+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4067+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4068+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4069+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4070+
4071+semigroupoids LICENSE file:
4072+
4073+ Copyright 2011-2015 Edward Kmett
4074+
4075+ All rights reserved.
4076+
4077+ Redistribution and use in source and binary forms, with or without
4078+ modification, are permitted provided that the following conditions
4079+ are met:
4080+
4081+ 1. Redistributions of source code must retain the above copyright
4082+ notice, this list of conditions and the following disclaimer.
4083+
4084+ 2. Redistributions in binary form must reproduce the above copyright
4085+ notice, this list of conditions and the following disclaimer in the
4086+ documentation and/or other materials provided with the distribution.
4087+
4088+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
4089+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4090+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4091+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
4092+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4093+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4094+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4095+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
4096+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
4097+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4098+ POSSIBILITY OF SUCH DAMAGE.
4099+
4100+semigroups LICENSE file:
4101+
4102+ Copyright 2011-2015 Edward Kmett
4103+
4104+ All rights reserved.
4105+
4106+ Redistribution and use in source and binary forms, with or without
4107+ modification, are permitted provided that the following conditions
4108+ are met:
4109+
4110+ 1. Redistributions of source code must retain the above copyright
4111+ notice, this list of conditions and the following disclaimer.
4112+
4113+ 2. Redistributions in binary form must reproduce the above copyright
4114+ notice, this list of conditions and the following disclaimer in the
4115+ documentation and/or other materials provided with the distribution.
4116+
4117+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
4118+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4119+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4120+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
4121+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4122+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4123+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4124+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
4125+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
4126+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4127+ POSSIBILITY OF SUCH DAMAGE.
4128+
4129+simple-sendfile LICENSE file:
4130+
4131+ Copyright (c) 2009, IIJ Innovation Institute Inc.
4132+ All rights reserved.
4133+
4134+ Redistribution and use in source and binary forms, with or without
4135+ modification, are permitted provided that the following conditions
4136+ are met:
4137+
4138+ * Redistributions of source code must retain the above copyright
4139+ notice, this list of conditions and the following disclaimer.
4140+ * Redistributions in binary form must reproduce the above copyright
4141+ notice, this list of conditions and the following disclaimer in
4142+ the documentation and/or other materials provided with the
4143+ distribution.
4144+ * Neither the name of the copyright holders nor the names of its
4145+ contributors may be used to endorse or promote products derived
4146+ from this software without specific prior written permission.
4147+
4148+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4149+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4150+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
4151+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
4152+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
4153+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
4154+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4155+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4156+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4157+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
4158+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4159+ POSSIBILITY OF SUCH DAMAGE.
4160+
4161+socks LICENSE file:
4162+
4163+ Copyright (c) 2010-2011 Vincent Hanquez <vincent@snarc.org>
4164+
4165+ All rights reserved.
4166+
4167+ Redistribution and use in source and binary forms, with or without
4168+ modification, are permitted provided that the following conditions
4169+ are met:
4170+ 1. Redistributions of source code must retain the above copyright
4171+ notice, this list of conditions and the following disclaimer.
4172+ 2. Redistributions in binary form must reproduce the above copyright
4173+ notice, this list of conditions and the following disclaimer in the
4174+ documentation and/or other materials provided with the distribution.
4175+ 3. Neither the name of the author nor the names of his contributors
4176+ may be used to endorse or promote products derived from this software
4177+ without specific prior written permission.
4178+
4179+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
4180+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4181+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4182+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
4183+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4184+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4185+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4186+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4187+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4188+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4189+ SUCH DAMAGE.
4190+
4191+sourcemap LICENSE file:
4192+
4193+ Copyright (c) 2012, Chris Done
4194+
4195+ All rights reserved.
4196+
4197+ Redistribution and use in source and binary forms, with or without
4198+ modification, are permitted provided that the following conditions are met:
4199+
4200+ * Redistributions of source code must retain the above copyright
4201+ notice, this list of conditions and the following disclaimer.
4202+
4203+ * Redistributions in binary form must reproduce the above
4204+ copyright notice, this list of conditions and the following
4205+ disclaimer in the documentation and/or other materials provided
4206+ with the distribution.
4207+
4208+ * Neither the name of Chris Done nor the names of other
4209+ contributors may be used to endorse or promote products derived
4210+ from this software without specific prior written permission.
4211+
4212+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4213+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4214+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4215+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4216+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4217+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4218+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4219+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4220+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4221+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4222+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4223+
4224+spdx LICENSE file:
4225+
4226+ Copyright (c) 2015, Oleg Grenrus
4227+
4228+ All rights reserved.
4229+
4230+ Redistribution and use in source and binary forms, with or without
4231+ modification, are permitted provided that the following conditions are met:
4232+
4233+ * Redistributions of source code must retain the above copyright
4234+ notice, this list of conditions and the following disclaimer.
4235+
4236+ * Redistributions in binary form must reproduce the above
4237+ copyright notice, this list of conditions and the following
4238+ disclaimer in the documentation and/or other materials provided
4239+ with the distribution.
4240+
4241+ * Neither the name of Oleg Grenrus nor the names of other
4242+ contributors may be used to endorse or promote products derived
4243+ from this software without specific prior written permission.
4244+
4245+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4246+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4247+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4248+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4249+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4250+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4251+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4252+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4253+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4254+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4255+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4256+
4257+split LICENSE file:
4258+
4259+ Copyright (c) 2008 Brent Yorgey, Louis Wasserman
4260+
4261+ All rights reserved.
4262+
4263+ Redistribution and use in source and binary forms, with or without
4264+ modification, are permitted provided that the following conditions
4265+ are met:
4266+ 1. Redistributions of source code must retain the above copyright
4267+ notice, this list of conditions and the following disclaimer.
4268+ 2. Redistributions in binary form must reproduce the above copyright
4269+ notice, this list of conditions and the following disclaimer in the
4270+ documentation and/or other materials provided with the distribution.
4271+ 3. Neither the name of the author nor the names of other contributors
4272+ may be used to endorse or promote products derived from this software
4273+ without specific prior written permission.
4274+
4275+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND
4276+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4277+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4278+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
4279+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4280+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4281+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4282+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4283+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4284+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4285+ SUCH DAMAGE.
4286+
4287+stm LICENSE file:
4288+
4289+ The Glasgow Haskell Compiler License
4290+
4291+ Copyright 2004, The University Court of the University of Glasgow.
4292+ All rights reserved.
4293+
4294+ Redistribution and use in source and binary forms, with or without
4295+ modification, are permitted provided that the following conditions are met:
4296+
4297+ - Redistributions of source code must retain the above copyright notice,
4298+ this list of conditions and the following disclaimer.
4299+
4300+ - Redistributions in binary form must reproduce the above copyright notice,
4301+ this list of conditions and the following disclaimer in the documentation
4302+ and/or other materials provided with the distribution.
4303+
4304+ - Neither name of the University nor the names of its contributors may be
4305+ used to endorse or promote products derived from this software without
4306+ specific prior written permission.
4307+
4308+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
4309+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
4310+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
4311+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
4312+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
4313+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4314+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4315+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4316+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4317+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4318+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
4319+ DAMAGE.
4320+
4321+stm-chans LICENSE file:
4322+
4323+ === stm-chans license ===
4324+
4325+ Copyright (c) 2011--2013, wren gayle romano.
4326+ ALL RIGHTS RESERVED.
4327+
4328+ Redistribution and use in source and binary forms, with or without
4329+ modification, are permitted provided that the following conditions
4330+ are met:
4331+
4332+ * Redistributions of source code must retain the above copyright
4333+ notice, this list of conditions and the following disclaimer.
4334+
4335+ * Redistributions in binary form must reproduce the above
4336+ copyright notice, this list of conditions and the following
4337+ disclaimer in the documentation and/or other materials provided
4338+ with the distribution.
4339+
4340+ * Neither the name of the copyright holders nor the names of
4341+ other contributors may be used to endorse or promote products
4342+ derived from this software without specific prior written
4343+ permission.
4344+
4345+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4346+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4347+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
4348+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
4349+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
4350+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
4351+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4352+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4353+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4354+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
4355+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4356+ POSSIBILITY OF SUCH DAMAGE.
4357+
4358+
4359+streaming-commons LICENSE file:
4360+
4361+ The MIT License (MIT)
4362+
4363+ Copyright (c) 2014 FP Complete
4364+
4365+ Permission is hereby granted, free of charge, to any person obtaining a copy
4366+ of this software and associated documentation files (the "Software"), to deal
4367+ in the Software without restriction, including without limitation the rights
4368+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
4369+ copies of the Software, and to permit persons to whom the Software is
4370+ furnished to do so, subject to the following conditions:
4371+
4372+ The above copyright notice and this permission notice shall be included in all
4373+ copies or substantial portions of the Software.
4374+
4375+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4376+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
4377+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4378+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4379+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4380+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
4381+ SOFTWARE.
4382+
4383+stringsearch LICENSE file:
24384
3−All rights reserved.
4385+ Copyright (c)2010, Daniel Fischer
4386+
4387+ All rights reserved.
4388+
4389+ Redistribution and use in source and binary forms, with or without
4390+ modification, are permitted provided that the following conditions are met:
4391+
4392+ * Redistributions of source code must retain the above copyright
4393+ notice, this list of conditions and the following disclaimer.
4394+
4395+ * Redistributions in binary form must reproduce the above
4396+ copyright notice, this list of conditions and the following
4397+ disclaimer in the documentation and/or other materials provided
4398+ with the distribution.
4399+
4400+ * Neither the name of Daniel Fischer nor the names of other
4401+ contributors may be used to endorse or promote products derived
4402+ from this software without specific prior written permission.
4403+
4404+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4405+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4406+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4407+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4408+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4409+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4410+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4411+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4412+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4413+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4414+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4415+
4416+syb LICENSE file:
4417+
4418+ This library (libraries/syb) is derived from code from several
4419+ sources:
4420+
4421+ * Code from the GHC project which is largely (c) The University of
4422+ Glasgow, and distributable under a BSD-style license (see below),
4423+
4424+ * Code from the Haskell 98 Report which is (c) Simon Peyton Jones
4425+ and freely redistributable (but see the full license for
4426+ restrictions).
4427+
4428+ * Code from the Haskell Foreign Function Interface specification,
4429+ which is (c) Manuel M. T. Chakravarty and freely redistributable
4430+ (but see the full license for restrictions).
4431+
4432+ The full text of these licenses is reproduced below. All of the
4433+ licenses are BSD-style or compatible.
4434+
4435+ -----------------------------------------------------------------------------
4436+
4437+ The Glasgow Haskell Compiler License
4438+
4439+ Copyright 2004, The University Court of the University of Glasgow.
4440+ All rights reserved.
4441+
4442+ Redistribution and use in source and binary forms, with or without
4443+ modification, are permitted provided that the following conditions are met:
4444+
4445+ - Redistributions of source code must retain the above copyright notice,
4446+ this list of conditions and the following disclaimer.
4447+
4448+ - Redistributions in binary form must reproduce the above copyright notice,
4449+ this list of conditions and the following disclaimer in the documentation
4450+ and/or other materials provided with the distribution.
4451+
4452+ - Neither name of the University nor the names of its contributors may be
4453+ used to endorse or promote products derived from this software without
4454+ specific prior written permission.
4455+
4456+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
4457+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
4458+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
4459+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
4460+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
4461+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4462+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4463+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4464+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4465+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4466+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
4467+ DAMAGE.
4468+
4469+ -----------------------------------------------------------------------------
4470+
4471+ Code derived from the document "Report on the Programming Language
4472+ Haskell 98", is distributed under the following license:
4473+
4474+ Copyright (c) 2002 Simon Peyton Jones
4475+
4476+ The authors intend this Report to belong to the entire Haskell
4477+ community, and so we grant permission to copy and distribute it for
4478+ any purpose, provided that it is reproduced in its entirety,
4479+ including this Notice. Modified versions of this Report may also be
4480+ copied and distributed for any purpose, provided that the modified
4481+ version is clearly presented as such, and that it does not claim to
4482+ be a definition of the Haskell 98 Language.
4483+
4484+ -----------------------------------------------------------------------------
4485+
4486+ Code derived from the document "The Haskell 98 Foreign Function
4487+ Interface, An Addendum to the Haskell 98 Report" is distributed under
4488+ the following license:
4489+
4490+ Copyright (c) 2002 Manuel M. T. Chakravarty
4491+
4492+ The authors intend this Report to belong to the entire Haskell
4493+ community, and so we grant permission to copy and distribute it for
4494+ any purpose, provided that it is reproduced in its entirety,
4495+ including this Notice. Modified versions of this Report may also be
4496+ copied and distributed for any purpose, provided that the modified
4497+ version is clearly presented as such, and that it does not claim to
4498+ be a definition of the Haskell 98 Foreign Function Interface.
4499+
4500+ -----------------------------------------------------------------------------
4501+
4502+system-fileio LICENSE file:
4503+
4504+ Copyright (c) 2011 John Millikin
4505+
4506+ Permission is hereby granted, free of charge, to any person
4507+ obtaining a copy of this software and associated documentation
4508+ files (the "Software"), to deal in the Software without
4509+ restriction, including without limitation the rights to use,
4510+ copy, modify, merge, publish, distribute, sublicense, and/or sell
4511+ copies of the Software, and to permit persons to whom the
4512+ Software is furnished to do so, subject to the following
4513+ conditions:
4514+
4515+ The above copyright notice and this permission notice shall be
4516+ included in all copies or substantial portions of the Software.
4517+
4518+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
4519+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
4520+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
4521+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
4522+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
4523+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4524+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4525+ OTHER DEALINGS IN THE SOFTWARE.
4526+
4527+system-filepath LICENSE file:
4528+
4529+ Copyright (c) 2010 John Millikin
4530+
4531+ Permission is hereby granted, free of charge, to any person
4532+ obtaining a copy of this software and associated documentation
4533+ files (the "Software"), to deal in the Software without
4534+ restriction, including without limitation the rights to use,
4535+ copy, modify, merge, publish, distribute, sublicense, and/or sell
4536+ copies of the Software, and to permit persons to whom the
4537+ Software is furnished to do so, subject to the following
4538+ conditions:
4539+
4540+ The above copyright notice and this permission notice shall be
4541+ included in all copies or substantial portions of the Software.
4542+
4543+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
4544+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
4545+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
4546+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
4547+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
4548+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4549+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4550+ OTHER DEALINGS IN THE SOFTWARE.
4551+
4552+tagged LICENSE file:
4553+
4554+ Copyright (c) 2009-2015 Edward Kmett
4555+ All rights reserved.
4556+
4557+ Redistribution and use in source and binary forms, with or without
4558+ modification, are permitted provided that the following conditions are
4559+ met:
4560+
4561+ * Redistributions of source code must retain the above copyright
4562+ notice, this list of conditions and the following disclaimer.
4563+
4564+ * Redistributions in binary form must reproduce the above
4565+ copyright notice, this list of conditions and the following
4566+ disclaimer in the documentation and/or other materials provided
4567+ with the distribution.
4568+
4569+ * Neither the name of Edward Kmett nor the names of other
4570+ contributors may be used to endorse or promote products derived
4571+ from this software without specific prior written permission.
4572+
4573+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4574+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4575+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4576+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4577+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4578+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4579+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4580+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4581+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4582+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4583+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4584+
4585+tagsoup LICENSE file:
4586+
4587+ Copyright Neil Mitchell 2006-2016.
4588+ All rights reserved.
4589+
4590+ Redistribution and use in source and binary forms, with or without
4591+ modification, are permitted provided that the following conditions are
4592+ met:
4593+
4594+ * Redistributions of source code must retain the above copyright
4595+ notice, this list of conditions and the following disclaimer.
4596+
4597+ * Redistributions in binary form must reproduce the above
4598+ copyright notice, this list of conditions and the following
4599+ disclaimer in the documentation and/or other materials provided
4600+ with the distribution.
4601+
4602+ * Neither the name of Neil Mitchell nor the names of other
4603+ contributors may be used to endorse or promote products derived
4604+ from this software without specific prior written permission.
4605+
4606+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4607+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4608+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4609+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4610+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4611+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4612+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4613+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4614+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4615+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4616+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4617+
4618+template-haskell LICENSE file:
4619+
4620+
4621+ The Glasgow Haskell Compiler License
4622+
4623+ Copyright 2002-2007, The University Court of the University of Glasgow.
4624+ All rights reserved.
4625+
4626+ Redistribution and use in source and binary forms, with or without
4627+ modification, are permitted provided that the following conditions are met:
4628+
4629+ - Redistributions of source code must retain the above copyright notice,
4630+ this list of conditions and the following disclaimer.
4631+
4632+ - Redistributions in binary form must reproduce the above copyright notice,
4633+ this list of conditions and the following disclaimer in the documentation
4634+ and/or other materials provided with the distribution.
4635+
4636+ - Neither name of the University nor the names of its contributors may be
4637+ used to endorse or promote products derived from this software without
4638+ specific prior written permission.
4639+
4640+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
4641+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
4642+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
4643+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
4644+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
4645+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4646+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4647+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4648+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4649+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4650+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
4651+ DAMAGE.
4652+
4653+
4654+temporary LICENSE file:
4655+
4656+ Copyright (c) 2008, Maximilian Bolingbroke
4657+ All rights reserved.
4658+
4659+ Redistribution and use in source and binary forms, with or without modification, are permitted
4660+ provided that the following conditions are met:
4661+
4662+ * Redistributions of source code must retain the above copyright notice, this list of
4663+ conditions and the following disclaimer.
4664+ * Redistributions in binary form must reproduce the above copyright notice, this list of
4665+ conditions and the following disclaimer in the documentation and/or other materials
4666+ provided with the distribution.
4667+ * Neither the name of Maximilian Bolingbroke nor the names of other contributors may be used to
4668+ endorse or promote products derived from this software without specific prior written permission.
4669+
4670+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
4671+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
4672+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
4673+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4674+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4675+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
4676+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
4677+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4678+
4679+terminfo LICENSE file:
4680+
4681+ Copyright 2007, Judah Jacobson.
4682+ All Rights Reserved.
4683+
4684+ Redistribution and use in source and binary forms, with or without
4685+ modification, are permitted provided that the following conditions are met:
4686+
4687+ - Redistribution of source code must retain the above copyright notice,
4688+ this list of conditions and the following disclamer.
4689+
4690+ - Redistribution in binary form must reproduce the above copyright notice,
4691+ this list of conditions and the following disclamer in the documentation
4692+ and/or other materials provided with the distribution.
4693+
4694+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY
4695+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4696+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4697+ DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE CONTRIBUTORS BE LIABLE
4698+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4699+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4700+ SERVICES; LOSS OF USE, DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4701+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
4702+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
4703+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4704+
4705+text LICENSE file:
4706+
4707+ Copyright (c) 2008-2009, Tom Harper
4708+ All rights reserved.
4709+
4710+ Redistribution and use in source and binary forms, with or without
4711+ modification, are permitted provided that the following conditions
4712+ are met:
4713+
4714+ * Redistributions of source code must retain the above copyright
4715+ notice, this list of conditions and the following disclaimer.
4716+
4717+ * Redistributions in binary form must reproduce the above
4718+ copyright notice, this list of conditions and the following
4719+ disclaimer in the documentation and/or other materials provided
4720+ with the distribution.
4721+
4722+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4723+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4724+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4725+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4726+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4727+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4728+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4729+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4730+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4731+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4732+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4733+
4734+time LICENSE file:
4735+
4736+ TimeLib is Copyright (c) Ashley Yakeley, 2004-2014. All rights reserved.
4737+ Certain sections are Copyright 2004, The University Court of the University of Glasgow. All rights reserved.
4738+
4739+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4740+
4741+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
4742+
4743+ - 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.
4744+
4745+ 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.
4746+
4747+tls LICENSE file:
4748+
4749+ Copyright (c) 2010-2015 Vincent Hanquez <vincent@snarc.org>
4750+
4751+ All rights reserved.
4752+
4753+ Redistribution and use in source and binary forms, with or without
4754+ modification, are permitted provided that the following conditions
4755+ are met:
4756+ 1. Redistributions of source code must retain the above copyright
4757+ notice, this list of conditions and the following disclaimer.
4758+ 2. Redistributions in binary form must reproduce the above copyright
4759+ notice, this list of conditions and the following disclaimer in the
4760+ documentation and/or other materials provided with the distribution.
4761+ 3. Neither the name of the author nor the names of his contributors
4762+ may be used to endorse or promote products derived from this software
4763+ without specific prior written permission.
4764+
4765+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
4766+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4767+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4768+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
4769+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4770+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4771+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4772+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4773+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4774+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4775+ SUCH DAMAGE.
4776+
4777+transformers LICENSE file:
4778+
4779+ The Glasgow Haskell Compiler License
4780+
4781+ Copyright 2004, The University Court of the University of Glasgow.
4782+ All rights reserved.
4783+
4784+ Redistribution and use in source and binary forms, with or without
4785+ modification, are permitted provided that the following conditions are met:
4786+
4787+ - Redistributions of source code must retain the above copyright notice,
4788+ this list of conditions and the following disclaimer.
4789+
4790+ - Redistributions in binary form must reproduce the above copyright notice,
4791+ this list of conditions and the following disclaimer in the documentation
4792+ and/or other materials provided with the distribution.
4793+
4794+ - Neither name of the University nor the names of its contributors may be
4795+ used to endorse or promote products derived from this software without
4796+ specific prior written permission.
4797+
4798+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
4799+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
4800+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
4801+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
4802+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
4803+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4804+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4805+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4806+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4807+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4808+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
4809+ DAMAGE.
4810+
4811+transformers-base LICENSE file:
4812+
4813+ Copyright (c) 2011, Mikhail Vorozhtsov, Bas van Dijk
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 notice,
4820+ this list of conditions and the following disclaimer.
4821+ - Redistributions in binary form must reproduce the above copyright
4822+ notice, this list of conditions and the following disclaimer in the
4823+ documentation and/or other materials provided with the distribution.
4824+ - Neither the names of the copyright owners nor the names of the
4825+ contributors may be used to endorse or promote products derived
4826+ from this software without specific prior written permission.
4827+
4828+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4829+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4830+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4831+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4832+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4833+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4834+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4835+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4836+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4837+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4838+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4839+
4840+
4841+transformers-compat LICENSE file:
4842+
4843+ Copyright 2012 Edward Kmett
4844+
4845+ All rights reserved.
4846+
4847+ Redistribution and use in source and binary forms, with or without
4848+ modification, are permitted provided that the following conditions
4849+ are met:
4850+
4851+ 1. Redistributions of source code must retain the above copyright
4852+ notice, this list of conditions and the following disclaimer.
4853+
4854+ 2. Redistributions in binary form must reproduce the above copyright
4855+ notice, this list of conditions and the following disclaimer in the
4856+ documentation and/or other materials provided with the distribution.
4857+
4858+ 3. Neither the name of the author nor the names of his contributors
4859+ may be used to endorse or promote products derived from this software
4860+ without specific prior written permission.
4861+
4862+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
4863+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4864+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4865+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
4866+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4867+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4868+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4869+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
4870+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
4871+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4872+ POSSIBILITY OF SUCH DAMAGE.
4873+
4874+turtle LICENSE file:
4875+
4876+ Copyright (c) 2015 Gabriel Gonzalez
4877+ All rights reserved.
4878+
4879+ Redistribution and use in source and binary forms, with or without modification,
4880+ are permitted provided that the following conditions are met:
4881+ * Redistributions of source code must retain the above copyright notice,
4882+ this list of conditions and the following disclaimer.
4883+ * Redistributions in binary form must reproduce the above copyright notice,
4884+ this list of conditions and the following disclaimer in the documentation
4885+ and/or other materials provided with the distribution.
4886+ * Neither the name of Gabriel Gonzalez nor the names of other contributors
4887+ may be used to endorse or promote products derived from this software
4888+ without specific prior written permission.
4889+
4890+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
4891+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4892+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4893+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
4894+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4895+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4896+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
4897+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4898+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
4899+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4900+
4901+uniplate LICENSE file:
4902+
4903+ Copyright Neil Mitchell 2006-2013.
4904+ All rights reserved.
4905+
4906+ Redistribution and use in source and binary forms, with or without
4907+ modification, are permitted provided that the following conditions are
4908+ met:
4909+
4910+ * Redistributions of source code must retain the above copyright
4911+ notice, this list of conditions and the following disclaimer.
4912+
4913+ * Redistributions in binary form must reproduce the above
4914+ copyright notice, this list of conditions and the following
4915+ disclaimer in the documentation and/or other materials provided
4916+ with the distribution.
4917+
4918+ * Neither the name of Neil Mitchell nor the names of other
4919+ contributors may be used to endorse or promote products derived
4920+ from this software without specific prior written permission.
4921+
4922+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4923+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4924+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4925+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4926+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4927+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4928+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4929+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4930+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4931+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4932+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4933+
4934+unix LICENSE file:
4935+
4936+ The Glasgow Haskell Compiler License
4937+
4938+ Copyright 2004, The University Court of the University of Glasgow.
4939+ All rights reserved.
44940
5−Redistribution and use in source and binary forms, with or without
6−modification, are permitted provided that the following conditions are met:
4941+ Redistribution and use in source and binary forms, with or without
4942+ modification, are permitted provided that the following conditions are met:
4943+
4944+ - Redistributions of source code must retain the above copyright notice,
4945+ this list of conditions and the following disclaimer.
4946+
4947+ - Redistributions in binary form must reproduce the above copyright notice,
4948+ this list of conditions and the following disclaimer in the documentation
4949+ and/or other materials provided with the distribution.
4950+
4951+ - Neither name of the University nor the names of its contributors may be
4952+ used to endorse or promote products derived from this software without
4953+ specific prior written permission.
4954+
4955+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
4956+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
4957+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
4958+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
4959+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
4960+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4961+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4962+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4963+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4964+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4965+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
4966+ DAMAGE.
4967+
4968+unix-compat LICENSE file:
4969+
4970+ Copyright (c) 2007-2008, Björn Bringert
4971+ Copyright (c) 2007-2009, Duncan Coutts
4972+ Copyright (c) 2010-2011, Jacob Stanley
4973+ Copyright (c) 2011, Bryan O'Sullivan
4974+ All rights reserved.
4975+
4976+ Redistribution and use in source and binary forms, with or without
4977+ modification, are permitted provided that the following conditions are met:
4978+
4979+ - Redistributions of source code must retain the above copyright notice,
4980+ this list of conditions and the following disclaimer.
4981+ - Redistributions in binary form must reproduce the above copyright
4982+ notice, this list of conditions and the following disclaimer in the
4983+ documentation and/or other materials provided with the distribution.
4984+ - Neither the names of the copyright owners nor the names of the
4985+ contributors may be used to endorse or promote products derived
4986+ from this software without specific prior written permission.
4987+
4988+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4989+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4990+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4991+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4992+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4993+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4994+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4995+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4996+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4997+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4998+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4999+
5000+unix-time LICENSE file:
5001+
5002+ Copyright (c) 2009, IIJ Innovation Institute Inc.
5003+ All rights reserved.
5004+
5005+ Redistribution and use in source and binary forms, with or without
5006+ modification, are permitted provided that the following conditions
5007+ are met:
5008+
5009+ * Redistributions of source code must retain the above copyright
5010+ notice, this list of conditions and the following disclaimer.
5011+ * Redistributions in binary form must reproduce the above copyright
5012+ notice, this list of conditions and the following disclaimer in
5013+ the documentation and/or other materials provided with the
5014+ distribution.
5015+ * Neither the name of the copyright holders nor the names of its
5016+ contributors may be used to endorse or promote products derived
5017+ from this software without specific prior written permission.
5018+
5019+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5020+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5021+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
5022+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
5023+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
5024+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
5025+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
5026+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5027+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5028+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
5029+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
5030+ POSSIBILITY OF SUCH DAMAGE.
5031+
5032+unordered-containers LICENSE file:
5033+
5034+ Copyright (c) 2010, Johan Tibell
5035+
5036+ All rights reserved.
5037+
5038+ Redistribution and use in source and binary forms, with or without
5039+ modification, are permitted provided that the following conditions are met:
5040+
5041+ * Redistributions of source code must retain the above copyright
5042+ notice, this list of conditions and the following disclaimer.
5043+
5044+ * Redistributions in binary form must reproduce the above
5045+ copyright notice, this list of conditions and the following
5046+ disclaimer in the documentation and/or other materials provided
5047+ with the distribution.
5048+
5049+ * Neither the name of Johan Tibell nor the names of other
5050+ contributors may be used to endorse or promote products derived
5051+ from this software without specific prior written permission.
5052+
5053+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5054+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5055+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
5056+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
5057+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
5058+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
5059+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
5060+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
5061+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5062+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5063+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5064+
5065+utf8-string LICENSE file:
5066+
5067+ * Copyright (c) 2007, Galois Inc.
5068+ * All rights reserved.
5069+ *
5070+ * Redistribution and use in source and binary forms, with or without
5071+ * modification, are permitted provided that the following conditions are met:
5072+ * * Redistributions of source code must retain the above copyright
5073+ * notice, this list of conditions and the following disclaimer.
5074+ * * Redistributions in binary form must reproduce the above copyright
5075+ * notice, this list of conditions and the following disclaimer in the
5076+ * documentation and/or other materials provided with the distribution.
5077+ * * Neither the name of Galois Inc. nor the
5078+ * names of its contributors may be used to endorse or promote products
5079+ * derived from this software without specific prior written permission.
5080+ *
5081+ * THIS SOFTWARE IS PROVIDED BY Galois Inc. ``AS IS'' AND ANY
5082+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
5083+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5084+ * DISCLAIMED. IN NO EVENT SHALL Galois Inc. BE LIABLE FOR ANY
5085+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
5086+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
5087+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
5088+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5089+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
5090+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5091+
5092+vault LICENSE file:
5093+
5094+ Copyright (c)2011, Heinrich Apfelmus
5095+
5096+ All rights reserved.
5097+
5098+ Redistribution and use in source and binary forms, with or without
5099+ modification, are permitted provided that the following conditions are met:
5100+
5101+ * Redistributions of source code must retain the above copyright
5102+ notice, this list of conditions and the following disclaimer.
5103+
5104+ * Redistributions in binary form must reproduce the above
5105+ copyright notice, this list of conditions and the following
5106+ disclaimer in the documentation and/or other materials provided
5107+ with the distribution.
5108+
5109+ * Neither the name of Heinrich Apfelmus nor the names of other
5110+ contributors may be used to endorse or promote products derived
5111+ from this software without specific prior written permission.
5112+
5113+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5114+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5115+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
5116+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
5117+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
5118+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
5119+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
5120+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
5121+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5122+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5123+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5124+
5125+vector LICENSE file:
5126+
5127+ Copyright (c) 2008-2012, Roman Leshchinskiy
5128+ All rights reserved.
5129+
5130+ Redistribution and use in source and binary forms, with or without
5131+ modification, are permitted provided that the following conditions are met:
5132+
5133+ - Redistributions of source code must retain the above copyright notice,
5134+ this list of conditions and the following disclaimer.
5135+
5136+ - Redistributions in binary form must reproduce the above copyright notice,
5137+ this list of conditions and the following disclaimer in the documentation
5138+ and/or other materials provided with the distribution.
5139+
5140+ - Neither name of the University nor the names of its contributors may be
5141+ used to endorse or promote products derived from this software without
5142+ specific prior written permission.
5143+
5144+ THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
5145+ GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
5146+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
5147+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
5148+ UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
5149+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5150+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
5151+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5152+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5153+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5154+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
5155+ DAMAGE.
5156+
5157+
5158+void LICENSE file:
5159+
5160+ Copyright 2015 Edward Kmett
5161+
5162+ All rights reserved.
5163+
5164+ Redistribution and use in source and binary forms, with or without
5165+ modification, are permitted provided that the following conditions
5166+ are met:
5167+
5168+ 1. Redistributions of source code must retain the above copyright
5169+ notice, this list of conditions and the following disclaimer.
5170+
5171+ 2. Redistributions in binary form must reproduce the above copyright
5172+ notice, this list of conditions and the following disclaimer in the
5173+ documentation and/or other materials provided with the distribution.
5174+
5175+ 3. Neither the name of the author nor the names of his contributors
5176+ may be used to endorse or promote products derived from this software
5177+ without specific prior written permission.
5178+
5179+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
5180+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
5181+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5182+ DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
5183+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5184+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5185+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5186+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
5187+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
5188+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
5189+ POSSIBILITY OF SUCH DAMAGE.
5190+
5191+wai LICENSE file:
5192+
5193+ Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
5194+
5195+ Permission is hereby granted, free of charge, to any person obtaining
5196+ a copy of this software and associated documentation files (the
5197+ "Software"), to deal in the Software without restriction, including
5198+ without limitation the rights to use, copy, modify, merge, publish,
5199+ distribute, sublicense, and/or sell copies of the Software, and to
5200+ permit persons to whom the Software is furnished to do so, subject to
5201+ the following conditions:
5202+
5203+ The above copyright notice and this permission notice shall be
5204+ included in all copies or substantial portions of the Software.
5205+
5206+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
5207+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
5208+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
5209+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
5210+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
5211+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
5212+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5213+
5214+wai-app-static LICENSE file:
5215+
5216+ Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
5217+
5218+ Permission is hereby granted, free of charge, to any person obtaining
5219+ a copy of this software and associated documentation files (the
5220+ "Software"), to deal in the Software without restriction, including
5221+ without limitation the rights to use, copy, modify, merge, publish,
5222+ distribute, sublicense, and/or sell copies of the Software, and to
5223+ permit persons to whom the Software is furnished to do so, subject to
5224+ the following conditions:
5225+
5226+ The above copyright notice and this permission notice shall be
5227+ included in all copies or substantial portions of the Software.
5228+
5229+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
5230+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
5231+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
5232+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
5233+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
5234+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
5235+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5236+
5237+wai-extra LICENSE file:
5238+
5239+ Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
5240+
5241+ Permission is hereby granted, free of charge, to any person obtaining
5242+ a copy of this software and associated documentation files (the
5243+ "Software"), to deal in the Software without restriction, including
5244+ without limitation the rights to use, copy, modify, merge, publish,
5245+ distribute, sublicense, and/or sell copies of the Software, and to
5246+ permit persons to whom the Software is furnished to do so, subject to
5247+ the following conditions:
5248+
5249+ The above copyright notice and this permission notice shall be
5250+ included in all copies or substantial portions of the Software.
5251+
5252+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
5253+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
5254+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
5255+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
5256+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
5257+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
5258+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5259+
5260+wai-logger LICENSE file:
5261+
5262+ Copyright (c) 2009, IIJ Innovation Institute Inc.
5263+ All rights reserved.
5264+
5265+ Redistribution and use in source and binary forms, with or without
5266+ modification, are permitted provided that the following conditions
5267+ are met:
75268
85269 * Redistributions of source code must retain the above copyright
95270 notice, this list of conditions and the following disclaimer.
5271+ * Redistributions in binary form must reproduce the above copyright
5272+ notice, this list of conditions and the following disclaimer in
5273+ the documentation and/or other materials provided with the
5274+ distribution.
5275+ * Neither the name of the copyright holders nor the names of its
5276+ contributors may be used to endorse or promote products derived
5277+ from this software without specific prior written permission.
5278+
5279+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5280+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5281+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
5282+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
5283+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
5284+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
5285+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
5286+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5287+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5288+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
5289+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
5290+ POSSIBILITY OF SUCH DAMAGE.
5291+
5292+wai-websockets LICENSE file:
5293+
5294+ Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
5295+
5296+ Permission is hereby granted, free of charge, to any person obtaining
5297+ a copy of this software and associated documentation files (the
5298+ "Software"), to deal in the Software without restriction, including
5299+ without limitation the rights to use, copy, modify, merge, publish,
5300+ distribute, sublicense, and/or sell copies of the Software, and to
5301+ permit persons to whom the Software is furnished to do so, subject to
5302+ the following conditions:
5303+
5304+ The above copyright notice and this permission notice shall be
5305+ included in all copies or substantial portions of the Software.
5306+
5307+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
5308+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
5309+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
5310+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
5311+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
5312+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
5313+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5314+
5315+warp LICENSE file:
5316+
5317+ Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
105318
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.
5319+ Permission is hereby granted, free of charge, to any person obtaining
5320+ a copy of this software and associated documentation files (the
5321+ "Software"), to deal in the Software without restriction, including
5322+ without limitation the rights to use, copy, modify, merge, publish,
5323+ distribute, sublicense, and/or sell copies of the Software, and to
5324+ permit persons to whom the Software is furnished to do so, subject to
5325+ the following conditions:
155326
16− * Neither the name of Author name here nor the names of other
5327+ The above copyright notice and this permission notice shall be
5328+ included in all copies or substantial portions of the Software.
5329+
5330+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
5331+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
5332+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
5333+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
5334+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
5335+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
5336+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5337+
5338+websockets LICENSE file:
5339+
5340+ Copyright Jasper Van der Jeugt, 2011
5341+
5342+ All rights reserved.
5343+
5344+ Redistribution and use in source and binary forms, with or without
5345+ modification, are permitted provided that the following conditions are met:
5346+
5347+ * Redistributions of source code must retain the above copyright
5348+ notice, this list of conditions and the following disclaimer.
5349+
5350+ * Redistributions in binary form must reproduce the above
5351+ copyright notice, this list of conditions and the following
5352+ disclaimer in the documentation and/or other materials provided
5353+ with the distribution.
5354+
5355+ * Neither the name of Siniša Biđin nor the names of other
5356+ contributors may be used to endorse or promote products derived
5357+ from this software without specific prior written permission.
5358+
5359+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5360+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5361+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
5362+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
5363+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
5364+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
5365+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
5366+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
5367+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5368+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5369+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5370+
5371+word8 LICENSE file:
5372+
5373+ Copyright (c) 2012, IIJ Innovation Institute Inc.
5374+ All rights reserved.
5375+
5376+ Redistribution and use in source and binary forms, with or without
5377+ modification, are permitted provided that the following conditions
5378+ are met:
5379+
5380+ * Redistributions of source code must retain the above copyright
5381+ notice, this list of conditions and the following disclaimer.
5382+ * Redistributions in binary form must reproduce the above copyright
5383+ notice, this list of conditions and the following disclaimer in
5384+ the documentation and/or other materials provided with the
5385+ distribution.
5386+ * Neither the name of the copyright holders nor the names of its
175387 contributors may be used to endorse or promote products derived
185388 from this software without specific prior written permission.
195389
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.
5390+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5391+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5392+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
5393+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
5394+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
5395+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
5396+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
5397+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5398+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5399+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
5400+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
5401+ POSSIBILITY OF SUCH DAMAGE.
5402+
5403+x509 LICENSE file:
5404+
5405+ Copyright (c) 2010-2013 Vincent Hanquez <vincent@snarc.org>
5406+
5407+ All rights reserved.
5408+
5409+ Redistribution and use in source and binary forms, with or without
5410+ modification, are permitted provided that the following conditions
5411+ are met:
5412+ 1. Redistributions of source code must retain the above copyright
5413+ notice, this list of conditions and the following disclaimer.
5414+ 2. Redistributions in binary form must reproduce the above copyright
5415+ notice, this list of conditions and the following disclaimer in the
5416+ documentation and/or other materials provided with the distribution.
5417+ 3. Neither the name of the author nor the names of his contributors
5418+ may be used to endorse or promote products derived from this software
5419+ without specific prior written permission.
5420+
5421+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
5422+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5423+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5424+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
5425+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5426+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5427+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5428+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5429+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5430+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5431+ SUCH DAMAGE.
5432+
5433+x509-store LICENSE file:
5434+
5435+ Copyright (c) 2010-2013 Vincent Hanquez <vincent@snarc.org>
5436+
5437+ All rights reserved.
5438+
5439+ Redistribution and use in source and binary forms, with or without
5440+ modification, are permitted provided that the following conditions
5441+ are met:
5442+ 1. Redistributions of source code must retain the above copyright
5443+ notice, this list of conditions and the following disclaimer.
5444+ 2. Redistributions in binary form must reproduce the above copyright
5445+ notice, this list of conditions and the following disclaimer in the
5446+ documentation and/or other materials provided with the distribution.
5447+ 3. Neither the name of the author nor the names of his contributors
5448+ may be used to endorse or promote products derived from this software
5449+ without specific prior written permission.
5450+
5451+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
5452+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5453+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5454+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
5455+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5456+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5457+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5458+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5459+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5460+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5461+ SUCH DAMAGE.
5462+
5463+x509-system LICENSE file:
5464+
5465+ Copyright (c) 2010-2013 Vincent Hanquez <vincent@snarc.org>
5466+
5467+ All rights reserved.
5468+
5469+ Redistribution and use in source and binary forms, with or without
5470+ modification, are permitted provided that the following conditions
5471+ are met:
5472+ 1. Redistributions of source code must retain the above copyright
5473+ notice, this list of conditions and the following disclaimer.
5474+ 2. Redistributions in binary form must reproduce the above copyright
5475+ notice, this list of conditions and the following disclaimer in the
5476+ documentation and/or other materials provided with the distribution.
5477+ 3. Neither the name of the author nor the names of his contributors
5478+ may be used to endorse or promote products derived from this software
5479+ without specific prior written permission.
5480+
5481+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
5482+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5483+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5484+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
5485+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5486+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5487+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5488+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5489+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5490+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5491+ SUCH DAMAGE.
5492+
5493+x509-validation LICENSE file:
5494+
5495+ Copyright (c) 2010-2013 Vincent Hanquez <vincent@snarc.org>
5496+
5497+ All rights reserved.
5498+
5499+ Redistribution and use in source and binary forms, with or without
5500+ modification, are permitted provided that the following conditions
5501+ are met:
5502+ 1. Redistributions of source code must retain the above copyright
5503+ notice, this list of conditions and the following disclaimer.
5504+ 2. Redistributions in binary form must reproduce the above copyright
5505+ notice, this list of conditions and the following disclaimer in the
5506+ documentation and/or other materials provided with the distribution.
5507+ 3. Neither the name of the author nor the names of his contributors
5508+ may be used to endorse or promote products derived from this software
5509+ without specific prior written permission.
5510+
5511+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
5512+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5513+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5514+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
5515+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5516+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5517+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5518+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5519+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5520+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5521+ SUCH DAMAGE.
5522+
5523+xss-sanitize LICENSE file:
5524+
5525+ The following license covers this documentation, and the source code, except
5526+ where otherwise indicated.
5527+
5528+ Copyright 2010, Greg Weber. All rights reserved.
5529+
5530+ Redistribution and use in source and binary forms, with or without
5531+ modification, are permitted provided that the following conditions are met:
5532+
5533+ * Redistributions of source code must retain the above copyright notice, this
5534+ list of conditions and the following disclaimer.
5535+
5536+ * Redistributions in binary form must reproduce the above copyright notice,
5537+ this list of conditions and the following disclaimer in the documentation
5538+ and/or other materials provided with the distribution.
5539+
5540+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR
5541+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
5542+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
5543+ EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
5544+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
5545+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
5546+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
5547+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
5548+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
5549+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5550+
5551+zlib LICENSE file:
5552+
5553+ Copyright (c) 2006-2016, Duncan Coutts
5554+ All rights reserved.
5555+
5556+ Redistribution and use in source and binary forms, with or without
5557+ modification, are permitted provided that the following conditions are met:
5558+
5559+ 1. Redistributions of source code must retain the above copyright notice,
5560+ this list of conditions and the following disclaimer.
5561+ 2. Redistributions in binary form must reproduce the above copyright
5562+ notice, this list of conditions and the following disclaimer in the
5563+ documentation and/or other materials provided with the distribution.
5564+ 3. This clause is intentionally left blank.
5565+
5566+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
5567+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5568+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5569+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
5570+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
5571+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
5572+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
5573+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
5574+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
5575+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
5576+ POSSIBILITY OF SUCH DAMAGE.
5577+
README-go.mddeleted−48
@@ -1,48 +0,0 @@
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.markdownnew file+123
@@ -0,0 +1,123 @@
1+[![PureScript](https://raw.githubusercontent.com/purescript/purescript/master/logo.png)](http://purescript.org)
2+
3+This is an experimental C++11/native compiler backend for [PureScript](https://github.com/purescript/purescript). It attempts to generate "sane", performant, and portable C++11 code as an intermediate language, which is then compiled to a native executable binary. This enables easy interoperability with existing C/C++ frameworks and libraries on a number of platforms.
4+
5+---
6+
7+### **Please note that projects [purescript-native](https://github.com/andyarvanitis/purescript-native) and [pure11](https://github.com/pure11/pure11) are now the same**
8+
9+---
10+
11+#### Performance
12+
13+* No runtime system (beyond some support classes and the standard C++11 runtime library)
14+* For automatic memory management, uses either native C++11 reference counting (`std::shared_ptr`), or the [Boehm-Demers-Weiser Garbage Collector](http://hboehm.info/gc/) -- **selectable when building** (see instructions below)
15+* Uses PureScript's normal tail call optimizations for generated C++11 code
16+
17+#### Differences from PureScript:
18+
19+* Foreign imports are C++11 (or C) instead of JavaScript ([FFI examples](https://github.com/pure11/pure11/wiki/FFI_Examples))
20+* Foreign functions are not written as curried functions (any necessary currying is done implicitly by the compiler)
21+* Compiler is `pcc` instead of `psc`, `make` is recommended for building
22+* No native/pure11-specific REPL
23+
24+#### Other notes:
25+
26+* PureScript arrays are implmented using [`std::deque`](http://en.cppreference.com/w/cpp/container/deque) (random access *O(1)*)
27+* `String` types are implmented using either C-strings (for literals) or `std::string`
28+* `Number` is C++ `double`, `Int` is C++ `int`, `Char` is `char`, `Boolean` is `bool`
29+* [The current tested/supported package set is here.](https://github.com/pure11/package-sets/blob/psc-0.10.2/packages.json) Please feel free to submit a PR if you've had success with any others.
30+
31+#### TO-DO:
32+
33+* Get automated builds/tests fully up and running [(some work already done)](https://github.com/pure11/purescript/blob/pure11/pcc/TestMain.hs)
34+* Unicode (UTF-8) support for `String` (possibly use code from my Idris backend)
35+* Lots of testing!
36+
37+#### Future ideas:
38+
39+* Nice facilities (modules) for concurrency/parallelism, using `std::thread`, `std::async`, etc. under the hood
40+* `BigInt` via GNU GMP (or an alternative)
41+
42+#### Requirements
43+
44+* Everything you need to build [PureScript](https://github.com/purescript/purescript) (if you're running macOS 10.11+, you can use pre-built binaries from [here](https://github.com/pure11/pure11/releases/))
45+* A C++11-capable toolchain, e.g. recent versions of clang, gcc, Microsoft Visual Studio 2015
46+* GNU Make is the default supported build tool, but you should be able to use your favorite C++ build system, tools, debuggers, etc.
47+
48+#### Examples
49+
50+**`fib.purs`**
51+```PureScript
52+module Main where
53+ import Prelude
54+ import Control.Monad.Eff.Console (log, logShow)
55+
56+ fib :: Int -> Int
57+ fib 0 = 0
58+ fib 1 = 1
59+ fib n = fib (n - 2) + fib (n - 1)
60+
61+ main = do
62+ log "Here's the result of fib 10:"
63+ logShow (fib 10)
64+```
65+**`fib.cc`**
66+```c++
67+#include "Main/Main.hh"
68+namespace Main {
69+ using namespace PureScript;
70+ using namespace Prelude;
71+ using namespace Control_Monad_Eff_Console;
72+ using namespace Data_Semiring;
73+ using namespace Data_Ring;
74+ using namespace Control_Bind;
75+ using namespace Control_Monad_Eff;
76+ using namespace Data_Show;
77+
78+ auto fib(int v) -> int {
79+ switch (cast<int>(v)) {
80+ case 0: return 0;
81+ case 1: return 1;
82+ };
83+ return fib(v - 2) + fib(v - 1);
84+ };
85+ auto main() -> any {
86+ Control_Monad_Eff_Console::log("Here's the result of fib 10:")();
87+ return Control_Monad_Eff_Console::logShow(Data_Show::showInt, fib(10))();
88+ };
89+}
90+
91+auto main(int, char *[]) -> int {
92+ using namespace Main;
93+ INITIALIZE_GC();
94+ Main::main();
95+ return 0;
96+};
97+```
98+---
99+#### [FFI examples](https://github.com/pure11/pure11/wiki/FFI_Examples)
100+---
101+#### Getting Started
102+This assumes you are running OS X or a Unix-like system (Linux, *BSD, etc.), and already have the ability to [build PureScript from source] (http://www.purescript.org/download/) (bottom of the page) -- but instead of cloning and building the repository in the instructions, make sure to use this project's repo.
103+
104+If you're running macOS 10.11+ (El Capitan or later), you can avoid building it yourself by using these [pre-built snapshot binaries](https://github.com/pure11/pure11/releases/), but make sure you've installed a recent version of [purescript](https://github.com/purescript/purescript/releases) first.
105+
106+1. Make sure you have developer tools for your system installed. For OS X, you'll need a recent version of Xcode. For Linux, etc., you need gcc 4.9.2 or later, including g++ support. You can also use clang 3.5 or later, but it still requires gcc for its C++ standard libraries.
107+
108+2. **Optional and advanced:** If you wish to use the Boehm garbage collector (better runtime performance, in general, but less tested), install it for your system. For OS X, [brew](http://brew.sh/) is an easy method and recommended (package `bdw-gc`). For linux, it's available under package names such as `libgc-dev` (for Debian/Ubuntu).
109+
110+3. Create a working directory wherever you like, and a `src` subdirectory under it, which will be where you will place your own PureScript source files.
111+
112+4. From your working directory, run the `{installation_path}/pcc` command with no arguments. This will generate `Makefile` and `psc-package.json` files in that directory. There are some usage notes in the generated `Makefile`.
113+
114+5. Use PureScript's standard `psc-package` utility to add and manage package dependencies.
115+
116+6. You should now be ready to build a PureScript program.
117+ * As stated above, place your source file(s) in the working directory's `src` subdirectory and execute `make`. If your machine has multiple cores, you might want to use `make -jN`, where `N` is the number of cores.
118+
119+ * **Optional and advanced:** To use the garbage collector, add `GC=yes` to the `make` command line (or you can modify the `Makefile` that you generated in step 4).
120+
121+ * This will generate the C++ source tree for your program and then build an executable binary. The resulting executable will be in the `bin` subdirectory under the output directory and called `main` (so `output/bin/main`, by default).
122+
123+---
README.md+17−33
@@ -1,41 +1,25 @@
1−[![PureScript](https://raw.githubusercontent.com/purescript/purescript/master/logo.png)](http://purescript.org)
1+[![PureScript](logo.png)](http://purescript.org)
22
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.
3+A small strongly typed programming language with expressive types that compiles to Javascript, written in and inspired by Haskell.
44
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).
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)
66
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`
7+## Language info
208
9+- [PureScript home](http://purescript.org)
10+- [Releases & changelog](https://github.com/purescript/purescript/releases)
11+- [Contributing to PureScript](https://github.com/purescript/purescript/blob/master/CONTRIBUTING.md)
2112
22−#### Requirements for building `pscpp` and `psgo`
13+## Resources
2314
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/))
15+- [PureScript book](https://leanpub.com/purescript/read)
16+- [Documentation](https://github.com/purescript/documentation)
17+- [Try PureScript](http://try.purescript.org)
18+- [Pursuit Package Index](http://pursuit.purescript.org/)
2519
26−#### Requirements for using PureScript + purescript-native
20+## Help!
2721
28−* A recent version (0.13+) of [purescript](https://github.com/purescript/purescript/releases).
29−
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−---
22+- [#purescript IRC @ FreeNode](http://webchat.freenode.net/?channels=purescript)
23+- [PureScript on StackOverflow](http://stackoverflow.com/questions/tagged/purescript)
24+- [Google Group](https://groups.google.com/forum/#!forum/purescript)
25+- [Gitter Channel](https://gitter.im/purescript/purescript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Setup.hs+4
@@ -1,2 +1,6 @@
1+module Main where
2+
13import Distribution.Simple
4+
5+main :: IO ()
26main = defaultMain
app/Main.hsdeleted−250
@@ -1,250 +0,0 @@
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.ymlnew file+54
@@ -0,0 +1,54 @@
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.txtnew file+8
@@ -0,0 +1,8 @@
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/.gitignorenew file+4
@@ -0,0 +1,4 @@
1+build/
2+*.tar.gz
3+*.sha
4+*.md5
bundle/READMEnew file+25
@@ -0,0 +1,25 @@
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.shnew file+65
@@ -0,0 +1,65 @@
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/.gitignorenew file+3
@@ -0,0 +1,3 @@
1+core-docs.md
2+bower_components/
3+output/
core-tests/bower.jsonnew file+60
@@ -0,0 +1,60 @@
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.shnew file+33
@@ -0,0 +1,33 @@
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.pursnew file+30
@@ -0,0 +1,30 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.nixdeleted−23
@@ -1,23 +0,0 @@
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/.gitignorenew file+1
@@ -0,0 +1 @@
1+shelltest/tests
examples/docs/bower.jsonnew file+20
@@ -0,0 +1,20 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module Clash (module Clash1) where
2+
3+import Clash1 as Clash1
4+import Clash2 as Clash2
examples/docs/src/Clash1.pursnew file+3
@@ -0,0 +1,3 @@
1+module Clash1 (module Clash1a) where
2+
3+import Clash1a
examples/docs/src/Clash1a.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+3
@@ -0,0 +1,3 @@
1+module Clash2 (module Clash2a) where
2+
3+import Clash2a
examples/docs/src/Clash2a.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
1+module Example
2+ ( module Prelude
3+ , module Example2
4+ ) where
5+
6+import Prelude (Unit())
7+import Example2 (one)
examples/docs/src/Example2.pursnew file+7
@@ -0,0 +1,7 @@
1+module Example2 where
2+
3+one :: Int
4+one = 1
5+
6+two :: Int
7+two = 2
examples/docs/src/ExplicitTypeSignatures.pursnew file+16
@@ -0,0 +1,16 @@
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
examples/docs/src/ImportedTwice.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
1+module ImportedTwiceA
2+ ( module ImportedTwiceB )
3+ where
4+
5+import ImportedTwiceB
6+
7+bar :: Int
8+bar = 1
examples/docs/src/ImportedTwiceB.pursnew file+4
@@ -0,0 +1,4 @@
1+module ImportedTwiceB where
2+
3+foo :: Int
4+foo = 0
examples/docs/src/MultiVirtual.pursnew file+6
@@ -0,0 +1,6 @@
1+module MultiVirtual
2+ ( module X )
3+ where
4+
5+import MultiVirtual1 as X
6+import MultiVirtual2 as X
examples/docs/src/MultiVirtual1.pursnew file+4
@@ -0,0 +1,4 @@
1+module MultiVirtual1 where
2+
3+foo :: Int
4+foo = 1
examples/docs/src/MultiVirtual2.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module MultiVirtual3 where
2+
3+baz :: Int
4+baz = 3
examples/docs/src/NewOperators.pursnew file+5
@@ -0,0 +1,5 @@
1+module NewOperators
2+ ( module NewOperators2 )
3+ where
4+
5+import NewOperators2
examples/docs/src/NewOperators2.pursnew file+6
@@ -0,0 +1,6 @@
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.pursnew file+5
@@ -0,0 +1,5 @@
1+module NotAllCtors
2+ ( module Prelude )
3+ where
4+
5+import Prelude (Boolean2(True))
examples/docs/src/ReExportedTypeClass.pursnew file+5
@@ -0,0 +1,5 @@
1+module ReExportedTypeClass
2+ ( module SomeTypeClass )
3+ where
4+
5+import SomeTypeClass
examples/docs/src/SolitaryTypeClassMember.pursnew file+6
@@ -0,0 +1,6 @@
1+module SolitaryTypeClassMember
2+ ( module SomeTypeClass )
3+ where
4+
5+import SomeTypeClass (member)
6+
examples/docs/src/SomeTypeClass.pursnew file+5
@@ -0,0 +1,5 @@
1+
2+module SomeTypeClass where
3+
4+class SomeClass a where
5+ member :: a
examples/docs/src/Transitive1.pursnew file+5
@@ -0,0 +1,5 @@
1+module Transitive1
2+ ( module Transitive2 )
3+ where
4+
5+import Transitive2
examples/docs/src/Transitive2.pursnew file+5
@@ -0,0 +1,5 @@
1+module Transitive2
2+ ( module Transitive3 )
3+ where
4+
5+import Transitive3
examples/docs/src/Transitive3.pursnew file+4
@@ -0,0 +1,4 @@
1+module Transitive3 where
2+
3+transitive3 :: Int
4+transitive3 = 0
examples/docs/src/TypeClassWithFunDeps.pursnew file+5
@@ -0,0 +1,5 @@
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.pursnew file+5
@@ -0,0 +1,5 @@
1+module TypeClassWithoutMembers
2+ ( module TypeClassWithoutMembersIntermediate )
3+ where
4+
5+import TypeClassWithoutMembersIntermediate
examples/docs/src/TypeClassWithoutMembersIntermediate.pursnew file+5
@@ -0,0 +1,5 @@
1+module TypeClassWithoutMembersIntermediate
2+ ( module SomeTypeClass )
3+ where
4+
5+import SomeTypeClass (class SomeClass)
examples/docs/src/TypeOpAliases.pursnew file+18
@@ -0,0 +1,18 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
1+module UTF8 where
2+
3+import Prelude (Unit, unit)
4+
5+-- | üÜäÄ 😰
6+thing :: Unit
7+thing = unit
examples/docs/src/Virtual.pursnew file+5
@@ -0,0 +1,5 @@
1+module Virtual
2+ ( module VirtualPrelude )
3+ where
4+
5+import Prelude as VirtualPrelude
examples/failing/1071.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+18
@@ -0,0 +1,18 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith ExpectedType
2+module M where
3+
4+data F a = F a
5+
6+test = \(x :: F) -> x
examples/failing/1733.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith UnknownName
2+module Main where
3+
4+import Thingy as Thing
5+
6+main = Thing.doesntExist "hi"
examples/failing/1733/Thingy.pursnew file+4
@@ -0,0 +1,4 @@
1+module Thingy where
2+
3+foo :: Int
4+foo = 1
examples/failing/1825.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith ErrorParsingModule
2+module Main where
3+
4+foo =
5+bar :: Int
6+bar = 3
examples/failing/2128-class.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldFailWith ErrorParsingModule
2+module Main where
3+
4+class Foo a where
5+ foo :: a -> !!!
examples/failing/2128-instance.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith OrphanInstance
2+module Main where
3+
4+import Lib
5+
6+instance fooX :: Foo "x"
examples/failing/2378/Lib.pursnew file+3
@@ -0,0 +1,3 @@
1+module Lib (class Foo) where
2+
3+class Foo (a :: Symbol)
examples/failing/2379.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith UnknownClass
2+module Main where
3+
4+import Lib
5+
6+test = x [1, 2, 3]
examples/failing/2379/Lib.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldFailWith ErrorParsingModule
2+module Main where
3+
4+x :: Char
5+x = '\x10000'
examples/failing/2445.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith ErrorParsingModule
2+module Main where
3+
4+data X a = X
5+
6+eg = \(X :: (forall a. X a)) -> X
examples/failing/2534.pursnew file+8
@@ -0,0 +1,8 @@
1+-- @shouldFailWith InfiniteType
2+module Main where
3+
4+foo :: Array Int -> Int
5+foo xs = go xs where
6+ go :: Array _ -> Int
7+ go [] = 0
8+ go xs = go [xs]
examples/failing/2542.pursnew file+9
@@ -0,0 +1,9 @@
1+-- @shouldFailWith UndefinedTypeVariable
2+module Main where
3+
4+type T = forall a. Array a
5+
6+foo :: T
7+foo = bar where
8+ bar :: Array a
9+ bar = []
examples/failing/2601.pursnew file+7
@@ -0,0 +1,7 @@
1+-- @shouldFailWith KindsDoNotUnify
2+module Main where
3+
4+type Syn (a :: * -> *) = String
5+
6+val :: Syn Int
7+val = "bad"
examples/failing/365.pursnew file+14
@@ -0,0 +1,14 @@
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.pursnew file+15
@@ -0,0 +1,15 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldFailWith IncorrectAnonymousArgument
2+module Main where
3+
4+test :: Int -> Int
5+test = _
examples/failing/AnonArgument2.pursnew file+7
@@ -0,0 +1,7 @@
1+-- @shouldFailWith IncorrectAnonymousArgument
2+module Main where
3+
4+import Prelude
5+
6+test :: Int -> Int
7+test = 1 + 2 * _
examples/failing/AnonArgument3.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldFailWith IncorrectAnonymousArgument
2+module Main where
3+
4+test :: Int -> Int
5+test = 1 + _
examples/failing/ArgLengthMismatch.pursnew file+7
@@ -0,0 +1,7 @@
1+-- @shouldFailWith ArgListLengthsDiffer
2+module ArgLengthMismatch where
3+
4+import Prelude
5+
6+f x y = true
7+f = false
examples/failing/ArrayType.pursnew file+14
@@ -0,0 +1,14 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
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/BindInDo-2.pursnew file+9
@@ -0,0 +1,9 @@
1+-- @shouldFailWith CannotUseBindWithDo
2+module Main where
3+
4+import Prelude
5+
6+foo = do
7+ let bind = 42
8+ x <- [4, 5, 6]
9+ pure x
examples/failing/BindInDo.pursnew file+9
@@ -0,0 +1,9 @@
1+-- @shouldFailWith CannotUseBindWithDo
2+module Main where
3+
4+import Prelude
5+
6+foo = do
7+ bind <- [1,2,3]
8+ x <- [4, 5, 6]
9+ pure x
examples/failing/CannotDeriveNewtypeForData.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith CaseBinderLengthDiffers
2+module Main where
3+
4+test = case 1, 2 of
5+ 1, 2, 3 -> 42
6+ _, _ -> 43
examples/failing/CaseDoesNotMatchAllConstructorArgs.pursnew file+15
@@ -0,0 +1,15 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module A where
2+
3+thing :: Int
4+thing = 1
examples/failing/ConflictingExports/B.pursnew file+4
@@ -0,0 +1,4 @@
1+module B where
2+
3+thing :: Int
4+thing = 2
examples/failing/ConflictingImports.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module A where
2+
3+thing :: Int
4+thing = 1
examples/failing/ConflictingImports/B.pursnew file+4
@@ -0,0 +1,4 @@
1+module B where
2+
3+thing :: Int
4+thing = 2
examples/failing/ConflictingImports2.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module A where
2+
3+thing :: Int
4+thing = 1
examples/failing/ConflictingImports2/B.pursnew file+4
@@ -0,0 +1,4 @@
1+module B where
2+
3+thing :: Int
4+thing = 2
examples/failing/ConflictingQualifiedImports.pursnew file+7
@@ -0,0 +1,7 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module A where
2+
3+thing :: Int
4+thing = 1
examples/failing/ConflictingQualifiedImports/B.pursnew file+4
@@ -0,0 +1,4 @@
1+module B where
2+
3+thing :: Int
4+thing = 2
examples/failing/ConflictingQualifiedImports2.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldFailWith ScopeConflict
2+module Main (module X) where
3+
4+import A as X
5+import B as X
examples/failing/ConflictingQualifiedImports2/A.pursnew file+4
@@ -0,0 +1,4 @@
1+module A where
2+
3+thing :: Int
4+thing = 1
examples/failing/ConflictingQualifiedImports2/B.pursnew file+4
@@ -0,0 +1,4 @@
1+module B where
2+
3+thing :: Int
4+thing = 2
examples/failing/ConstraintFailure.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith DeclConflict
2+module Main where
3+
4+data T = Fail
5+
6+class Fail
examples/failing/DeclConflictClassSynonym.pursnew file+8
@@ -0,0 +1,8 @@
1+-- @shouldFailWith DeclConflict
2+module Main where
3+
4+import Prelude
5+
6+type Fail = Unit
7+
8+class Fail
examples/failing/DeclConflictClassType.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith DeclConflict
2+module Main where
3+
4+class Fail
5+
6+data Fail
examples/failing/DeclConflictCtorClass.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith DeclConflict
2+module Main where
3+
4+class Fail
5+
6+data T = Fail
examples/failing/DeclConflictCtorCtor.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith DeclConflict
2+module Main where
3+
4+data T1 = Fail
5+
6+data T2 = Fail
examples/failing/DeclConflictDuplicateCtor.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldFailWith DeclConflict
2+module Main where
3+
4+data T = Fail | Fail
5+
examples/failing/DeclConflictSynonymClass.pursnew file+8
@@ -0,0 +1,8 @@
1+-- @shouldFailWith DeclConflict
2+module Main where
3+
4+import Prelude
5+
6+class Fail
7+
8+type Fail = Unit
examples/failing/DeclConflictSynonymType.pursnew file+8
@@ -0,0 +1,8 @@
1+-- @shouldFailWith DeclConflict
2+module Main where
3+
4+import Prelude
5+
6+data Fail
7+
8+type Fail = Unit
examples/failing/DeclConflictTypeClass.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith DeclConflict
2+module Main where
3+
4+class Fail
5+
6+data Fail
examples/failing/DeclConflictTypeSynonym.pursnew file+8
@@ -0,0 +1,8 @@
1+-- @shouldFailWith DeclConflict
2+module Main where
3+
4+import Prelude
5+
6+type Fail = Unit
7+
8+data Fail
examples/failing/DeclConflictTypeType.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith DeclConflict
2+module Main where
3+
4+data Fail
5+
6+data Fail
examples/failing/DiffKindsSameName.pursnew file+15
@@ -0,0 +1,15 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module DiffKindsSameName.LibA where
2+
3+foreign import kind DemoKind
4+
examples/failing/DiffKindsSameName/LibB.pursnew file+6
@@ -0,0 +1,6 @@
1+module DiffKindsSameName.LibB where
2+
3+foreign import kind DemoKind
4+
5+foreign import data DemoData :: DemoKind
6+
examples/failing/Do.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+2
@@ -0,0 +1,2 @@
1+-- @shouldFailWith DuplicateModule
2+module M1 where
examples/failing/DuplicateModule/M1.pursnew file+1
@@ -0,0 +1 @@
1+module M1 where
examples/failing/DuplicateProperties1.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith DuplicateTypeArgument
2+module Main where
3+
4+import Prelude
5+
6+type Foo a a = a
examples/failing/Eff.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+-- @shouldFailWith ErrorParsingModule
2+module Main where
3+
4+error err = case err of \_ -> 1
examples/failing/EmptyClass.pursnew file+7
@@ -0,0 +1,7 @@
1+-- @shouldFailWith ErrorParsingModule
2+module Main where
3+
4+class Foo x where
5+
6+bar :: String
7+bar = "hello"
examples/failing/EmptyDo.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith ErrorParsingModule
2+
3+module Main where
4+
5+main = do
6+
examples/failing/ExportConflictClass.pursnew file+5
@@ -0,0 +1,5 @@
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.pursnew file+3
@@ -0,0 +1,3 @@
1+module A where
2+
3+class X
examples/failing/ExportConflictClass/B.pursnew file+3
@@ -0,0 +1,3 @@
1+module B where
2+
3+class X
examples/failing/ExportConflictCtor.pursnew file+5
@@ -0,0 +1,5 @@
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.pursnew file+3
@@ -0,0 +1,3 @@
1+module A where
2+
3+data T1 = X
examples/failing/ExportConflictCtor/B.pursnew file+3
@@ -0,0 +1,3 @@
1+module B where
2+
3+data T2 = X
examples/failing/ExportConflictType.pursnew file+5
@@ -0,0 +1,5 @@
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.pursnew file+3
@@ -0,0 +1,3 @@
1+module A where
2+
3+data T
examples/failing/ExportConflictType/B.pursnew file+3
@@ -0,0 +1,3 @@
1+module B where
2+
3+data T
examples/failing/ExportConflictTypeOp.pursnew file+5
@@ -0,0 +1,5 @@
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.pursnew file+5
@@ -0,0 +1,5 @@
1+module A where
2+
3+type T1 a b = a -> b
4+
5+infixr 4 type T1 as ??
examples/failing/ExportConflictTypeOp/B.pursnew file+5
@@ -0,0 +1,5 @@
1+module B where
2+
3+type T2 a b = a -> b
4+
5+infixr 4 type T2 as ??
examples/failing/ExportConflictValue.pursnew file+5
@@ -0,0 +1,5 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module A where
2+
3+x :: Boolean
4+x = true
examples/failing/ExportConflictValue/B.pursnew file+4
@@ -0,0 +1,4 @@
1+module B where
2+
3+x :: Boolean
4+x = false
examples/failing/ExportConflictValueOp.pursnew file+5
@@ -0,0 +1,5 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+3
@@ -0,0 +1,3 @@
1+module M1 (X(X)) where
2+
3+data X = X | Y
examples/failing/ExportExplicit2.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module M1 (X(..)) where
2+
3+data X = X | Y
4+data Z = Z
examples/failing/ExtraRecordField.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+17
@@ -0,0 +1,17 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+-- @shouldFailWith UnknownImport
2+module Main where
3+
4+import M1 (X(..))
examples/failing/ImportExplicit/M1.pursnew file+3
@@ -0,0 +1,3 @@
1+module M1 where
2+
3+foo = "foo"
examples/failing/ImportExplicit2.pursnew file+4
@@ -0,0 +1,4 @@
1+-- @shouldFailWith UnknownImportDataConstructor
2+module Main where
3+
4+import M1 (X(Z, Q))
examples/failing/ImportExplicit2/M1.pursnew file+3
@@ -0,0 +1,3 @@
1+module M1 where
2+
3+data X = Y
examples/failing/ImportHidingModule.pursnew file+4
@@ -0,0 +1,4 @@
1+-- @shouldFailWith ImportHidingModule
2+module Main where
3+
4+import B hiding (module A)
examples/failing/ImportHidingModule/A.pursnew file+2
@@ -0,0 +1,2 @@
1+module A where
2+x = 1
examples/failing/ImportHidingModule/B.pursnew file+3
@@ -0,0 +1,3 @@
1+module B (module B, module A) where
2+import A
3+y = 1
examples/failing/ImportModule.pursnew file+4
@@ -0,0 +1,4 @@
1+-- @shouldFailWith ModuleNotFound
2+module Main where
3+
4+import M1
examples/failing/ImportModule/M2.pursnew file+3
@@ -0,0 +1,3 @@
1+module M2 where
2+
3+data X = X
examples/failing/InfiniteKind.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldFailWith InfiniteKind
2+
3+module Main where
4+
5+data F a = F (a a)
examples/failing/InfiniteType.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldFailWith InfiniteType
2+
3+module Main where
4+
5+f a = a a
examples/failing/InstanceExport.pursnew file+7
@@ -0,0 +1,7 @@
1+-- @shouldFailWith TransitiveExportError
2+module Test where
3+
4+import InstanceExport
5+import Prelude
6+
7+test = f $ S "Test"
examples/failing/InstanceExport/InstanceExport.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith IntOutOfRange
2+
3+module Main where
4+
5+n :: Int
6+n = 2147483648
examples/failing/InvalidOperatorInBinder.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith ErrorParsingModule
2+module Main where
3+
4+import Prelude
5+
6+x = 01
examples/failing/LeadingZeros2.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith ErrorParsingModule
2+module Main where
3+
4+import Prelude
5+
6+x = 00.1
examples/failing/Let.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith CycleInDeclaration
2+module Main where
3+
4+import Prelude
5+
6+test = let x = x in x
examples/failing/MPTCs.pursnew file+10
@@ -0,0 +1,10 @@
1+-- @shouldFailWith ClassInstanceArityMismatch
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.pursnew file+7
@@ -0,0 +1,7 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith CycleInDeclaration
2+module Main where
3+
4+import Prelude
5+
6+x = x
examples/failing/NewtypeInstance.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith InvalidNewtype
2+module Main where
3+
4+import Prelude
5+
6+newtype Thing = Thing String Boolean
examples/failing/NewtypeMultiCtor.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith InvalidNewtype
2+module Main where
3+
4+import Prelude
5+
6+newtype Thing = Thing String | Other
examples/failing/NonWildcardNewtypeInstance.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith ErrorParsingModule
2+module Main where
3+
4+import Prelude
5+
6+func = \ -> "no"
examples/failing/Object.pursnew file+8
@@ -0,0 +1,8 @@
1+-- @shouldFailWith PropertyIsMissing
2+module Main where
3+
4+import Prelude
5+
6+test o = o.foo
7+
8+test1 = test {}
examples/failing/OperatorAliasNoExport.pursnew file+7
@@ -0,0 +1,7 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
1+-- @shouldFailWith TypesDoNotUnify
2+module Main where
3+
4+import Prelude
5+
6+main = do
7+ (true `not` _)
examples/failing/OrphanInstance.pursnew file+7
@@ -0,0 +1,7 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module Class where
2+
3+class C a where
4+ op :: a -> a
examples/failing/OrphanInstanceFunDepCycle.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldFailWith OrphanInstance
2+module Main where
3+import Lib
4+data L
5+instance clr :: C L R
examples/failing/OrphanInstanceFunDepCycle/Lib.pursnew file+4
@@ -0,0 +1,4 @@
1+module Lib where
2+-- covering sets: {{l}, {r}}
3+class C l r | l -> r, r -> l
4+data R
examples/failing/OrphanInstanceNullary.pursnew file+4
@@ -0,0 +1,4 @@
1+-- @shouldFailWith OrphanInstance
2+module Test where
3+import Lib
4+instance c :: C
examples/failing/OrphanInstanceNullary/Lib.pursnew file+2
@@ -0,0 +1,2 @@
1+module Lib where
2+class C
examples/failing/OrphanInstanceWithDetermined.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldFailWith OrphanInstance
2+module Main where
3+import Lib
4+data R
5+instance cflr :: C F L R
examples/failing/OrphanInstanceWithDetermined/Lib.pursnew file+5
@@ -0,0 +1,5 @@
1+module Lib where
2+-- covering sets: {{f, l}}
3+class C f l r | l -> r
4+data F
5+data L
examples/failing/OrphanTypeDecl.pursnew file+4
@@ -0,0 +1,4 @@
1+-- @shouldFailWith OrphanTypeDeclaration
2+module OrphanTypeDecl where
3+
4+fn :: Number -> Boolean
examples/failing/OverlappingArguments.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith OverlappingArgNames
2+module OverlappingArguments where
3+
4+import Prelude
5+
6+f x x = x
examples/failing/OverlappingBinders.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+14
@@ -0,0 +1,14 @@
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.pursnew file+16
@@ -0,0 +1,16 @@
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.pursnew file+18
@@ -0,0 +1,18 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
1+-- @shouldFailWith ErrorParsingModule
2+module Main where
3+
4+import Prelude
5+
6+(<) :: Number -> Number -> Number
7+(<) a b = !(a >= b)
examples/failing/RowConstructors1.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
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.pursnew file+14
@@ -0,0 +1,14 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+26
@@ -0,0 +1,26 @@
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/TooFewClassInstanceArgs.pursnew file+8
@@ -0,0 +1,8 @@
1+-- @shouldFailWith ClassInstanceArityMismatch
2+module Main where
3+
4+import Prelude
5+
6+class Foo a b
7+
8+instance fooString :: Foo String
examples/failing/TopLevelCaseNoArgs.pursnew file+8
@@ -0,0 +1,8 @@
1+-- @shouldFailWith DuplicateValueDeclaration
2+module Main where
3+
4+import Prelude
5+
6+foo :: Number
7+foo = 1
8+foo = 2
examples/failing/TransitiveDctorExport.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldFailWith TransitiveExportError
2+module Main (Y(..)) where
3+
4+type X = Int
5+data Y = Y X
examples/failing/TransitiveSynonymExport.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldFailWith TransitiveExportError
2+module Main (Y()) where
3+
4+type X = Int
5+type Y = X
examples/failing/TypeClassInstances.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith TypesDoNotUnify
2+module Main where
3+
4+import Prelude
5+
6+test = 1 <> "A"
examples/failing/TypeOperatorAliasNoExport.pursnew file+6
@@ -0,0 +1,6 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith CycleInTypeSynonym
2+module Main where
3+
4+import Prelude
5+
6+type T = T
examples/failing/TypeWildcards1.pursnew file+7
@@ -0,0 +1,7 @@
1+-- @shouldFailWith ErrorParsingModule
2+module TypeWildcards where
3+
4+import Prelude
5+
6+type Test = _
7+
examples/failing/TypeWildcards2.pursnew file+7
@@ -0,0 +1,7 @@
1+-- @shouldFailWith ErrorParsingModule
2+module TypeWildcards where
3+
4+import Prelude
5+
6+data Test = Test _
7+
examples/failing/TypeWildcards3.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith ErrorParsingModule
2+module Bad_Module where
3+
4+import Control.Monad.Eff.Console (log)
5+
6+main = log "Done"
examples/failing/UnknownType.pursnew file+7
@@ -0,0 +1,7 @@
1+-- @shouldFailWith UnknownName
2+module Main where
3+
4+import Prelude
5+
6+test :: Number -> Something
7+test = {}
examples/passing/1185.pursnew file+15
@@ -0,0 +1,15 @@
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.pursnew file+14
@@ -0,0 +1,14 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+16
@@ -0,0 +1,16 @@
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.pursnew file+25
@@ -0,0 +1,25 @@
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.pursnew file+14
@@ -0,0 +1,14 @@
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.pursnew file+19
@@ -0,0 +1,19 @@
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.pursnew file+22
@@ -0,0 +1,22 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
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.pursnew file+3
@@ -0,0 +1,3 @@
1+module B where
2+
3+data Foo = X | Y
examples/passing/2049.pursnew file+14
@@ -0,0 +1,14 @@
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/2136.pursnew file+9
@@ -0,0 +1,9 @@
1+module Main where
2+
3+import Prelude
4+import Control.Monad.Eff.Console (log)
5+
6+main =
7+ if (negate (bottom :: Int) > top)
8+ then log "Fail"
9+ else log "Done"
examples/passing/2138.pursnew file+7
@@ -0,0 +1,7 @@
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.pursnew file+3
@@ -0,0 +1,3 @@
1+module Lib (A(..), A) where
2+
3+data A = B | C
examples/passing/2172.jsnew file+5
@@ -0,0 +1,5 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+15
@@ -0,0 +1,15 @@
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/2288.pursnew file+19
@@ -0,0 +1,19 @@
1+module Main where
2+
3+import Prelude
4+import Control.Monad.Eff
5+import Control.Monad.Eff.Console
6+import Data.Array
7+import Data.Array.Partial as P
8+import Partial.Unsafe
9+
10+length :: forall a. Array a -> Int
11+length = go 0 where
12+ go acc arr =
13+ if null arr
14+ then acc
15+ else go (acc + 1) (unsafePartial P.tail arr)
16+
17+main = do
18+ logShow (length (1 .. 10000))
19+ log "Done"
examples/passing/2378.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+18
@@ -0,0 +1,18 @@
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.pursnew file+14
@@ -0,0 +1,14 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+20
@@ -0,0 +1,20 @@
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.pursnew file+16
@@ -0,0 +1,16 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+16
@@ -0,0 +1,16 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+16
@@ -0,0 +1,16 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+21
@@ -0,0 +1,21 @@
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.pursnew file+18
@@ -0,0 +1,18 @@
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.pursnew file+21
@@ -0,0 +1,21 @@
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.pursnew file+22
@@ -0,0 +1,22 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+18
@@ -0,0 +1,18 @@
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.pursnew file+18
@@ -0,0 +1,18 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module Lib (class X, go) where
2+
3+class X a where
4+ go :: a -> a
examples/passing/Collatz.pursnew file+21
@@ -0,0 +1,21 @@
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.pursnew file+15
@@ -0,0 +1,15 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+15
@@ -0,0 +1,15 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+15
@@ -0,0 +1,15 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+33
@@ -0,0 +1,33 @@
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.pursnew file+34
@@ -0,0 +1,34 @@
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.pursnew file+5
@@ -0,0 +1,5 @@
1+module List where
2+
3+data List a = Cons a (List a) | Nil
4+
5+infixr 6 Cons as :
examples/passing/DeepArrayBinder.pursnew file+17
@@ -0,0 +1,17 @@
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.pursnew file+15
@@ -0,0 +1,15 @@
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.pursnew file+29
@@ -0,0 +1,29 @@
1+module Main where
2+
3+import Control.Monad.Eff.Console (log)
4+
5+import Data.Newtype
6+
7+type MyString = String
8+
9+newtype Test = Test MyString
10+
11+derive instance newtypeTest :: Newtype Test _
12+
13+t :: Test
14+t = wrap "hello"
15+
16+a :: String
17+a = unwrap t
18+
19+newtype First a = First a
20+
21+derive instance newtypeFirst :: Newtype (First b) _
22+
23+f :: First Int
24+f = wrap 1
25+
26+i :: Int
27+i = unwrap f
28+
29+main = log "Done"
examples/passing/DeriveWithNestedSynonyms.pursnew file+29
@@ -0,0 +1,29 @@
1+module Main where
2+
3+import Prelude
4+import Control.Monad.Eff.Console (log)
5+
6+type L = {}
7+data X = X L
8+derive instance eqX :: Eq X
9+
10+type M = {}
11+data Y = Y {foo :: M}
12+derive instance eqY :: Eq Y
13+
14+type N = {}
15+data Z = Z N
16+derive instance eqZ :: Eq Z
17+
18+type Foo = String
19+
20+type Bar = { foo :: Foo }
21+
22+type Baz = { baz :: Bar }
23+
24+newtype T = T Baz
25+
26+derive instance eqT :: Eq T
27+derive instance ordT :: Ord T
28+
29+main = log "Done"
examples/passing/Deriving.pursnew file+36
@@ -0,0 +1,36 @@
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+type MyString = String
14+
15+data X = X Int | Y MyString
16+
17+derive instance eqX :: Eq X
18+
19+derive instance ordX :: Ord X
20+
21+newtype Z = Z { left :: X, right :: X }
22+
23+derive instance eqZ :: Eq Z
24+
25+main = do
26+ assert $ X 0 == X 0
27+ assert $ X 0 /= X 1
28+ assert $ Y "Foo" == Y "Foo"
29+ assert $ Y "Foo" /= Y "Bar"
30+ assert $ X 0 < X 1
31+ assert $ X 0 < Y "Foo"
32+ assert $ Y "Bar" < Y "Baz"
33+ assert $ z == z
34+ log "Done"
35+ where
36+ z = Z { left: X 0, right: Y "Foo" }
examples/passing/DerivingFunctor.pursnew file+28
@@ -0,0 +1,28 @@
1+module Main where
2+
3+import Prelude
4+import Control.Monad.Eff.Console (log)
5+import Test.Assert
6+
7+type MyRecord a = { myField :: a }
8+
9+data M f a
10+ = M0 a (Array a)
11+ | M1 Int
12+ | M2 (f a)
13+ | M3 { foo :: Int, bar :: a, baz :: f a }
14+ | M4 (MyRecord a)
15+
16+derive instance eqM :: (Eq (f a), Eq a) => Eq (M f a)
17+
18+derive instance functorM :: Functor f => Functor (M f)
19+
20+type MA = M Array
21+
22+main = do
23+ assert $ map show (M0 0 [1, 2] :: MA Int) == M0 "0" ["1", "2"]
24+ assert $ map show (M1 0 :: MA Int) == M1 0
25+ assert $ map show (M2 [0, 1] :: MA Int) == M2 ["0", "1"]
26+ assert $ map show (M3 {foo: 0, bar: 1, baz: [2, 3]} :: MA Int) == M3 {foo: 0, bar: "1", baz: ["2", "3"]}
27+ assert $ map show (M4 { myField: 42 }) == M4 { myField: "42" } :: MA String
28+ log "Done"
examples/passing/Do.pursnew file+68
@@ -0,0 +1,68 @@
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.pursnew file+16
@@ -0,0 +1,16 @@
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.pursnew file+26
@@ -0,0 +1,26 @@
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.pursnew file+20
@@ -0,0 +1,20 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+18
@@ -0,0 +1,18 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+3
@@ -0,0 +1,3 @@
1+module Bar (module Foo) where
2+
3+import Foo
examples/passing/ExplicitImportReExport/Foo.pursnew file+4
@@ -0,0 +1,4 @@
1+module Foo where
2+
3+foo :: Int
4+foo = 3
examples/passing/ExplicitOperatorSections.pursnew file+15
@@ -0,0 +1,15 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
1+module M1 (bar) where
2+
3+foo :: Int
4+foo = 0
5+
6+bar :: Int
7+bar = foo
examples/passing/ExportedInstanceDeclarations.pursnew file+45
@@ -0,0 +1,45 @@
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.pursnew file+17
@@ -0,0 +1,17 @@
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.pursnew file+18
@@ -0,0 +1,18 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+25
@@ -0,0 +1,25 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+60
@@ -0,0 +1,60 @@
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.jsnew file+32
@@ -0,0 +1,32 @@
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.pursnew file+41
@@ -0,0 +1,41 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+21
@@ -0,0 +1,21 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+55
@@ -0,0 +1,55 @@
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+type MyString = String
31+
32+newtype W = W { x :: Int, y :: MyString }
33+
34+derive instance genericW :: Generic W _
35+
36+instance eqW :: Eq W where
37+ eq x y = genericEq x y
38+
39+data V = V { x :: Int } { x :: Int }
40+
41+derive instance genericV :: Generic V _
42+
43+instance eqV :: Eq V where
44+ eq x y = genericEq x y
45+
46+main :: Eff (console :: CONSOLE) Unit
47+main = do
48+ logShow (X 0 == X 1)
49+ logShow (X 1 == X 1)
50+ logShow (Z 1 Y == Z 1 Y)
51+ logShow (Z 1 Y == Y)
52+ logShow (Y == Y :: Y Z)
53+ logShow (W { x: 0, y: "A" } == W { x: 0, y: "A" })
54+ logShow (V { x: 0 } { x: 0 } == V { x: 0 } { x: 0 })
55+ log "Done"
examples/passing/Guards.pursnew file+30
@@ -0,0 +1,30 @@
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.pursnew file+5
@@ -0,0 +1,5 @@
1+module Main where
2+
3+import Control.Monad.Eff.Console (log)
4+
5+main = log ({hasOwnProperty: "Hi"} {hasOwnProperty = "Done"}).hasOwnProperty
examples/passing/HoistError.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+19
@@ -0,0 +1,19 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+module Main where
2+
3+import M2
4+import Control.Monad.Eff.Console (log)
5+
6+main = log "Done"
examples/passing/Import/M1.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+module M2 where
2+
3+import Prelude ()
4+import M1
5+
6+main = \_ -> foo 42
examples/passing/ImportExplicit.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module M1 where
2+
3+data X = X | Y
4+data Z = Z
examples/passing/ImportHiding.pursnew file+19
@@ -0,0 +1,19 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+3
@@ -0,0 +1,3 @@
1+module M1 where
2+
3+log x = x
examples/passing/InferRecFunWithConstrainedArgument.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+19
@@ -0,0 +1,19 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+34
@@ -0,0 +1,34 @@
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.pursnew file+35
@@ -0,0 +1,35 @@
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.pursnew file+58
@@ -0,0 +1,58 @@
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.pursnew file+20
@@ -0,0 +1,20 @@
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.pursnew file+15
@@ -0,0 +1,15 @@
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.pursnew file+22
@@ -0,0 +1,22 @@
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.pursnew file+21
@@ -0,0 +1,21 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
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.pursnew file+14
@@ -0,0 +1,14 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+module Main where
2+
3+import M1
4+import Control.Monad.Eff.Console (log)
5+
6+main = log "Done"
examples/passing/ModuleDeps/M1.pursnew file+5
@@ -0,0 +1,5 @@
1+module M1 where
2+
3+import M2 as M2
4+
5+foo = M2.bar
examples/passing/ModuleDeps/M2.pursnew file+5
@@ -0,0 +1,5 @@
1+module M2 where
2+
3+import M3 as M3
4+
5+bar = M3.baz
examples/passing/ModuleDeps/M3.pursnew file+3
@@ -0,0 +1,3 @@
1+module M3 where
2+
3+baz = 1
examples/passing/ModuleExport.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+3
@@ -0,0 +1,3 @@
1+module A (module Prelude) where
2+
3+import Prelude
examples/passing/ModuleExportDupes.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+3
@@ -0,0 +1,3 @@
1+module A (module Prelude) where
2+
3+import Prelude
examples/passing/ModuleExportDupes/B.pursnew file+3
@@ -0,0 +1,3 @@
1+module B (module Prelude) where
2+
3+import Prelude
examples/passing/ModuleExportDupes/C.pursnew file+4
@@ -0,0 +1,4 @@
1+module C (module Prelude, module A) where
2+
3+import Prelude
4+import A
examples/passing/ModuleExportExcluded.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+module A (module Prelude, foo) where
2+
3+import Prelude
4+
5+foo :: Number -> Number
6+foo _ = 0.0
examples/passing/ModuleExportQualified.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+3
@@ -0,0 +1,3 @@
1+module A (module Prelude) where
2+
3+import Prelude
examples/passing/ModuleExportSelf.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+5
@@ -0,0 +1,5 @@
1+module A (module A, module Prelude) where
2+
3+import Prelude
4+
5+type Foo = Boolean
examples/passing/Monad.pursnew file+32
@@ -0,0 +1,32 @@
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.pursnew file+63
@@ -0,0 +1,63 @@
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.pursnew file+27
@@ -0,0 +1,27 @@
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.pursnew file+20
@@ -0,0 +1,20 @@
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.pursnew file+20
@@ -0,0 +1,20 @@
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.pursnew file+20
@@ -0,0 +1,20 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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/NestedRecordUpdate.pursnew file+24
@@ -0,0 +1,24 @@
1+module Main where
2+
3+import Prelude
4+import Control.Monad.Eff.Console
5+
6+type T = { foo :: Int, bar :: { baz :: Int, qux :: { lhs :: Int, rhs :: Int } } }
7+
8+init :: T
9+init = { foo: 1, bar: { baz: 2, qux: { lhs: 3, rhs: 4 } } }
10+
11+updated :: T
12+updated = init { foo = 10, bar { baz = 20, qux { lhs = 30, rhs = 40 } } }
13+
14+expected :: T
15+expected = { foo: 10, bar: { baz: 20, qux: { lhs: 30, rhs: 40 } } }
16+
17+check l r =
18+ l.foo == r.foo &&
19+ l.bar.baz == r.bar.baz &&
20+ l.bar.qux.lhs == r.bar.qux.lhs &&
21+ l.bar.qux.rhs == r.bar.qux.rhs
22+
23+main = do
24+ when (check updated expected) $ log "Done"
examples/passing/NestedRecordUpdateWildcards.pursnew file+20
@@ -0,0 +1,20 @@
1+module Main where
2+
3+import Prelude
4+import Control.Monad.Eff.Console
5+
6+update = _ { foo = _, bar { baz = _, qux = _ } }
7+
8+init = { foo: 1, bar: { baz: 2, qux: 3 } }
9+
10+after = update init 10 20 30
11+
12+expected = { foo: 10, bar: { baz: 20, qux: 30 } }
13+
14+check l r =
15+ l.foo == r.foo &&
16+ l.bar.baz == r.bar.baz &&
17+ l.bar.qux == r.bar.qux
18+
19+main = do
20+ when (check after expected) $ log "Done"
examples/passing/NestedTypeSynonyms.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+23
@@ -0,0 +1,23 @@
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.pursnew file+39
@@ -0,0 +1,39 @@
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.pursnew file+29
@@ -0,0 +1,29 @@
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.pursnew file+43
@@ -0,0 +1,43 @@
1+module Main where
2+
3+import Prelude
4+import Control.Monad.Eff
5+import Control.Monad.Eff.Console
6+
7+type MyString = String
8+
9+newtype X = X MyString
10+
11+derive newtype instance showX :: Show X
12+
13+derive newtype instance eqX :: Eq X
14+
15+derive newtype instance ordX :: Ord X
16+
17+newtype Y a = Y (Array a)
18+
19+derive newtype instance showY :: Show (Y String)
20+
21+class Singleton a b where
22+ singleton :: a -> b
23+
24+instance singletonArray :: Singleton a (Array a) where
25+ singleton x = [x]
26+
27+derive newtype instance singletonY :: Singleton a (Y a)
28+
29+newtype MyArray a = MyArray (Array a)
30+
31+derive newtype instance showMyArray :: Show a => Show (MyArray a)
32+
33+derive newtype instance functorMyArray :: Functor MyArray
34+
35+newtype ProxyArray x a = ProxyArray (Array a)
36+
37+derive newtype instance functorProxyArray :: Functor (ProxyArray x)
38+
39+main = do
40+ logShow (X "test")
41+ logShow (singleton "test" :: Y String)
42+ logShow (map show (MyArray [1, 2, 3]))
43+ log "Done"
examples/passing/NewtypeWithRecordUpdate.pursnew file+16
@@ -0,0 +1,16 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module A where
2+
3+thing :: Int
4+thing = 1
examples/passing/NonOrphanInstanceFunDepExtra.pursnew file+8
@@ -0,0 +1,8 @@
1+-- Both f and l must be known, thus can be in separate modules
2+module Main where
3+import Control.Monad.Eff.Console (log)
4+import Lib
5+data F
6+data R
7+instance cflr :: C F L R
8+main = log "Done"
examples/passing/NonOrphanInstanceFunDepExtra/Lib.pursnew file+4
@@ -0,0 +1,4 @@
1+module Lib where
2+-- covering sets: {{f, l}}
3+class C f l r | l -> r
4+data L
examples/passing/NonOrphanInstanceMulti.pursnew file+7
@@ -0,0 +1,7 @@
1+-- Both l and r must be known, thus can be in separate modules
2+module Main where
3+import Control.Monad.Eff.Console (log)
4+import Lib
5+data L
6+instance clr :: C L R
7+main = log "Done"
examples/passing/NonOrphanInstanceMulti/Lib.pursnew file+4
@@ -0,0 +1,4 @@
1+module Lib where
2+-- covering sets: {{l, r}}
3+class C l r
4+data R
examples/passing/NumberLiterals.pursnew file+39
@@ -0,0 +1,39 @@
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.pursnew file+14
@@ -0,0 +1,14 @@
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.pursnew file+16
@@ -0,0 +1,16 @@
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.pursnew file+23
@@ -0,0 +1,23 @@
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.pursnew file+18
@@ -0,0 +1,18 @@
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.pursnew file+26
@@ -0,0 +1,26 @@
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.pursnew file+20
@@ -0,0 +1,20 @@
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.pursnew file+36
@@ -0,0 +1,36 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module Def where
2+
3+what :: forall a b. a -> b -> a
4+what a _ = a
examples/passing/OperatorAssociativity.pursnew file+25
@@ -0,0 +1,25 @@
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.pursnew file+48
@@ -0,0 +1,48 @@
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.pursnew file+18
@@ -0,0 +1,18 @@
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.pursnew file+91
@@ -0,0 +1,91 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+17
@@ -0,0 +1,17 @@
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.pursnew file+27
@@ -0,0 +1,27 @@
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.pursnew file+20
@@ -0,0 +1,20 @@
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.pursnew file+20
@@ -0,0 +1,20 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+23
@@ -0,0 +1,23 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module A where
2+
3+thing :: Int
4+thing = 1
examples/passing/PendingConflictingImports/B.pursnew file+4
@@ -0,0 +1,4 @@
1+module B where
2+
3+thing :: Int
4+thing = 2
examples/passing/PendingConflictingImports2.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module A where
2+
3+thing :: Int
4+thing = 1
examples/passing/Person.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+20
@@ -0,0 +1,20 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+5
@@ -0,0 +1,5 @@
1+module Either where
2+
3+import Prelude
4+
5+data Either a b = Left a | Right b
examples/passing/QualifiedQualifiedImports.pursnew file+6
@@ -0,0 +1,6 @@
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.pursnew file+30
@@ -0,0 +1,30 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+17
@@ -0,0 +1,17 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
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.pursnew file+3
@@ -0,0 +1,3 @@
1+module A where
2+
3+x = "Do"
examples/passing/ReExportQualified/B.pursnew file+3
@@ -0,0 +1,3 @@
1+module B where
2+
3+y = "ne"
examples/passing/ReExportQualified/C.pursnew file+4
@@ -0,0 +1,4 @@
1+module C (module A, module M2) where
2+
3+import A
4+import B as M2
examples/passing/RebindableSyntax.pursnew file+43
@@ -0,0 +1,43 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+module Main where
2+
3+import M3
4+import Control.Monad.Eff.Console (log)
5+
6+main = log "Done"
examples/passing/RedefinedFixity/M1.pursnew file+6
@@ -0,0 +1,6 @@
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.pursnew file+5
@@ -0,0 +1,5 @@
1+module M2 where
2+
3+import Prelude ()
4+
5+import M1
examples/passing/RedefinedFixity/M3.pursnew file+6
@@ -0,0 +1,6 @@
1+module M3 where
2+
3+import Prelude ()
4+
5+import M1
6+import M2
examples/passing/ReservedWords.pursnew file+19
@@ -0,0 +1,19 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module A where
2+
3+thing :: Int
4+thing = 1
examples/passing/ResolvableScopeConflict/B.pursnew file+7
@@ -0,0 +1,7 @@
1+module B where
2+
3+thing :: Int
4+thing = 2
5+
6+zing :: Int
7+zing = 3
examples/passing/ResolvableScopeConflict2.pursnew file+15
@@ -0,0 +1,15 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
1+module A where
2+
3+thing :: Int
4+thing = 2
5+
6+zing :: Int
7+zing = 3
examples/passing/ResolvableScopeConflict3.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module A where
2+
3+thing :: Int
4+thing = 1
examples/passing/RowConstructors.pursnew file+43
@@ -0,0 +1,43 @@
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.pursnew file+40
@@ -0,0 +1,40 @@
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.pursnew file+23
@@ -0,0 +1,23 @@
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.pursnew file+25
@@ -0,0 +1,25 @@
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.pursnew file+22
@@ -0,0 +1,22 @@
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.pursnew file+37
@@ -0,0 +1,37 @@
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.pursnew file+16
@@ -0,0 +1,16 @@
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.pursnew file+38
@@ -0,0 +1,38 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+6
@@ -0,0 +1,6 @@
1+module Test where
2+
3+data Z = Z String
4+
5+runZ :: Z -> String
6+runZ (Z s) = s
examples/passing/ShadowedName.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+14
@@ -0,0 +1,14 @@
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.pursnew file+21
@@ -0,0 +1,21 @@
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.pursnew file+15
@@ -0,0 +1,15 @@
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.pursnew file+18
@@ -0,0 +1,18 @@
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.pursnew file+32
@@ -0,0 +1,32 @@
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.pursnew file+30
@@ -0,0 +1,30 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+26
@@ -0,0 +1,26 @@
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/StringEdgeCases.pursnew file+9
@@ -0,0 +1,9 @@
1+module Main where
2+
3+import Prelude
4+import Records as Records
5+import Symbols as Symbols
6+
7+main = do
8+ Records.main
9+ Symbols.main
examples/passing/StringEdgeCases/Records.pursnew file+66
@@ -0,0 +1,66 @@
1+module Records where
2+
3+import Prelude
4+import Data.Generic (class Generic, toSpine, GenericSpine(..))
5+import Control.Monad.Eff.Console (log)
6+import Test.Assert (assert')
7+
8+newtype AstralKeys = AstralKeys { "💡" :: Int, "💢" :: Int }
9+newtype LoneSurrogateKeys = LoneSurrogateKeys { "\xdf06" :: Int, "\xd834" :: Int }
10+
11+derive instance genericAstralKeys :: Generic AstralKeys
12+derive instance genericLoneSurrogateKeys :: Generic LoneSurrogateKeys
13+
14+spineOf :: forall a. Generic a => a -> Unit -> GenericSpine
15+spineOf x _ = toSpine x
16+
17+testLoneSurrogateKeys =
18+ let
19+ expected = 5
20+ actual = (_."\xd801" <<< helper) { "\xd800": 5 }
21+ in
22+ assert' ("lone surrogate keys: " <> show actual) (expected == actual)
23+
24+ where
25+ helper :: { "\xd800" :: Int } -> { "\xd801" :: Int }
26+ helper o =
27+ case o."\xd800" of
28+ x -> { "\xd801": x }
29+
30+testAstralKeys =
31+ let
32+ expected = 5
33+ actual = (_."💢" <<< helper) { "💡": 5 }
34+ in
35+ assert' ("astral keys: " <> show actual) (expected == actual)
36+
37+ where
38+ helper :: { "💡" :: Int } -> { "💢" :: Int }
39+ helper o =
40+ case o."💡" of
41+ x -> { "💢": x }
42+
43+testGenericLoneSurrogateKeys = do
44+ let expected = SProd "Records.LoneSurrogateKeys"
45+ [ \_ -> SRecord [ {recLabel: "\xd834", recValue: spineOf 1}
46+ , {recLabel: "\xdf06", recValue: spineOf 0}
47+ ]
48+ ]
49+ actual = toSpine (LoneSurrogateKeys { "\xdf06": 0, "\xd834": 1 })
50+ assert' ("generic lone surrogate keys: " <> show actual) (expected == actual)
51+
52+testGenericAstralKeys = do
53+ let expected = SProd "Records.AstralKeys"
54+ [ \_ -> SRecord [ {recLabel: "💡", recValue: spineOf 0}
55+ , {recLabel: "💢", recValue: spineOf 1}
56+ ]
57+ ]
58+ actual = toSpine (AstralKeys { "💡": 0, "💢": 1 })
59+ assert' ("generic astral keys: " <> show actual) (expected == actual)
60+
61+main = do
62+ testLoneSurrogateKeys
63+ testAstralKeys
64+ testGenericLoneSurrogateKeys
65+ testGenericAstralKeys
66+ log "Done"
examples/passing/StringEdgeCases/Symbols.pursnew file+30
@@ -0,0 +1,30 @@
1+-- This is similar to StringEscapes except we are performing the same tests
2+-- with Symbols (at the type level).
3+
4+module Symbols where
5+
6+import Prelude
7+import Control.Monad.Eff.Console (log)
8+import Type.Data.Symbol (SProxy(..), class AppendSymbol, appendSymbol, reflectSymbol)
9+import Test.Assert (assert')
10+
11+highS :: SProxy "\xd834"
12+highS = SProxy
13+
14+lowS :: SProxy "\xdf06"
15+lowS = SProxy
16+
17+loneSurrogates :: Boolean
18+loneSurrogates = reflectSymbol (appendSymbol highS lowS) == "\x1d306"
19+
20+outOfOrderSurrogates :: Boolean
21+outOfOrderSurrogates = reflectSymbol (appendSymbol lowS highS) == "\xdf06\xd834"
22+
23+notReplacing :: Boolean
24+notReplacing = reflectSymbol lowS /= "\xfffd"
25+
26+main = do
27+ assert' "lone surrogates may be combined into a surrogate pair" loneSurrogates
28+ assert' "lone surrogates may be combined out of order to remain lone surrogates" outOfOrderSurrogates
29+ assert' "lone surrogates are not replaced with the Unicode replacement character U+FFFD" notReplacing
30+ log "Done"
examples/passing/StringEscapes.pursnew file+26
@@ -0,0 +1,26 @@
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.pursnew file+23
@@ -0,0 +1,23 @@
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.pursnew file+41
@@ -0,0 +1,41 @@
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.pursnew file+20
@@ -0,0 +1,20 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+20
@@ -0,0 +1,20 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+19
@@ -0,0 +1,19 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+5
@@ -0,0 +1,5 @@
1+module Middle where
2+
3+import Test (test)
4+
5+middle = test
examples/passing/TransitiveImport/Test.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+16
@@ -0,0 +1,16 @@
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.pursnew file+71
@@ -0,0 +1,71 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+20
@@ -0,0 +1,20 @@
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.pursnew file+22
@@ -0,0 +1,22 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+28
@@ -0,0 +1,28 @@
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.pursnew file+16
@@ -0,0 +1,16 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+module Lib (X, Y) where
2+
3+data X = X
4+type Y = X
examples/passing/TypedBinders.pursnew file+68
@@ -0,0 +1,68 @@
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.pursnew file+18
@@ -0,0 +1,18 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
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.pursnew file+22
@@ -0,0 +1,22 @@
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.pursnew file+22
@@ -0,0 +1,22 @@
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.pursnew file+25
@@ -0,0 +1,25 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+15
@@ -0,0 +1,15 @@
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.pursnew file+17
@@ -0,0 +1,17 @@
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.pursnew file+49
@@ -0,0 +1,49 @@
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.pursnew file+23
@@ -0,0 +1,23 @@
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.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldWarnWith ShadowedTypeVar
2+module Main where
3+
4+class Test a where
5+ f :: (forall a. a -> a) -> a -> a
examples/warning/2383.pursnew file+12
@@ -0,0 +1,12 @@
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.pursnew file+15
@@ -0,0 +1,15 @@
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/2542.pursnew file+16
@@ -0,0 +1,16 @@
1+-- @shouldWarnWith MissingTypeDeclaration
2+module Main where
3+
4+import Control.Monad.Eff.Console
5+
6+type T = forall a. Array a
7+
8+-- | Note: This should not raise a `ShadowedTypeVar` warning as the
9+-- | type `a` introduced in `T` should not be in scope
10+-- | in the definition of `bar`.
11+foo :: T
12+foo = bar where
13+ bar :: forall a. Array a
14+ bar = []
15+
16+main = log "Done"
examples/warning/CustomWarning.pursnew file+9
@@ -0,0 +1,9 @@
1+-- @shouldWarnWith UserDefinedWarning
2+module Main where
3+
4+foo :: forall t. Warn (TypeConcat "Custom warning " (TypeString t)) => t -> t
5+foo x = x
6+
7+bar :: Int
8+bar = foo 42
9+
examples/warning/DuplicateExportRef.pursnew file+30
@@ -0,0 +1,30 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+18
@@ -0,0 +1,18 @@
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.pursnew file+10
@@ -0,0 +1,10 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+11
@@ -0,0 +1,11 @@
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.pursnew file+4
@@ -0,0 +1,4 @@
1+-- @shouldWarnWith MissingTypeDeclaration
2+module Main where
3+
4+x = 0
examples/warning/OverlappingInstances.pursnew file+17
@@ -0,0 +1,17 @@
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.pursnew file+15
@@ -0,0 +1,15 @@
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.pursnew file+13
@@ -0,0 +1,13 @@
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.pursnew file+5
@@ -0,0 +1,5 @@
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.jsnew file+1
@@ -0,0 +1 @@
1+exports.out = null;
examples/warning/UnnecessaryFFIModule.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldWarnWith UnnecessaryFFIModule
2+module Main where
3+
4+t :: Boolean
5+t = true
examples/warning/UnusedDctorExplicitImport.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
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.pursnew file+7
@@ -0,0 +1,7 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+9
@@ -0,0 +1,9 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.pursnew file+8
@@ -0,0 +1,8 @@
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.jsnew file+2
@@ -0,0 +1,2 @@
1+exports.yes = true;
2+exports.no = false;
examples/warning/UnusedFFIImplementations.pursnew file+4
@@ -0,0 +1,4 @@
1+-- @shouldWarnWith UnusedFFIImplementations
2+module Main where
3+
4+foreign import yes :: Boolean
examples/warning/UnusedImport.pursnew file+14
@@ -0,0 +1,14 @@
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.pursnew file+5
@@ -0,0 +1,5 @@
1+-- @shouldWarnWith UnusedTypeVar
2+module Main where
3+
4+f :: forall a b. a -> a
5+f x = x
examples/warning/WildcardInferredType.pursnew file+23
@@ -0,0 +1,23 @@
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.hsnew file+119
@@ -0,0 +1,119 @@
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.hsnew file+172
@@ -0,0 +1,172 @@
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.txtnew file+15
@@ -0,0 +1,15 @@
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.pngnew file

Binary file not shown.

make_release_notesnew file+2
@@ -0,0 +1,2 @@
1+curl https://api.github.com/repos/purescript/purescript/pulls?state=closed\&per_page=100 \
2+ | jq -r '.[] | ("- " + .title + " (@" + .user.login + ")")'
package.yamldeleted−86
@@ -1,86 +0,0 @@
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
pcc/Main.hsnew file+275
@@ -0,0 +1,275 @@
1+-----------------------------------------------------------------------------
2+--
3+-- Module : Main
4+-- Copyright : (c) 2013-15 Phil Freeman, Andy Arvanitis, and other contributors
5+-- License : MIT
6+--
7+-- Maintainer : Andy Arvanitis
8+-- Stability : experimental
9+-- Portability :
10+--
11+-- |
12+--
13+-----------------------------------------------------------------------------
14+
15+{-# LANGUAGE DataKinds #-}
16+{-# LANGUAGE FlexibleContexts #-}
17+{-# LANGUAGE PatternGuards #-}
18+{-# LANGUAGE RecordWildCards #-}
19+{-# LANGUAGE ScopedTypeVariables #-}
20+{-# LANGUAGE TupleSections #-}
21+
22+module Main where
23+
24+import Control.Applicative
25+import Control.Monad
26+import Control.Monad.Writer.Strict
27+
28+import qualified Data.Aeson as A
29+import Data.Bool (bool)
30+import qualified Data.ByteString.Lazy as B
31+import qualified Data.ByteString.UTF8 as BU8
32+import Data.Char (isSpace)
33+import qualified Data.Map as M
34+import Data.Maybe (maybe)
35+import Data.Text (Text, unpack)
36+import Data.Version (showVersion)
37+
38+import qualified Language.PureScript as P
39+import Language.PureScript.Errors.JSON
40+
41+import Options.Applicative as Opts
42+
43+import qualified Paths_purescript as Paths
44+
45+import qualified System.Console.ANSI as ANSI
46+import System.Exit (exitSuccess, exitFailure)
47+import System.FilePath.Glob (glob)
48+import System.IO (hSetEncoding, hPutStrLn, stdout, stderr, utf8)
49+import System.IO.UTF8 (readUTF8FileT)
50+
51+import Text.Printf (printf)
52+
53+import Make
54+import Makefile
55+
56+data PCCMakeOptions = PCCMakeOptions
57+ { pccmInput :: [FilePath]
58+ , pccmOutputDir :: FilePath
59+ , pccmOpts :: P.Options
60+ , pccmOtherOpts :: OtherOptions
61+ , pccmUsePrefix :: Bool
62+ , pccmJSONErrors :: Bool
63+ , pccmBriefErrors :: Bool
64+ , pccmXcode :: Bool
65+ }
66+
67+data ErrorTypes = StandardErrors | JSONErrors | BriefErrors
68+
69+data BriefType = Warning | Error | Note
70+
71+instance Show BriefType where
72+ show Warning = "warning"
73+ show Error = "error"
74+ show Note = "note"
75+
76+-- | Argumnets: verbose, ErrorTypes (e.g. JSON or Brief), warnings, errors
77+printWarningsAndErrors :: Bool -> ErrorTypes -> P.MultipleErrors -> Either P.MultipleErrors a -> IO ()
78+printWarningsAndErrors verbose StandardErrors warnings errors = do
79+ cc <- bool Nothing (Just P.defaultCodeColor) <$> ANSI.hSupportsANSI stderr
80+ let ppeOpts = P.defaultPPEOptions { P.ppeCodeColor = cc, P.ppeFull = verbose }
81+ when (P.nonEmpty warnings) $
82+ hPutStrLn stderr (P.prettyPrintMultipleWarnings ppeOpts warnings)
83+ case errors of
84+ Left errs -> do
85+ hPutStrLn stderr (P.prettyPrintMultipleErrors ppeOpts errs)
86+ exitFailure
87+ Right _ -> return ()
88+printWarningsAndErrors verbose JSONErrors warnings errors = do
89+ hPutStrLn stderr . BU8.toString . B.toStrict . A.encode $
90+ JSONResult (toJSONErrors verbose P.Warning warnings)
91+ (either (toJSONErrors verbose P.Error) (const []) errors)
92+ either (const exitFailure) (const (return ())) errors
93+printWarningsAndErrors verbose BriefErrors warnings errors = do
94+ mapM
95+ (hPutStrLn stderr)
96+ (briefFormat $ JSONResult (toJSONErrors verbose P.Warning warnings)
97+ (either (toJSONErrors verbose P.Error) (const []) errors))
98+ either (const exitFailure) (const (return ())) errors
99+
100+briefFormat :: JSONResult -> [String]
101+briefFormat (JSONResult warnings errors) =
102+ (renderError Error <$> errors) <> (renderError Warning <$> warnings)
103+ where
104+ renderError :: BriefType -> JSONError -> String
105+ renderError t (JSONError (Just pos) msg _ lnk (Just file) _ _) =
106+ printf
107+ "%s:%d:%d: %s: %s"
108+ file
109+ (startLine pos)
110+ (startColumn pos)
111+ (show t)
112+ (combine msg (unpack lnk))
113+ renderError t (JSONError _ msg _ lnk _ module' _) =
114+ printf
115+ "%s: in module %s - %s"
116+ (show t)
117+ (maybe "?" (printf "\"%s\"") module')
118+ (combine msg (unpack lnk))
119+ combine :: String -> String -> String
120+ combine msg lnk
121+ | null lnk = msg'
122+ | otherwise = printf "%s\nSee %s for more information\n" msg' lnk
123+ where
124+ msg' = dropWhile isSpace msg
125+
126+compile :: PCCMakeOptions -> IO ()
127+compile PCCMakeOptions{..} = do
128+ input <- globWarningOnMisses (unless pccmJSONErrors . warnFileTypeNotFound) pccmInput
129+ when pccmXcode $ do
130+ generateXcodefile
131+ when (null input && not pccmJSONErrors) $ do
132+ generatePackagefile
133+ generateMakefile
134+ exitSuccess
135+ moduleFiles <- readInput input
136+ (makeErrors, makeWarnings) <- runMake pccmOpts $ do
137+ ms <- P.parseModulesFromFiles id moduleFiles
138+ let filePathMap = M.fromList $ map (\(fp, P.Module _ _ mn _ _) -> (mn, Right fp)) ms
139+ let makeActions = buildMakeActions pccmOutputDir filePathMap pccmUsePrefix pccmOtherOpts
140+ P.make makeActions (map snd ms)
141+ printWarningsAndErrors (P.optionsVerboseErrors pccmOpts) errorType makeWarnings makeErrors
142+ exitSuccess
143+ where
144+ errorType
145+ | pccmJSONErrors = JSONErrors
146+ | pccmBriefErrors = BriefErrors
147+ | otherwise = StandardErrors
148+
149+warnFileTypeNotFound :: String -> IO ()
150+warnFileTypeNotFound = hPutStrLn stderr . ("pcc: No files found using pattern: " ++)
151+
152+globWarningOnMisses :: (String -> IO ()) -> [FilePath] -> IO [FilePath]
153+globWarningOnMisses warn = concatMapM globWithWarning
154+ where
155+ globWithWarning pattern = do
156+ paths <- glob pattern
157+ when (null paths) $ warn pattern
158+ return paths
159+ concatMapM f = liftM concat . mapM f
160+
161+readInput :: [FilePath] -> IO [(FilePath, Text)]
162+readInput inputFiles = forM inputFiles $ \inFile -> (inFile, ) <$> readUTF8FileT inFile
163+
164+inputFile :: Parser FilePath
165+inputFile = strArgument $
166+ metavar "FILE"
167+ <> help "The input .purs file(s)"
168+
169+outputDirectory :: Parser FilePath
170+outputDirectory = strOption $
171+ short 'o'
172+ <> long "output"
173+ <> Opts.value "output"
174+ <> showDefault
175+ <> help "The output directory"
176+
177+noTco :: Parser Bool
178+noTco = switch $
179+ long "no-tco"
180+ <> help "Disable tail call optimizations"
181+
182+noMagicDo :: Parser Bool
183+noMagicDo = switch $
184+ long "no-magic-do"
185+ <> help "Disable the optimization that overloads the do keyword to generate efficient code specifically for the Eff monad"
186+
187+noOpts :: Parser Bool
188+noOpts = switch $
189+ long "no-opts"
190+ <> help "Skip the optimization phase"
191+
192+comments :: Parser Bool
193+comments = switch $
194+ short 'c'
195+ <> long "comments"
196+ <> help "Include comments in the generated code"
197+
198+verboseErrors :: Parser Bool
199+verboseErrors = switch $
200+ short 'v'
201+ <> long "verbose-errors"
202+ <> help "Display verbose error messages"
203+
204+noPrefix :: Parser Bool
205+noPrefix = switch $
206+ short 'p'
207+ <> long "no-prefix"
208+ <> help "Do not include comment header"
209+
210+jsonErrors :: Parser Bool
211+jsonErrors = switch $
212+ long "json-errors"
213+ <> help "Print errors to stderr as JSON"
214+
215+briefErrors :: Parser Bool
216+briefErrors = switch $
217+ long "brief-errors"
218+ <> help "Print errors to stderr in \"brief format\" (a de facto standard made popular by gcc)"
219+
220+sourceMaps :: Parser Bool
221+sourceMaps = switch $
222+ long "source-maps"
223+ <> help "Generate source maps"
224+
225+dumpCoreFn :: Parser Bool
226+dumpCoreFn = switch $
227+ long "dump-corefn"
228+ <> help "Dump the (functional) core representation of the compiled code at output/*/corefn.json"
229+
230+xcode :: Parser Bool
231+xcode = switch $
232+ long "xcode"
233+ <> help "Generate support files for Xcode"
234+
235+ucns :: Parser Bool
236+ucns = switch $
237+ long "use-ucns"
238+ <> help "Use UCNs for unicode identifiers (for compilers that do not fully support them, such as gcc)"
239+
240+options :: Parser P.Options
241+options = P.Options <$> noTco
242+ <*> noMagicDo
243+ <*> pure Nothing
244+ <*> noOpts
245+ <*> verboseErrors
246+ <*> (not <$> comments)
247+ <*> sourceMaps
248+ <*> dumpCoreFn
249+
250+otherOptions :: Parser OtherOptions
251+otherOptions = OtherOptions <$> ucns
252+
253+pccMakeOptions :: Parser PCCMakeOptions
254+pccMakeOptions = PCCMakeOptions <$> many inputFile
255+ <*> outputDirectory
256+ <*> options
257+ <*> otherOptions
258+ <*> (not <$> noPrefix)
259+ <*> jsonErrors
260+ <*> briefErrors
261+ <*> xcode
262+
263+main :: IO ()
264+main = do
265+ hSetEncoding stdout utf8
266+ hSetEncoding stderr utf8
267+ execParser opts >>= compile
268+ where
269+ opts = info (version <*> helper <*> pccMakeOptions) infoModList
270+ infoModList = fullDesc <> headerInfo <> footerInfo
271+ headerInfo = header "pcc - Compiles PureScript to C++11"
272+ footerInfo = footer $ "pcc " ++ showVersion Paths.version
273+
274+ version :: Parser (a -> a)
275+ version = abortOption (InfoMsg (showVersion Paths.version)) $ long "version" <> help "Show the version number" <> hidden
pcc/Make.hsnew file+199
@@ -0,0 +1,199 @@
1+-----------------------------------------------------------------------------
2+--
3+-- Module : Make
4+-- Copyright : (c) 2013-14 Phil Freeman, (c) 2014 Gary Burgess, and other contributors
5+-- License : MIT
6+--
7+-- Maintainer : Andy Arvanitis
8+-- Stability : experimental
9+-- Portability :
10+--
11+-- |
12+--
13+-----------------------------------------------------------------------------
14+
15+{-# LANGUAGE DataKinds #-}
16+{-# LANGUAGE FlexibleContexts #-}
17+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
18+{-# LANGUAGE OverloadedStrings #-}
19+{-# LANGUAGE PatternGuards #-}
20+{-# LANGUAGE TupleSections #-}
21+{-# LANGUAGE TemplateHaskell #-}
22+
23+module Make
24+ ( Make(..)
25+ , runMake
26+ , buildMakeActions
27+ , CPP.OtherOptions(..)
28+ ) where
29+
30+import Control.Monad
31+import Control.Monad.Reader
32+
33+import Data.FileEmbed (embedFile)
34+import Data.Maybe (fromMaybe)
35+import Data.Monoid ((<>))
36+import qualified Data.Text as T
37+import qualified Data.Text.Encoding as TE
38+import Data.Time.Clock
39+import Data.Version (showVersion)
40+import qualified Data.Map as M
41+import qualified Data.ByteString.Lazy as B
42+
43+import System.Directory (copyFile, doesDirectoryExist, doesFileExist, getModificationTime, createDirectoryIfMissing)
44+import System.FilePath ((</>), takeDirectory, addExtension, dropExtension)
45+import System.IO.Error (tryIOError)
46+
47+import Language.PureScript.Errors
48+import Language.PureScript (Make, makeIO, readTextFile, runMake)
49+
50+import qualified Language.PureScript as P
51+import qualified Language.PureScript.CodeGen.Cpp as CPP
52+import qualified Language.PureScript.CoreFn as CF
53+import qualified Paths_purescript as Paths
54+
55+runModuleName' :: P.ModuleName -> String
56+runModuleName' = T.unpack . P.runModuleName
57+
58+buildMakeActions :: FilePath
59+ -> M.Map P.ModuleName (Either P.RebuildPolicy FilePath)
60+ -> Bool
61+ -> CPP.OtherOptions
62+ -> P.MakeActions Make
63+buildMakeActions outputDir filePathMap usePrefix otherOpts =
64+ P.MakeActions getInputTimestamp getOutputTimestamp readExterns codegen progress
65+ where
66+
67+ getInputFile :: P.ModuleName -> FilePath
68+ getInputFile mn =
69+ let path = fromMaybe (error "Module has no filename in 'make'") $ M.lookup mn filePathMap in
70+ case path of
71+ Right path' -> path'
72+ Left _ -> error "Module has no filename in 'make'"
73+
74+ getInputTimestamp :: P.ModuleName -> Make (Either P.RebuildPolicy (Maybe UTCTime))
75+ getInputTimestamp mn = do
76+ let path = fromMaybe (error "Module has no filename in 'make'") $ M.lookup mn filePathMap
77+ let filePath = either (const []) takeDirectory path
78+ fileBase = filePath </> (last . words . dotsTo ' ' $ runModuleName' mn)
79+ ffis = addExtension fileBase <$> [sourceExt, headerExt] ++ otherExts
80+ e1 <- traverse getTimestamp path
81+ ffimax <- foldl1 max <$> mapM getTimestamp ffis
82+ return $ max ffimax <$> e1
83+
84+ getOutputTimestamp :: P.ModuleName -> Make (Maybe UTCTime)
85+ getOutputTimestamp mn = do
86+ let filePath = runModuleName' mn
87+ fileBase = outputDir </> filePath </> (last . words . dotsTo ' ' $ runModuleName' mn)
88+ sourceFile = addExtension fileBase sourceExt
89+ headerFile = addExtension fileBase headerExt
90+ externsFile = outputDir </> filePath </> "externs.json"
91+ foldl min <$> getTimestamp externsFile <*> mapM getTimestamp [sourceFile, headerFile]
92+
93+ readExterns :: P.ModuleName -> Make (FilePath, P.Externs)
94+ readExterns mn = do
95+ let path = outputDir </> (runModuleName' mn) </> "externs.json"
96+ (path, ) <$> readTextFile path
97+
98+ codegen :: CF.Module CF.Ann -> P.Environment -> P.Externs -> P.SupplyT Make ()
99+ codegen m env exts = do
100+ let mn = CF.moduleName m
101+ let filePath = runModuleName' mn
102+ fileBase = outputDir </> filePath </> (last . words . dotsTo ' ' $ runModuleName' mn)
103+ sourceFile = addExtension fileBase sourceExt
104+ headerFile = addExtension fileBase headerExt
105+ externsFile = outputDir </> filePath </> "externs.json"
106+ prefix = ["Generated by pcc version " <> T.pack (showVersion Paths.version) | usePrefix]
107+ cpps <- CPP.moduleToCpp otherOpts env m
108+ let (hdrs,srcs) = span (/= CPP.CppEndOfHeader) cpps
109+ psrcs <- CPP.prettyPrintCpp <$> pure srcs
110+ phdrs <- CPP.prettyPrintCpp <$> pure hdrs
111+ let src = T.unlines $ map ("// " <>) prefix ++ [psrcs]
112+ hdr = T.unlines $ map ("// " <>) prefix ++ [phdrs]
113+
114+ lift $ do
115+ writeTextFile' sourceFile src
116+ writeTextFile' headerFile hdr
117+ writeTextFile externsFile exts
118+
119+ let supportDir = outputDir </> "PureScript"
120+ supportFilesExist <- dirExists supportDir
121+ when (not supportFilesExist) $ do
122+ writeTextFile (supportDir </> "PureScript.hh") $ B.fromStrict $(embedFile "pcc/runtime/purescript.hh")
123+ writeTextFile (supportDir </> "PureScript.cc") $ B.fromStrict $(embedFile "pcc/runtime/purescript.cc")
124+ writeTextFile (supportDir </> "purescript_memory.hh") $ B.fromStrict $(embedFile "pcc/runtime/purescript_memory.hh")
125+
126+ let inputPath = dropExtension $ getInputFile mn
127+ hfile = addExtension inputPath headerExt
128+ sfile = addExtension inputPath sourceExt
129+ hfileExists <- textFileExists hfile
130+ when (hfileExists || requiresForeign m) $ do
131+ let dstFile = addExtension (fileBase ++ ffiMangle) headerExt
132+ if hfileExists
133+ then copyTextFile dstFile hfile
134+ else writeTextFile dstFile ""
135+ sfileExists <- textFileExists sfile
136+ when (sfileExists) $ do
137+ copyTextFile (addExtension (fileBase ++ ffiMangle) sourceExt) sfile
138+ mapM (copyTextFileWithExt fileBase inputPath) otherExts
139+ return ()
140+
141+ requiresForeign :: CF.Module a -> Bool
142+ requiresForeign = not . null . CF.moduleForeign
143+
144+ dirExists :: FilePath -> Make Bool
145+ dirExists path = makeIO (const (ErrorMessage [] $ CannotReadFile path)) $ do
146+ doesDirectoryExist path
147+
148+ textFileExists :: FilePath -> Make Bool
149+ textFileExists path = makeIO (const (ErrorMessage [] $ CannotReadFile path)) $ do
150+ doesFileExist path
151+
152+ getTimestamp :: FilePath -> Make (Maybe UTCTime)
153+ getTimestamp path = makeIO (const (ErrorMessage [] $ CannotGetFileInfo path)) $ do
154+ exists <- doesFileExist path
155+ traverse (const $ getModificationTime path) $ guard exists
156+
157+ copyTextFile :: FilePath -> FilePath -> Make ()
158+ copyTextFile to from = makeIO (const (ErrorMessage [] $ CannotWriteFile to)) $ do
159+ createDirectoryIfMissing True (takeDirectory to)
160+ copyFile from to
161+
162+ copyTextFileWithExt :: FilePath -> FilePath -> String -> Make ()
163+ copyTextFileWithExt to from ext = makeIO (const (ErrorMessage [] $ CannotWriteFile to)) $ do
164+ createDirectoryIfMissing True (takeDirectory to)
165+ _ <- tryIOError $ copyFile (addExtension from ext) (addExtension to ext)
166+ return ()
167+
168+ writeTextFile :: FilePath -> B.ByteString -> Make ()
169+ writeTextFile path text = makeIO (const (ErrorMessage [] $ CannotWriteFile path)) $ do
170+ mkdirp path
171+ _ <- tryIOError $ B.writeFile path text -- TODO: intended to ignore "file busy", fix properly asap
172+ return ()
173+ where
174+ mkdirp :: FilePath -> IO ()
175+ mkdirp = createDirectoryIfMissing True . takeDirectory
176+
177+ writeTextFile' path = writeTextFile path . B.fromStrict . TE.encodeUtf8
178+
179+ -- | Render a progress message
180+ renderProgressMessage :: P.ProgressMessage -> String
181+ renderProgressMessage (P.CompilingModule mn) = "Compiling " ++ runModuleName' mn
182+
183+ progress :: P.ProgressMessage -> Make ()
184+ progress = liftIO . putStrLn . renderProgressMessage
185+
186+dotsTo :: Char -> String -> String
187+dotsTo chr = map (\c -> if c == '.' then chr else c)
188+
189+headerExt :: String
190+headerExt = "hh"
191+
192+sourceExt :: String
193+sourceExt = "cc"
194+
195+otherExts :: [String]
196+otherExts = ["h", "inl"]
197+
198+ffiMangle :: String
199+ffiMangle = "_ffi"
pcc/Makefile.hsnew file+81
@@ -0,0 +1,81 @@
1+-------------------------------------------------------------------------------
2+--
3+-- Module : Main
4+-- Copyright : (c) 2016 Andy Arvanitis and other contributors
5+-- License : MIT
6+--
7+-- Maintainer : Andy Arvanitis
8+-- Stability : experimental
9+-- Portability :
10+--
11+-------------------------------------------------------------------------------
12+{-# LANGUAGE OverloadedStrings #-}
13+{-# LANGUAGE PatternGuards #-}
14+{-# LANGUAGE TemplateHaskell #-}
15+
16+module Makefile where
17+
18+import Control.Monad (when)
19+import Data.FileEmbed (embedFile)
20+import System.Environment (getExecutablePath)
21+import System.Directory (doesFileExist)
22+import System.FilePath (takeDirectory)
23+
24+import qualified Data.Text as T
25+import qualified Data.ByteString.Char8 as B
26+
27+generateMakefile :: IO ()
28+generateMakefile = do
29+ makefileExists <- doesFileExist makefilename
30+ when (not makefileExists) $ do
31+ let makefile = $(embedFile "pcc/support/Makefile")
32+ exePath <- getExecutablePath
33+ putStrLn ""
34+ putStrLn $ "Generating " ++ makefilename ++ "... " ++ "pcc executable location " ++ exePath
35+ writeFile makefilename . T.unpack $
36+ T.replace
37+ pathPlaceholder
38+ (T.pack $ takeDirectory exePath)
39+ (T.pack $ B.unpack makefile)
40+ putStrLn "Done"
41+ putStrLn ""
42+ putStrLn "Run 'make' or 'make release' to build an optimized release build."
43+ putStrLn "Run 'make debug' to build an executable with assertions enabled and"
44+ putStrLn "suitable for source-level debugging."
45+ putStrLn ""
46+ putStrLn "The resulting binary executable will be located in output/bin (by default)."
47+ putStrLn ""
48+
49+generatePackagefile :: IO ()
50+generatePackagefile = do
51+ pkgfileExists <- doesFileExist packagefilename
52+ when (not pkgfileExists) $ do
53+ let pkgfile = $(embedFile "pcc/support/psc-package.json")
54+ putStrLn ""
55+ putStrLn $ "Generating " ++ packagefilename ++ "..."
56+ writeFile packagefilename $ B.unpack pkgfile
57+ putStrLn "Done"
58+ putStrLn "Use the 'psc-package' utility to install or update packages."
59+
60+generateXcodefile :: IO ()
61+generateXcodefile = do
62+ xcodefileExists <- doesFileExist xcodefilename
63+ when (not xcodefileExists) $ do
64+ let xcodefile = $(embedFile "pcc/support/psc-xcode.sh")
65+ putStrLn ""
66+ putStrLn $ "Generating " ++ xcodefilename ++ "..."
67+ writeFile xcodefilename $ B.unpack xcodefile
68+ putStrLn "Done"
69+ putStrLn "Add this file to an Xcode 'Run Script' build phase."
70+
71+makefilename :: String
72+makefilename = "Makefile"
73+
74+packagefilename :: String
75+packagefilename = "psc-package.json"
76+
77+xcodefilename :: String
78+xcodefilename = "psc-xcode.sh"
79+
80+pathPlaceholder :: T.Text
81+pathPlaceholder = "{{path}}"
src/Tests.hs → pcc/TestMain.hsrenamed+40−31
@@ -1,6 +1,18 @@
1−module Tests (runTests) where
1+-------------------------------------------------------------------------------
2+--
3+-- Module : Main
4+-- Copyright : (c) 2015 Andy Arvanitis and other contributors
5+-- License : MIT
6+--
7+-- Maintainer : Andy Arvanitis
8+-- Stability : experimental
9+-- Portability :
10+--
11+--
12+--
13+-------------------------------------------------------------------------------
14+module Main where
215
3−import Prelude.Compat
416import Data.List
517import Control.Applicative
618import Control.Monad
@@ -15,12 +27,12 @@ testsDir :: IO (FilePath, FilePath)
1527-------------------------------------------------------------------------------
1628testsDir = do
1729 baseDir <- getCurrentDirectory
18− return (baseDir </> "purescript-tests", baseDir)
30+ return (baseDir </> "pcc-tests", baseDir)
1931
2032-------------------------------------------------------------------------------
21−runTests :: IO ()
33+main :: IO ()
2234-------------------------------------------------------------------------------
23−runTests = do
35+main = do
2436
2537 (outputDir, baseDir) <- testsDir
2638
@@ -31,11 +43,12 @@ runTests = do
3143 let srcDir = outputDir </> "src"
3244 createDirectory srcDir
3345
34− callProcess "git" ["clone", "--branch", "v0.13.8", "--depth", "1", "https://github.com/purescript/purescript.git"]
35− let passingDir = baseDir </> "purescript" </> "tests" </> "purs" </> "passing"
46+ let passingDir = baseDir </> "examples" </> "passing"
3647 passingTestCases <- sort . filter (".purs" `isSuffixOf`) <$> getDirectoryContents passingDir
3748
49+ -- Auto-generate Makefile
3850 setCurrentDirectory outputDir
51+ callProcess "pcc" []
3952
4053 fetchPackages
4154
@@ -60,15 +73,14 @@ runTests = do
6073 testCaseDirExists <- doesDirectoryExist testCaseDir
6174 when testCaseDirExists $ callProcess "cp" ["-R", testCaseDir, srcDir]
6275
63− callProcess "rm" ["-rf", "output"]
64− callProcess "rm" ["-rf", "Main"]
65− callProcess "spago" ["build"]
76+ callProcess "make" ["clean"]
77+ callProcess "make" ["debug", "CXXFLAGS=-Werror", "-j2"]
6678 --
67− -- Run executable file
79+ -- Run C++ files
6880 --
6981 outputFile <- openFile (tmp </> logpath </> logfile) AppendMode
7082 hPutStrLn outputFile ("\n" ++ inputFile ++ ":")
71− proc <- runProcess ("./" </> "Main") [] Nothing Nothing Nothing (Just outputFile) Nothing
83+ proc <- runProcess ("output" </> "bin" </> "main") [] Nothing Nothing Nothing (Just outputFile) Nothing
7284
7385 removeFile (srcDir </> inputFile)
7486 when testCaseDirExists $ callProcess "rm" ["-rf", srcDir </> (takeWhile (/='.') inputFile)]
@@ -80,30 +92,36 @@ runTests = do
8092 --
8193
8294 setCurrentDirectory baseDir
83− putStrLn "PureScript tests finished"
95+ putStrLn "pcc-tests finished"
8496 putStrLn $ "Total tests available: " ++ show (length passingTestCases)
8597 putStrLn $ "Tests run: " ++ show (length tests)
8698 putStrLn $ "Tests skipped: " ++ show (length skipped)
8799
100+-------------------------------------------------------------------------------
101+repo :: String
102+-------------------------------------------------------------------------------
103+repo = "git://github.com/pure11/"
104+
88105-------------------------------------------------------------------------------
89106packages :: [String]
90107-------------------------------------------------------------------------------
91108packages =
92− [ "arrays"
109+ [ "eff"
110+ , "arrays"
93111 , "assert"
94112 , "console"
95113 , "control"
96− , "effect"
97114 , "foldable-traversable"
98115 , "functions"
99116 , "generics-rep"
100117 , "invariant"
118+ , "monoid"
101119 , "newtype"
102120 , "partial"
103121 , "prelude"
104122 , "proxy"
105− , "refs"
106123 , "st"
124+ , "symbols"
107125 , "type-equality"
108126 , "typelevel-prelude"
109127 ]
@@ -112,30 +130,21 @@ packages =
112130fetchPackages :: IO ()
113131-------------------------------------------------------------------------------
114132fetchPackages = do
115− callProcess "spago" ["init"]
116− callCommand "sed '$s/\\(}\\)/, backend = \"psgo\"\\1/' < spago.dhall | dhall format > spago.tmp"
117− callCommand "mv spago.tmp spago.dhall"
118−
119− mapM (callProcess "spago" . (\p -> ["install", p])) packages
133+ mapM (callProcess "psc-package" . (\p -> ["install", p])) packages
120134 return ()
121135
122136-------------------------------------------------------------------------------
123137skipped :: [String]
124138-------------------------------------------------------------------------------
125139skipped =
126− [ "2172.purs" -- foreign in Main needed (test manually)
127− , "EffFn.purs" -- foreign in Main needed (test manually)
128− , "FunWithFunDeps.purs" -- foreign in Main needed (test manually)
129− , "NumberLiterals.purs" -- unreliable float string comparison (test manually)
130− , "PolyLabels.purs" -- foreign in Main needed (test manually)
131− , "RowUnion.purs" -- foreign in Main needed (test manually)
132− , "ShadowedModuleName.purs" -- ?
133− , "StringEdgeCases.purs" -- javascript char encoding specific
134− , "StringEscapes.purs" -- Partially javascript-char-encoding-specific (test manually)
140+ [ "NumberLiterals.purs" -- unreliable float comparison, test manually
141+ , "FunWithFunDeps.purs" -- requires FFI
142+ , "StringEdgeCases.purs" -- TODO: depends on new package needing porting
143+ , "StringEscapes.purs" -- TODO: UTF16-specific
135144 ]
136145
137146logpath :: FilePath
138147logpath = "purescript-output"
139148
140149logfile :: FilePath
141−logfile = "purescript-tests.out"
150+logfile = "pcc-tests.out"
pcc/runtime/purescript.ccnew file+239
@@ -0,0 +1,239 @@
1+///////////////////////////////////////////////////////////////////////////////
2+//
3+// Module : purescript.cc
4+// Copyright : (c) Andy Arvanitis 2015
5+// License : MIT
6+//
7+// Maintainer : Andy Arvanitis <andy.arvanitis@gmail.com>
8+// Stability : experimental
9+// Portability :
10+//
11+// Basic types and functions to support purescript-to-C++1x rendering
12+//
13+///////////////////////////////////////////////////////////////////////////////
14+//
15+#include <cstring>
16+#include "PureScript.hh"
17+
18+namespace PureScript {
19+
20+any::Closure::~Closure() {}
21+any::EffClosure::~EffClosure() {}
22+
23+#define RETURN_VALUE(TAG, ACCESSOR, INDIRECTION) \
24+ const any& variant = unthunkVariant(*this); \
25+ assert(variant.tag == TAG); \
26+ return INDIRECTION(variant.ACCESSOR); \
27+
28+auto any::operator()(const any& arg) const -> any {
29+ const any& variant = unthunkVariant(*this);
30+ if (variant.tag == Tag::Closure) {
31+ return (*static_cast<const Closure*>(POINTER_FROM_MEMBER(variant.p)))(arg);
32+ }
33+ assert(variant.tag == Tag::Function);
34+ return (*variant.f)(arg);
35+}
36+
37+auto any::operator()(const as_thunk) const -> const any& {
38+ assert(tag == Tag::Thunk);
39+ return (*t)(unthunk);
40+}
41+
42+auto any::operator()() const -> any {
43+ const any& variant = unthunkVariant(*this);
44+ if (variant.tag == Tag::EffClosure) {
45+ return (*static_cast<const EffClosure*>(POINTER_FROM_MEMBER(variant.p)))();
46+ }
47+ assert(variant.tag == Tag::EffFunction);
48+ return (*variant.e)();
49+}
50+
51+any::operator int() const {
52+ RETURN_VALUE(Tag::Integer, i,)
53+}
54+
55+any::operator double() const {
56+ RETURN_VALUE(Tag::Double, d,)
57+}
58+
59+any::operator bool() const {
60+ RETURN_VALUE(Tag::Boolean, b,)
61+}
62+
63+any::operator char32_t() const {
64+ RETURN_VALUE(Tag::Character, c,)
65+}
66+
67+any::operator char() const {
68+ const auto val = static_cast<decltype(c)>(*this);
69+ assert(val <= std::numeric_limits<char>::max());
70+ return static_cast<char>(val);
71+}
72+
73+any::operator size_t() const {
74+ const auto val = static_cast<decltype(i)>(*this);
75+ assert(val >= 0);
76+ return static_cast<size_t>(val);
77+}
78+
79+any::operator const string&() const {
80+ return *static_cast<const string*>(extractPointer(IF_DEBUG(Tag::String)));
81+}
82+
83+any::operator const char *() const {
84+ return static_cast<const string*>(extractPointer(IF_DEBUG(Tag::String)))->c_str();
85+}
86+
87+any::operator const array&() const {
88+ return *static_cast<const array*>(extractPointer(IF_DEBUG(Tag::Array)));
89+}
90+
91+any::operator const record&() const {
92+ return *static_cast<const record*>(extractPointer(IF_DEBUG(Tag::Record)));
93+}
94+
95+auto any::extractPointer(IF_DEBUG(const any::Tag t)) const -> void* {
96+ RETURN_VALUE(t, POINTER_FROM_MEMBER(p),)
97+}
98+
99+auto any::unthunkVariant(const any& a) -> const any& {
100+ const any * variant = &a;
101+ while (variant->tag == Tag::Thunk) {
102+ variant = &((*variant->t)(unthunk));
103+ }
104+ return *variant;
105+}
106+
107+auto any::operator[](const size_t rhs) const -> const any& {
108+ const auto& xs = static_cast<const array&>(*this);
109+ return xs[rhs];
110+}
111+
112+auto any::size() const -> size_t {
113+ return static_cast<const array&>(*this).size();
114+}
115+
116+auto any::empty() const -> bool {
117+ return static_cast<const array&>(*this).empty();
118+}
119+
120+auto any::contains(const Private::Symbol key) const -> bool {
121+ // TODO: assumes at least one element -- safe assumption?
122+ const auto& m = cast<dict<unknown_size>>(*this);
123+ std::remove_reference<decltype(m)>::type::size_type i = 0;
124+ do {
125+ if (m[i].first == key) {
126+ return true;
127+ }
128+ } while (m[++i].first != nullptr);
129+ return false;
130+}
131+
132+auto any::cstr_cmp::operator ()(const char * a, const char * b) const -> bool {
133+ return a == b ? false : std::strcmp(a, b) < 0;
134+}
135+
136+auto any::at(const char * key) const -> const any& {
137+ return static_cast<const record&>(*this).at(key);
138+}
139+
140+//-----------------------------------------------------------------------------
141+// Operator helper macros
142+//-----------------------------------------------------------------------------
143+
144+#define DEFINE_COMPARISON_OPERATOR(op) \
145+ auto operator op (const any& lhs_, const any& rhs) -> bool { \
146+ const any& lhs = any::unthunkVariant(lhs_); \
147+ switch (lhs.tag) { \
148+ case any::Tag::Integer: return lhs.i op static_cast<decltype(any::i)>(rhs); \
149+ case any::Tag::Double: return lhs.d op static_cast<decltype(any::d)>(rhs); \
150+ case any::Tag::Character: return lhs.c op static_cast<decltype(any::c)>(rhs); \
151+ case any::Tag::Boolean: return lhs.b op static_cast<decltype(any::b)>(rhs); \
152+ case any::Tag::String: return *static_cast<const string*>(POINTER_FROM_MEMBER(lhs.p)) \
153+ op static_cast<const string&>(rhs); \
154+ case any::Tag::RawPointer: return lhs.v op cast<decltype(any::v)>(rhs); \
155+ case any::Tag::Pointer: return lhs.p op any::unthunkVariant(rhs).p; \
156+ default: assert(false && "Unsupported tag for operator " #op); \
157+ } \
158+ return false; \
159+ }
160+
161+//-----------------------------------------------------------------------------
162+// Operator definitions
163+//-----------------------------------------------------------------------------
164+
165+DEFINE_COMPARISON_OPERATOR(==)
166+DEFINE_COMPARISON_OPERATOR(!=)
167+DEFINE_COMPARISON_OPERATOR(<)
168+DEFINE_COMPARISON_OPERATOR(<=)
169+DEFINE_COMPARISON_OPERATOR(>)
170+DEFINE_COMPARISON_OPERATOR(>=)
171+
172+auto operator+(const any& lhs_, const any& rhs) -> any {
173+ const any& lhs = any::unthunkVariant(lhs_);
174+ switch (lhs.tag) {
175+ case any::Tag::Integer: return lhs.i + static_cast<decltype(any::i)>(rhs);
176+ case any::Tag::Double: return lhs.d + static_cast<decltype(any::d)>(rhs);
177+ case any::Tag::Character: return decltype(any::c){lhs.c + static_cast<decltype(any::c)>(rhs)};
178+ case any::Tag::String: return *static_cast<const string*>(POINTER_FROM_MEMBER(lhs.p))
179+ + static_cast<const string&>(rhs);
180+ default: assert(false && "Unsupported tag for '+' operator");
181+ }
182+ return nullptr;
183+}
184+
185+auto operator-(const any& lhs_, const any& rhs) -> any {
186+ const any& lhs = any::unthunkVariant(lhs_);
187+ switch (lhs.tag) {
188+ case any::Tag::Integer: return lhs.i - static_cast<decltype(any::i)>(rhs);
189+ case any::Tag::Double: return lhs.d - static_cast<decltype(any::d)>(rhs);
190+ case any::Tag::Character: return decltype(any::c){lhs.c - static_cast<decltype(any::c)>(rhs)};
191+ default: assert(false && "Unsupported tag for '-' operator");
192+ }
193+ return nullptr;
194+}
195+
196+auto operator*(const any& lhs_, const any& rhs) -> any {
197+ const any& lhs = any::unthunkVariant(lhs_);
198+ switch (lhs.tag) {
199+ case any::Tag::Integer: return lhs.i * static_cast<decltype(any::i)>(rhs);
200+ case any::Tag::Double: return lhs.d * static_cast<decltype(any::d)>(rhs);
201+ case any::Tag::Character: return decltype(lhs.c){lhs.c - static_cast<decltype(any::c)>(rhs)};
202+ default: assert(false && "Unsupported tag for '*' operator");
203+ }
204+ return nullptr;
205+}
206+
207+auto operator/(const any& lhs_, const any& rhs) -> any {
208+ const any& lhs = any::unthunkVariant(lhs_);
209+ switch (lhs.tag) {
210+ case any::Tag::Integer: return lhs.i / static_cast<decltype(any::i)>(rhs);
211+ case any::Tag::Double: return lhs.d / static_cast<decltype(any::d)>(rhs);
212+ case any::Tag::Character: return decltype(any::c){lhs.c / static_cast<decltype(any::c)>(rhs)};
213+ default: assert(false && "Unsupported tag for '/' operator");
214+ }
215+ return nullptr;
216+}
217+
218+auto operator%(const any& lhs_, const any& rhs) -> any {
219+ const any& lhs = any::unthunkVariant(lhs_);
220+ switch (lhs.tag) {
221+ case any::Tag::Integer: return lhs.i % static_cast<decltype(any::i)>(rhs);
222+ case any::Tag::Character: return decltype(any::c){lhs.c % static_cast<decltype(any::c)>(rhs)};
223+ default: assert(false && "Unsupported tag for '%' operator");
224+ }
225+ return nullptr;
226+}
227+
228+// unary negate
229+auto operator-(const any& rhs_) -> any {
230+ const any& rhs = any::unthunkVariant(rhs_);
231+ switch (rhs.tag) {
232+ case any::Tag::Integer: return (- rhs.i);
233+ case any::Tag::Double: return (- rhs.d);
234+ default: assert(false && "Unsupported tag for unary '-' operator");
235+ }
236+ return nullptr;
237+}
238+
239+} // namespace PureScript
pcc/runtime/purescript.hhnew file+581
@@ -0,0 +1,581 @@
1+///////////////////////////////////////////////////////////////////////////////
2+//
3+// Module : purescript.hh
4+// Copyright : (c) Andy Arvanitis 2015
5+// License : MIT
6+//
7+// Maintainer : Andy Arvanitis <andy.arvanitis@gmail.com>
8+// Stability : experimental
9+// Portability :
10+//
11+// Basic types and functions to support purescript-to-C++1x rendering
12+//
13+///////////////////////////////////////////////////////////////////////////////
14+//
15+#ifndef PureScript_HH
16+#define PureScript_HH
17+
18+#if !defined(__cplusplus)
19+#error This is a C++ file!
20+#endif
21+
22+// Standard includes
23+
24+#if defined(DEBUG)
25+ #include <cassert>
26+ #include <limits>
27+ #define IF_DEBUG(x) x
28+#else
29+ #define NDEBUG
30+ #undef assert
31+ #define assert(x)
32+ #define IF_DEBUG(_)
33+#endif
34+
35+#include <functional>
36+#include <string>
37+#include <array>
38+#include <deque>
39+#include <map>
40+#include <utility>
41+#include <stdexcept>
42+#include <iso646.h> // mostly for MS Visual Studio compiler
43+#include "purescript_memory.hh"
44+
45+namespace PureScript {
46+
47+using cstring = const char *;
48+using std::string;
49+using std::nullptr_t;
50+using std::runtime_error;
51+
52+namespace Private {
53+ struct SymbolGeneratorAnchor {};
54+
55+ template <typename T>
56+ struct SymbolGenerator {
57+ constexpr static SymbolGeneratorAnchor anchor = SymbolGeneratorAnchor{};
58+ };
59+ template <typename T>
60+ constexpr SymbolGeneratorAnchor SymbolGenerator<T>::anchor;
61+
62+ using Symbol = const SymbolGeneratorAnchor *;
63+}
64+
65+#define DEFINE_SYMBOL(S) namespace PureScript { \
66+ namespace Private { \
67+ namespace Symbols { \
68+ struct S_ ## S {}; \
69+ } \
70+ } \
71+ }
72+#define SYM(S) (&Private::SymbolGenerator<::PureScript::Private::Symbols::S_ ## S>::anchor)
73+
74+constexpr bool undefined = false;
75+
76+// TODO: Not a real limit, just used for simpler accessors
77+static constexpr size_t unknown_size = 64;
78+
79+// A variant data class designed to provide some features of dynamic typing.
80+//
81+class any {
82+
83+ private:
84+ static constexpr auto _managed_ = 0x10;
85+
86+ public:
87+ enum class Tag {
88+ Unknown,
89+ Thunk,
90+ Integer,
91+ Double,
92+ Character,
93+ Boolean,
94+ Function,
95+ EffFunction,
96+ RawPointer,
97+ String = _managed_,
98+ Dictionary,
99+ Data,
100+ Array,
101+ Record,
102+ Closure,
103+ EffClosure,
104+ Pointer,
105+ Invalid
106+ };
107+
108+ private:
109+ mutable Tag tag;
110+
111+ inline static auto isManaged(const Tag tag) -> decltype(_managed_) {
112+ return static_cast<decltype(_managed_)>(tag) & _managed_;
113+ }
114+ static_assert(static_cast<decltype(_managed_)>(Tag::Invalid) & _managed_, "outside of range");
115+
116+ public:
117+ struct as_thunk {
118+ };
119+ static constexpr as_thunk unthunk = as_thunk{};
120+
121+ using dict_pair = std::pair<const Private::Symbol, const any>;
122+ template <size_t N>
123+ using dict = std::array<const dict_pair, N>;
124+
125+ template <size_t N>
126+ using data = std::array<const any, N>;
127+
128+ using array = std::deque<any WITH_ALLOCATOR(any)>;
129+
130+ struct cstr_cmp {
131+ auto operator ()(const char *, const char *) const -> bool;
132+ };
133+ using record = std::map<const char *,
134+ any,
135+ cstr_cmp
136+ WITH_ALLOCATOR_PAIR(char * const, any)>;
137+
138+ using fn = auto (*)(const any&) -> any;
139+ using eff_fn = auto (*)() -> any;
140+ using thunk = auto (*)(const as_thunk) -> const any&;
141+
142+ private:
143+ class Closure {
144+ public:
145+ virtual auto operator()(const any&) const -> any = 0;
146+ virtual ~Closure();
147+ };
148+
149+ template <typename T>
150+ class Closure_ : public Closure {
151+ const T lambda;
152+ public:
153+ Closure_(const T& l) noexcept : lambda(l) {}
154+ auto operator()(const any& arg) const -> any override {
155+ return lambda(arg);
156+ }
157+ };
158+
159+ class EffClosure {
160+ public:
161+ virtual auto operator()() const -> any = 0;
162+ virtual ~EffClosure();
163+ };
164+
165+ template <typename T>
166+ class EffClosure_ : public EffClosure {
167+ const T lambda;
168+ public:
169+ EffClosure_(const T& l) noexcept : lambda(l) {}
170+ auto operator()() const -> any override {
171+ return lambda();
172+ }
173+ };
174+
175+ private:
176+ union {
177+ mutable thunk t;
178+ mutable int i;
179+ mutable double d;
180+ mutable char32_t c;
181+ mutable bool b;
182+ mutable fn f;
183+ mutable eff_fn e;
184+ mutable void * v;
185+ mutable uint64_t u;
186+ mutable managed<void> p;
187+ };
188+
189+ public:
190+
191+ any(const int val) noexcept : tag(Tag::Integer), i(val) {}
192+ any(const long val) noexcept : tag(Tag::Integer), i(static_cast<decltype(i)>(val)) {
193+ assert(val >= std::numeric_limits<decltype(i)>::min() &&
194+ val <= std::numeric_limits<decltype(i)>::max());
195+ }
196+ any(const double val) noexcept : tag(Tag::Double), d(val) {}
197+ any(const char32_t val) noexcept : tag(Tag::Character), c(val) {}
198+ any(const char val) noexcept : tag(Tag::Character), c(val) {}
199+
200+ template <typename T, typename = typename std::enable_if<std::is_same<bool,T>::value>::type>
201+ any(const T val) noexcept : tag(Tag::Boolean), b(val) {}
202+
203+ any(const char * val) : tag(Tag::String), p(make_managed_and_finalized<string>(val)) {}
204+ any(const string& val) : tag(Tag::String), p(make_managed_and_finalized<string>(val)) {}
205+ any(string&& val) noexcept : tag(Tag::String), p(make_managed_and_finalized<string>(std::move(val))) {}
206+
207+ any(const managed<string>& val) noexcept : tag(Tag::String), p(val) {}
208+ any(managed<string>&& val) noexcept : tag(Tag::String), p(std::move(val)) {}
209+
210+ template <size_t N>
211+ any(dict<N>&& val) noexcept : tag(Tag::Dictionary), p(make_managed<dict<N>>(std::move(val))) {}
212+
213+ template <size_t N>
214+ any(data<N>&& val) noexcept : tag(Tag::Data), p(make_managed<data<N>>(std::move(val))) {}
215+
216+ any(const array& val) : tag(Tag::Array), p(make_managed<array>(val)) {}
217+ any(array&& val) noexcept : tag(Tag::Array), p(make_managed<array>(std::move(val))) {}
218+
219+ any(const record& val) : tag(Tag::Record), p(make_managed<record>(val)) {}
220+ any(record&& val) noexcept : tag(Tag::Record), p(make_managed<record>(std::move(val))) {}
221+
222+ template <typename T>
223+ any(const T& val, typename std::enable_if<std::is_convertible<T,fn>::value>::type* = 0) noexcept
224+ : tag(Tag::Function), f(val) {}
225+
226+ template <typename T, typename = typename std::enable_if<!std::is_same<any,T>::value &&
227+ !std::is_convertible<T,fn>::value>::type>
228+ any(const T& val, typename std::enable_if<std::is_assignable<std::function<any(const any&)>,T>::value>::type* = 0)
229+ : tag(Tag::Closure), p(make_managed<Closure_<T>>(val)) {}
230+
231+ template <typename T>
232+ any(const T& val, typename std::enable_if<std::is_convertible<T,eff_fn>::value>::type* = 0) noexcept
233+ : tag(Tag::EffFunction), e(val) {}
234+
235+ template <typename T,
236+ typename = typename std::enable_if<!std::is_same<any,T>::value &&
237+ !std::is_convertible<T,eff_fn>::value>::type>
238+ any(const T& val, typename std::enable_if<std::is_assignable<std::function<any()>,T>::value>::type* = 0)
239+ : tag(Tag::EffClosure), p(make_managed<EffClosure_<T>>(val)) {}
240+
241+ template <typename T>
242+ any(const T& val, typename std::enable_if<std::is_convertible<T,thunk>::value>::type* = 0) noexcept
243+ : tag(Tag::Thunk), t(val) {}
244+
245+ template <typename T,
246+ typename = typename std::enable_if<std::is_class<typename std::remove_pointer<T>::type>::value>::type>
247+ any(const T& val, typename std::enable_if<IS_POINTER_TYPE(T)::value>::type* = 0) noexcept
248+ : tag(Tag::Pointer), p(val) {}
249+
250+ template <typename T>
251+ any(T&& val, typename std::enable_if<std::is_assignable<managed<void>,T>::value>::type* = 0) noexcept
252+ : tag(Tag::Pointer), p(std::move(val)) {}
253+
254+ // Explicit void* to raw pointer value
255+ template <typename T>
256+ any(const T& val, typename std::enable_if<std::is_same<T,void*>::value>::type* = 0) noexcept
257+ : tag(Tag::RawPointer), v(val) {}
258+
259+ any(nullptr_t) noexcept : tag(Tag::RawPointer), v(nullptr) {}
260+
261+
262+#if !defined(USE_GC)
263+ private:
264+ auto destruct() const noexcept -> void {
265+ if (isManaged(tag)) {
266+ p.~managed<void>();
267+ }
268+ }
269+
270+ static_assert(sizeof(any::u) >= sizeof(any::t), "size assumption");
271+ static_assert(sizeof(any::u) >= sizeof(any::i), "size assumption");
272+ static_assert(sizeof(any::u) >= sizeof(any::d), "size assumption");
273+ static_assert(sizeof(any::u) >= sizeof(any::c), "size assumption");
274+ static_assert(sizeof(any::u) >= sizeof(any::b), "size assumption");
275+ static_assert(sizeof(any::u) >= sizeof(any::f), "size assumption");
276+ static_assert(sizeof(any::u) >= sizeof(any::e), "size assumption");
277+ static_assert(sizeof(any::u) >= sizeof(any::v), "size assumption");
278+
279+ auto copyAssign(const any& other) const noexcept -> void {
280+ if (isManaged(other.tag)) {
281+ new (&p) managed<void>(other.p);
282+ } else {
283+ u = other.u;
284+ }
285+ }
286+ auto moveAssign(any& other) const noexcept -> void {
287+ if (isManaged(other.tag)) {
288+ new (&p) managed<void>(std::move(other.p));
289+ } else {
290+ u = other.u;
291+ }
292+ }
293+
294+ public:
295+ any(const any& other) noexcept : tag(other.tag) {
296+ copyAssign(other);
297+ }
298+
299+ any(any&& other) noexcept : tag(other.tag) {
300+ moveAssign(other);
301+ }
302+
303+ auto operator=(const any& rhs) noexcept -> any& {
304+ destruct();
305+ tag = rhs.tag;
306+ copyAssign(rhs);
307+ return *this;
308+ }
309+
310+ auto operator=(any&& rhs) noexcept -> any& {
311+ destruct();
312+ tag = rhs.tag;
313+ moveAssign(rhs);
314+ return *this;
315+ }
316+
317+ ~any() {
318+ destruct();
319+ }
320+#endif // !defined(USE_GC)
321+
322+ public:
323+ any() = delete;
324+
325+ auto operator()(const any&) const -> any;
326+ auto operator()(const as_thunk) const -> const any&;
327+ auto operator()() const -> any;
328+
329+ operator int() const;
330+ operator double() const;
331+ operator bool() const;
332+ operator char32_t() const;
333+ operator char() const;
334+ operator size_t() const;
335+ operator const string&() const;
336+ operator const char *() const;
337+ operator const array&() const;
338+ operator const record&() const;
339+
340+ auto operator[](const size_t) const -> const any&;
341+ auto at(const char *) const -> const any&;
342+ auto size() const -> size_t;
343+ auto empty() const -> bool;
344+ auto contains(const Private::Symbol) const -> bool;
345+
346+ auto extractPointer(IF_DEBUG(const Tag)) const -> void*;
347+
348+ auto rawPointer() const -> void* {
349+ const any& variant = unthunkVariant(*this);
350+ assert(tag == Tag::RawPointer);
351+ return variant.v;
352+ }
353+
354+ static auto unthunkVariant(const any&) -> const any&;
355+
356+ #define DEFINE_OPERATOR(op) \
357+ template <typename T, \
358+ typename = typename std::enable_if<!std::is_same<T,any>::value && \
359+ !std::is_same<T,const char *>::value>::type> \
360+ inline friend auto operator op (const any& lhs, T rhs) -> T { \
361+ return static_cast<typename std::add_lvalue_reference<typename std::add_const<T>::type >::type>(lhs) op rhs; \
362+ } \
363+ template <typename T, \
364+ typename = typename std::enable_if<!std::is_same<T,any>::value && \
365+ !std::is_same<T,const char *>::value>::type> \
366+ inline friend auto operator op (T lhs, const any& rhs) -> T { \
367+ return lhs op static_cast<typename std::add_lvalue_reference<typename std::add_const<T>::type >::type>(rhs); \
368+ } \
369+ friend auto operator op (const any&, const any&) -> any; \
370+
371+ #define DEFINE_COMPARISON_OPERATOR(op) \
372+ template <typename T, \
373+ typename = typename std::enable_if<!std::is_same<T,any>::value && \
374+ !std::is_same<T,const char *>::value>::type> \
375+ inline friend auto operator op (const any& lhs, T rhs) -> bool { \
376+ return static_cast<typename std::add_lvalue_reference<typename std::add_const<T>::type >::type>(lhs) op rhs; \
377+ } \
378+ template <typename T, \
379+ typename = typename std::enable_if<!std::is_same<T,any>::value && \
380+ !std::is_same<T,const char *>::value>::type> \
381+ inline friend auto operator op (T lhs, const any& rhs) -> bool { \
382+ return lhs op static_cast<typename std::add_lvalue_reference<typename std::add_const<T>::type >::type>(rhs); \
383+ } \
384+ inline friend auto operator op (const any& lhs, const char * rhs) -> bool { \
385+ return static_cast<const string&>(lhs) op rhs; \
386+ } \
387+ inline friend auto operator op (const char * lhs, const any& rhs) -> bool { \
388+ return lhs op static_cast<const string&>(rhs); \
389+ } \
390+ friend auto operator op (const any&, const any&) -> bool; \
391+
392+ DEFINE_COMPARISON_OPERATOR(==)
393+ DEFINE_COMPARISON_OPERATOR(!=)
394+ DEFINE_COMPARISON_OPERATOR(<)
395+ DEFINE_COMPARISON_OPERATOR(<=)
396+ DEFINE_COMPARISON_OPERATOR(>)
397+ DEFINE_COMPARISON_OPERATOR(>=)
398+
399+ DEFINE_OPERATOR(+)
400+ DEFINE_OPERATOR(-)
401+ DEFINE_OPERATOR(*)
402+ DEFINE_OPERATOR(/)
403+ DEFINE_OPERATOR(%)
404+
405+ inline friend auto operator+(const any& lhs, const char * rhs) -> string {
406+ return static_cast<const string&>(lhs) + rhs;
407+ }
408+ inline friend auto operator+(const char * lhs, const any& rhs) -> string {
409+ return lhs + static_cast<const string&>(rhs);
410+ }
411+
412+ friend auto operator-(const any&) -> any; // unary negate
413+
414+}; // class any
415+
416+namespace Private {
417+ template <typename T, typename U=void>
418+ struct TagHelper {};
419+
420+ template <>
421+ struct TagHelper<string> {
422+ static constexpr any::Tag tag = any::Tag::String;
423+ };
424+
425+ template <>
426+ struct TagHelper<const char *> {
427+ static constexpr any::Tag tag = any::Tag::String;
428+ };
429+
430+ template <size_t N>
431+ struct TagHelper<any::dict<N>> {
432+ static constexpr any::Tag tag = any::Tag::Dictionary;
433+ };
434+
435+ template <size_t N>
436+ struct TagHelper<any::data<N>> {
437+ static constexpr any::Tag tag = any::Tag::Data;
438+ };
439+
440+ template <>
441+ struct TagHelper<any::array> {
442+ static constexpr any::Tag tag = any::Tag::Array;
443+ };
444+
445+ template <>
446+ struct TagHelper<any::record> {
447+ static constexpr any::Tag tag = any::Tag::Record;
448+ };
449+
450+ template <typename T>
451+ struct TagHelper<T> {
452+ static constexpr any::Tag tag = any::Tag::Pointer;
453+ };
454+}
455+
456+// Pass-through
457+template <typename T>
458+constexpr auto cast(const T& a) -> const T& {
459+ return a;
460+}
461+
462+template <typename T>
463+inline auto cast(const any& a) ->
464+ typename std::enable_if<std::is_arithmetic<T>::value ||
465+ std::is_same<T,const char *>::value, T>::type {
466+ return a;
467+}
468+
469+template <typename T,
470+ typename = typename std::enable_if<std::is_class<T>::value>::type>
471+inline auto cast(const any& a) -> T& {
472+ return *static_cast<T*>(a.extractPointer(IF_DEBUG(Private::TagHelper<T>::tag)));
473+}
474+
475+template <typename T,
476+ typename = typename std::enable_if<std::is_pointer<T>::value &&
477+ !std::is_same<T,void*>::value &&
478+ !std::is_same<T,const char *>::value>::type>
479+inline auto cast(const any& a) -> T {
480+ return static_cast<T>(a.extractPointer(IF_DEBUG(Private::TagHelper<T>::tag)));
481+}
482+
483+template <typename T>
484+inline auto cast(const any& a) ->
485+ typename std::enable_if<std::is_same<void*, T>::value, T>::type {
486+ return a.rawPointer();
487+}
488+
489+namespace dict {
490+ template <size_t N, typename T>
491+ inline auto get(const T& a) ->
492+ typename std::enable_if<!std::is_same<any, T>::value, const any&>::type {
493+ return a[N].second;
494+ }
495+
496+ template <size_t N>
497+ inline auto get(const any& a) -> const any& {
498+ return cast<any::dict<N+1>>(a)[N].second;
499+ }
500+
501+ template <size_t N>
502+ inline auto get(const Private::Symbol key, const any::dict<N>& a) -> const any& {
503+ static_assert(N > 0, "dict size must be greater than zero");
504+ typename std::remove_reference<decltype(a)>::type::size_type i = 0;
505+ do {
506+ if (a[i].first == key) {
507+ return a[i].second;
508+ }
509+ } while (a[++i].first != nullptr);
510+ assert(false && "dict key not found");
511+ static const any invalid_key(nullptr);
512+ return invalid_key;
513+ }
514+
515+ inline auto get(const Private::Symbol key, const any& a) -> const any& {
516+ return get(key, cast<any::dict<unknown_size>>(a));
517+ }
518+
519+ #define P(N) any::dict_pair&& arg ## N
520+ #define T(N) any::dict<N+1>
521+ #define E(N) std::forward<decltype(arg ## N)>(arg ## N)
522+ #define M(...) {{ __VA_ARGS__, { nullptr, nullptr } }}
523+
524+ inline auto make(P(1)) -> T(1) {
525+ return T(1) M(E(1));
526+ }
527+ inline auto make(P(1), P(2)) -> T(2) {
528+ return T(2) M(E(1), E(2));
529+ }
530+ inline auto make(P(1), P(2), P(3)) -> T(3) {
531+ return T(3) M(E(1), E(2), E(3));
532+ }
533+ inline auto make(P(1), P(2), P(3), P(4)) -> T(4) {
534+ return T(4) M(E(1), E(2), E(3), E(4));
535+ }
536+ inline auto make(P(1), P(2), P(3), P(4), P(5)) -> T(5) {
537+ return T(5) M(E(1), E(2), E(3), E(4), E(5));
538+ }
539+ inline auto make(P(1), P(2), P(3), P(4), P(5), P(6)) -> T(6) {
540+ return T(6) M(E(1), E(2), E(3), E(4), E(5), E(6));
541+ }
542+ inline auto make(P(1), P(2), P(3), P(4), P(5), P(6), P(7)) -> T(7) {
543+ return T(7) M(E(1), E(2), E(3), E(4), E(5), E(6), E(7));
544+ }
545+ inline auto make(P(1), P(2), P(3), P(4), P(5), P(6), P(7), P(8)) -> T(8) {
546+ return T(8) M(E(1), E(2), E(3), E(4), E(5), E(6), E(7), E(8));
547+ }
548+
549+ #undef P
550+ #undef T
551+ #undef E
552+ #undef M
553+}
554+
555+namespace data {
556+ template <size_t N, typename T>
557+ inline auto get(const T& a) ->
558+ typename std::enable_if<!std::is_same<any, T>::value, const any&>::type {
559+ return a[N];
560+ }
561+
562+ template <size_t N>
563+ inline auto get(const any& a) -> const any& {
564+ return cast<any::data<N+1>>(a)[N];
565+ }
566+
567+ template <typename T>
568+ inline auto ctor(const T& a) -> int {
569+ return get<0>(a);
570+ }
571+}
572+
573+} // namespace PureScript
574+
575+#undef WITH_ALLOCATOR
576+#undef WITH_ALLOCATOR_PAIR
577+#undef IS_POINTER_TYPE
578+#undef DEFINE_OPERATOR
579+#undef DEFINE_COMPARISON_OPERATOR
580+
581+#endif // PureScript_HH
pcc/runtime/purescript_memory.hhnew file+61
@@ -0,0 +1,61 @@
1+///////////////////////////////////////////////////////////////////////////////
2+//
3+// Module : purescript_memory.hh
4+// Copyright : (c) Andy Arvanitis 2016
5+// License : MIT
6+//
7+// Maintainer : Andy Arvanitis <andy.arvanitis@gmail.com>
8+// Stability : experimental
9+// Portability :
10+//
11+// Includes and macros for garbage collection options
12+//
13+///////////////////////////////////////////////////////////////////////////////
14+//
15+#ifndef PureScript_MEMORY_HH
16+#define PureScript_MEMORY_HH
17+
18+#if defined(USE_GC)
19+ #define GC_THREADS
20+ #include <gc/gc_cpp.h>
21+ #include <gc/gc_allocator.h>
22+ #define WITH_ALLOCATOR(T) , gc_allocator<T>
23+ #define WITH_ALLOCATOR_PAIR(T, U) , gc_allocator<std::pair<const T, U>>
24+ #define MANAGED_TYPE(T) T*
25+ #define MAKE_MANAGED(T) new (GC) T
26+ #define MAKE_MANAGED_FINALIZED(T) new (PointerFreeGC, [](void* p, void*){ static_cast<T*>(p)->~T(); }) T
27+ #define IS_POINTER_TYPE(T) std::is_pointer<T>
28+ #define POINTER_FROM_MEMBER(P) P
29+ #define INITIALIZE_GC() GC_INIT()
30+#else
31+ #include <memory>
32+ #define WITH_ALLOCATOR(_)
33+ #define WITH_ALLOCATOR_PAIR(...)
34+ #define MANAGED_TYPE(T) std::shared_ptr<T>
35+ #define MAKE_MANAGED(T) std::make_shared<T>
36+ #define MAKE_MANAGED_FINALIZED(T) MAKE_MANAGED(T)
37+ #define IS_POINTER_TYPE(T) std::is_assignable<managed<void>,T>
38+ #define POINTER_FROM_MEMBER(P) P.get()
39+ #define INITIALIZE_GC()
40+#endif
41+
42+namespace PureScript {
43+ template <typename T>
44+ using managed = MANAGED_TYPE(T);
45+
46+ template <typename T, typename... Args>
47+ inline static auto make_managed(Args&&... args) -> MANAGED_TYPE(T) {
48+ return MAKE_MANAGED(T)(std::forward<Args>(args)...);
49+ }
50+
51+ template <typename T, typename... Args>
52+ inline static auto make_managed_and_finalized(Args&&... args) -> MANAGED_TYPE(T) {
53+ return MAKE_MANAGED_FINALIZED(T)(std::forward<Args>(args)...);
54+ }
55+}
56+
57+#undef MANAGED_TYPE
58+#undef MAKE_MANAGED
59+#undef MAKE_MANAGED_FINALIZED
60+
61+#endif // PureScript_MEMORY_HH
pcc/support/Makefilenew file+91
@@ -0,0 +1,91 @@
1+# PureScript to native binary (via C++) Makefile
2+#
3+# Run 'make' or 'make release' to build an optimized release build
4+# Run 'make debug' to build a non-optimized build suitable for debugging
5+#
6+# You can also perform a parallel build with 'make -jN', where N is the
7+# number of cores to use.
8+#
9+# PCC, SRC, OUTPUT, and BIN can all be overridden with the
10+# command itself. For example: 'make BIN=myutil'
11+#
12+# Flags can be added to either the codegen or native build phases.
13+# For example: 'make PCCFLAGS=--no-tco CXXFLAGS=-DDEBUG LDFLAGS=lobjc'
14+#
15+# You can also edit the generated version of this file directly.
16+#
17+PCC := {{path}}/pcc
18+SRC := src
19+OUTPUT := output
20+BIN := main
21+
22+override PCCFLAGS += --comments
23+override CXXFLAGS += -std=c++11 -Wno-logical-op-parentheses -Wno-missing-braces -Wmissing-field-initializers
24+override LDFLAGS +=
25+
26+ifeq ($(GC),yes)
27+ override CXXFLAGS += -DUSE_GC
28+ override LDFLAGS += -lgc
29+endif
30+
31+DEBUG := "-DDEBUG -g"
32+RELEASE := "-O3 -flto"
33+
34+INCLUDES := -I $(OUTPUT)
35+BIN_DIR := $(OUTPUT)/bin
36+
37+PSC_PKG_BIN := psc-package
38+PSC_PACKAGE := {{path}}/$(PSC_PKG_BIN)
39+
40+ifeq ("$(wildcard $(PSC_PACKAGE))","")
41+ PSC_PACKAGE := $(PSC_PKG_BIN)
42+endif
43+
44+PACKAGE_SOURCES = $(subst \,/,$(shell $(PSC_PACKAGE) sources))
45+PURESCRIPT_PKGS := $(firstword $(subst /, ,$(PACKAGE_SOURCES)))
46+
47+## Not all environments support globstar (** dir pattern)
48+rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
49+
50+release: codegen
51+ @$(MAKE) $(BIN) CXXFLAGS+=$(RELEASE)
52+
53+debug: codegen
54+ @$(MAKE) $(BIN) CXXFLAGS+=$(DEBUG)
55+
56+codegen: PURESCRIPT_PKG_SRCS=$(foreach d,$(PACKAGE_SOURCES),$(call rwildcard,$(firstword $(subst *, ,$(d))),*.purs))
57+codegen: PURESCRIPT_SRCS=$(call rwildcard,$(SRC)/,*.purs)
58+#
59+codegen: $(PURESCRIPT_PKGS)
60+ @$(PCC) $(PCCFLAGS) --output $(OUTPUT) $(PURESCRIPT_PKG_SRCS) $(PURESCRIPT_SRCS)
61+
62+$(PURESCRIPT_PKGS):
63+ @echo "Getting packages using" $(PSC_PACKAGE) "..."
64+ @$(PSC_PACKAGE) update
65+
66+SRCS := $(call rwildcard,$(OUTPUT)/,*.cc)
67+
68+OBJS = $(SRCS:.cc=.o)
69+DEPS = $(SRCS:.cc=.d)
70+
71+$(BIN): $(OBJS)
72+ @echo "Linking" $(BIN_DIR)/$(BIN)
73+ @mkdir -p $(BIN_DIR)
74+ @$(CXX) $^ -o $(BIN_DIR)/$@ $(LDFLAGS)
75+
76+-include $(DEPS)
77+
78+%.o: %.cc
79+ @echo "Creating" $@
80+ @$(CXX) $(CXXFLAGS) $(INCLUDES) -MMD -MP -c $< -o $@
81+
82+.PHONY: all
83+all: release
84+
85+.PHONY: clean
86+clean:
87+ @-rm -rf $(OUTPUT)
88+
89+.PHONY: run
90+run:
91+ @$(BIN_DIR)/$(BIN) $(ARGS)
pcc/support/psc-package.jsonnew file+9
@@ -0,0 +1,9 @@
1+{
2+ "name": "Main",
3+ "set": "master",
4+ "source": "https://github.com/pure11/package-sets.git",
5+ "depends": [
6+ "console",
7+ "prelude"
8+ ]
9+}
pcc/support/psc-xcode.shnew file+53
@@ -0,0 +1,53 @@
1+# Xcode support script. Intended to be used with an "External Build System" target.
2+#
3+#!/bin/sh
4+
5+if [[ "$ACTION" == "clean" ]] ; then
6+ echo "Cleaning all PureScript products..."
7+ make clean
8+
9+else
10+ echo "CONFIGURATION =" "$CONFIGURATION"
11+ echo "ARCHITECTURES =" "$ARCHS"
12+
13+ IS_DEBUG="$PROJECT_TEMP_DIR/is_debug"
14+ IS_RELEASE="$PROJECT_TEMP_DIR/is_release"
15+
16+ if [[ "$CONFIGURATION" == "Debug" ]] ; then
17+ if [ ! -f "$IS_DEBUG" ] ; then
18+ make clean
19+ touch "$IS_DEBUG"
20+ fi
21+ rm "$IS_RELEASE" > /dev/null 2>&1 || true
22+ OBJECT_TYPE=debug
23+ else
24+ if [ ! -f "$IS_RELEASE" ] ; then
25+ make clean
26+ touch "$IS_RELEASE"
27+ fi
28+ rm "$IS_DEBUG" > /dev/null 2>&1 || true
29+ OBJECT_TYPE=release
30+ fi
31+
32+ ## Create compiler switches for architectures
33+ #
34+ for arch_ in $ARCHS ; do
35+ ARCH_OPTS+="-arch $arch_ "
36+ if ! file output/bin/purescript.o | grep -q $arch_; then
37+ make clean
38+ fi
39+ # TODO: make this more future-proof
40+ # Note: -flto optimization causes problems with the source-level
41+ # debugger. Disable bitcode temporarily if necessary.
42+ if [[ $ENABLE_BITCODE == YES && $arch == arm64 ]] ; then
43+ FLTO="-flto"
44+ fi
45+ done
46+
47+ make $OBJECT_TYPE \
48+ PCCFLAGS=--brief-errors \
49+ CXXFLAGS="$ARCH_OPTS $FLTO -isysroot $SDKROOT" \
50+ LDFLAGS="-r -nostdlib $ARCH_OPTS" \
51+ BIN=purescript.o \
52+ -j`sysctl -n hw.ncpu`
53+fi
psc-bundle/Main.hsnew file+147
@@ -0,0 +1,147 @@
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.mdnew file+18
@@ -0,0 +1,18 @@
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.hsnew file+13
@@ -0,0 +1,13 @@
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.hsnew file+13
@@ -0,0 +1,13 @@
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.hsnew file+253
@@ -0,0 +1,253 @@
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.parseFilesInPackages input []
64+ >>= uncurry 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.hsnew file+21
@@ -0,0 +1,21 @@
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.hsnew file+50
@@ -0,0 +1,50 @@
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+ hSetEncoding stdin utf8
39+ hSetEncoding stdout utf8
40+ h <-
41+ connectTo "127.0.0.1" port `catch`
42+ (\(SomeException e) ->
43+ putStrLn
44+ ("Couldn't connect to psc-ide-server on port: " ++
45+ show port ++ " Error: " ++ show e) >>
46+ exitFailure)
47+ T.hPutStrLn h =<< T.getLine
48+ BS8.putStrLn =<< BS8.hGetLine h
49+ hFlush stdout
50+ hClose h
psc-ide-server/Main.hsnew file+187
@@ -0,0 +1,187 @@
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 GHC.IO.Exception (IOErrorType(..), IOException(..))
33+import Language.PureScript.Ide
34+import Language.PureScript.Ide.Command
35+import Language.PureScript.Ide.Util
36+import Language.PureScript.Ide.Error
37+import Language.PureScript.Ide.Types
38+import Language.PureScript.Ide.Watcher
39+import Network hiding (socketPort, accept)
40+import Network.BSD (getProtocolNumber)
41+import Network.Socket hiding (PortNumber, Type,
42+ sClose)
43+import Options.Applicative (ParseError (..))
44+import qualified Options.Applicative as Opts
45+import System.Directory
46+import System.Info as SysInfo
47+import System.FilePath
48+import System.IO hiding (putStrLn, print)
49+import System.IO.Error (isEOFError)
50+import qualified Paths_purescript as Paths
51+
52+listenOnLocalhost :: PortNumber -> IO Socket
53+listenOnLocalhost port = do
54+ proto <- getProtocolNumber "tcp"
55+ localhost <- inet_addr "127.0.0.1"
56+ bracketOnError
57+ (socket AF_INET Stream proto)
58+ sClose
59+ (\sock -> do
60+ setSocketOption sock ReuseAddr 1
61+ bind sock (SockAddrInet port localhost)
62+ listen sock maxListenQueue
63+ pure sock)
64+
65+data Options = Options
66+ { optionsDirectory :: Maybe FilePath
67+ , optionsGlobs :: [FilePath]
68+ , optionsOutputPath :: FilePath
69+ , optionsPort :: PortNumber
70+ , optionsNoWatch :: Bool
71+ , optionsPolling :: Bool
72+ , optionsDebug :: Bool
73+ , optionsLoglevel :: IdeLogLevel
74+ } deriving (Show)
75+
76+main :: IO ()
77+main = do
78+ opts'@(Options dir globs outputPath port noWatch polling debug logLevel) <- Opts.execParser opts
79+ when debug (putText "Parsed Options:" *> print opts')
80+ maybe (pure ()) setCurrentDirectory dir
81+ ideState <- newTVarIO emptyIdeState
82+ cwd <- getCurrentDirectory
83+ let fullOutputPath = cwd </> outputPath
84+
85+ unlessM (doesDirectoryExist fullOutputPath) $ do
86+ putStrLn ("Your output directory didn't exist. I'll create it at: " <> fullOutputPath)
87+ createDirectory fullOutputPath
88+ putText "This usually means you didn't compile your project yet."
89+ putText "psc-ide needs you to compile your project (for example by running pulp build)"
90+
91+ unless noWatch $
92+ void (forkFinally (watcher polling ideState fullOutputPath) print)
93+ -- TODO: deprecate and get rid of `debug`
94+ let conf = Configuration {confLogLevel = if debug then LogDebug else logLevel, confOutputPath = outputPath, confGlobs = globs}
95+ env = IdeEnvironment {ideStateVar = ideState, ideConfiguration = conf}
96+ startServer port env
97+ where
98+ parser =
99+ Options
100+ <$> optional (Opts.strOption (Opts.long "directory" `mappend` Opts.short 'd'))
101+ <*> many (Opts.argument Opts.str (Opts.metavar "Source GLOBS..."))
102+ <*> Opts.strOption (Opts.long "output-directory" `mappend` Opts.value "output/")
103+ <*> (fromIntegral <$>
104+ Opts.option Opts.auto (Opts.long "port" `mappend` Opts.short 'p' `mappend` Opts.value (4242 :: Integer)))
105+ <*> Opts.switch (Opts.long "no-watch")
106+ <*> flipIfWindows (Opts.switch (Opts.long "polling"))
107+ <*> Opts.switch (Opts.long "debug")
108+ <*> (parseLogLevel <$> Opts.strOption
109+ (Opts.long "log-level"
110+ `mappend` Opts.value ""
111+ `mappend` Opts.help "One of \"debug\", \"perf\", \"all\" or \"none\""))
112+ opts = Opts.info (version <*> Opts.helper <*> parser) mempty
113+ parseLogLevel s = case s of
114+ "debug" -> LogDebug
115+ "perf" -> LogPerf
116+ "all" -> LogAll
117+ "none" -> LogNone
118+ _ -> LogDefault
119+ version = Opts.abortOption
120+ (InfoMsg (showVersion Paths.version))
121+ (Opts.long "version" `mappend` Opts.help "Show the version number")
122+
123+ -- polling is the default on Windows and the flag turns it off. See
124+ -- #2209 and #2414 for explanations
125+ flipIfWindows = map (if SysInfo.os == "mingw32" then not else identity)
126+
127+startServer :: PortNumber -> IdeEnvironment -> IO ()
128+startServer port env = withSocketsDo $ do
129+ sock <- listenOnLocalhost port
130+ runLogger (confLogLevel (ideConfiguration env)) (runReaderT (forever (loop sock)) env)
131+ where
132+ loop :: (Ide m, MonadLogger m) => Socket -> m ()
133+ loop sock = do
134+ accepted <- runExceptT (acceptCommand sock)
135+ case accepted of
136+ Left err -> $(logError) err
137+ Right (cmd, h) -> do
138+ case decodeT cmd of
139+ Just cmd' -> do
140+ let message duration =
141+ "Command " <> commandName cmd'
142+ <> " took "
143+ <> displayTimeSpec duration
144+ result <- logPerf message (runExceptT (handleCommand cmd'))
145+ -- $(logDebug) ("Answer was: " <> T.pack (show result))
146+ liftIO (hFlush stdout)
147+ case result of
148+ Right r -> liftIO $ catchGoneHandle (BS8.hPutStrLn h (Aeson.encode r))
149+ Left err -> liftIO $ catchGoneHandle (BS8.hPutStrLn h (Aeson.encode err))
150+ Nothing -> do
151+ $(logError) ("Parsing the command failed. Command: " <> cmd)
152+ liftIO $ do
153+ catchGoneHandle (T.hPutStrLn h (encodeT (GeneralError "Error parsing Command.")))
154+ hFlush stdout
155+ liftIO $ catchGoneHandle (hClose h)
156+
157+catchGoneHandle :: IO () -> IO ()
158+catchGoneHandle =
159+ handle (\e -> case e of
160+ IOError { ioe_type = ResourceVanished } ->
161+ putText ("[Error] psc-ide-server tried interact with the handle, but the connection was already gone.")
162+ _ -> throwIO e)
163+
164+acceptCommand :: (MonadIO m, MonadLogger m, MonadError Text m)
165+ => Socket -> m (Text, Handle)
166+acceptCommand sock = do
167+ h <- acceptConnection
168+ $(logDebug) "Accepted a connection"
169+ cmd' <- liftIO (catchJust
170+ -- this means that the connection was
171+ -- terminated without receiving any input
172+ (\e -> if isEOFError e then Just () else Nothing)
173+ (Just <$> T.hGetLine h)
174+ (const (pure Nothing)))
175+ case cmd' of
176+ Nothing -> throwError "Connection was closed before any input arrived"
177+ Just cmd -> do
178+ $(logDebug) ("Received command: " <> cmd)
179+ pure (cmd, h)
180+ where
181+ acceptConnection = liftIO $ do
182+ -- Use low level accept to prevent accidental reverse name resolution
183+ (s,_) <- accept sock
184+ h <- socketToHandle s ReadWriteMode
185+ hSetEncoding h utf8
186+ hSetBuffering h LineBuffering
187+ pure h
psc-ide-server/PROTOCOL.mdnew file+568
@@ -0,0 +1,568 @@
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.mdnew file+47
@@ -0,0 +1,47 @@
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.hsnew file+423
@@ -0,0 +1,423 @@
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 Control.Foldl as Foldl
11+import qualified Data.Aeson as Aeson
12+import Data.Aeson.Encode.Pretty
13+import Data.Foldable (fold, for_, traverse_)
14+import Data.List (nub)
15+import qualified Data.Map as Map
16+import Data.Maybe (fromMaybe, mapMaybe)
17+import qualified Data.Set as Set
18+import Data.Text (pack)
19+import qualified Data.Text as T
20+import Data.Text.Encoding (encodeUtf8)
21+import qualified Data.Text.Lazy as TL
22+import qualified Data.Text.Lazy.Builder as TB
23+import qualified Data.Text.Read as TR
24+import Data.Traversable (for)
25+import Data.Version (showVersion)
26+import qualified Filesystem.Path.CurrentOS as Path
27+import GHC.Generics (Generic)
28+import qualified Options.Applicative as Opts
29+import qualified Paths_purescript as Paths
30+import qualified System.IO as IO
31+import Turtle hiding (echo, fold, s, x)
32+import qualified Turtle
33+
34+echoT :: Text -> IO ()
35+echoT = Turtle.printf (Turtle.s % "\n")
36+
37+packageFile :: Path.FilePath
38+packageFile = "psc-package.json"
39+
40+data PackageConfig = PackageConfig
41+ { name :: Text
42+ , depends :: [Text]
43+ , set :: Text
44+ , source :: Text
45+ } deriving (Show, Generic, Aeson.FromJSON, Aeson.ToJSON)
46+
47+pathToTextUnsafe :: Turtle.FilePath -> Text
48+pathToTextUnsafe = either (error "Path.toText failed") id . Path.toText
49+
50+defaultPackage :: Text -> PackageConfig
51+defaultPackage pkgName =
52+ PackageConfig { name = pkgName
53+ , depends = [ "prelude" ]
54+ , set = "psc-" <> pack (showVersion Paths.version)
55+ , source = "https://github.com/purescript/package-sets.git"
56+ }
57+
58+readPackageFile :: IO PackageConfig
59+readPackageFile = do
60+ exists <- testfile packageFile
61+ unless exists $ do
62+ echoT "psc-package.json does not exist"
63+ exit (ExitFailure 1)
64+ mpkg <- Aeson.decodeStrict . encodeUtf8 <$> readTextFile packageFile
65+ case mpkg of
66+ Nothing -> do
67+ echoT "Unable to parse psc-package.json"
68+ exit (ExitFailure 1)
69+ Just pkg -> return pkg
70+
71+packageConfigToJSON :: PackageConfig -> Text
72+packageConfigToJSON =
73+ TL.toStrict
74+ . TB.toLazyText
75+ . encodePrettyToTextBuilder' config
76+ where
77+ config = defConfig
78+ { confCompare =
79+ keyOrder [ "name"
80+ , "set"
81+ , "source"
82+ , "depends"
83+ ]
84+ }
85+
86+packageSetToJSON :: PackageSet -> Text
87+packageSetToJSON =
88+ TL.toStrict
89+ . TB.toLazyText
90+ . encodePrettyToTextBuilder' config
91+ where
92+ config = defConfig { confCompare = compare }
93+
94+writePackageFile :: PackageConfig -> IO ()
95+writePackageFile =
96+ writeTextFile packageFile
97+ . packageConfigToJSON
98+
99+data PackageInfo = PackageInfo
100+ { repo :: Text
101+ , version :: Text
102+ , dependencies :: [Text]
103+ } deriving (Show, Eq, Generic, Aeson.FromJSON, Aeson.ToJSON)
104+
105+type PackageSet = Map.Map Text PackageInfo
106+
107+cloneShallow
108+ :: Text
109+ -- ^ repo
110+ -> Text
111+ -- ^ branch/tag
112+ -> Turtle.FilePath
113+ -- ^ target directory
114+ -> IO ExitCode
115+cloneShallow from ref into =
116+ proc "git"
117+ [ "clone"
118+ , "-q"
119+ , "-c", "advice.detachedHead=false"
120+ , "--depth", "1"
121+ , "-b", ref
122+ , from
123+ , pathToTextUnsafe into
124+ ] empty .||. exit (ExitFailure 1)
125+
126+listRemoteTags
127+ :: Text
128+ -- ^ repo
129+ -> Turtle.Shell Text
130+listRemoteTags from = let gitProc = inproc "git"
131+ [ "ls-remote"
132+ , "-q"
133+ , "-t"
134+ , from
135+ ] empty
136+ in lineToText <$> gitProc
137+
138+getPackageSet :: PackageConfig -> IO ()
139+getPackageSet PackageConfig{ source, set } = do
140+ let pkgDir = ".psc-package" </> fromText set </> ".set"
141+ exists <- testdir pkgDir
142+ unless exists . void $ cloneShallow source set pkgDir
143+
144+readPackageSet :: PackageConfig -> IO PackageSet
145+readPackageSet PackageConfig{ set } = do
146+ let dbFile = ".psc-package" </> fromText set </> ".set" </> "packages.json"
147+ exists <- testfile dbFile
148+ unless exists $ do
149+ echoT $ format (fp%" does not exist") dbFile
150+ exit (ExitFailure 1)
151+ mdb <- Aeson.decodeStrict . encodeUtf8 <$> readTextFile dbFile
152+ case mdb of
153+ Nothing -> do
154+ echoT "Unable to parse packages.json"
155+ exit (ExitFailure 1)
156+ Just db -> return db
157+
158+writePackageSet :: PackageConfig -> PackageSet -> IO ()
159+writePackageSet PackageConfig{ set } =
160+ let dbFile = ".psc-package" </> fromText set </> ".set" </> "packages.json"
161+ in writeTextFile dbFile . packageSetToJSON
162+
163+installOrUpdate :: Text -> Text -> PackageInfo -> IO Turtle.FilePath
164+installOrUpdate set pkgName PackageInfo{ repo, version } = do
165+ echoT ("Updating " <> pkgName)
166+ let pkgDir = ".psc-package" </> fromText set </> fromText pkgName </> fromText version
167+ exists <- testdir pkgDir
168+ unless exists . void $ cloneShallow repo version pkgDir
169+ pure pkgDir
170+
171+getTransitiveDeps :: PackageSet -> [Text] -> IO [(Text, PackageInfo)]
172+getTransitiveDeps db depends = do
173+ pkgs <- for depends $ \pkg ->
174+ case Map.lookup pkg db of
175+ Nothing -> do
176+ echoT ("Package " <> pkg <> " does not exist in package set")
177+ exit (ExitFailure 1)
178+ Just PackageInfo{ dependencies } -> return (pkg : dependencies)
179+ let unique = Set.toList (foldMap Set.fromList pkgs)
180+ return (mapMaybe (\name -> fmap (name, ) (Map.lookup name db)) unique)
181+
182+updateImpl :: PackageConfig -> IO ()
183+updateImpl config@PackageConfig{ depends } = do
184+ getPackageSet config
185+ db <- readPackageSet config
186+ trans <- getTransitiveDeps db depends
187+ echoT ("Updating " <> pack (show (length trans)) <> " packages...")
188+ for_ trans $ \(pkgName, pkg) -> installOrUpdate (set config) pkgName pkg
189+
190+initialize :: IO ()
191+initialize = do
192+ exists <- testfile "psc-package.json"
193+ when exists $ do
194+ echoT "psc-package.json already exists"
195+ exit (ExitFailure 1)
196+ echoT "Initializing new project in current directory"
197+ pkgName <- pathToTextUnsafe . Path.filename <$> pwd
198+ let pkg = defaultPackage pkgName
199+ writePackageFile pkg
200+ updateImpl pkg
201+
202+update :: IO ()
203+update = do
204+ pkg <- readPackageFile
205+ updateImpl pkg
206+ echoT "Update complete"
207+
208+install :: String -> IO ()
209+install pkgName = do
210+ pkg <- readPackageFile
211+ let pkg' = pkg { depends = nub (pack pkgName : depends pkg) }
212+ updateImpl pkg'
213+ writePackageFile pkg'
214+ echoT "psc-package.json file was updated"
215+
216+uninstall :: String -> IO ()
217+uninstall pkgName = do
218+ pkg <- readPackageFile
219+ let pkg' = pkg { depends = filter (/= pack pkgName) $ depends pkg }
220+ updateImpl pkg'
221+ writePackageFile pkg'
222+ echoT "psc-package.json file was updated"
223+
224+listDependencies :: IO ()
225+listDependencies = do
226+ pkg@PackageConfig{ depends } <- readPackageFile
227+ db <- readPackageSet pkg
228+ trans <- getTransitiveDeps db depends
229+ traverse_ (echoT . fst) trans
230+
231+listPackages :: IO ()
232+listPackages = do
233+ pkg <- readPackageFile
234+ db <- readPackageSet pkg
235+ traverse_ echoT (fmt <$> Map.assocs db)
236+ where
237+ fmt :: (Text, PackageInfo) -> Text
238+ fmt (name, PackageInfo{ version }) = name <> " (" <> version <> ")"
239+
240+getSourcePaths :: PackageConfig -> PackageSet -> [Text] -> IO [Turtle.FilePath]
241+getSourcePaths PackageConfig{..} db pkgNames = do
242+ trans <- getTransitiveDeps db pkgNames
243+ let paths = [ ".psc-package"
244+ </> fromText set
245+ </> fromText pkgName
246+ </> fromText version
247+ </> "src" </> "**" </> "*.purs"
248+ | (pkgName, PackageInfo{ version }) <- trans
249+ ]
250+ return paths
251+
252+listSourcePaths :: IO ()
253+listSourcePaths = do
254+ pkg@PackageConfig{ depends } <- readPackageFile
255+ db <- readPackageSet pkg
256+ paths <- getSourcePaths pkg db depends
257+ traverse_ (echoT . pathToTextUnsafe) paths
258+
259+exec :: Text -> IO ()
260+exec exeName = do
261+ pkg@PackageConfig{..} <- readPackageFile
262+ db <- readPackageSet pkg
263+ paths <- getSourcePaths pkg db depends
264+ procs exeName
265+ (map pathToTextUnsafe ("src" </> "**" </> "*.purs" : paths))
266+ empty
267+
268+checkForUpdates :: Bool -> Bool -> IO ()
269+checkForUpdates applyMinorUpdates applyMajorUpdates = do
270+ pkg <- readPackageFile
271+ db <- readPackageSet pkg
272+
273+ echoT ("Checking " <> pack (show (Map.size db)) <> " packages for updates.")
274+ echoT "Warning: this could take some time!"
275+
276+ newDb <- Map.fromList <$> (for (Map.toList db) $ \(name, p@PackageInfo{ repo, version }) -> do
277+ echoT ("Checking package " <> name)
278+ tagLines <- Turtle.fold (listRemoteTags repo) Foldl.list
279+ let tags = mapMaybe parseTag tagLines
280+ newVersion <- case parseVersion version of
281+ Just parts ->
282+ let applyMinor =
283+ case filter (isMinorReleaseFrom parts) tags of
284+ [] -> pure version
285+ minorReleases -> do
286+ echoT ("New minor release available")
287+ case applyMinorUpdates of
288+ True -> do
289+ let latestMinorRelease = maximum minorReleases
290+ pure ("v" <> T.intercalate "." (map (pack . show) latestMinorRelease))
291+ False -> pure version
292+ applyMajor =
293+ case filter (isMajorReleaseFrom parts) tags of
294+ [] -> applyMinor
295+ newReleases -> do
296+ echoT ("New major release available")
297+ case applyMajorUpdates of
298+ True -> do
299+ let latestRelease = maximum newReleases
300+ pure ("v" <> T.intercalate "." (map (pack . show) latestRelease))
301+ False -> applyMinor
302+ in applyMajor
303+ _ -> do
304+ echoT "Unable to parse version string"
305+ pure version
306+ pure (name, p { version = newVersion }))
307+
308+ when (applyMinorUpdates || applyMajorUpdates)
309+ (writePackageSet pkg newDb)
310+ where
311+ parseTag :: Text -> Maybe [Int]
312+ parseTag line =
313+ case T.splitOn "\t" line of
314+ [_sha, ref] ->
315+ case T.stripPrefix "refs/tags/" ref of
316+ Just tag ->
317+ case parseVersion tag of
318+ Just parts -> pure parts
319+ _ -> Nothing
320+ _ -> Nothing
321+ _ -> Nothing
322+
323+ parseVersion :: Text -> Maybe [Int]
324+ parseVersion ref =
325+ case T.stripPrefix "v" ref of
326+ Just tag ->
327+ traverse parseDecimal (T.splitOn "." tag)
328+ _ -> Nothing
329+
330+ parseDecimal :: Text -> Maybe Int
331+ parseDecimal s =
332+ case TR.decimal s of
333+ Right (n, "") -> Just n
334+ _ -> Nothing
335+
336+ isMajorReleaseFrom :: [Int] -> [Int] -> Bool
337+ isMajorReleaseFrom (0 : xs) (0 : ys) = isMajorReleaseFrom xs ys
338+ isMajorReleaseFrom (x : _) (y : _) = y > x
339+ isMajorReleaseFrom _ _ = False
340+
341+ isMinorReleaseFrom :: [Int] -> [Int] -> Bool
342+ isMinorReleaseFrom (0 : xs) (0 : ys) = isMinorReleaseFrom xs ys
343+ isMinorReleaseFrom (x : xs) (y : ys) = y == x && ys > xs
344+ isMinorReleaseFrom _ _ = False
345+
346+verifyPackageSet :: IO ()
347+verifyPackageSet = do
348+ pkg <- readPackageFile
349+ db <- readPackageSet pkg
350+
351+ echoT ("Verifying " <> pack (show (Map.size db)) <> " packages.")
352+ echoT "Warning: this could take some time!"
353+
354+ let installOrUpdate' (name, pkgInfo) = (name, ) <$> installOrUpdate (set pkg) name pkgInfo
355+ paths <- Map.fromList <$> traverse installOrUpdate' (Map.toList db)
356+
357+ for_ (Map.toList db) $ \(name, PackageInfo{..}) -> do
358+ let dirFor = fromMaybe (error "verifyPackageSet: no directory") . (`Map.lookup` paths)
359+ echoT ("Verifying package " <> name)
360+ let srcGlobs = map (pathToTextUnsafe . (</> ("src" </> "**" </> "*.purs")) . dirFor) (name : dependencies)
361+ procs "psc" srcGlobs empty
362+
363+main :: IO ()
364+main = do
365+ IO.hSetEncoding IO.stdout IO.utf8
366+ IO.hSetEncoding IO.stderr IO.utf8
367+ cmd <- Opts.execParser opts
368+ cmd
369+ where
370+ opts = Opts.info (versionInfo <*> Opts.helper <*> commands) infoModList
371+ infoModList = Opts.fullDesc <> headerInfo <> footerInfo
372+ headerInfo = Opts.progDesc "Manage package dependencies"
373+ footerInfo = Opts.footer $ "psc-package " ++ showVersion Paths.version
374+
375+ versionInfo :: Parser (a -> a)
376+ versionInfo = Opts.abortOption (Opts.InfoMsg (showVersion Paths.version)) $
377+ Opts.long "version" <> Opts.help "Show the version number" <> Opts.hidden
378+
379+ commands :: Parser (IO ())
380+ commands = (Opts.subparser . fold)
381+ [ Opts.command "init"
382+ (Opts.info (pure initialize)
383+ (Opts.progDesc "Initialize a new package"))
384+ , Opts.command "update"
385+ (Opts.info (pure update)
386+ (Opts.progDesc "Update dependencies"))
387+ , Opts.command "uninstall"
388+ (Opts.info (uninstall <$> pkg)
389+ (Opts.progDesc "Uninstall the named package"))
390+ , Opts.command "install"
391+ (Opts.info (install <$> pkg)
392+ (Opts.progDesc "Install the named package"))
393+ , Opts.command "build"
394+ (Opts.info (pure (exec "psc"))
395+ (Opts.progDesc "Build the current package and dependencies"))
396+ , Opts.command "dependencies"
397+ (Opts.info (pure listDependencies)
398+ (Opts.progDesc "List all (transitive) dependencies for the current package"))
399+ , Opts.command "sources"
400+ (Opts.info (pure listSourcePaths)
401+ (Opts.progDesc "List all (active) source paths for dependencies"))
402+ , Opts.command "available"
403+ (Opts.info (pure listPackages)
404+ (Opts.progDesc "List all packages available in the package set"))
405+ , Opts.command "updates"
406+ (Opts.info (checkForUpdates <$> apply <*> applyMajor)
407+ (Opts.progDesc "Check all packages in the package set for new releases"))
408+ , Opts.command "verify-set"
409+ (Opts.info (pure verifyPackageSet)
410+ (Opts.progDesc "Verify that the packages in the package set build correctly"))
411+ ]
412+ where
413+ pkg = Opts.strArgument $
414+ Opts.metavar "PACKAGE"
415+ <> Opts.help "The name of the package to install"
416+
417+ apply = Opts.switch $
418+ Opts.long "apply"
419+ <> Opts.help "Apply all minor package updates"
420+
421+ applyMajor = Opts.switch $
422+ Opts.long "apply-breaking"
423+ <> Opts.help "Apply all major package updates"
psc-package/README.mdnew file+99
@@ -0,0 +1,99 @@
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.hsnew file+57
@@ -0,0 +1,57 @@
1+{-# LANGUAGE OverloadedStrings #-}
2+
3+module Main where
4+
5+import Control.Monad.IO.Class (liftIO)
6+import Data.Version (Version(..), showVersion)
7+import qualified Data.Aeson as A
8+import qualified Data.ByteString.Lazy.Char8 as BL
9+import Data.Monoid ((<>))
10+import Data.Time.Clock (getCurrentTime)
11+
12+import Options.Applicative (Parser, ParseError (..))
13+import qualified Options.Applicative as Opts
14+
15+import System.IO (hSetEncoding, stderr, stdout, utf8)
16+
17+import qualified Paths_purescript as Paths
18+import Language.PureScript.Publish
19+import Language.PureScript.Publish.ErrorsWarnings
20+
21+dryRun :: Parser Bool
22+dryRun = Opts.switch $
23+ Opts.long "dry-run"
24+ <> Opts.help "Produce no output, and don't require a tagged version to be checked out."
25+
26+dryRunOptions :: PublishOptions
27+dryRunOptions = defaultPublishOptions
28+ { publishGetVersion = return dummyVersion
29+ , publishWorkingTreeDirty = warn DirtyWorkingTree_Warn
30+ , publishGetTagTime = const (liftIO getCurrentTime)
31+ }
32+ where dummyVersion = ("0.0.0", Version [0,0,0] [])
33+
34+main :: IO ()
35+main = do
36+ hSetEncoding stdout utf8
37+ hSetEncoding stderr utf8
38+ Opts.execParser opts >>= publish
39+ where
40+ opts = Opts.info (version <*> Opts.helper <*> dryRun) infoModList
41+ infoModList = Opts.fullDesc <> headerInfo <> footerInfo
42+ headerInfo = Opts.header "psc-publish - Generates documentation packages for upload to http://pursuit.purescript.org"
43+ footerInfo = Opts.footer $ "psc-publish " ++ showVersion Paths.version
44+
45+ version :: Parser (a -> a)
46+ version = Opts.abortOption (InfoMsg (showVersion Paths.version)) $
47+ Opts.long "version" <> Opts.help "Show the version number" <> Opts.hidden
48+
49+publish :: Bool -> IO ()
50+publish isDryRun =
51+ if isDryRun
52+ then do
53+ _ <- unsafePreparePackage dryRunOptions
54+ putStrLn "Dry run completed, no errors."
55+ else do
56+ pkg <- unsafePreparePackage defaultPublishOptions
57+ BL.putStrLn (A.encode pkg)
psc/Main.hsnew file+182
@@ -0,0 +1,182 @@
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.hsnew file+377
@@ -0,0 +1,377 @@
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.htmlnew file+10
@@ -0,0 +1,10 @@
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.jsnew file+63
@@ -0,0 +1,63 @@
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.cabaldeleted−145
@@ -1,145 +0,0 @@
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.cabalnew file+638
@@ -0,0 +1,638 @@
1+name: purescript
2+version: 0.10.7
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/NonOrphanInstanceMulti/*.purs
44+ , examples/passing/NonOrphanInstanceFunDepExtra/*.purs
45+ , examples/passing/OperatorAliasElsewhere/*.purs
46+ , examples/passing/Operators/*.purs
47+ , examples/passing/PendingConflictingImports/*.purs
48+ , examples/passing/PendingConflictingImports2/*.purs
49+ , examples/passing/QualifiedNames/*.purs
50+ , examples/passing/RedefinedFixity/*.purs
51+ , examples/passing/ReExportQualified/*.purs
52+ , examples/passing/ResolvableScopeConflict/*.purs
53+ , examples/passing/ResolvableScopeConflict2/*.purs
54+ , examples/passing/ResolvableScopeConflict3/*.purs
55+ , examples/passing/ShadowedModuleName/*.purs
56+ , examples/passing/SolvingIsSymbol/*.purs
57+ , examples/passing/StringEdgeCases/*.purs
58+ , examples/passing/TransitiveImport/*.purs
59+ , examples/passing/TypeOperators/*.purs
60+ , examples/passing/TypeWithoutParens/*.purs
61+ , examples/failing/*.purs
62+ , examples/failing/1733/*.purs
63+ , examples/failing/2378/*.purs
64+ , examples/failing/2379/*.purs
65+ , examples/failing/ConflictingExports/*.purs
66+ , examples/failing/ConflictingImports/*.purs
67+ , examples/failing/ConflictingImports2/*.purs
68+ , examples/failing/ConflictingQualifiedImports/*.purs
69+ , examples/failing/ConflictingQualifiedImports2/*.purs
70+ , examples/failing/DiffKindsSameName/*.purs
71+ , examples/failing/DuplicateModule/*.purs
72+ , examples/failing/ExportConflictClass/*.purs
73+ , examples/failing/ExportConflictCtor/*.purs
74+ , examples/failing/ExportConflictType/*.purs
75+ , examples/failing/ExportConflictTypeOp/*.purs
76+ , examples/failing/ExportConflictValue/*.purs
77+ , examples/failing/ExportConflictValueOp/*.purs
78+ , examples/failing/ExportExplicit1/*.purs
79+ , examples/failing/ExportExplicit3/*.purs
80+ , examples/failing/ImportExplicit/*.purs
81+ , examples/failing/ImportExplicit2/*.purs
82+ , examples/failing/ImportHidingModule/*.purs
83+ , examples/failing/ImportModule/*.purs
84+ , examples/failing/InstanceExport/*.purs
85+ , examples/failing/OrphanInstance/*.purs
86+ , examples/failing/OrphanInstanceFunDepCycle/*.purs
87+ , examples/failing/OrphanInstanceWithDetermined/*.purs
88+ , examples/failing/OrphanInstanceNullary/*.purs
89+ , examples/warning/*.purs
90+ , examples/warning/*.js
91+ , examples/warning/UnusedExplicitImportTypeOp/*.purs
92+ , examples/docs/bower_components/purescript-prelude/src/*.purs
93+ , examples/docs/bower.json
94+ , examples/docs/src/*.purs
95+ , psci/static/index.html
96+ , psci/static/index.js
97+ , tests/support/package.json
98+ , tests/support/bower.json
99+ , tests/support/setup-win.cmd
100+ , tests/support/psci/*.purs
101+ , tests/support/pscide/src/*.purs
102+ , tests/support/pscide/src/*.js
103+ , tests/support/pscide/src/*.fail
104+ , stack.yaml
105+ , README.md
106+ , INSTALL.md
107+ , CONTRIBUTORS.md
108+ , CONTRIBUTING.md
109+ , pcc/runtime/*.hh
110+ , pcc/runtime/*.cc
111+ , pcc/support/Makefile
112+ , pcc/support/*.json
113+ , pcc/support/*.sh
114+
115+source-repository head
116+ type: git
117+ location: https://github.com/purescript/purescript.git
118+
119+library
120+ build-depends: base >=4.8 && <5,
121+ aeson >= 0.8 && < 1.0,
122+ aeson-better-errors >= 0.8,
123+ ansi-terminal >= 0.6.2 && < 0.7,
124+ base-compat >=0.6.0,
125+ blaze-html >= 0.8.1 && < 0.9,
126+ bower-json >= 1.0.0.1 && < 1.1,
127+ boxes >= 0.1.4 && < 0.2.0,
128+ bytestring -any,
129+ cheapskate >= 0.1 && < 0.2,
130+ containers -any,
131+ clock -any,
132+ data-ordlist >= 0.4.7.0,
133+ deepseq -any,
134+ directory >= 1.2,
135+ dlist -any,
136+ edit-distance -any,
137+ filepath -any,
138+ fsnotify >= 0.2.1,
139+ Glob >= 0.7 && < 0.8,
140+ haskeline >= 0.7.0.0,
141+ http-client >= 0.4.30 && <0.5,
142+ http-types -any,
143+ language-javascript >= 0.6.0.9 && < 0.7,
144+ lens == 4.*,
145+ lifted-base >= 0.2.3 && < 0.2.4,
146+ monad-control >= 1.0.0.0 && < 1.1,
147+ monad-logger >= 0.3 && < 0.4,
148+ mtl >= 2.1.0 && < 2.3.0,
149+ parallel >= 3.2 && < 3.3,
150+ parsec >=3.1.10,
151+ pattern-arrows >= 0.0.2 && < 0.1,
152+ pipes >= 4.0.0 && < 4.3.0,
153+ pipes-http -any,
154+ process >= 1.2.0 && < 1.5,
155+ protolude >= 0.1.6,
156+ regex-tdfa -any,
157+ safe >= 0.3.9 && < 0.4,
158+ scientific >= 0.3.4.9 && < 0.4,
159+ semigroups >= 0.16.2 && < 0.19,
160+ sourcemap >= 0.1.6,
161+ spdx == 0.2.*,
162+ split -any,
163+ stm >= 0.2.4.0,
164+ syb -any,
165+ text -any,
166+ time -any,
167+ transformers >= 0.3.0 && < 0.6,
168+ transformers-base >= 0.4.0 && < 0.5,
169+ transformers-compat >= 0.3.0,
170+ unordered-containers -any,
171+ utf8-string >= 1 && < 2,
172+ vector -any
173+
174+ exposed-modules: Language.PureScript
175+ Language.PureScript.AST
176+ Language.PureScript.AST.Binders
177+ Language.PureScript.AST.Declarations
178+ Language.PureScript.AST.Operators
179+ Language.PureScript.AST.Literals
180+ Language.PureScript.AST.SourcePos
181+ Language.PureScript.AST.Traversals
182+ Language.PureScript.AST.Exported
183+ Language.PureScript.Bundle
184+ Language.PureScript.Crash
185+ Language.PureScript.Externs
186+ Language.PureScript.CodeGen
187+ Language.PureScript.CodeGen.JS
188+ Language.PureScript.CodeGen.JS.AST
189+ Language.PureScript.CodeGen.JS.Common
190+ Language.PureScript.CodeGen.JS.Optimizer
191+ Language.PureScript.CodeGen.JS.Optimizer.Blocks
192+ Language.PureScript.CodeGen.JS.Optimizer.Common
193+ Language.PureScript.CodeGen.JS.Optimizer.Inliner
194+ Language.PureScript.CodeGen.JS.Optimizer.MagicDo
195+ Language.PureScript.CodeGen.JS.Optimizer.TCO
196+ Language.PureScript.CodeGen.JS.Optimizer.Unused
197+
198+ Language.PureScript.CodeGen.Cpp
199+ Language.PureScript.CodeGen.Cpp.AST
200+ Language.PureScript.CodeGen.Cpp.Common
201+ Language.PureScript.CodeGen.Cpp.File
202+ Language.PureScript.CodeGen.Cpp.Optimizer
203+ Language.PureScript.CodeGen.Cpp.Optimizer.Blocks
204+ Language.PureScript.CodeGen.Cpp.Optimizer.Common
205+ Language.PureScript.CodeGen.Cpp.Optimizer.Inliner
206+ Language.PureScript.CodeGen.Cpp.Optimizer.MagicDo
207+ Language.PureScript.CodeGen.Cpp.Optimizer.TCO
208+ Language.PureScript.CodeGen.Cpp.Optimizer.Uncurry
209+ Language.PureScript.CodeGen.Cpp.Optimizer.Unused
210+ Language.PureScript.CodeGen.Cpp.Recursion
211+ Language.PureScript.CodeGen.Cpp.Types
212+ Language.PureScript.CodeGen.Cpp.Unicode
213+ Language.PureScript.Pretty.Cpp
214+
215+ Language.PureScript.Constants
216+ Language.PureScript.CoreFn
217+ Language.PureScript.CoreFn.Ann
218+ Language.PureScript.CoreFn.Binders
219+ Language.PureScript.CoreFn.Desugar
220+ Language.PureScript.CoreFn.Expr
221+ Language.PureScript.CoreFn.Meta
222+ Language.PureScript.CoreFn.Module
223+ Language.PureScript.CoreFn.Traversals
224+ Language.PureScript.CoreFn.ToJSON
225+ Language.PureScript.Comments
226+ Language.PureScript.Environment
227+ Language.PureScript.Errors
228+ Language.PureScript.Errors.JSON
229+ Language.PureScript.Kinds
230+ Language.PureScript.Label
231+ Language.PureScript.Linter
232+ Language.PureScript.Linter.Exhaustive
233+ Language.PureScript.Linter.Imports
234+ Language.PureScript.Make
235+ Language.PureScript.ModuleDependencies
236+ Language.PureScript.Names
237+ Language.PureScript.Options
238+ Language.PureScript.Parser
239+ Language.PureScript.Parser.Lexer
240+ Language.PureScript.Parser.Common
241+ Language.PureScript.Parser.Declarations
242+ Language.PureScript.Parser.Kinds
243+ Language.PureScript.Parser.State
244+ Language.PureScript.Parser.Types
245+ Language.PureScript.Pretty
246+ Language.PureScript.Pretty.Common
247+ Language.PureScript.Pretty.JS
248+ Language.PureScript.Pretty.Kinds
249+ Language.PureScript.Pretty.Types
250+ Language.PureScript.Pretty.Values
251+ Language.PureScript.PSString
252+ Language.PureScript.Renamer
253+ Language.PureScript.Sugar
254+ Language.PureScript.Sugar.BindingGroups
255+ Language.PureScript.Sugar.CaseDeclarations
256+ Language.PureScript.Sugar.DoNotation
257+ Language.PureScript.Sugar.Names
258+ Language.PureScript.Sugar.Names.Common
259+ Language.PureScript.Sugar.Names.Env
260+ Language.PureScript.Sugar.Names.Exports
261+ Language.PureScript.Sugar.Names.Imports
262+ Language.PureScript.Sugar.ObjectWildcards
263+ Language.PureScript.Sugar.Operators
264+ Language.PureScript.Sugar.Operators.Common
265+ Language.PureScript.Sugar.Operators.Expr
266+ Language.PureScript.Sugar.Operators.Binders
267+ Language.PureScript.Sugar.Operators.Types
268+ Language.PureScript.Sugar.TypeClasses
269+ Language.PureScript.Sugar.TypeClasses.Deriving
270+ Language.PureScript.Sugar.TypeDeclarations
271+ Language.PureScript.Traversals
272+ Language.PureScript.TypeChecker
273+ Language.PureScript.TypeChecker.Entailment
274+ Language.PureScript.TypeChecker.Kinds
275+ Language.PureScript.TypeChecker.Monad
276+ Language.PureScript.TypeChecker.Rows
277+ Language.PureScript.TypeChecker.Skolems
278+ Language.PureScript.TypeChecker.Subsumption
279+ Language.PureScript.TypeChecker.Synonyms
280+ Language.PureScript.TypeChecker.Types
281+ Language.PureScript.TypeChecker.TypeSearch
282+ Language.PureScript.TypeChecker.Unify
283+ Language.PureScript.TypeClassDictionaries
284+ Language.PureScript.Types
285+
286+ Language.PureScript.Docs
287+ Language.PureScript.Docs.Convert
288+ Language.PureScript.Docs.Convert.Single
289+ Language.PureScript.Docs.Convert.ReExports
290+ Language.PureScript.Docs.Prim
291+ Language.PureScript.Docs.Render
292+ Language.PureScript.Docs.Types
293+ Language.PureScript.Docs.RenderedCode
294+ Language.PureScript.Docs.RenderedCode.Types
295+ Language.PureScript.Docs.RenderedCode.RenderType
296+ Language.PureScript.Docs.RenderedCode.RenderKind
297+ Language.PureScript.Docs.AsMarkdown
298+ Language.PureScript.Docs.AsHtml
299+ Language.PureScript.Docs.ParseInPackage
300+ Language.PureScript.Docs.Utils.MonoidExtras
301+
302+ Language.PureScript.Publish
303+ Language.PureScript.Publish.Utils
304+ Language.PureScript.Publish.ErrorsWarnings
305+ Language.PureScript.Publish.BoxesHelpers
306+
307+ Language.PureScript.Ide
308+ Language.PureScript.Ide.CaseSplit
309+ Language.PureScript.Ide.Command
310+ Language.PureScript.Ide.Completion
311+ Language.PureScript.Ide.Externs
312+ Language.PureScript.Ide.Error
313+ Language.PureScript.Ide.Filter
314+ Language.PureScript.Ide.Imports
315+ Language.PureScript.Ide.Logging
316+ Language.PureScript.Ide.Matcher
317+ Language.PureScript.Ide.Pursuit
318+ Language.PureScript.Ide.Rebuild
319+ Language.PureScript.Ide.Reexports
320+ Language.PureScript.Ide.SourceFile
321+ Language.PureScript.Ide.State
322+ Language.PureScript.Ide.Types
323+ Language.PureScript.Ide.Util
324+ Language.PureScript.Ide.Watcher
325+
326+ Language.PureScript.Interactive
327+ Language.PureScript.Interactive.Types
328+ Language.PureScript.Interactive.Parser
329+ Language.PureScript.Interactive.Directive
330+ Language.PureScript.Interactive.Completion
331+ Language.PureScript.Interactive.IO
332+ Language.PureScript.Interactive.Message
333+ Language.PureScript.Interactive.Module
334+ Language.PureScript.Interactive.Printer
335+
336+ Control.Monad.Logger
337+ Control.Monad.Supply
338+ Control.Monad.Supply.Class
339+
340+ System.IO.UTF8
341+
342+ extensions: ConstraintKinds
343+ DataKinds
344+ DeriveFunctor
345+ EmptyDataDecls
346+ FlexibleContexts
347+ KindSignatures
348+ LambdaCase
349+ MultiParamTypeClasses
350+ NoImplicitPrelude
351+ PatternGuards
352+ PatternSynonyms
353+ RankNTypes
354+ RecordWildCards
355+ OverloadedStrings
356+ ScopedTypeVariables
357+ TupleSections
358+ ViewPatterns
359+ exposed: True
360+ buildable: True
361+ hs-source-dirs: src
362+ other-modules: Paths_purescript
363+ ghc-options: -Wall -O2
364+
365+executable psc
366+ build-depends: base >=4 && <5,
367+ purescript -any,
368+ aeson >= 0.8 && < 1.0,
369+ ansi-terminal >= 0.6.2 && < 0.7,
370+ base-compat >=0.6.0,
371+ bytestring -any,
372+ containers -any,
373+ directory -any,
374+ filepath -any,
375+ Glob >= 0.7 && < 0.8,
376+ mtl -any,
377+ optparse-applicative >= 0.13.0,
378+ parsec -any,
379+ text -any,
380+ time -any,
381+ transformers -any,
382+ transformers-compat -any,
383+ utf8-string >= 1 && < 2
384+ main-is: Main.hs
385+ buildable: True
386+ hs-source-dirs: psc
387+ other-modules: Paths_purescript
388+ ghc-options: -Wall -O2 -fno-warn-unused-do-bind -threaded -rtsopts "-with-rtsopts=-N"
389+
390+executable psci
391+ build-depends: base >=4 && <5,
392+ purescript -any,
393+ base-compat >=0.6.0,
394+ boxes >= 0.1.4 && < 0.2.0,
395+ bytestring -any,
396+ containers -any,
397+ directory -any,
398+ filepath -any,
399+ file-embed -any,
400+ Glob -any,
401+ haskeline >= 0.7.0.0,
402+ http-types == 0.9.*,
403+ mtl -any,
404+ optparse-applicative >= 0.13.0,
405+ parsec -any,
406+ process -any,
407+ stm >= 0.2.4.0,
408+ text -any,
409+ time -any,
410+ transformers -any,
411+ transformers-compat -any,
412+ wai == 3.*,
413+ wai-websockets == 3.*,
414+ warp == 3.*,
415+ websockets >= 0.9 && <0.10
416+ main-is: Main.hs
417+ buildable: True
418+ hs-source-dirs: psci
419+ other-modules: Paths_purescript
420+ ghc-options: -Wall -O2
421+
422+executable psc-docs
423+ build-depends: base >=4 && <5,
424+ purescript -any,
425+ ansi-wl-pprint -any,
426+ directory -any,
427+ filepath -any,
428+ Glob -any,
429+ mtl -any,
430+ optparse-applicative >= 0.13.0,
431+ process -any,
432+ split -any,
433+ text -any,
434+ transformers -any,
435+ transformers-compat -any
436+ main-is: Main.hs
437+ other-modules: Paths_purescript
438+ buildable: True
439+ hs-source-dirs: psc-docs
440+ other-modules: Ctags
441+ Etags
442+ Tags
443+ ghc-options: -Wall -O2
444+
445+executable psc-publish
446+ build-depends: base >=4 && <5,
447+ purescript -any,
448+ aeson >= 0.8 && < 1.0,
449+ bytestring -any,
450+ optparse-applicative -any,
451+ time -any,
452+ transformers -any
453+ main-is: Main.hs
454+ other-modules: Paths_purescript
455+ buildable: True
456+ hs-source-dirs: psc-publish
457+ ghc-options: -Wall -O2
458+
459+executable psc-package
460+ build-depends: base >=4 && <5,
461+ purescript -any,
462+ aeson -any,
463+ aeson-pretty -any,
464+ bytestring -any,
465+ containers -any,
466+ foldl -any,
467+ optparse-applicative -any,
468+ system-filepath -any,
469+ text -any,
470+ turtle ==1.3.*
471+ main-is: Main.hs
472+ other-modules: Paths_purescript
473+ buildable: True
474+ hs-source-dirs: psc-package
475+ ghc-options: -Wall -O2
476+
477+executable psc-hierarchy
478+ build-depends: base >=4 && <5,
479+ purescript -any,
480+ directory -any,
481+ filepath -any,
482+ Glob -any,
483+ mtl -any,
484+ optparse-applicative >= 0.13.0,
485+ parsec -any,
486+ process -any,
487+ text -any
488+ main-is: Main.hs
489+ other-modules: Paths_purescript
490+ buildable: True
491+ hs-source-dirs: hierarchy
492+ other-modules:
493+ ghc-options: -Wall -O2
494+
495+executable psc-bundle
496+ main-is: Main.hs
497+ other-modules: Paths_purescript
498+ other-extensions:
499+ build-depends: base >=4 && <5,
500+ bytestring -any,
501+ purescript -any,
502+ directory -any,
503+ aeson >= 0.8 && < 1.0,
504+ filepath -any,
505+ Glob -any,
506+ mtl -any,
507+ optparse-applicative >= 0.13.0,
508+ sourcemap >= 0.1.6,
509+ transformers -any,
510+ transformers-compat -any,
511+ utf8-string >= 1 && < 2
512+
513+ ghc-options: -Wall -O2
514+ hs-source-dirs: psc-bundle
515+
516+executable psc-ide-server
517+ main-is: Main.hs
518+ other-modules: Paths_purescript
519+ other-extensions:
520+ build-depends: base >=4 && <5,
521+ aeson >= 0.8 && < 1.0,
522+ bytestring -any,
523+ purescript -any,
524+ directory -any,
525+ filepath -any,
526+ monad-logger -any,
527+ mtl -any,
528+ network -any,
529+ optparse-applicative >= 0.13.0,
530+ protolude >= 0.1.6,
531+ stm -any,
532+ text -any,
533+ transformers -any
534+ ghc-options: -Wall -O2 -threaded
535+ hs-source-dirs: psc-ide-server
536+
537+executable psc-ide-client
538+ main-is: Main.hs
539+ other-modules: Paths_purescript
540+ other-extensions:
541+ build-depends: base >=4 && <5,
542+ base-compat >=0.6.0,
543+ bytestring -any,
544+ mtl -any,
545+ network -any,
546+ optparse-applicative >= 0.13.0,
547+ text -any
548+ ghc-options: -Wall -O2
549+ hs-source-dirs: psc-ide-client
550+
551+executable pcc
552+ build-depends: base >=4 && <5,
553+ purescript -any,
554+ aeson -any,
555+ ansi-terminal >= 0.6.2 && < 0.7,
556+ base-compat >=0.6.0,
557+ bytestring -any,
558+ containers -any,
559+ directory -any,
560+ filepath -any,
561+ file-embed -any,
562+ Glob >= 0.7 && < 0.8,
563+ mtl -any,
564+ optparse-applicative >= 0.12.1,
565+ parsec -any,
566+ text -any,
567+ time -any,
568+ transformers -any,
569+ transformers-compat -any,
570+ utf8-string >= 1 && < 2
571+ main-is: Main.hs
572+ buildable: True
573+ hs-source-dirs: pcc
574+ other-modules: Paths_purescript Make Makefile
575+ ghc-options: -Wall -O2 -fno-warn-unused-do-bind -threaded -rtsopts "-with-rtsopts=-N"
576+
577+
578+test-suite tests
579+ build-depends: base >=4 && <5,
580+ purescript -any,
581+ aeson -any,
582+ aeson-better-errors -any,
583+ base-compat -any,
584+ bower-json -any,
585+ boxes -any,
586+ bytestring -any,
587+ containers -any,
588+ directory -any,
589+ filepath -any,
590+ Glob -any,
591+ haskeline >= 0.7.0.0,
592+ hspec -any,
593+ hspec-discover -any,
594+ HUnit -any,
595+ lens -any,
596+ monad-logger -any,
597+ mtl -any,
598+ optparse-applicative -any,
599+ parsec -any,
600+ process -any,
601+ protolude >= 0.1.6,
602+ silently -any,
603+ stm -any,
604+ text -any,
605+ time -any,
606+ transformers -any,
607+ transformers-compat -any,
608+ utf8-string -any,
609+ vector -any
610+ ghc-options: -Wall
611+ type: exitcode-stdio-1.0
612+ main-is: Main.hs
613+ other-modules: TestUtils
614+ TestCompiler
615+ TestDocs
616+ TestPrimDocs
617+ TestPscPublish
618+ TestPsci
619+ TestPscIde
620+ PscIdeSpec
621+ Language.PureScript.Ide.Test
622+ Language.PureScript.Ide.FilterSpec
623+ Language.PureScript.Ide.ImportsSpec
624+ Language.PureScript.Ide.MatcherSpec
625+ Language.PureScript.Ide.RebuildSpec
626+ Language.PureScript.Ide.ReexportsSpec
627+ Language.PureScript.Ide.SourceFileSpec
628+ Language.PureScript.Ide.StateSpec
629+ buildable: True
630+ hs-source-dirs: tests
631+
632+test-suite pcc-tests
633+ build-depends: base >=4 && <5, directory -any, filepath -any, process -any
634+ type: exitcode-stdio-1.0
635+ main-is: TestMain.hs
636+ buildable: True
637+ hs-source-dirs: pcc
638+
src/CodeGen/IL.hsdeleted−321
@@ -1,321 +0,0 @@
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.hsdeleted−196
@@ -1,196 +0,0 @@
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.hsdeleted−81
@@ -1,81 +0,0 @@
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.hsdeleted−18
@@ -1,18 +0,0 @@
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.hsdeleted−435

This diff is too big to show here.

src/CodeGen/IL/Optimizer/MagicDo.hsdeleted−146

This diff is too big to show here.

src/CodeGen/IL/Optimizer/TCO.hsdeleted−141

This diff is too big to show here.

src/CodeGen/IL/Printer.hsdeleted−527

This diff is too big to show here.

src/Control/Monad/Logger.hsnew file+59

This diff is too big to show here.

src/Control/Monad/Supply.hsnew file+33

This diff is too big to show here.

src/Control/Monad/Supply/Class.hsnew file+36

This diff is too big to show here.

src/Language/PureScript.hsnew file+36

This diff is too big to show here.

src/Language/PureScript/AST.hsnew file+14

This diff is too big to show here.

src/Language/PureScript/AST/Binders.hsnew file+83

This diff is too big to show here.

src/Language/PureScript/AST/Declarations.hsnew file+744

This diff is too big to show here.

src/Language/PureScript/AST/Exported.hsnew file+155

This diff is too big to show here.

src/Language/PureScript/AST/Literals.hsnew file+38

This diff is too big to show here.

src/Language/PureScript/AST/Operators.hsnew file+51

This diff is too big to show here.

src/Language/PureScript/AST/SourcePos.hsnew file+81

This diff is too big to show here.

src/Language/PureScript/AST/Traversals.hsnew file+645

This diff is too big to show here.

src/Language/PureScript/Bundle.hsnew file+710

This diff is too big to show here.

src/Language/PureScript/CodeGen.hsnew file+8

This diff is too big to show here.

src/Language/PureScript/CodeGen/Cpp.hsnew file+826

This diff is too big to show here.

src/Language/PureScript/CodeGen/Cpp/AST.hsnew file+415

This diff is too big to show here.

src/Language/PureScript/CodeGen/Cpp/Common.hsnew file+270

This diff is too big to show here.

src/Language/PureScript/CodeGen/Cpp/File.hsnew file+191

This diff is too big to show here.

src/Language/PureScript/CodeGen/Cpp/Optimizer.hsnew file+97

This diff is too big to show here.

src/Language/PureScript/CodeGen/Cpp/Optimizer/Blocks.hsnew file+108

This diff is too big to show here.

src/Language/PureScript/CodeGen/Cpp/Optimizer/Common.hsnew file+93

This diff is too big to show here.

src/Language/PureScript/CodeGen/Cpp/Optimizer/Inliner.hsnew file+450

This diff is too big to show here.

src/Language/PureScript/CodeGen/Cpp/Optimizer/MagicDo.hsnew file+154

This diff is too big to show here.

src/Language/PureScript/CodeGen/Cpp/Optimizer/TCO.hsnew file+159

This diff is too big to show here.

src/Language/PureScript/CodeGen/Cpp/Optimizer/Uncurry.hsnew file+50

This diff is too big to show here.

src/Language/PureScript/CodeGen/Cpp/Optimizer/Unused.hsnew file+47

This diff is too big to show here.

src/Language/PureScript/CodeGen/Cpp/Recursion.hsnew file+135

This diff is too big to show here.

src/Language/PureScript/CodeGen/Cpp/Types.hsnew file+150

This diff is too big to show here.

src/Language/PureScript/CodeGen/Cpp/Unicode.hsnew file+69

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS.hsnew file+452

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/AST.hsnew file+398

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Common.hsnew file+237

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Optimizer.hsnew file+73

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Optimizer/Blocks.hsnew file+32

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Optimizer/Common.hsnew file+78

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Optimizer/Inliner.hsnew file+385

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Optimizer/MagicDo.hsnew file+137

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Optimizer/TCO.hsnew file+120

This diff is too big to show here.

src/Language/PureScript/CodeGen/JS/Optimizer/Unused.hsnew file+35

This diff is too big to show here.

src/Language/PureScript/Comments.hsnew file+18

This diff is too big to show here.

src/Language/PureScript/Constants.hsnew file+455

This diff is too big to show here.

src/Language/PureScript/CoreFn.hsnew file+15

This diff is too big to show here.

src/Language/PureScript/CoreFn/Ann.hsnew file+25

This diff is too big to show here.

src/Language/PureScript/CoreFn/Binders.hsnew file+42

This diff is too big to show here.

src/Language/PureScript/CoreFn/Desugar.hsnew file+279

This diff is too big to show here.

src/Language/PureScript/CoreFn/Expr.hsnew file+122

This diff is too big to show here.

src/Language/PureScript/CoreFn/Meta.hsnew file+42

This diff is too big to show here.

src/Language/PureScript/CoreFn/Module.hsnew file+22

This diff is too big to show here.

src/Language/PureScript/CoreFn/ToJSON.hsnew file+129

This diff is too big to show here.

src/Language/PureScript/CoreFn/Traversals.hsnew file+77

This diff is too big to show here.

src/Language/PureScript/Crash.hsnew file+27

This diff is too big to show here.

src/Language/PureScript/Docs.hsnew file+14

This diff is too big to show here.

src/Language/PureScript/Docs/AsHtml.hsnew file+299

This diff is too big to show here.

src/Language/PureScript/Docs/AsMarkdown.hsnew file+138

This diff is too big to show here.

src/Language/PureScript/Docs/Convert.hsnew file+215

This diff is too big to show here.

src/Language/PureScript/Docs/Convert/ReExports.hsnew file+532

This diff is too big to show here.

src/Language/PureScript/Docs/Convert/Single.hsnew file+185

This diff is too big to show here.

src/Language/PureScript/Docs/ParseInPackage.hsnew file+73

This diff is too big to show here.

src/Language/PureScript/Docs/Prim.hsnew file+253

This diff is too big to show here.

src/Language/PureScript/Docs/Render.hsnew file+152

This diff is too big to show here.

src/Language/PureScript/Docs/RenderedCode.hsnew file+9

This diff is too big to show here.

src/Language/PureScript/Docs/RenderedCode/RenderKind.hsnew file+57

This diff is too big to show here.

src/Language/PureScript/Docs/RenderedCode/RenderType.hsnew file+208

This diff is too big to show here.

src/Language/PureScript/Docs/RenderedCode/Types.hsnew file+383

This diff is too big to show here.

src/Language/PureScript/Docs/Types.hsnew file+819

This diff is too big to show here.

src/Language/PureScript/Docs/Utils/MonoidExtras.hsnew file+9

This diff is too big to show here.

src/Language/PureScript/Environment.hsnew file+407

This diff is too big to show here.

src/Language/PureScript/Errors.hsnew file+1335

This diff is too big to show here.

src/Language/PureScript/Errors/JSON.hsnew file+76

This diff is too big to show here.

src/Language/PureScript/Externs.hsnew file+238

This diff is too big to show here.

src/Language/PureScript/Ide.hsnew file+217

This diff is too big to show here.

src/Language/PureScript/Ide/CaseSplit.hsnew file+148

This diff is too big to show here.

src/Language/PureScript/Ide/Command.hsnew file+164

This diff is too big to show here.

src/Language/PureScript/Ide/Completion.hsnew file+33

This diff is too big to show here.

src/Language/PureScript/Ide/Error.hsnew file+54

This diff is too big to show here.

src/Language/PureScript/Ide/Externs.hsnew file+152

This diff is too big to show here.

src/Language/PureScript/Ide/Filter.hsnew file+93

This diff is too big to show here.

src/Language/PureScript/Ide/Imports.hsnew file+331

This diff is too big to show here.

src/Language/PureScript/Ide/Logging.hsnew file+41

This diff is too big to show here.

src/Language/PureScript/Ide/Matcher.hsnew file+123

This diff is too big to show here.

src/Language/PureScript/Ide/Pursuit.hsnew file+73

This diff is too big to show here.

src/Language/PureScript/Ide/Rebuild.hsnew file+190

This diff is too big to show here.

src/Language/PureScript/Ide/Reexports.hsnew file+122

This diff is too big to show here.

src/Language/PureScript/Ide/SourceFile.hsnew file+129

This diff is too big to show here.

src/Language/PureScript/Ide/State.hsnew file+309

This diff is too big to show here.

src/Language/PureScript/Ide/Types.hsnew file+321

This diff is too big to show here.

src/Language/PureScript/Ide/Util.hsnew file+147

This diff is too big to show here.

src/Language/PureScript/Ide/Watcher.hsnew file+53

This diff is too big to show here.

src/Language/PureScript/Interactive.hsnew file+290

This diff is too big to show here.

src/Language/PureScript/Interactive/Completion.hsnew file+223

This diff is too big to show here.

src/Language/PureScript/Interactive/Directive.hsnew file+103

This diff is too big to show here.

src/Language/PureScript/Interactive/IO.hsnew file+34

This diff is too big to show here.

src/Language/PureScript/Interactive/Message.hsnew file+56

This diff is too big to show here.

src/Language/PureScript/Interactive/Module.hsnew file+99

This diff is too big to show here.

src/Language/PureScript/Interactive/Parser.hsnew file+125

This diff is too big to show here.

src/Language/PureScript/Interactive/Printer.hsnew file+131

This diff is too big to show here.

src/Language/PureScript/Interactive/Types.hsnew file+128

This diff is too big to show here.

src/Language/PureScript/Kinds.hsnew file+106

This diff is too big to show here.

src/Language/PureScript/Label.hsnew file+16

This diff is too big to show here.

src/Language/PureScript/Linter.hsnew file+103

This diff is too big to show here.

src/Language/PureScript/Linter/Exhaustive.hsnew file+348

This diff is too big to show here.

src/Language/PureScript/Linter/Imports.hsnew file+365

This diff is too big to show here.

src/Language/PureScript/Make.hsnew file+476

This diff is too big to show here.

src/Language/PureScript/ModuleDependencies.hsnew file+64

This diff is too big to show here.

src/Language/PureScript/Names.hsnew file+213

This diff is too big to show here.

src/Language/PureScript/Options.hsnew file+42

This diff is too big to show here.

src/Language/PureScript/PSString.hsnew file+197

This diff is too big to show here.

src/Language/PureScript/Parser.hsnew file+23

This diff is too big to show here.

src/Language/PureScript/Parser/Common.hsnew file+145

This diff is too big to show here.

src/Language/PureScript/Parser/Declarations.hsnew file+569

This diff is too big to show here.

src/Language/PureScript/Parser/Kinds.hsnew file+40

This diff is too big to show here.

src/Language/PureScript/Parser/Lexer.hsnew file+600

This diff is too big to show here.

src/Language/PureScript/Parser/State.hsnew file+18

This diff is too big to show here.

src/Language/PureScript/Parser/Types.hsnew file+128

This diff is too big to show here.

src/Language/PureScript/Pretty.hsnew file+18

This diff is too big to show here.

src/Language/PureScript/Pretty/Common.hsnew file+163

This diff is too big to show here.

src/Language/PureScript/Pretty/Cpp.hsnew file+622

This diff is too big to show here.

src/Language/PureScript/Pretty/JS.hsnew file+303

This diff is too big to show here.

src/Language/PureScript/Pretty/Kinds.hsnew file+58

This diff is too big to show here.

src/Language/PureScript/Pretty/Types.hsnew file+234

This diff is too big to show here.

src/Language/PureScript/Pretty/Values.hsnew file+206

This diff is too big to show here.

src/Language/PureScript/Publish.hsnew file+409

This diff is too big to show here.

src/Language/PureScript/Publish/BoxesHelpers.hsnew file+49

This diff is too big to show here.

src/Language/PureScript/Publish/ErrorsWarnings.hsnew file+431

This diff is too big to show here.

src/Language/PureScript/Publish/Utils.hsnew file+41

This diff is too big to show here.

src/Language/PureScript/Renamer.hsnew file+193

This diff is too big to show here.

src/Language/PureScript/Sugar.hsnew file+67

This diff is too big to show here.

src/Language/PureScript/Sugar/BindingGroups.hsnew file+222

This diff is too big to show here.

src/Language/PureScript/Sugar/CaseDeclarations.hsnew file+188

This diff is too big to show here.

src/Language/PureScript/Sugar/DoNotation.hsnew file+70

This diff is too big to show here.

src/Language/PureScript/Sugar/Names.hsnew file+367

This diff is too big to show here.

src/Language/PureScript/Sugar/Names/Common.hsnew file+68

This diff is too big to show here.

src/Language/PureScript/Sugar/Names/Env.hsnew file+430

This diff is too big to show here.

src/Language/PureScript/Sugar/Names/Exports.hsnew file+322

This diff is too big to show here.

src/Language/PureScript/Sugar/Names/Imports.hsnew file+243

This diff is too big to show here.

src/Language/PureScript/Sugar/ObjectWildcards.hsnew file+121

This diff is too big to show here.

src/Language/PureScript/Sugar/Operators.hsnew file+415

This diff is too big to show here.

src/Language/PureScript/Sugar/Operators/Binders.hsnew file+26

This diff is too big to show here.

src/Language/PureScript/Sugar/Operators/Common.hsnew file+79

This diff is too big to show here.

src/Language/PureScript/Sugar/Operators/Expr.hsnew file+46

This diff is too big to show here.

src/Language/PureScript/Sugar/Operators/Types.hsnew file+27

This diff is too big to show here.

src/Language/PureScript/Sugar/TypeClasses.hsnew file+336

This diff is too big to show here.

src/Language/PureScript/Sugar/TypeClasses/Deriving.hsnew file+825

This diff is too big to show here.

src/Language/PureScript/Sugar/TypeDeclarations.hsnew file+63

This diff is too big to show here.

src/Language/PureScript/Traversals.hsnew file+27

This diff is too big to show here.

src/Language/PureScript/TypeChecker.hsnew file+481

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Entailment.hsnew file+496

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Kinds.hsnew file+266

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Monad.hsnew file+304

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Rows.hsnew file+53

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Skolems.hsnew file+128

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Subsumption.hsnew file+145

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Synonyms.hsnew file+62

This diff is too big to show here.

src/Language/PureScript/TypeChecker/TypeSearch.hsnew file+90

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Types.hsnew file+805

This diff is too big to show here.

src/Language/PureScript/TypeChecker/Unify.hsnew file+190

This diff is too big to show here.

src/Language/PureScript/TypeClassDictionaries.hsnew file+29

This diff is too big to show here.

src/Language/PureScript/Types.hsnew file+329

This diff is too big to show here.

src/System/IO/UTF8.hsnew file+24

This diff is too big to show here.

stack-ghc-8.0.yamlnew file+14

This diff is too big to show here.

stack.nixdeleted−23

This diff is too big to show here.

stack.yaml+6−22

This diff is too big to show here.

support/ffi-loader.godeleted−30

This diff is too big to show here.

support/go.mod.ffi-loaderdeleted−2

This diff is too big to show here.

support/go.mod.outputdeleted−2

This diff is too big to show here.

support/go.mod.workingdeleted−1

This diff is too big to show here.

test/Spec.hsdeleted−2

This diff is too big to show here.

tests/Language/PureScript/Ide/FilterSpec.hsnew file+54

This diff is too big to show here.

tests/Language/PureScript/Ide/ImportsSpec.hsnew file+238

This diff is too big to show here.

tests/Language/PureScript/Ide/MatcherSpec.hsnew file+36

This diff is too big to show here.

tests/Language/PureScript/Ide/RebuildSpec.hsnew file+61

This diff is too big to show here.

tests/Language/PureScript/Ide/ReexportsSpec.hsnew file+65

This diff is too big to show here.

tests/Language/PureScript/Ide/SourceFileSpec.hsnew file+122

This diff is too big to show here.

tests/Language/PureScript/Ide/StateSpec.hsnew file+91

This diff is too big to show here.

tests/Language/PureScript/Ide/Test.hsnew file+135

This diff is too big to show here.

tests/Main.hsnew file+46

This diff is too big to show here.

tests/PscIdeSpec.hsnew file+1

This diff is too big to show here.

tests/TestCompiler.hsnew file+309

This diff is too big to show here.

tests/TestDocs.hsnew file+416

This diff is too big to show here.

tests/TestPrimDocs.hsnew file+30

This diff is too big to show here.

tests/TestPscIde.hsnew file+13

This diff is too big to show here.

tests/TestPscPublish.hsnew file+64

This diff is too big to show here.

tests/TestPsci.hsnew file+138

This diff is too big to show here.

tests/TestUtils.hsnew file+167

This diff is too big to show here.

tests/support/.gitignorenew file+2

This diff is too big to show here.

tests/support/bower.jsonnew file+18

This diff is too big to show here.

tests/support/package.jsonnew file+8

This diff is too big to show here.

tests/support/psci/Sample.pursnew file

No changes to the content.

tests/support/pscide/.gitignorenew file+7

This diff is too big to show here.

tests/support/pscide/src/ImportsSpec.pursnew file+3

This diff is too big to show here.

tests/support/pscide/src/ImportsSpec1.pursnew file+32

This diff is too big to show here.

tests/support/pscide/src/MatcherSpec.pursnew file+7

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecDep.pursnew file+3

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecSingleModule.failnew file+3

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecSingleModule.pursnew file+4

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecWithDeps.pursnew file+5

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecWithForeign.jsnew file+1

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecWithForeign.pursnew file+3

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecWithHiddenIdent.pursnew file+6

This diff is too big to show here.

tests/support/pscide/src/RebuildSpecWithMissingForeign.failnew file+3

This diff is too big to show here.

tests/support/setup-win.cmdnew file+3

This diff is too big to show here.

travis/build.shnew file+59

This diff is too big to show here.

travis/convert-os-name.shnew file+14

This diff is too big to show here.