diff options
author | Gleb Popov <arrowd@FreeBSD.org> | 2020-05-04 18:08:10 +0000 |
---|---|---|
committer | Gleb Popov <arrowd@FreeBSD.org> | 2020-05-04 18:08:10 +0000 |
commit | 19c26acbf0b3412689187c066d994589e169f4ee (patch) | |
tree | ea6ceaad0e8295491cdee982afa383c2cb90cdbb /lang/purescript | |
parent | ff6a5b09cf537befa21bb538dd62eccad35ce089 (diff) | |
download | ports-19c26acbf0b3412689187c066d994589e169f4ee.tar.gz ports-19c26acbf0b3412689187c066d994589e169f4ee.zip |
Upgrade lang/ghc to 8.8.3 and many Haskell ports along the way.
PR: 244784
Submitted by: Evilham <contact@evilham.com> (some ports)
Notes
Notes:
svn path=/head/; revision=533933
Diffstat (limited to 'lang/purescript')
7 files changed, 530 insertions, 11 deletions
diff --git a/lang/purescript/files/patch-happy-1.19.9_happy.cabal b/lang/purescript/files/patch-happy-1.19.9_happy.cabal deleted file mode 100644 index c64b01c6f0f6..000000000000 --- a/lang/purescript/files/patch-happy-1.19.9_happy.cabal +++ /dev/null @@ -1,11 +0,0 @@ ---- happy-1.19.9/happy.cabal.orig 2018-02-04 16:17:42 UTC -+++ happy-1.19.9/happy.cabal -@@ -129,7 +129,7 @@ extra-source-files: - tests/typeclass_monad_lexer.y - - custom-setup -- setup-depends: Cabal <2.2, -+ setup-depends: Cabal <2.6, - base <5, - directory <1.4, - filepath <1.5 diff --git a/lang/purescript/files/patch-purescript.cabal b/lang/purescript/files/patch-purescript.cabal new file mode 100644 index 000000000000..2d62dbd02763 --- /dev/null +++ b/lang/purescript/files/patch-purescript.cabal @@ -0,0 +1,159 @@ +--- purescript.cabal.orig 2020-01-18 16:10:21 UTC ++++ purescript.cabal +@@ -1153,7 +1153,7 @@ library + Language.PureScript.TypeClassDictionaries + Language.PureScript.Types + System.IO.UTF8 +- build-tools: happy ==1.19.9 ++ build-tools: happy ==1.19.12 + hs-source-dirs: src + other-modules: + Paths_purescript +@@ -1166,14 +1166,14 @@ library + ScopedTypeVariables TupleSections ViewPatterns + ghc-options: -Wall -O2 + build-depends: +- Cabal >=2.2 && <2.5, ++ Cabal >=2.2 && <3.2, + Glob ==0.9.*, + aeson >=1.0 && <1.5, + aeson-better-errors >=0.8 && <0.10, + aeson-pretty <0.9, + ansi-terminal >=0.7.1 && <0.9, + array <0.6, +- base >=4.11 && <4.13, ++ base >=4.11 && <4.14, + base-compat >=0.6.0 && <0.11, + blaze-html >=0.8.1 && <0.10, + bower-json >=1.0.0.1 && <1.1, +@@ -1195,8 +1195,8 @@ library + language-javascript >=0.7.0.0 && <0.8, + lifted-async >=0.10.0.3 && <0.10.1, + lifted-base ==0.2.3.*, +- memory ==0.14.*, +- microlens-platform >=0.3.9.0 && <0.4, ++ memory >=0.14, ++ microlens-platform >=0.3.9.0 && <0.5, + monad-control >=1.0.0.0 && <1.1, + monad-logger ==0.3.*, + mtl >=2.1.0 && <2.3.0, +@@ -1204,11 +1204,11 @@ library + parsec >=3.1.10 && <3.2, + pattern-arrows >=0.0.2 && <0.1, + process >=1.2.0 && <1.7, +- protolude >=0.1.6 && <0.2.4, +- regex-tdfa <1.3, ++ protolude >=0.1.6 && <0.2.5, ++ regex-tdfa, + safe >=0.3.9 && <0.4, + scientific >=0.3.4.9 && <0.4, +- semialign >=1 && <1.1, ++ semialign >=1 && <1.2, + semigroups >=0.16.2 && <0.19, + sourcemap >=0.1.6 && <0.2, + split <0.3, +@@ -1217,7 +1217,7 @@ library + syb <0.8, + text <1.3, + these >=1 && <1.1, +- time <1.9, ++ time, + transformers >=0.3.0 && <0.6, + transformers-base >=0.4.0 && <0.5, + transformers-compat >=0.3.0 && <0.7, +@@ -1227,7 +1227,7 @@ library + + executable purs + main-is: Main.hs +- build-tools: happy ==1.19.9 ++ build-tools: happy ==1.19.12 + hs-source-dirs: app + other-modules: + Command.Bundle +@@ -1245,7 +1245,7 @@ executable purs + ghc-options: -Wall -O2 -fno-warn-unused-do-bind -threaded -rtsopts + -with-rtsopts=-N + build-depends: +- Cabal >=2.2 && <2.5, ++ Cabal >=2.2 && <3.2, + Glob ==0.9.*, + aeson >=1.0 && <1.5, + aeson-better-errors >=0.8 && <0.10, +@@ -1253,7 +1253,7 @@ executable purs + ansi-terminal >=0.7.1 && <0.9, + ansi-wl-pprint <0.7, + array <0.6, +- base >=4.11 && <4.13, ++ base >=4.11 && <4.14, + base-compat >=0.6.0 && <0.11, + blaze-html >=0.8.1 && <0.10, + bower-json >=1.0.0.1 && <1.1, +@@ -1276,23 +1276,23 @@ executable purs + language-javascript >=0.7.0.0 && <0.8, + lifted-async >=0.10.0.3 && <0.10.1, + lifted-base ==0.2.3.*, +- memory ==0.14.*, +- microlens-platform >=0.3.9.0 && <0.4, ++ memory >=0.14, ++ microlens-platform >=0.3.9.0 && <0.5, + monad-control >=1.0.0.0 && <1.1, + monad-logger ==0.3.*, + mtl >=2.1.0 && <2.3.0, + network >=3.0.1.1 && <3.1, +- optparse-applicative >=0.13.0 && <0.15, ++ optparse-applicative, + parallel ==3.2.*, + parsec >=3.1.10 && <3.2, + pattern-arrows >=0.0.2 && <0.1, + process >=1.2.0 && <1.7, +- protolude >=0.1.6 && <0.2.4, ++ protolude >=0.1.6 && <0.2.5, + purescript -any, +- regex-tdfa <1.3, ++ regex-tdfa, + safe >=0.3.9 && <0.4, + scientific >=0.3.4.9 && <0.4, +- semialign >=1 && <1.1, ++ semialign >=1 && <1.2, + semigroups >=0.16.2 && <0.19, + sourcemap >=0.1.6 && <0.2, + split <0.3, +@@ -1301,7 +1301,7 @@ executable purs + syb <0.8, + text <1.3, + these >=1 && <1.1, +- time <1.9, ++ time, + transformers >=0.3.0 && <0.6, + transformers-base >=0.4.0 && <0.5, + transformers-compat >=0.3.0 && <0.7, +@@ -1312,7 +1312,7 @@ executable purs + wai-websockets ==3.*, + warp ==3.*, + websockets >=0.9 && <0.13 +- ++ + if flag(release) + cpp-options: -DRELEASE + else +@@ -1322,7 +1322,7 @@ executable purs + test-suite tests + type: exitcode-stdio-1.0 + main-is: Main.hs +- build-tools: happy ==1.19.9 ++ build-tools: happy ==1.19.12 + hs-source-dirs: tests + other-modules: + Language.PureScript.Ide.CompletionSpec +@@ -1398,9 +1398,9 @@ test-suite tests + parsec >=3.1.10 && <3.2, + pattern-arrows >=0.0.2 && <0.1, + process >=1.2.0 && <1.7, +- protolude >=0.1.6 && <0.2.4, ++ protolude >=0.1.6 && <0.2.5, + purescript -any, +- regex-tdfa <1.3, ++ regex-tdfa, + safe >=0.3.9 && <0.4, + scientific >=0.3.4.9 && <0.4, + semialign >=1 && <1.1, diff --git a/lang/purescript/files/patch-src_Language_PureScript_CST_Parser.y b/lang/purescript/files/patch-src_Language_PureScript_CST_Parser.y new file mode 100644 index 000000000000..9fb0c0cbd531 --- /dev/null +++ b/lang/purescript/files/patch-src_Language_PureScript_CST_Parser.y @@ -0,0 +1,293 @@ +--- src/Language/PureScript/CST/Parser.y.orig 2019-11-02 17:39:14 UTC ++++ src/Language/PureScript/CST/Parser.y +@@ -175,12 +175,12 @@ moduleName :: { Name N.ModuleName } + : UPPER {% upperToModuleName $1 } + | QUAL_UPPER {% upperToModuleName $1 } + +-qualProperName :: { QualifiedName (N.ProperName a) } +- : UPPER {% toQualifiedName N.ProperName $1 } +- | QUAL_UPPER {% toQualifiedName N.ProperName $1 } ++qualProperName :: { QualifiedProperName } ++ : UPPER {% qualifiedProperName <\$> toQualifiedName N.ProperName $1 } ++ | QUAL_UPPER {% qualifiedProperName <\$> toQualifiedName N.ProperName $1 } + +-properName :: { Name (N.ProperName a) } +- : UPPER {% toName N.ProperName $1 } ++properName :: { ProperName } ++ : UPPER {% properName <\$> toName N.ProperName $1 } + + qualIdent :: { QualifiedName Ident } + : LOWER {% toQualifiedName Ident $1 } +@@ -195,29 +195,29 @@ ident :: { Name Ident } + | 'hiding' {% toName Ident $1 } + | 'kind' {% toName Ident $1 } + +-qualOp :: { QualifiedName (N.OpName a) } +- : OPERATOR {% toQualifiedName N.OpName $1 } +- | QUAL_OPERATOR {% toQualifiedName N.OpName $1 } +- | '<=' {% toQualifiedName N.OpName $1 } +- | '-' {% toQualifiedName N.OpName $1 } +- | '#' {% toQualifiedName N.OpName $1 } +- | ':' {% toQualifiedName N.OpName $1 } ++qualOp :: { QualifiedOpName } ++ : OPERATOR {% qualifiedOpName <\$> toQualifiedName N.OpName $1 } ++ | QUAL_OPERATOR {% qualifiedOpName <\$> toQualifiedName N.OpName $1 } ++ | '<=' {% qualifiedOpName <\$> toQualifiedName N.OpName $1 } ++ | '-' {% qualifiedOpName <\$> toQualifiedName N.OpName $1 } ++ | '#' {% qualifiedOpName <\$> toQualifiedName N.OpName $1 } ++ | ':' {% qualifiedOpName <\$> toQualifiedName N.OpName $1 } + +-op :: { Name (N.OpName a) } +- : OPERATOR {% toName N.OpName $1 } +- | '<=' {% toName N.OpName $1 } +- | '-' {% toName N.OpName $1 } +- | '#' {% toName N.OpName $1 } +- | ':' {% toName N.OpName $1 } ++op :: { OpName } ++ : OPERATOR {% opName <\$> toName N.OpName $1 } ++ | '<=' {% opName <\$> toName N.OpName $1 } ++ | '-' {% opName <\$> toName N.OpName $1 } ++ | '#' {% opName <\$> toName N.OpName $1 } ++ | ':' {% opName <\$> toName N.OpName $1 } + +-qualSymbol :: { QualifiedName (N.OpName a) } +- : SYMBOL {% toQualifiedName N.OpName $1 } +- | QUAL_SYMBOL {% toQualifiedName N.OpName $1 } +- | '(..)' {% toQualifiedName N.OpName $1 } ++qualSymbol :: { QualifiedOpName } ++ : SYMBOL {% qualifiedOpName <\$> toQualifiedName N.OpName $1 } ++ | QUAL_SYMBOL {% qualifiedOpName <\$> toQualifiedName N.OpName $1 } ++ | '(..)' {% qualifiedOpName <\$> toQualifiedName N.OpName $1 } + +-symbol :: { Name (N.OpName a) } +- : SYMBOL {% toName N.OpName $1 } +- | '(..)' {% toName N.OpName $1 } ++symbol :: { OpName } ++ : SYMBOL {% opName <\$> toName N.OpName $1 } ++ | '(..)' {% opName <\$> toName N.OpName $1 } + + label :: { Label } + : LOWER { toLabel $1 } +@@ -278,7 +278,7 @@ kind :: { Kind () } + | kind1 '->' kind { KindArr () $1 $2 $3 } + + kind1 :: { Kind () } +- : qualProperName { KindName () $1 } ++ : qualProperName { KindName () (getQualifiedProperName $1) } + | '#' kind1 { KindRow () $1 $2 } + | '(' kind ')' { KindParens () (Wrapped $1 $2 $3) } + +@@ -297,7 +297,7 @@ type2 :: { Type () } + + type3 :: { Type () } + : type4 { $1 } +- | type3 qualOp type4 { TypeOp () $1 $2 $3 } ++ | type3 qualOp type4 { TypeOp () $1 (getQualifiedOpName $2) $3 } + + type4 :: { Type () } + : typeAtom { $1 } +@@ -306,8 +306,8 @@ type4 :: { Type () } + typeAtom :: { Type ()} + : '_' { TypeWildcard () $1 } + | ident { TypeVar () $1 } +- | qualProperName { TypeConstructor () $1 } +- | qualSymbol { TypeOpName () $1 } ++ | qualProperName { TypeConstructor () (getQualifiedProperName $1) } ++ | qualSymbol { TypeOpName () (getQualifiedOpName $1) } + | string { uncurry (TypeString ()) $1 } + | hole { TypeHole () $1 } + | '(->)' { TypeArrName () $1 } +@@ -321,8 +321,8 @@ typeAtom :: { Type ()} + -- row, and to annotate `a` with kind `Foo`, one must use `((a) :: Foo)`. + typeKindedAtom :: { Type () } + : '_' { TypeWildcard () $1 } +- | qualProperName { TypeConstructor () $1 } +- | qualSymbol { TypeOpName () $1 } ++ | qualProperName { TypeConstructor () (getQualifiedProperName $1) } ++ | qualSymbol { TypeOpName () (getQualifiedOpName $1) } + | hole { TypeHole () $1 } + | '{' row '}' { TypeRecord () (Wrapped $1 $2 $3) } + | '(' row ')' { TypeRow () (Wrapped $1 $2 $3) } +@@ -356,7 +356,7 @@ expr :: { Expr () } + + expr1 :: { Expr () } + : expr2 { $1 } +- | expr1 qualOp expr2 { ExprOp () $1 $2 $3 } ++ | expr1 qualOp expr2 { ExprOp () $1 (getQualifiedOpName $2) $3 } + + expr2 :: { Expr () } + : expr3 { $1 } +@@ -364,7 +364,7 @@ expr2 :: { Expr () } + + exprBacktick :: { Expr () } + : expr3 { $1 } +- | exprBacktick qualOp expr3 { ExprOp () $1 $2 $3 } ++ | exprBacktick qualOp expr3 { ExprOp () $1 (getQualifiedOpName $2) $3 } + + expr3 :: { Expr () } + : expr4 { $1 } +@@ -415,8 +415,8 @@ exprAtom :: { Expr () } + : '_' { ExprSection () $1 } + | hole { ExprHole () $1 } + | qualIdent { ExprIdent () $1 } +- | qualProperName { ExprConstructor () $1 } +- | qualSymbol { ExprOpName () $1 } ++ | qualProperName { ExprConstructor () (getQualifiedProperName $1) } ++ | qualSymbol { ExprOpName () (getQualifiedOpName $1) } + | boolean { uncurry (ExprBoolean ()) $1 } + | char { uncurry (ExprChar ()) $1 } + | string { uncurry (ExprString ()) $1 } +@@ -554,7 +554,7 @@ binder :: { Binder () } + + binder1 :: { Binder () } + : binder2 { $1 } +- | binder1 qualOp binder2 { BinderOp () $1 $2 $3 } ++ | binder1 qualOp binder2 { BinderOp () $1 (getQualifiedOpName $2) $3 } + + binder2 :: { Binder () } + : many(binderAtom) {% toBinderConstructor $1 } +@@ -563,7 +563,7 @@ binderAtom :: { Binder () } + : '_' { BinderWildcard () $1 } + | ident { BinderVar () $1 } + | ident '@' binderAtom { BinderNamed () $1 $2 $3 } +- | qualProperName { BinderConstructor () $1 [] } ++ | qualProperName { BinderConstructor () (getQualifiedProperName $1) [] } + | boolean { uncurry (BinderBoolean ()) $1 } + | char { uncurry (BinderChar ()) $1 } + | string { uncurry (BinderString ()) $1 } +@@ -602,7 +602,7 @@ moduleDecls :: { ([ImportDecl ()], [Declaration ()]) } + : manySep(moduleDecl, '\;') {% toModuleDecls $ NE.toList $1 } + | {- empty -} { ([], []) } + +-moduleDecl :: { TmpModuleDecl a } ++moduleDecl :: { TmpModuleDecl () } + : importDecl { TmpImport $1 } + | sep(decl, declElse) { TmpChain $1 } + +@@ -616,18 +616,18 @@ exports :: { Maybe (DelimitedNonEmpty (Export ())) } + + export :: { Export () } + : ident { ExportValue () $1 } +- | symbol { ExportOp () $1 } +- | properName { ExportType () $1 Nothing } +- | properName dataMembers { ExportType () $1 (Just $2) } +- | 'type' symbol { ExportTypeOp () $1 $2 } +- | 'class' properName { ExportClass () $1 $2 } +- | 'kind' properName { ExportKind () $1 $2 } ++ | symbol { ExportOp () (getOpName $1) } ++ | properName { ExportType () (getProperName $1) Nothing } ++ | properName dataMembers { ExportType () (getProperName $1) (Just $2) } ++ | 'type' symbol { ExportTypeOp () $1 (getOpName $2) } ++ | 'class' properName { ExportClass () $1 (getProperName $2) } ++ | 'kind' properName { ExportKind () $1 (getProperName $2) } + | 'module' moduleName { ExportModule () $1 $2 } + + dataMembers :: { (DataMembers ()) } + : '(..)' { DataAll () $1 } + | '(' ')' { DataEnumerated () (Wrapped $1 Nothing $2) } +- | '(' sep(properName, ',') ')' { DataEnumerated () (Wrapped $1 (Just $2) $3) } ++ | '(' sep(properName, ',') ')' { DataEnumerated () (Wrapped $1 (Just \$ getProperName <\$> $2) $3) } + + importDecl :: { ImportDecl () } + : 'import' moduleName imports { ImportDecl () $1 $2 $3 Nothing } +@@ -640,18 +640,18 @@ imports :: { Maybe (Maybe SourceToken, DelimitedNonEmp + + import :: { Import () } + : ident { ImportValue () $1 } +- | symbol { ImportOp () $1 } +- | properName { ImportType () $1 Nothing } +- | properName dataMembers { ImportType () $1 (Just $2) } +- | 'type' symbol { ImportTypeOp () $1 $2 } +- | 'class' properName { ImportClass () $1 $2 } +- | 'kind' properName { ImportKind () $1 $2 } ++ | symbol { ImportOp () (getOpName $1) } ++ | properName { ImportType () (getProperName $1) Nothing } ++ | properName dataMembers { ImportType () (getProperName $1) (Just $2) } ++ | 'type' symbol { ImportTypeOp () $1 (getOpName $2) } ++ | 'class' properName { ImportClass () $1 (getProperName $2) } ++ | 'kind' properName { ImportKind () $1 (getProperName $2) } + + decl :: { Declaration () } + : dataHead { DeclData () $1 Nothing } + | dataHead '=' sep(dataCtor, '|') { DeclData () $1 (Just ($2, $3)) } + | typeHead '=' type {% checkNoWildcards $3 *> pure (DeclType () $1 $2 $3) } +- | newtypeHead '=' properName typeAtom {% checkNoWildcards $4 *> pure (DeclNewtype () $1 $2 $3 $4) } ++ | newtypeHead '=' properName typeAtom {% checkNoWildcards $4 *> pure (DeclNewtype () $1 $2 (getProperName $3) $4) } + | classHead {% checkFundeps $1 *> pure (DeclClass () $1 Nothing) } + | classHead 'where' '\{' manySep(classMember, '\;') '\}' {% checkFundeps $1 *> pure (DeclClass () $1 (Just ($2, $4))) } + | instHead { DeclInstanceChain () (Separated (Instance $1 Nothing) []) } +@@ -664,17 +664,17 @@ decl :: { Declaration () } + | 'foreign' 'import' foreign { DeclForeign () $1 $2 $3 } + + dataHead :: { DataHead () } +- : 'data' properName manyOrEmpty(typeVarBinding) { DataHead $1 $2 $3 } ++ : 'data' properName manyOrEmpty(typeVarBinding) { DataHead $1 (getProperName $2) $3 } + + typeHead :: { DataHead () } +- : 'type' properName manyOrEmpty(typeVarBinding) { DataHead $1 $2 $3 } ++ : 'type' properName manyOrEmpty(typeVarBinding) { DataHead $1 (getProperName $2) $3 } + + newtypeHead :: { DataHead () } +- : 'newtype' properName manyOrEmpty(typeVarBinding) { DataHead $1 $2 $3 } ++ : 'newtype' properName manyOrEmpty(typeVarBinding) { DataHead $1 (getProperName $2) $3 } + + dataCtor :: { DataCtor () } + : properName manyOrEmpty(typeAtom) +- {% for_ $2 checkNoWildcards *> pure (DataCtor () $1 $2) } ++ {% for_ $2 checkNoWildcards *> pure (DataCtor () (getProperName $1) $2) } + + -- Class head syntax requires unbounded lookahead due to a conflict between + -- row syntax and `typeVarBinding`. `(a :: B)` is either a row in `constraint` +@@ -698,7 +698,7 @@ classSuper + : constraints '<=' {%^ revert $ pure ($1, $2) } + + classNameAndFundeps :: { (Name (N.ProperName 'N.ClassName), [TypeVarBinding ()], Maybe (SourceToken, Separated ClassFundep)) } +- : properName manyOrEmpty(typeVarBinding) fundeps {%^ revert $ pure ($1, $2, $3) } ++ : properName manyOrEmpty(typeVarBinding) fundeps {%^ revert $ pure (getProperName $1, $2, $3) } + + fundeps :: { Maybe (SourceToken, Separated ClassFundep) } + : {- empty -} { Nothing } +@@ -713,16 +713,16 @@ classMember :: { Labeled (Name Ident) (Type ()) } + + instHead :: { InstanceHead () } + : 'instance' ident '::' constraints '=>' qualProperName manyOrEmpty(typeAtom) +- { InstanceHead $1 $2 $3 (Just ($4, $5)) $6 $7 } ++ { InstanceHead $1 $2 $3 (Just ($4, $5)) (getQualifiedProperName $6) $7 } + | 'instance' ident '::' qualProperName manyOrEmpty(typeAtom) +- { InstanceHead $1 $2 $3 Nothing $4 $5 } ++ { InstanceHead $1 $2 $3 Nothing (getQualifiedProperName $4) $5 } + + constraints :: { OneOrDelimited (Constraint ()) } + : constraint { One $1 } + | '(' sep(constraint, ',') ')' { Many (Wrapped $1 $2 $3) } + + constraint :: { Constraint () } +- : qualProperName manyOrEmpty(typeAtom) {% for_ $2 checkNoWildcards *> for_ $2 checkNoForalls *> pure (Constraint () $1 $2) } ++ : qualProperName manyOrEmpty(typeAtom) {% for_ $2 checkNoWildcards *> for_ $2 checkNoForalls *> pure (Constraint () (getQualifiedProperName $1) $2) } + | '(' constraint ')' { ConstraintParens () (Wrapped $1 $2 $3) } + + instBinding :: { InstanceBinding () } +@@ -730,9 +730,9 @@ instBinding :: { InstanceBinding () } + | ident manyOrEmpty(binderAtom) guardedDecl { InstanceBindingName () (ValueBindingFields $1 $2 $3) } + + fixity :: { FixityFields } +- : infix int qualIdent 'as' op { FixityFields $1 $2 (FixityValue (fmap Left $3) $4 $5) } +- | infix int qualProperName 'as' op { FixityFields $1 $2 (FixityValue (fmap Right $3) $4 $5) } +- | infix int 'type' qualProperName 'as' op { FixityFields $1 $2 (FixityType $3 $4 $5 $6) } ++ : infix int qualIdent 'as' op { FixityFields $1 $2 (FixityValue (fmap Left $3) $4 (getOpName $5)) } ++ | infix int qualProperName 'as' op { FixityFields $1 $2 (FixityValue (fmap Right (getQualifiedProperName $3)) $4 (getOpName $5)) } ++ | infix int 'type' qualProperName 'as' op { FixityFields $1 $2 (FixityType $3 (getQualifiedProperName $4) $5 (getOpName $6)) } + + infix :: { (SourceToken, Fixity) } + : 'infix' { ($1, Infix) } +@@ -741,8 +741,8 @@ infix :: { (SourceToken, Fixity) } + + foreign :: { Foreign () } + : ident '::' type { ForeignValue (Labeled $1 $2 $3) } +- | 'data' properName '::' kind { ForeignData $1 (Labeled $2 $3 $4) } +- | 'kind' properName { ForeignKind $1 $2 } ++ | 'data' properName '::' kind { ForeignData $1 (Labeled (getProperName $2) $3 $4) } ++ | 'kind' properName { ForeignKind $1 (getProperName $2) } + + -- Partial parsers which can be combined with combinators for adhoc use. We need + -- to revert the lookahead token so that it doesn't consume an extra token diff --git a/lang/purescript/files/patch-src_Language_PureScript_CST_Utils.hs b/lang/purescript/files/patch-src_Language_PureScript_CST_Utils.hs new file mode 100644 index 000000000000..c94f0b47f51e --- /dev/null +++ b/lang/purescript/files/patch-src_Language_PureScript_CST_Utils.hs @@ -0,0 +1,35 @@ +--- src/Language/PureScript/CST/Utils.hs.orig 2019-11-02 17:39:14 UTC ++++ src/Language/PureScript/CST/Utils.hs +@@ -20,6 +20,32 @@ import Language.PureScript.CST.Types + import qualified Language.PureScript.Names as N + import Language.PureScript.PSString (PSString, mkString) + ++ ++newtype QualifiedProperName = ++ QualifiedProperName { getQualifiedProperName :: forall a. QualifiedName (N.ProperName a) } ++ ++qualifiedProperName :: QualifiedName (N.ProperName a) -> QualifiedProperName ++qualifiedProperName n = QualifiedProperName (N.coerceProperName <$> n) ++ ++ ++newtype ProperName = ++ ProperName { getProperName :: forall a. Name (N.ProperName a) } ++ ++properName :: Name (N.ProperName a) -> ProperName ++properName n = ProperName (N.coerceProperName <$> n) ++ ++newtype QualifiedOpName = ++ QualifiedOpName { getQualifiedOpName :: forall a. QualifiedName (N.OpName a) } ++ ++qualifiedOpName :: QualifiedName (N.OpName a) -> QualifiedOpName ++qualifiedOpName n = QualifiedOpName (N.coerceOpName <$> n) ++ ++newtype OpName = ++ OpName { getOpName :: forall a. Name (N.OpName a) } ++ ++opName :: Name (N.OpName a) -> OpName ++opName n = OpName (N.coerceOpName <$> n) ++ + placeholder :: SourceToken + placeholder = SourceToken + { tokAnn = TokenAnn (SourceRange (SourcePos 0 0) (SourcePos 0 0)) [] [] diff --git a/lang/purescript/files/patch-src_Language_PureScript_Docs_Types.hs b/lang/purescript/files/patch-src_Language_PureScript_Docs_Types.hs new file mode 100644 index 000000000000..7ff5cfe445ea --- /dev/null +++ b/lang/purescript/files/patch-src_Language_PureScript_Docs_Types.hs @@ -0,0 +1,11 @@ +--- src/Language/PureScript/Docs/Types.hs.orig 2019-11-02 17:39:14 UTC ++++ src/Language/PureScript/Docs/Types.hs +@@ -6,7 +6,7 @@ module Language.PureScript.Docs.Types + ) + where + +-import Protolude hiding (to, from) ++import Protolude hiding (to, from, unlines) + import Prelude (String, unlines, lookup) + + import GHC.Generics (Generic) diff --git a/lang/purescript/files/patch-src_Language_PureScript_Names.hs b/lang/purescript/files/patch-src_Language_PureScript_Names.hs new file mode 100644 index 000000000000..d842ea7cd8ef --- /dev/null +++ b/lang/purescript/files/patch-src_Language_PureScript_Names.hs @@ -0,0 +1,12 @@ +--- src/Language/PureScript/Names.hs.orig 2019-11-02 17:39:14 UTC ++++ src/Language/PureScript/Names.hs +@@ -126,6 +126,9 @@ data OpNameType = ValueOpName | TypeOpName | AnyOpName + eraseOpName :: OpName a -> OpName 'AnyOpName + eraseOpName = OpName . runOpName + ++coerceOpName :: OpName a -> OpName b ++coerceOpName = OpName . runOpName ++ + -- | + -- Proper names, i.e. capitalized names for e.g. module names, type//data constructors. + -- diff --git a/lang/purescript/files/patch-src_Language_PureScript_Publish.hs b/lang/purescript/files/patch-src_Language_PureScript_Publish.hs new file mode 100644 index 000000000000..676ec6296abe --- /dev/null +++ b/lang/purescript/files/patch-src_Language_PureScript_Publish.hs @@ -0,0 +1,20 @@ +--- src/Language/PureScript/Publish.hs.orig 2019-11-02 17:39:14 UTC ++++ src/Language/PureScript/Publish.hs +@@ -19,7 +19,7 @@ module Language.PureScript.Publish + , getModules + ) where + +-import Protolude hiding (stdin) ++import Protolude hiding (stdin, lines) + + import Control.Arrow ((***)) + import Control.Category ((>>>)) +@@ -36,7 +36,7 @@ import Data.Time.Clock (UTCTime) + import Data.Time.Clock.POSIX (posixSecondsToUTCTime) + import Data.Version + import qualified Distribution.SPDX as SPDX +-import qualified Distribution.Parsec.Class as CabalParsec ++import qualified Distribution.Parsec as CabalParsec + + import System.Directory (doesFileExist) + import System.FilePath.Glob (globDir1) |