summaryrefslogtreecommitdiff
path: root/lang/elm/files
diff options
context:
space:
mode:
Diffstat (limited to 'lang/elm/files')
-rw-r--r--lang/elm/files/patch-compiler_src_Data_Name.hs26
-rw-r--r--lang/elm/files/patch-compiler_src_Data_Utf8.hs98
-rw-r--r--lang/elm/files/patch-compiler_src_Parse_Variable.hs17
-rw-r--r--lang/elm/files/patch-elm.cabal65
4 files changed, 206 insertions, 0 deletions
diff --git a/lang/elm/files/patch-compiler_src_Data_Name.hs b/lang/elm/files/patch-compiler_src_Data_Name.hs
new file mode 100644
index 000000000000..ebed22b01427
--- /dev/null
+++ b/lang/elm/files/patch-compiler_src_Data_Name.hs
@@ -0,0 +1,26 @@
+--- compiler/src/Data/Name.hs.orig 2019-10-20 14:31:43 UTC
++++ compiler/src/Data/Name.hs
+@@ -241,7 +241,7 @@ fromTypeVariable name@(Utf8.Utf8 ba#) index =
+ else
+ let
+ len# = sizeofByteArray# ba#
+- end# = indexWord8Array# ba# (len# -# 1#)
++ end# = word8ToWord# (indexWord8Array# ba# (len# -# 1#))
+ in
+ if isTrue# (leWord# 0x30## end#) && isTrue# (leWord# end# 0x39##) then
+ runST
+@@ -316,11 +316,11 @@ fromManyNames names =
+ ST $ \s ->
+ case newByteArray# (len# +# 3#) s of
+ (# s, mba# #) ->
+- case writeWord8Array# mba# 0# 0x5F## {-_-} s of
++ case writeWord8Array# mba# 0# (wordToWord8# 0x5F##) {-_-} s of
+ s ->
+- case writeWord8Array# mba# 1# 0x4D## {-M-} s of
++ case writeWord8Array# mba# 1# (wordToWord8# 0x4D##) {-M-} s of
+ s ->
+- case writeWord8Array# mba# 2# 0x24## {-$-} s of
++ case writeWord8Array# mba# 2# (wordToWord8# 0x24##) {-$-} s of
+ s ->
+ case copyByteArray# ba# 0# mba# 3# len# s of
+ s ->
diff --git a/lang/elm/files/patch-compiler_src_Data_Utf8.hs b/lang/elm/files/patch-compiler_src_Data_Utf8.hs
new file mode 100644
index 000000000000..1795a55d4841
--- /dev/null
+++ b/lang/elm/files/patch-compiler_src_Data_Utf8.hs
@@ -0,0 +1,98 @@
+--- compiler/src/Data/Utf8.hs.orig 2019-10-20 14:31:43 UTC
++++ compiler/src/Data/Utf8.hs
+@@ -109,10 +109,10 @@ contains (W8# word#) (Utf8 ba#) =
+ containsHelp word# ba# 0# (sizeofByteArray# ba#)
+
+
+-containsHelp :: Word# -> ByteArray# -> Int# -> Int# -> Bool
++containsHelp :: Word8# -> ByteArray# -> Int# -> Int# -> Bool
+ containsHelp word# ba# !offset# len# =
+ if isTrue# (offset# <# len#) then
+- if isTrue# (eqWord# word# (indexWord8Array# ba# offset#))
++ if isTrue# (eqWord8# word# (indexWord8Array# ba# offset#))
+ then True
+ else containsHelp word# ba# (offset# +# 1#) len#
+ else
+@@ -145,7 +145,7 @@ startsWithChar isGood bytes@(Utf8 ba#) =
+ False
+ else
+ let
+- !w# = indexWord8Array# ba# 0#
++ !w# = word8ToWord# (indexWord8Array# ba# 0#)
+ !char
+ | isTrue# (ltWord# w# 0xC0##) = C# (chr# (word2Int# w#))
+ | isTrue# (ltWord# w# 0xE0##) = chr2 ba# 0# w#
+@@ -164,7 +164,7 @@ endsWithWord8 (W8# w#) (Utf8 ba#) =
+ let len# = sizeofByteArray# ba# in
+ isTrue# (len# ># 0#)
+ &&
+- isTrue# (eqWord# w# (indexWord8Array# ba# (len# -# 1#)))
++ isTrue# (eqWord8# w# (indexWord8Array# ba# (len# -# 1#)))
+
+
+
+@@ -186,11 +186,11 @@ splitHelp str start offsets =
+ unsafeSlice str start offset : splitHelp str (offset + 1) offsets
+
+
+-findDividers :: Word# -> ByteArray# -> Int# -> Int# -> [Int] -> [Int]
++findDividers :: Word8# -> ByteArray# -> Int# -> Int# -> [Int] -> [Int]
+ findDividers divider# ba# !offset# len# revOffsets =
+ if isTrue# (offset# <# len#) then
+ findDividers divider# ba# (offset# +# 1#) len# $
+- if isTrue# (eqWord# divider# (indexWord8Array# ba# offset#))
++ if isTrue# (eqWord8# divider# (indexWord8Array# ba# offset#))
+ then I# offset# : revOffsets
+ else revOffsets
+ else
+@@ -351,7 +351,7 @@ toCharsHelp ba# offset# len# =
+ []
+ else
+ let
+- !w# = indexWord8Array# ba# offset#
++ !w# = word8ToWord# (indexWord8Array# ba# offset#)
+ !(# char, width# #)
+ | isTrue# (ltWord# w# 0xC0##) = (# C# (chr# (word2Int# w#)), 1# #)
+ | isTrue# (ltWord# w# 0xE0##) = (# chr2 ba# offset# w#, 2# #)
+@@ -368,7 +368,7 @@ chr2 ba# offset# firstWord# =
+ chr2 ba# offset# firstWord# =
+ let
+ !i1# = word2Int# firstWord#
+- !i2# = word2Int# (indexWord8Array# ba# (offset# +# 1#))
++ !i2# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 1#)))
+ !c1# = uncheckedIShiftL# (i1# -# 0xC0#) 6#
+ !c2# = i2# -# 0x80#
+ in
+@@ -380,8 +380,8 @@ chr3 ba# offset# firstWord# =
+ chr3 ba# offset# firstWord# =
+ let
+ !i1# = word2Int# firstWord#
+- !i2# = word2Int# (indexWord8Array# ba# (offset# +# 1#))
+- !i3# = word2Int# (indexWord8Array# ba# (offset# +# 2#))
++ !i2# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 1#)))
++ !i3# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 2#)))
+ !c1# = uncheckedIShiftL# (i1# -# 0xE0#) 12#
+ !c2# = uncheckedIShiftL# (i2# -# 0x80#) 6#
+ !c3# = i3# -# 0x80#
+@@ -394,9 +394,9 @@ chr4 ba# offset# firstWord# =
+ chr4 ba# offset# firstWord# =
+ let
+ !i1# = word2Int# firstWord#
+- !i2# = word2Int# (indexWord8Array# ba# (offset# +# 1#))
+- !i3# = word2Int# (indexWord8Array# ba# (offset# +# 2#))
+- !i4# = word2Int# (indexWord8Array# ba# (offset# +# 3#))
++ !i2# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 1#)))
++ !i3# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 2#)))
++ !i4# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 3#)))
+ !c1# = uncheckedIShiftL# (i1# -# 0xF0#) 18#
+ !c2# = uncheckedIShiftL# (i2# -# 0x80#) 12#
+ !c3# = uncheckedIShiftL# (i3# -# 0x80#) 6#
+@@ -471,7 +471,7 @@ escape before@(W8# before#) after ptr name@(Utf8 ba#)
+ escape :: Word8 -> Word8 -> Ptr a -> Utf8 t -> Int -> Int -> Int -> IO ()
+ escape before@(W8# before#) after ptr name@(Utf8 ba#) offset@(I# offset#) len@(I# len#) i@(I# i#) =
+ if isTrue# (i# <# len#) then
+- if isTrue# (eqWord# before# (indexWord8Array# ba# (offset# +# i#)))
++ if isTrue# (eqWord8# before# (indexWord8Array# ba# (offset# +# i#)))
+ then
+ do writeWordToPtr ptr i after
+ escape before after ptr name offset len (i + 1)
diff --git a/lang/elm/files/patch-compiler_src_Parse_Variable.hs b/lang/elm/files/patch-compiler_src_Parse_Variable.hs
new file mode 100644
index 000000000000..0ac1b23864c0
--- /dev/null
+++ b/lang/elm/files/patch-compiler_src_Parse_Variable.hs
@@ -0,0 +1,17 @@
+--- compiler/src/Parse/Variable.hs.orig 2019-10-20 14:31:43 UTC
++++ compiler/src/Parse/Variable.hs
+@@ -21,7 +21,7 @@ import Foreign.Ptr (Ptr, plusPtr)
+ import qualified Data.Set as Set
+ import Data.Word (Word8)
+ import Foreign.Ptr (Ptr, plusPtr)
+-import GHC.Exts (Char(C#), Int#, (+#), (-#), chr#, uncheckedIShiftL#, word2Int#)
++import GHC.Exts (Char(C#), Int#, (+#), (-#), chr#, uncheckedIShiftL#, word2Int#, word8ToWord#)
+ import GHC.Word (Word8(W8#))
+
+ import qualified AST.Source as Src
+@@ -384,4 +384,4 @@ unpack (W8# word#) =
+
+ unpack :: Word8 -> Int#
+ unpack (W8# word#) =
+- word2Int# word#
++ word2Int# (word8ToWord# word#)
diff --git a/lang/elm/files/patch-elm.cabal b/lang/elm/files/patch-elm.cabal
new file mode 100644
index 000000000000..79fe9468b954
--- /dev/null
+++ b/lang/elm/files/patch-elm.cabal
@@ -0,0 +1,65 @@
+--- elm.cabal.orig 2019-10-20 14:31:43 UTC
++++ elm.cabal
+@@ -35,9 +35,6 @@ Executable elm
+
+
+ Executable elm
+- if flag(dev)
+- ghc-options: -O0 -Wall -Werror
+- else
+ ghc-options: -O2 -rtsopts -threaded "-with-rtsopts=-N -qg -A128m"
+ -- add -eventlog for (elm make src/Main.elm +RTS -l; threadscope elm.eventlog)
+ -- https://www.oreilly.com/library/view/parallel-and-concurrent/9781449335939/
+@@ -203,26 +200,26 @@ Executable elm
+ Paths_elm
+
+ Build-depends:
+- ansi-terminal >= 0.8 && < 0.9,
+- ansi-wl-pprint >= 0.6.8 && < 0.7,
+- base >=4.11 && <5,
+- binary >= 0.8 && < 0.9,
+- bytestring >= 0.9 && < 0.11,
+- containers >= 0.5.8.2 && < 0.6,
+- directory >= 1.2.3.0 && < 2.0,
+- edit-distance >= 0.2 && < 0.3,
++ ansi-terminal,
++ ansi-wl-pprint < 1,
++ base,
++ binary,
++ bytestring,
++ containers,
++ directory,
++ edit-distance,
+ file-embed,
+ filelock,
+- filepath >= 1 && < 2.0,
+- ghc-prim >= 0.5.2,
++ filepath,
++ ghc-prim,
+ haskeline,
+- HTTP >= 4000.2.5 && < 4000.4,
+- http-client >= 0.6 && < 0.7,
+- http-client-tls >= 0.3 && < 0.4,
+- http-types >= 0.12 && < 1.0,
+- language-glsl >= 0.3,
+- mtl >= 2.2.1 && < 3,
+- network >= 2.4 && < 2.7,
++ HTTP,
++ http-client,
++ http-client-tls,
++ http-types,
++ language-glsl,
++ mtl,
++ network,
+ parsec,
+ process,
+ raw-strings-qq,
+@@ -231,7 +228,7 @@ Executable elm
+ snap-core,
+ snap-server,
+ template-haskell,
+- time >= 1.9.1,
++ time,
+ unordered-containers,
+ utf8-string,
+ vector,