GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:02:34Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/15887Ideas for a better GHCi editing experience2019-07-07T18:02:34ZAnchpopIdeas for a better GHCi editing experienceI have a two annoyances when writing Haskell code in GHCi which I will enumerate here. While minor, I think if these were fixed there would be a marked improvement of the GHCi editing experience.
1) Syntax/Keyword Highlighting.
> Hask...I have a two annoyances when writing Haskell code in GHCi which I will enumerate here. While minor, I think if these were fixed there would be a marked improvement of the GHCi editing experience.
1) Syntax/Keyword Highlighting.
> Haskell has some very common keywords. Simply writing `if`, `then`, `else`, `where`, `do`, etc. in some color other than the default when not inside a string literal would be a huge improvement in my opinion, and might not be very difficult.
2) Multiline editing
> Writing multiline expressions in Haskell is somewhat difficult for four reasons. Firstly, to even start a multiline expression you must enter `:{` end end it with `:}`. Secondly, GHCi does not attempt to automatically indent your code, which is usually (always?) required when writing a multiline expression. Thirdly, you cannot navigate the curor to previous lines to edit them. Lastly, pressing the up arrow on the keyboard shows the last line of the multiline expression which is useless because it's almost always `:}`.
> My proposal is as follows.
> 1) The issue of how to enter multiline mode without needing to enter `:{` and exit it without needing `:}`.
Instead of entering multiline mode only when the user enters `:{`, we add the following additional criteria. When I discuss haskell keywords in here, assume I mean "while not in a string literal".
a) When the input code contains an odd number of unescaped quotation marks and ends in a backslash.
b) When the input code ends with `where`, `let`, `in`, `if`, `then`, `else`, `do`, `of`, `case`, or `->` preceeded by and in the same level of parenthetical nesting of `case`.
c) When the input code contains a `let` that is not eventually followed by `in`, an `if` not followed by `then`, or a `then` not followed by `else`.
d) When the input code contains a `case` followed by `of`, not enclosed by parentheses.
e) When the input code contains a `[` that is not followed by a `]`, or an `(` that is not followed by a `)`.
f) When the input starts with two or more consecutive space-seperated tokens that do not contain haskell keywords (other than the backtick) followed by `=`.
g)
i) When the input contains a single token that is not a haskell keyword, followed by `::`, ending in `=>` or `->`.
ii) When the input contains a single token that is not a haskell keyword, followed by `::`, not ending in `=>` or `->`.
e) When the user hits `shift-return` instead of simply `return`, or hits `return` when there are non-whitespace characters after the cursor.
This should cover the majority of cases where it can be safely assumed one would want to enter multiline mode. Criterion f is intended to enter multiline mode when defining any function, to make it simple to define functions that use pattern matching. Criterion g is to make it simple to place a function signature right above a function definition.
In situations where multiline mode was not entered with `:{`, you should be able to exit it and submit your code to GHCi for execution by pressing `return` twice, or `meta-return`.
2) The issue of GHCi not attempting to indent your code.
How to indent depends on the reason GHCi entered multiline mode. If GHCi entered multiline mode because the user entered `:{`, no indentation should take place. If the user is in multiline mode but their code does not match criteria a-f, the default indentation should be the same as the indentation on the previous line. If the line is just whitespace and the user presses enter, indentation should be the same as the previous line. For criteria a-f, here is how to respond (I've ordered these from greatest to least precedence I think they should take, but I could be entirely wrong here).
a) Indent to the same column as the last unescaped quotation mark. For bonus points add a backslash too.
b) Indent to two columns as the token that caused the activation of multiline mode.
c) Indent to the same column as the token that caused the activation of multiline mode.
d) Indent to the character after the final `of` not contained in parentheses
e) Indent to the column of the next non-whitespace character after `(` or `[`, if one exists. Otherwise, indent one column farther than the `(`/`[`.
f) No indentation.
g)
i) Indent to the column of the first non-whitespace character after the `::`
ii) No indentation.
e) No indentation
If the user is not editing the last line, use the code up to the point of their cursor for advice on how to indent.
3) The issue of not being able to navigate the curor to previous lines in order to edit them when in multiline editing mode.
I think this would require a complete rewrite of the user interface for multiline editing, and I anticipate it would be the hardest part of this whole endevor. I don't have the knowledge to suggest how one might go about implementing it, though. If possible, pressing ctrl-c should cancel the current code and make a new `Prelude> ` prompt.
4) The issue of pressing `up` only displaying one line at a time.
See above.
I would be happy to try to implement some of these, but I have never contributed to GHC or GHCi before and would need some pointers on where to start (Either in here or in the \#ghc irc channel).
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.6.2 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"It would be very nice to have a better GHCi editing experience","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"Research needed","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":["QoL"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"I have a two annoyances when writing Haskell code in GHCi which I will enumerate here. While minor, I think if these were fixed there would be a marked improvement of the GHCi editing experience.\r\n\r\n1) Syntax/Keyword Highlighting.\r\n\r\n Haskell has some very common keywords. Simply writing `if`, `then`, `else`, `where`, `do`, etc. in some color other than the default when not inside a string literal would be a huge improvement in my opinion, and might not be very difficult.\r\n\r\n2) Multiline editing\r\n\r\n Writing multiline expressions in Haskell is somewhat difficult for four reasons. Firstly, to even start a multiline expression you must enter `:{` end end it with `:}`. Secondly, GHCi does not attempt to automatically indent your code, which is usually (always?) required when writing a multiline expression. Thirdly, you cannot navigate the curor to previous lines to edit them. Lastly, pressing the up arrow on the keyboard shows the last line of the multiline expression which is useless because it's almost always `:}`. \r\n\r\n My proposal is as follows. \r\n\r\n 1) The issue of how to enter multiline mode without needing to enter `:{` and exit it without needing `:}`.\r\n\r\n\t Instead of entering multiline mode only when the user enters `:{`, we add the following additional criteria. When I discuss haskell keywords in here, assume I mean \"while not in a string literal\".\r\n\r\n\t a) When the input code contains an odd number of unescaped quotation marks and ends in a backslash.\r\n\r\n\t b) When the input code ends with `where`, `let`, `in`, `if`, `then`, `else`, `do`, `of`, `case`, or `->` preceeded by and in the same level of parenthetical nesting of `case`.\r\n\r\n\t c) When the input code contains a `let` that is not eventually followed by `in`, an `if` not followed by `then`, or a `then` not followed by `else`.\r\n\r\n\t d) When the input code contains a `case` followed by `of`, not enclosed by parentheses.\r\n\r\n\t e) When the input code contains a `[` that is not followed by a `]`, or an `(` that is not followed by a `)`.\r\n\r\n\t f) When the input starts with two or more consecutive space-seperated tokens that do not contain haskell keywords (other than the backtick) followed by `=`.\r\n\r\n\t g) \r\n\r\n\t \ti) When the input contains a single token that is not a haskell keyword, followed by `::`, ending in `=>` or `->`.\r\n\r\n\t \tii) When the input contains a single token that is not a haskell keyword, followed by `::`, not ending in `=>` or `->`.\r\n\r\n\t e) When the user hits `shift-return` instead of simply `return`, or hits `return` when there are non-whitespace characters after the cursor.\r\n\r\n\t This should cover the majority of cases where it can be safely assumed one would want to enter multiline mode. Criterion f is intended to enter multiline mode when defining any function, to make it simple to define functions that use pattern matching. Criterion g is to make it simple to place a function signature right above a function definition.\r\n\r\n\t In situations where multiline mode was not entered with `:{`, you should be able to exit it and submit your code to GHCi for execution by pressing `return` twice, or `meta-return`.\r\n\r\n\t2) The issue of GHCi not attempting to indent your code.\r\n\r\n\t\tHow to indent depends on the reason GHCi entered multiline mode. If GHCi entered multiline mode because the user entered `:{`, no indentation should take place. If the user is in multiline mode but their code does not match criteria a-f, the default indentation should be the same as the indentation on the previous line. If the line is just whitespace and the user presses enter, indentation should be the same as the previous line. For criteria a-f, here is how to respond (I've ordered these from greatest to least precedence I think they should take, but I could be entirely wrong here).\r\n\r\n\t\ta) Indent to the same column as the last unescaped quotation mark. For bonus points add a backslash too.\r\n\r\n\t\tb) Indent to two columns as the token that caused the activation of multiline mode.\r\n\r\n\t\tc) Indent to the same column as the token that caused the activation of multiline mode.\r\n\r\n\t\td) Indent to the character after the final `of` not contained in parentheses\r\n\r\n\t\te) Indent to the column of the next non-whitespace character after `(` or `[`, if one exists. Otherwise, indent one column farther than the `(`/`[`.\r\n\r\n\t\tf) No indentation.\r\n\r\n\t\tg)\r\n\r\n\t\t\ti) Indent to the column of the first non-whitespace character after the `::`\r\n\r\n\t\t\tii) No indentation.\r\n\r\n\t\te) No indentation\r\n\r\n\t\tIf the user is not editing the last line, use the code up to the point of their cursor for advice on how to indent.\r\n\r\n\t3) The issue of not being able to navigate the curor to previous lines in order to edit them when in multiline editing mode.\r\n\r\n\t I think this would require a complete rewrite of the user interface for multiline editing, and I anticipate it would be the hardest part of this whole endevor. I don't have the knowledge to suggest how one might go about implementing it, though. If possible, pressing ctrl-c should cancel the current code and make a new `Prelude> ` prompt.\r\n\r\n\t4) The issue of pressing `up` only displaying one line at a time.\r\n\r\n\t\tSee above.\r\n\r\nI would be happy to try to implement some of these, but I have never contributed to GHC or GHCi before and would need some pointers on where to start (Either in here or in the #ghc irc channel).","type_of_failure":"OtherFailure","blocking":[]} -->Research neededhttps://gitlab.haskell.org/ghc/ghc/-/issues/20885Allow Well-Founded Recursion in Data Type Kinds2022-01-05T13:19:42ZAndrew MartinAllow Well-Founded Recursion in Data Type KindsGHC does not accept this program:
```
type Nat :: Type
data Nat = S Nat | Z
type Supertype :: Nat -> Type
data Supertype :: Nat -> Type where
SupertypeNext :: forall (n :: Nat) (super :: Supertype n). Ty n super -> Supertype ('S n)
...GHC does not accept this program:
```
type Nat :: Type
data Nat = S Nat | Z
type Supertype :: Nat -> Type
data Supertype :: Nat -> Type where
SupertypeNext :: forall (n :: Nat) (super :: Supertype n). Ty n super -> Supertype ('S n)
SupertypeDone :: Supertype 'Z
type Ty :: forall (n :: Nat) -> Supertype n -> Type
data Ty :: forall (n :: Nat) -> Supertype n -> Type where
Cons :: Ty ('S 'Z) ('SupertypeNext 'List)
Nil :: Ty ('S 'Z) ('SupertypeNext 'List)
List :: Ty 'Z 'SupertypeDone
```
GHC rejects the program with:
```
• Type constructor ‘Supertype’ cannot be used here
(it is defined and used in the same recursive group)
• In a standalone kind signature for ‘Ty’:
forall (n :: Nat) -> Supertype n -> Type
|
93 | type Ty :: forall (n :: Nat) -> Supertype n -> Type
| ^^^^^^^^^^^
```
Agda does accept its equivalent of this program:
```
data Nat : Set where
S : Nat -> Nat
Z : Nat
mutual
data Supertype : Nat -> Set where
SupertypeNext : (n : Nat) -> (super : Supertype n) -> Ty n super -> Supertype (S n)
SupertypeDone : Supertype Z
data Ty : (n : Nat) -> Supertype n -> Set where
List : Ty Z SupertypeDone
Cons : Ty (S Z) (SupertypeNext Z SupertypeDone List)
Nil : Ty (S Z) (SupertypeNext Z SupertypeDone List)
```
I am not sure if this is the same thing as induction recursion or not. That feature is discussed at #11962, but the example uses type families instead. The same issue may lie at the heart of both of these. Here, `Supertype`'s data constructors do not actually reference any of `Ty`'s data constructors, but `Ty`'s data constructors do reference `Supertype`'s data constructors.Research neededhttps://gitlab.haskell.org/ghc/ghc/-/issues/15926conversion from Integer to Double rounds differently depending on the value2021-06-17T17:02:10Zdrvirgilioconversion from Integer to Double rounds differently depending on the valueI'm not sure if this is intended behavior or a bug.
For values less than 2\^53\^, the the Integer can be represented exactly as a Double so there is no issue. For values from 2\^53\^ to 2\^63\^, `fromInteger n` rounds to the nearest `Do...I'm not sure if this is intended behavior or a bug.
For values less than 2\^53\^, the the Integer can be represented exactly as a Double so there is no issue. For values from 2\^53\^ to 2\^63\^, `fromInteger n` rounds to the nearest `Double`, where ties go toward the `Double` with even least significant bit. This matches the behavior of `read`. For values between 2\^63\^ and 2\^1024\^, `fromInteger n` *rounds down* to the next representable `Double`.
Steps to reproduce:
These values are all the same except the last one because it falls just below the threshold for the "round to nearest, ties to even" rule. In this example, (2\^63\^) and (2\^63\^-2\^10\^) are the consecutive values of type `Double`.
```hs
> fromInteger (2^63) :: Double -- exactly 9223372036854775808
9.223372036854776e18
> fromInteger (2^63 - 1) :: Double -- rounded up
9.223372036854776e18
> fromInteger (2^63 - 2^9) :: Double -- rounded up
9.223372036854776e18
> fromInteger (2^63 - 2^9 - 1) :: Double -- rounded down
9.223372036854775e18
> fromInteger (2^63 - 2^10) :: Double -- exactly 9223372036854774784
9.223372036854775e18
```
Here you can see the behavior of `fromInteger` matches that of `read . show`
```hs
> (read . show) (2^63) :: Double -- exactly 9223372036854775808
9.223372036854776e18
> (read . show) (2^63 - 1) :: Double -- rounded up
9.223372036854776e18
> (read . show) (2^63 - 2^9) :: Double -- rounded up
9.223372036854776e18
> (read . show) (2^63 - 2^9 - 1) :: Double -- rounded down
9.223372036854775e18
> (read . show) (2^63 - 2^10) :: Double -- exactly 9223372036854774784
9.223372036854775e18
```
Here you can see `fromInteger` is rounding down. In this example, (2\^64\^) and (2\^64\^-2\^11\^) are the consecutive values of type `Double`.
```hs
> fromInteger (2^64) :: Double -- exactly 18446744073709551616
1.8446744073709552e19
> fromInteger (2^64 - 1) :: Double -- rounded down
1.844674407370955e19
> fromInteger (2^64 - 2^10) :: Double -- rounded down
1.844674407370955e19
> fromInteger (2^64 - 2^10 - 1) :: Double -- rounded down
1.844674407370955e19
> fromInteger (2^64 - 2^11) :: Double -- exactly 18446744073709549568
1.844674407370955e19
```
Here you can see the behavior of `fromInteger` does *not* match the behavior of `read . show`
```hs
> (read . show) (2^64) :: Double -- exactly 18446744073709551616
1.8446744073709552e19
> (read . show) (2^64 - 1) :: Double -- rounded up
1.8446744073709552e19
> (read . show) (2^64 - 2^10) :: Double -- rounded up
1.8446744073709552e19
> (read . show) (2^64 - 2^10 - 1) :: Double -- rounded down
1.844674407370955e19
> (read . show) (2^64 - 2^11) :: Double -- exactly 18446744073709549568
1.844674407370955e19
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"conversion from Integer to Double rounds differently depending on the value","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"Research needed","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I'm not sure if this is intended behavior or a bug.\r\n\r\nFor values less than 2^53^, the the Integer can be represented exactly as a Double so there is no issue. For values from 2^53^ to 2^63^, {{{fromInteger n}}} rounds to the nearest {{{Double}}}, where ties go toward the {{{Double}}} with even least significant bit. This matches the behavior of {{{read}}}. For values between 2^63^ and 2^1024^, {{{fromInteger n}}} ''rounds down'' to the next representable {{{Double}}}.\r\n\r\nSteps to reproduce:\r\n\r\nThese values are all the same except the last one because it falls just below the threshold for the \"round to nearest, ties to even\" rule. In this example, (2^63^) and (2^63^-2^10^) are the consecutive values of type {{{Double}}}.\r\n\r\n{{{#!hs\r\n> fromInteger (2^63) :: Double -- exactly 9223372036854775808\r\n9.223372036854776e18\r\n> fromInteger (2^63 - 1) :: Double -- rounded up\r\n9.223372036854776e18\r\n> fromInteger (2^63 - 2^9) :: Double -- rounded up\r\n9.223372036854776e18\r\n> fromInteger (2^63 - 2^9 - 1) :: Double -- rounded down\r\n9.223372036854775e18\r\n> fromInteger (2^63 - 2^10) :: Double -- exactly 9223372036854774784\r\n9.223372036854775e18\r\n}}}\r\n\r\nHere you can see the behavior of {{{fromInteger}}} matches that of {{{read . show}}}\r\n\r\n{{{#!hs\r\n> (read . show) (2^63) :: Double -- exactly 9223372036854775808\r\n9.223372036854776e18\r\n> (read . show) (2^63 - 1) :: Double -- rounded up\r\n9.223372036854776e18\r\n> (read . show) (2^63 - 2^9) :: Double -- rounded up\r\n9.223372036854776e18\r\n> (read . show) (2^63 - 2^9 - 1) :: Double -- rounded down\r\n9.223372036854775e18\r\n> (read . show) (2^63 - 2^10) :: Double -- exactly 9223372036854774784\r\n9.223372036854775e18\r\n}}}\r\n\r\nHere you can see {{{fromInteger}}} is rounding down. In this example, (2^64^) and (2^64^-2^11^) are the consecutive values of type {{{Double}}}.\r\n{{{#!hs\r\n> fromInteger (2^64) :: Double -- exactly 18446744073709551616\r\n1.8446744073709552e19\r\n> fromInteger (2^64 - 1) :: Double -- rounded down\r\n1.844674407370955e19\r\n> fromInteger (2^64 - 2^10) :: Double -- rounded down\r\n1.844674407370955e19\r\n> fromInteger (2^64 - 2^10 - 1) :: Double -- rounded down\r\n1.844674407370955e19\r\n> fromInteger (2^64 - 2^11) :: Double -- exactly 18446744073709549568\r\n1.844674407370955e19\r\n}}}\r\n\r\nHere you can see the behavior of {{{fromInteger}}} does ''not'' match the behavior of {{{read . show}}}\r\n\r\n{{{#!hs\r\n> (read . show) (2^64) :: Double -- exactly 18446744073709551616\r\n1.8446744073709552e19\r\n> (read . show) (2^64 - 1) :: Double -- rounded up\r\n1.8446744073709552e19\r\n> (read . show) (2^64 - 2^10) :: Double -- rounded up\r\n1.8446744073709552e19\r\n> (read . show) (2^64 - 2^10 - 1) :: Double -- rounded down\r\n1.844674407370955e19\r\n> (read . show) (2^64 - 2^11) :: Double -- exactly 18446744073709549568\r\n1.844674407370955e19\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->Research neededhttps://gitlab.haskell.org/ghc/ghc/-/issues/15333Nursery size adulterates cachegrind metrics in nofib2020-01-14T13:17:35ZSebastian GrafNursery size adulterates cachegrind metrics in nofibI'm currently investigating an alleged regression in my branch of the late lambda lift and hit a confusing data point. Note that I'm very much relying on cachegrinds counted instructions/memory accesses for my findings.
Check out the mo...I'm currently investigating an alleged regression in my branch of the late lambda lift and hit a confusing data point. Note that I'm very much relying on cachegrinds counted instructions/memory accesses for my findings.
Check out the most recent version of `nofib`, enter `shootout/binary-trees` and run the following script:
```sh
#! /bin/sh
sed -i 's/import Debug.Trace//g' Main.hs # Make the following line idempotent
echo "import Debug.Trace" | cat - Main.hs > Main.tmp && mv Main.tmp Main.hs # add the import for trace
# bt1: Vanilly
sed -i 's/trace "" \$ bit/bit/g' Main.hs # strip `trace $ ` prefixes in the call to `bit`
ghc -O2 -XBangPatterns Main.hs -o bt1
# bt2: Additional trace call
sed -i 's/bit/trace "" $ bit/g' Main.hs # prepend `trace $ ` to the call to `bit`
ghc -O2 -XBangPatterns Main.hs -o bt2
valgrind --tool=cachegrind ./bt1 12 2>&1 > /dev/null # without trace
valgrind --tool=cachegrind ./bt2 12 2>&1 > /dev/null # with trace
```
This will compile two versions of `binary-trees`, the original, unchanged version and one with an extra `trace "" $` call before the only call to the `bit` function. One would expect the version with the `trace` call (`bt2`) to allocate more than the version without (`bt1`). Indeed, the output of `+RTS -s` suggests that:
```
$ ./bt1 12 +RTS -s
...
43,107,560 bytes allocated in the heap
...
$ ./bt2 12 +RTS -s
...
43,116,888 bytes allocated in the heap
...
```
That's fine. A few benchmark runs by hand also suggested the tracing version is a little slower (probably due to IO).
Compare that to the output of the above cachegrind calls:
```
$ valgrind --tool=cachegrind ./bt1 12 > /dev/null
...
I refs: 118,697,583
...
D refs: 43,475,212
...
$ valgrind --tool=cachegrind ./bt2 12 > /dev/null
...
I refs: 116,340,710
...
D refs: 42,523,369
...
```
It's the other way round here! How's that possible?
Even if this isn't strictly a bug in GHC or NoFib, it's relevant nonetheless, as our benchmark infrastructure currently relies on instruction counts. I couldn't reproduce this by writing my own no-op `trace _ a = a; {-# NOINLINE trace #-}`, btw.
I checked this on GHC 8.2.2, 8.4.3 and a semi-recent HEAD commit (bb539cfe335eeec7989332b859b1f3162c5e105a).Research neededhttps://gitlab.haskell.org/ghc/ghc/-/issues/15008Type synonyms with hidden, determined type variables2019-07-07T18:14:42ZJoachim Breitnermail@joachim-breitner.deType synonyms with hidden, determined type variablesI found myself wanting to write (simplified)
```
type MyMonad m = (MonadReader r m, Show r)
```
but GHC does not accept this, it wants `r` as part of the type synonym. So why did I think this could work? Because `MonadReader` has a fun...I found myself wanting to write (simplified)
```
type MyMonad m = (MonadReader r m, Show r)
```
but GHC does not accept this, it wants `r` as part of the type synonym. So why did I think this could work? Because `MonadReader` has a functional dependency:
```
class Monad m => MonadReader r m | m -> r
```
so if `m` determines `r`, why do I have to write `MyMonad r m` and not just `MyMonad m`? Can I not “hide” the fact that, somewhere internal to the `MyMonad` synonym, there is an additional variable `r` around?
Clearly supporting this would need a language proposal, but I wanted to open a ticket here first to hear if this would even be possible to implement.
([Others have wanted this before as well.](https://stackoverflow.com/questions/29686920/is-it-possible-to-have-forgetful-type-synonyms-in-haskell))
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.5 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Type synonyms with hidden, determined type variables","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"Research needed","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.5","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"I found myself wanting to write (simplified)\r\n\r\n{{{\r\ntype MyMonad m = (MonadReader r m, Show r)\r\n}}}\r\nbut GHC does not accept this, it wants `r` as part of the type synonym. So why did I think this could work? Because `MonadReader` has a functional dependency:\r\n{{{\r\nclass Monad m => MonadReader r m | m -> r\r\n}}}\r\n\r\nso if `m` determines `r`, why do I have to write `MyMonad r m` and not just `MyMonad m`? Can I not “hide” the fact that, somewhere internal to the `MyMonad` synonym, there is an additional variable `r` around?\r\n\r\nClearly supporting this would need a language proposal, but I wanted to open a ticket here first to hear if this would even be possible to implement.\r\n\r\n([https://stackoverflow.com/questions/29686920/is-it-possible-to-have-forgetful-type-synonyms-in-haskell Others have wanted this before as well.])\r\n","type_of_failure":"OtherFailure","blocking":[]} -->Research neededhttps://gitlab.haskell.org/ghc/ghc/-/issues/14041ghc-8.2.1 installation fails on OpenBSD 6.12019-07-07T18:18:44Zromanzolotarevghc-8.2.1 installation fails on OpenBSD 6.1I have tried to install ghc-8.2.1 directly and via stack. Getting the same error:
```
ld.so: ghc-cabal: can't load library 'libgmp.so.9.0'
```
Seems like ghc requires 'libgmp.so.9.0', while OpenBSD 6.1 has 'libgmp.so.10.0' by default.
...I have tried to install ghc-8.2.1 directly and via stack. Getting the same error:
```
ld.so: ghc-cabal: can't load library 'libgmp.so.9.0'
```
Seems like ghc requires 'libgmp.so.9.0', while OpenBSD 6.1 has 'libgmp.so.10.0' by default.
```
# find / -name libgmp.so*
/usr/local/lib/libgmp.so.10.0
```
----
Here are full logs:
```
OpenBSD 6.1 (GENERIC) #19: Sat Apr 1 13:42:46 MDT 2017
Welcome to OpenBSD: The proactively secure Unix-like operating system.
Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
version of the code. With bug reports, please try to ensure that
enough information to reproduce the problem is enclosed, and if a
known fix for it exists, include that as well.
# ./.cabal/bin/stack setup 8.2.1
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.
Running /usr/local/bin/gmake install in directory /root/.stack/programs/x86_64-openbsd/ghc-8.2.1.temp/ghc-8.2.1/ exited with ExitFailure 2
/usr/local/bin/gmake --no-print-directory -f ghc.mk install BINDIST=YES NO_INCLUDE_DEPS=YES
"rm" -f utils/ghc-pkg/dist-install/build/Version.hs
echo "module Version where" >> utils/ghc-pkg/dist-install/build/Version.hs
echo "version, targetOS, targetARCH :: String" >> utils/ghc-pkg/dist-install/build/Version.hs
echo "version = \"8.2.1\"" >> utils/ghc-pkg/dist-install/build/Version.hs
echo "targetOS = \"openbsd\"" >> utils/ghc-pkg/dist-install/build/Version.hs
echo "targetARCH = \"x86_64\"" >> utils/ghc-pkg/dist-install/build/Version.hs
"rm" -f utils/ghc-pkg/dist/build/Version.hs
echo "module Version where" >> utils/ghc-pkg/dist/build/Version.hs
echo "version, targetOS, targetARCH :: String" >> utils/ghc-pkg/dist/build/Version.hs
echo "version = \"8.2.1\"" >> utils/ghc-pkg/dist/build/Version.hs
echo "targetOS = \"openbsd\"" >> utils/ghc-pkg/dist/build/Version.hs
echo "targetARCH = \"x86_64\"" >> utils/ghc-pkg/dist/build/Version.hs
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"
"rm" -f "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps"
create () { touch "$1" && chmod 755 "$1" ; } && create "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps"
echo '#!/bin/sh' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps"
echo 'exedir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps"
echo 'exeprog="hp2ps"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps"
echo 'executablename="$exedir/$exeprog"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps"
echo 'datadir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps"
echo 'bindir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps"
echo 'topdir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps"
cat utils/hp2ps/hp2ps.wrapper >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps"
chmod +x "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"
"rm" -f "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghci-8.2.1"
create () { touch "$1" && chmod 755 "$1" ; } && create "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghci-8.2.1"
echo '#!/bin/sh' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghci-8.2.1"
echo 'exec "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1" --interactive "$@"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghci-8.2.1"
chmod +x "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghci-8.2.1"
"rm" -f "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghci"
ln -s ghci-8.2.1 "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghci"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/." && /usr/bin/install -c -m 644 includes/./*.h "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/./" && /usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/rts" && /usr/bin/install -c -m 644 includes/rts/*.h "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/rts/" && /usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/rts/prof" && /usr/bin/install -c -m 644 includes/rts/prof/*.h "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/rts/prof/" && /usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/rts/storage" && /usr/bin/install -c -m 644 includes/rts/storage/*.h "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/rts/storage/" && /usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/stg" && /usr/bin/install -c -m 644 includes/stg/*.h "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/stg/" && true
/usr/bin/install -c -m 644 includes/ghcautoconf.h includes/ghcplatform.h includes/ghcversion.h includes/dist-derivedconstants/header/DerivedConstants.h "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"
"rm" -f "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1"
create () { touch "$1" && chmod 755 "$1" ; } && create "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1"
echo '#!/bin/sh' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1"
echo 'exedir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1"
echo 'exeprog="haddock"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1"
echo 'executablename="$exedir/$exeprog"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1"
echo 'datadir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1"
echo 'bindir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1"
echo 'topdir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1"
cat utils/haddock/haddock.wrapper >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1"
chmod +x "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Classic.theme/"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Ocean.std-theme/"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/latex/"
/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/haddock-util.js "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/"
/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Classic.theme/haskell_icon.gif "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Classic.theme/"
/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Classic.theme/minus.gif "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Classic.theme/"
/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Classic.theme/plus.gif "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Classic.theme/"
/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Classic.theme/xhaddock.css "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Classic.theme/"
/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Ocean.std-theme/hslogo-16.png "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Ocean.std-theme/"
/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Ocean.std-theme/minus.gif "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Ocean.std-theme/"
/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Ocean.std-theme/ocean.css "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Ocean.std-theme/"
/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Ocean.std-theme/plus.gif "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Ocean.std-theme/"
/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Ocean.std-theme/synopsis.png "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Ocean.std-theme/"
/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/solarized.css "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/"
/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/highlight.js "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/"
/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/latex/haddock.sty "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/latex/"
"rm" -f "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock"
ln -s haddock-ghc-8.2.1 "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"
"rm" -f "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs"
create () { touch "$1" && chmod 755 "$1" ; } && create "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs"
echo '#!/bin/sh' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs"
echo 'exedir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs"
echo 'exeprog="hsc2hs"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs"
echo 'executablename="$exedir/$exeprog"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs"
echo 'datadir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs"
echo 'bindir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs"
echo 'topdir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs"
echo 'HSC2HS_EXTRA="--cflag=-std=gnu99 --cflag=-fno-stack-protector --lflag=-Wl,-z,wxneeded"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs"
cat utils/hsc2hs/hsc2hs.wrapper >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs"
chmod +x "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs"
/usr/bin/install -c -m 644 utils/hsc2hs/template-hsc.h "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"
"rm" -f "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1"
create () { touch "$1" && chmod 755 "$1" ; } && create "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1"
echo '#!/bin/sh' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1"
echo 'exedir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1"
echo 'exeprog="ghc-pkg"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1"
echo 'executablename="$exedir/$exeprog"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1"
echo 'datadir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1"
echo 'bindir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1"
echo 'topdir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1"
cat utils/ghc-pkg/ghc-pkg.wrapper >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1"
chmod +x "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"
"rm" -f "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg"
ln -s ghc-pkg-8.2.1 "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"
"rm" -f "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc"
create () { touch "$1" && chmod 755 "$1" ; } && create "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc"
echo '#!/bin/sh' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc"
echo 'exedir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc"
echo 'exeprog="hpc"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc"
echo 'executablename="$exedir/$exeprog"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc"
echo 'datadir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc"
echo 'bindir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc"
echo 'topdir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc"
cat utils/hpc/hpc.wrapper >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc"
chmod +x "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"
"rm" -f "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1"
create () { touch "$1" && chmod 755 "$1" ; } && create "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1"
echo '#!/bin/sh' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1"
echo 'exedir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1"
echo 'exeprog="runghc"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1"
echo 'executablename="$exedir/$exeprog"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1"
echo 'datadir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1"
echo 'bindir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1"
echo 'topdir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1"
echo 'ghcprog="ghc-8.2.1"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1"
cat utils/runghc/runghc.wrapper >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1"
chmod +x "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1"
"rm" -f "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runhaskell"
ln -s runghc "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runhaskell"
"rm" -f "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc"
ln -s runghc-8.2.1 "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"
"rm" -f "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1"
create () { touch "$1" && chmod 755 "$1" ; } && create "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1"
echo '#!/bin/sh' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1"
echo 'exedir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1"
echo 'exeprog="ghc-stage2"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1"
echo 'executablename="$exedir/$exeprog"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1"
echo 'datadir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1"
echo 'bindir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1"
echo 'topdir="/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1"
echo 'executablename="$exedir/ghc"' >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1"
cat ghc/ghc.wrapper >> "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1"
chmod +x "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1"
"rm" -f "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc"
ln -s ghc-8.2.1 "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share/man"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share/man/man1"
/usr/bin/install -c -m 644 docs/users_guide/build-man/ghc.1 "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share/man/man1"
# driver/ghc-usage.txt driver/ghci-usage.txt includes/dist-derivedconstants/header/platformConstants settings = libraries to install
# "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1" = directory to install to
#
# The .dll case calls STRIP_CMD explicitly, instead of `install -s`, because
# on Win64, "install -s" calls a strip that doesn't understand 64bit binaries.
# For some reason, this means the DLLs end up non-executable, which means
# executables that use them just segfault.
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1"
for i in driver/ghc-usage.txt driver/ghci-usage.txt includes/dist-derivedconstants/header/platformConstants settings; do case $i in *.a) /usr/bin/install -c -m 644 $i "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1"; true "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1"/`basename $i` ;; *.dll) /usr/bin/install -c -m 755 $i "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1" ; strip "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1"/`basename $i` ;; *.so) /usr/bin/install -c -m 755 $i "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1" ;; *.dylib) /usr/bin/install -c -m 755 $i "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1";; *) /usr/bin/install -c -m 644 $i "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1"; esac; done
gcc -E -undef -traditional -P -DINSTALLING -DLIB_DIR='"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1"' -DINCLUDE_DIR='"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include"' -DFFI_INCLUDE_DIR=/usr/local/include -DFFI_LIB_DIR=/usr/local/lib '-DFFI_LIB=' -x c -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header rts/package.conf.in -o rts/dist/package.conf.install.raw
grep -v '^#pragma GCC' rts/dist/package.conf.install.raw | sed -e 's/""//g' -e 's/:[ ]*,/: /g' >rts/dist/package.conf.install
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin"
for i in utils/unlit/dist/build/tmp/unlit utils/hp2ps/dist/build/tmp/hp2ps utils/hp2ps/dist/build/tmp/hp2ps utils/haddock/dist/build/tmp/haddock utils/haddock/dist/build/tmp/haddock utils/hsc2hs/dist-install/build/tmp/hsc2hs utils/hsc2hs/dist-install/build/tmp/hsc2hs utils/ghc-pkg/dist-install/build/tmp/ghc-pkg utils/ghc-pkg/dist-install/build/tmp/ghc-pkg utils/hpc/dist-install/build/tmp/hpc utils/hpc/dist-install/build/tmp/hpc utils/runghc/dist-install/build/tmp/runghc utils/runghc/dist-install/build/tmp/runghc ghc/stage2/build/tmp/ghc-stage2 ghc/stage2/build/tmp/ghc-stage2 iserv/stage2/build/tmp/ghc-iserv iserv/stage2_p/build/tmp/ghc-iserv-prof iserv/stage2_dyn/build/tmp/ghc-iserv-dyn; do \
/usr/bin/install -c -m 755 $i "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin"; \
done
"mv" "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin/ghc-stage2" "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin/ghc"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1"
"rm" -rf "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/package.conf.d"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/package.conf.d"
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts"
# rts/dist/build/libHSrts.a rts/dist/build/libHSrts_p.a rts/dist/build/libHSrts-ghc8.2.1.so rts/dist/build/libHSrts_l.a rts/dist/build/libHSrts_debug.a rts/dist/build/libHSrts_thr.a rts/dist/build/libHSrts_thr_debug.a rts/dist/build/libHSrts_thr_l.a rts/dist/build/libHSrts_thr_p.a rts/dist/build/libHSrts_debug-ghc8.2.1.so rts/dist/build/libHSrts_thr-ghc8.2.1.so rts/dist/build/libHSrts_thr_debug-ghc8.2.1.so rts/dist/build/libHSrts_l-ghc8.2.1.so rts/dist/build/libHSrts_thr_l-ghc8.2.1.so = libraries to install
# "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts" = directory to install to
#
# The .dll case calls STRIP_CMD explicitly, instead of `install -s`, because
# on Win64, "install -s" calls a strip that doesn't understand 64bit binaries.
# For some reason, this means the DLLs end up non-executable, which means
# executables that use them just segfault.
/usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts"
for i in rts/dist/build/libHSrts.a rts/dist/build/libHSrts_p.a rts/dist/build/libHSrts-ghc8.2.1.so rts/dist/build/libHSrts_l.a rts/dist/build/libHSrts_debug.a rts/dist/build/libHSrts_thr.a rts/dist/build/libHSrts_thr_debug.a rts/dist/build/libHSrts_thr_l.a rts/dist/build/libHSrts_thr_p.a rts/dist/build/libHSrts_debug-ghc8.2.1.so rts/dist/build/libHSrts_thr-ghc8.2.1.so rts/dist/build/libHSrts_thr_debug-ghc8.2.1.so rts/dist/build/libHSrts_l-ghc8.2.1.so rts/dist/build/libHSrts_thr_l-ghc8.2.1.so; do case $i in *.a) /usr/bin/install -c -m 644 $i "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts"; true "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts"/`basename $i` ;; *.dll) /usr/bin/install -c -m 755 $i "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts" ; strip "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts"/`basename $i` ;; *.so) /usr/bin/install -c -m 755 $i "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts" ;; *.dylib) /usr/bin/install -c -m 755 $i "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts";; *) /usr/bin/install -c -m 644 $i "/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts"; esac; done
"utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist" copy libraries/ghc-prim dist-install "strip" '' '/root/.stack/programs/x86_64-openbsd/ghc-8.2.1' '/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1' '/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share/doc/ghc-8.2.1/html/libraries' 'v p dyn'
ld.so: ghc-cabal: can't load library 'libgmp.so.9.0'
Killed
gmake[1]: *** [ghc.mk:991: install_packages] Error 137
gmake: *** [Makefile:51: install] Error 2
Error: Error encountered while installing GHC with
gmake install
run in /root/.stack/programs/x86_64-openbsd/ghc-8.2.1.temp/ghc-8.2.1/
The following directories may now contain files, but won't be used by stack:
- /root/.stack/programs/x86_64-openbsd/ghc-8.2.1.temp/
- /root/.stack/programs/x86_64-openbsd/ghc-8.2.1/
Installing GHC ...
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.2.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | None |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"ghc-8.2.1 installation fails on OpenBSD 6.1","status":"New","operating_system":"","component":"None","related":[],"milestone":"Research needed","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.2.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I have tried to install ghc-8.2.1 directly and via stack. Getting the same error:\r\n\r\n{{{\r\nld.so: ghc-cabal: can't load library 'libgmp.so.9.0'\r\n}}}\r\n\r\nSeems like ghc requires 'libgmp.so.9.0', while OpenBSD 6.1 has 'libgmp.so.10.0' by default.\r\n\r\n{{{\r\n# find / -name libgmp.so*\r\n/usr/local/lib/libgmp.so.10.0\r\n}}}\r\n\r\n----\r\n\r\nHere are full logs:\r\n\r\n{{{\r\n\r\nOpenBSD 6.1 (GENERIC) #19: Sat Apr 1 13:42:46 MDT 2017\r\n\r\nWelcome to OpenBSD: The proactively secure Unix-like operating system.\r\n\r\nPlease use the sendbug(1) utility to report bugs in the system.\r\nBefore reporting a bug, please try to reproduce it with the latest\r\nversion of the code. With bug reports, please try to ensure that\r\nenough information to reproduce the problem is enclosed, and if a\r\nknown fix for it exists, include that as well.\r\n\r\n# ./.cabal/bin/stack setup 8.2.1 \r\nPreparing to install GHC to an isolated location.\r\nThis will not interfere with any system-level installation.\r\nAlready downloaded.\r\nRunning /usr/local/bin/gmake install in directory /root/.stack/programs/x86_64-openbsd/ghc-8.2.1.temp/ghc-8.2.1/ exited with ExitFailure 2\r\n\r\n/usr/local/bin/gmake --no-print-directory -f ghc.mk install BINDIST=YES NO_INCLUDE_DEPS=YES\r\n\"rm\" -f utils/ghc-pkg/dist-install/build/Version.hs\r\necho \"module Version where\" >> utils/ghc-pkg/dist-install/build/Version.hs\r\necho \"version, targetOS, targetARCH :: String\" >> utils/ghc-pkg/dist-install/build/Version.hs\r\necho \"version = \\\"8.2.1\\\"\" >> utils/ghc-pkg/dist-install/build/Version.hs\r\necho \"targetOS = \\\"openbsd\\\"\" >> utils/ghc-pkg/dist-install/build/Version.hs\r\necho \"targetARCH = \\\"x86_64\\\"\" >> utils/ghc-pkg/dist-install/build/Version.hs\r\n\"rm\" -f utils/ghc-pkg/dist/build/Version.hs\r\necho \"module Version where\" >> utils/ghc-pkg/dist/build/Version.hs\r\necho \"version, targetOS, targetARCH :: String\" >> utils/ghc-pkg/dist/build/Version.hs\r\necho \"version = \\\"8.2.1\\\"\" >> utils/ghc-pkg/dist/build/Version.hs\r\necho \"targetOS = \\\"openbsd\\\"\" >> utils/ghc-pkg/dist/build/Version.hs\r\necho \"targetARCH = \\\"x86_64\\\"\" >> utils/ghc-pkg/dist/build/Version.hs\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"\r\n\"rm\" -f \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps\"\r\ncreate () { touch \"$1\" && chmod 755 \"$1\" ; } && create \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps\"\r\necho '#!/bin/sh' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps\"\r\necho 'exedir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps\"\r\necho 'exeprog=\"hp2ps\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps\"\r\necho 'executablename=\"$exedir/$exeprog\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps\"\r\necho 'datadir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps\"\r\necho 'bindir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps\"\r\necho 'topdir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps\"\r\ncat utils/hp2ps/hp2ps.wrapper >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps\"\r\nchmod +x \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hp2ps\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"\r\n\"rm\" -f \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghci-8.2.1\"\r\ncreate () { touch \"$1\" && chmod 755 \"$1\" ; } && create \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghci-8.2.1\"\r\necho '#!/bin/sh' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghci-8.2.1\"\r\necho 'exec \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1\" --interactive \"$@\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghci-8.2.1\"\r\nchmod +x \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghci-8.2.1\"\r\n\"rm\" -f \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghci\"\r\nln -s ghci-8.2.1 \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghci\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/.\" && /usr/bin/install -c -m 644 includes/./*.h \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/./\" && /usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/rts\" && /usr/bin/install -c -m 644 includes/rts/*.h \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/rts/\" && /usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/rts/prof\" && /usr/bin/install -c -m 644 includes/rts/prof/*.h \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/rts/prof/\" && /usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/rts/storage\" && /usr/bin/install -c -m 644 includes/rts/storage/*.h \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/rts/storage/\" && /usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/stg\" && /usr/bin/install -c -m 644 includes/stg/*.h \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/stg/\" && true\r\n/usr/bin/install -c -m 644 includes/ghcautoconf.h includes/ghcplatform.h includes/ghcversion.h includes/dist-derivedconstants/header/DerivedConstants.h \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include/\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"\r\n\"rm\" -f \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1\"\r\ncreate () { touch \"$1\" && chmod 755 \"$1\" ; } && create \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1\"\r\necho '#!/bin/sh' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1\"\r\necho 'exedir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1\"\r\necho 'exeprog=\"haddock\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1\"\r\necho 'executablename=\"$exedir/$exeprog\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1\"\r\necho 'datadir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1\"\r\necho 'bindir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1\"\r\necho 'topdir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1\"\r\ncat utils/haddock/haddock.wrapper >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1\"\r\nchmod +x \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock-ghc-8.2.1\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Classic.theme/\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Ocean.std-theme/\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/latex/\"\r\n/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/haddock-util.js \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/\"\r\n/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Classic.theme/haskell_icon.gif \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Classic.theme/\"\r\n/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Classic.theme/minus.gif \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Classic.theme/\"\r\n/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Classic.theme/plus.gif \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Classic.theme/\"\r\n/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Classic.theme/xhaddock.css \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Classic.theme/\"\r\n/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Ocean.std-theme/hslogo-16.png \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Ocean.std-theme/\"\r\n/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Ocean.std-theme/minus.gif \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Ocean.std-theme/\"\r\n/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Ocean.std-theme/ocean.css \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Ocean.std-theme/\"\r\n/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Ocean.std-theme/plus.gif \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Ocean.std-theme/\"\r\n/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/Ocean.std-theme/synopsis.png \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/Ocean.std-theme/\"\r\n/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/solarized.css \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/\"\r\n/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/html/highlight.js \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/html/\"\r\n/usr/bin/install -c -m 644 utils/haddock/haddock-api/resources/latex/haddock.sty \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/latex/\"\r\n\"rm\" -f \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock\"\r\nln -s haddock-ghc-8.2.1 \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/haddock\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"\r\n\"rm\" -f \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs\"\r\ncreate () { touch \"$1\" && chmod 755 \"$1\" ; } && create \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs\"\r\necho '#!/bin/sh' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs\"\r\necho 'exedir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs\"\r\necho 'exeprog=\"hsc2hs\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs\"\r\necho 'executablename=\"$exedir/$exeprog\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs\"\r\necho 'datadir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs\"\r\necho 'bindir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs\"\r\necho 'topdir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs\"\r\necho 'HSC2HS_EXTRA=\"--cflag=-std=gnu99 --cflag=-fno-stack-protector --lflag=-Wl,-z,wxneeded\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs\"\r\ncat utils/hsc2hs/hsc2hs.wrapper >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs\"\r\nchmod +x \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hsc2hs\"\r\n/usr/bin/install -c -m 644 utils/hsc2hs/template-hsc.h \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"\r\n\"rm\" -f \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1\"\r\ncreate () { touch \"$1\" && chmod 755 \"$1\" ; } && create \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1\"\r\necho '#!/bin/sh' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1\"\r\necho 'exedir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1\"\r\necho 'exeprog=\"ghc-pkg\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1\"\r\necho 'executablename=\"$exedir/$exeprog\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1\"\r\necho 'datadir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1\"\r\necho 'bindir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1\"\r\necho 'topdir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1\"\r\ncat utils/ghc-pkg/ghc-pkg.wrapper >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1\"\r\nchmod +x \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg-8.2.1\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"\r\n\"rm\" -f \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg\"\r\nln -s ghc-pkg-8.2.1 \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-pkg\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"\r\n\"rm\" -f \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc\"\r\ncreate () { touch \"$1\" && chmod 755 \"$1\" ; } && create \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc\"\r\necho '#!/bin/sh' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc\"\r\necho 'exedir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc\"\r\necho 'exeprog=\"hpc\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc\"\r\necho 'executablename=\"$exedir/$exeprog\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc\"\r\necho 'datadir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc\"\r\necho 'bindir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc\"\r\necho 'topdir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc\"\r\ncat utils/hpc/hpc.wrapper >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc\"\r\nchmod +x \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/hpc\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"\r\n\"rm\" -f \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1\"\r\ncreate () { touch \"$1\" && chmod 755 \"$1\" ; } && create \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1\"\r\necho '#!/bin/sh' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1\"\r\necho 'exedir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1\"\r\necho 'exeprog=\"runghc\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1\"\r\necho 'executablename=\"$exedir/$exeprog\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1\"\r\necho 'datadir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1\"\r\necho 'bindir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1\"\r\necho 'topdir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1\"\r\necho 'ghcprog=\"ghc-8.2.1\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1\"\r\ncat utils/runghc/runghc.wrapper >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1\"\r\nchmod +x \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc-8.2.1\"\r\n\"rm\" -f \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runhaskell\"\r\nln -s runghc \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runhaskell\"\r\n\"rm\" -f \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc\"\r\nln -s runghc-8.2.1 \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/runghc\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"\r\n\"rm\" -f \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1\"\r\ncreate () { touch \"$1\" && chmod 755 \"$1\" ; } && create \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1\"\r\necho '#!/bin/sh' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1\"\r\necho 'exedir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1\"\r\necho 'exeprog=\"ghc-stage2\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1\"\r\necho 'executablename=\"$exedir/$exeprog\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1\"\r\necho 'datadir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1\"\r\necho 'bindir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1\"\r\necho 'topdir=\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1\"\r\necho 'executablename=\"$exedir/ghc\"' >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1\"\r\ncat ghc/ghc.wrapper >> \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1\"\r\nchmod +x \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc-8.2.1\"\r\n\"rm\" -f \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc\"\r\nln -s ghc-8.2.1 \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/bin/ghc\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share/man\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share/man/man1\"\r\n/usr/bin/install -c -m 644 docs/users_guide/build-man/ghc.1 \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share/man/man1\"\r\n# driver/ghc-usage.txt driver/ghci-usage.txt includes/dist-derivedconstants/header/platformConstants settings = libraries to install\r\n# \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\" = directory to install to\r\n#\r\n# The .dll case calls STRIP_CMD explicitly, instead of `install -s`, because\r\n# on Win64, \"install -s\" calls a strip that doesn't understand 64bit binaries.\r\n# For some reason, this means the DLLs end up non-executable, which means\r\n# executables that use them just segfault.\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\"\r\nfor i in driver/ghc-usage.txt driver/ghci-usage.txt includes/dist-derivedconstants/header/platformConstants settings; do case $i in *.a) /usr/bin/install -c -m 644 $i \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\"; true \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\"/`basename $i` ;; *.dll) /usr/bin/install -c -m 755 $i \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\" ; strip \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\"/`basename $i` ;; *.so) /usr/bin/install -c -m 755 $i \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\" ;; *.dylib) /usr/bin/install -c -m 755 $i \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\";; *) /usr/bin/install -c -m 644 $i \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\"; esac; done\r\ngcc -E -undef -traditional -P -DINSTALLING -DLIB_DIR='\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\"' -DINCLUDE_DIR='\"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/include\"' -DFFI_INCLUDE_DIR=/usr/local/include -DFFI_LIB_DIR=/usr/local/lib '-DFFI_LIB=' -x c -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header rts/package.conf.in -o rts/dist/package.conf.install.raw\r\ngrep -v '^#pragma GCC' rts/dist/package.conf.install.raw | sed -e 's/\"\"//g' -e 's/:[ ]*,/: /g' >rts/dist/package.conf.install\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin\"\r\nfor i in utils/unlit/dist/build/tmp/unlit utils/hp2ps/dist/build/tmp/hp2ps utils/hp2ps/dist/build/tmp/hp2ps utils/haddock/dist/build/tmp/haddock utils/haddock/dist/build/tmp/haddock utils/hsc2hs/dist-install/build/tmp/hsc2hs utils/hsc2hs/dist-install/build/tmp/hsc2hs utils/ghc-pkg/dist-install/build/tmp/ghc-pkg utils/ghc-pkg/dist-install/build/tmp/ghc-pkg utils/hpc/dist-install/build/tmp/hpc utils/hpc/dist-install/build/tmp/hpc utils/runghc/dist-install/build/tmp/runghc utils/runghc/dist-install/build/tmp/runghc ghc/stage2/build/tmp/ghc-stage2 ghc/stage2/build/tmp/ghc-stage2 iserv/stage2/build/tmp/ghc-iserv iserv/stage2_p/build/tmp/ghc-iserv-prof iserv/stage2_dyn/build/tmp/ghc-iserv-dyn; do \\\r\n /usr/bin/install -c -m 755 $i \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin\"; \\\r\ndone\r\n\"mv\" \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin/ghc-stage2\" \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/bin/ghc\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1\"\r\n\"rm\" -rf \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/package.conf.d\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/package.conf.d\"\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts\"\r\n# rts/dist/build/libHSrts.a rts/dist/build/libHSrts_p.a rts/dist/build/libHSrts-ghc8.2.1.so rts/dist/build/libHSrts_l.a rts/dist/build/libHSrts_debug.a rts/dist/build/libHSrts_thr.a rts/dist/build/libHSrts_thr_debug.a rts/dist/build/libHSrts_thr_l.a rts/dist/build/libHSrts_thr_p.a rts/dist/build/libHSrts_debug-ghc8.2.1.so rts/dist/build/libHSrts_thr-ghc8.2.1.so rts/dist/build/libHSrts_thr_debug-ghc8.2.1.so rts/dist/build/libHSrts_l-ghc8.2.1.so rts/dist/build/libHSrts_thr_l-ghc8.2.1.so = libraries to install\r\n# \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts\" = directory to install to\r\n#\r\n# The .dll case calls STRIP_CMD explicitly, instead of `install -s`, because\r\n# on Win64, \"install -s\" calls a strip that doesn't understand 64bit binaries.\r\n# For some reason, this means the DLLs end up non-executable, which means\r\n# executables that use them just segfault.\r\n/usr/bin/install -c -m 755 -d \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts\"\r\nfor i in rts/dist/build/libHSrts.a rts/dist/build/libHSrts_p.a rts/dist/build/libHSrts-ghc8.2.1.so rts/dist/build/libHSrts_l.a rts/dist/build/libHSrts_debug.a rts/dist/build/libHSrts_thr.a rts/dist/build/libHSrts_thr_debug.a rts/dist/build/libHSrts_thr_l.a rts/dist/build/libHSrts_thr_p.a rts/dist/build/libHSrts_debug-ghc8.2.1.so rts/dist/build/libHSrts_thr-ghc8.2.1.so rts/dist/build/libHSrts_thr_debug-ghc8.2.1.so rts/dist/build/libHSrts_l-ghc8.2.1.so rts/dist/build/libHSrts_thr_l-ghc8.2.1.so; do case $i in *.a) /usr/bin/install -c -m 644 $i \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts\"; true \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts\"/`basename $i` ;; *.dll) /usr/bin/install -c -m 755 $i \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts\" ; strip \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts\"/`basename $i` ;; *.so) /usr/bin/install -c -m 755 $i \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts\" ;; *.dylib) /usr/bin/install -c -m 755 $i \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts\";; *) /usr/bin/install -c -m 644 $i \"/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1/rts\"; esac; done\r\n\"utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist\" copy libraries/ghc-prim dist-install \"strip\" '' '/root/.stack/programs/x86_64-openbsd/ghc-8.2.1' '/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/lib/ghc-8.2.1' '/root/.stack/programs/x86_64-openbsd/ghc-8.2.1/share/doc/ghc-8.2.1/html/libraries' 'v p dyn'\r\n\r\nld.so: ghc-cabal: can't load library 'libgmp.so.9.0'\r\nKilled\r\ngmake[1]: *** [ghc.mk:991: install_packages] Error 137\r\ngmake: *** [Makefile:51: install] Error 2\r\n\r\n\r\nError: Error encountered while installing GHC with\r\n gmake install\r\n run in /root/.stack/programs/x86_64-openbsd/ghc-8.2.1.temp/ghc-8.2.1/\r\n\r\nThe following directories may now contain files, but won't be used by stack:\r\n - /root/.stack/programs/x86_64-openbsd/ghc-8.2.1.temp/\r\n - /root/.stack/programs/x86_64-openbsd/ghc-8.2.1/\r\n\r\nInstalling GHC ...\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->Research neededhttps://gitlab.haskell.org/ghc/ghc/-/issues/12043internal error: evacuate: strange closure type2019-07-07T18:27:52Zmattchaninternal error: evacuate: strange closure typeScary error while building Liquid Haskell from source:
```
$ stack install ...Scary error while building Liquid Haskell from source:
```
$ stack install
[truncated]
text-1.2.2.1: copy/register
Progress: 40/61
-- While building package Cabal-1.22.8.0 using:
/Users/matt/.stack/setup-exe-cache/x86_64-osx/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.5.0 build --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure (-6)
Logs have been written to: /Users/matt/liquid/liquidhaskell/.stack-work/logs/Cabal-1.22.8.0.log
Configuring Cabal-1.22.8.0...
Building Cabal-1.22.8.0...
Preprocessing library Cabal-1.22.8.0...
[ 1 of 81] Compiling Paths_Cabal ( .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen/Paths_Cabal.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Paths_Cabal.o )
[ 2 of 81] Compiling Distribution.TestSuite ( Distribution/TestSuite.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/TestSuite.o )
[ 3 of 81] Compiling Distribution.Simple.PreProcess.Unlit ( Distribution/Simple/PreProcess/Unlit.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Simple/PreProcess/Unlit.o )
[ 4 of 81] Compiling Distribution.GetOpt ( Distribution/GetOpt.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/GetOpt.o )
[ 5 of 81] Compiling Distribution.PackageDescription.Utils ( Distribution/PackageDescription/Utils.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/PackageDescription/Utils.o )
[ 6 of 81] Compiling Distribution.Simple.CCompiler ( Distribution/Simple/CCompiler.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Simple/CCompiler.o )
[ 7 of 81] Compiling Distribution.Compat.Binary ( Distribution/Compat/Binary.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Compat/Binary.o )
[ 8 of 81] Compiling Distribution.Compat.ReadP ( Distribution/Compat/ReadP.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Compat/ReadP.o )
[ 9 of 81] Compiling Distribution.Text ( Distribution/Text.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Text.o )
[10 of 81] Compiling Distribution.Version ( Distribution/Version.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Version.o )
[11 of 81] Compiling Language.Haskell.Extension ( Language/Haskell/Extension.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Language/Haskell/Extension.o )
[12 of 81] Compiling Distribution.Compiler ( Distribution/Compiler.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Compiler.o )
[13 of 81] Compiling Distribution.Simple.Compiler ( Distribution/Simple/Compiler.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Simple/Compiler.o )
[14 of 81] Compiling Distribution.Simple.GHC.ImplInfo ( Distribution/Simple/GHC/ImplInfo.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Simple/GHC/ImplInfo.o )
[15 of 81] Compiling Distribution.License ( Distribution/License.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/License.o )
[16 of 81] Compiling Distribution.ModuleName ( Distribution/ModuleName.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/ModuleName.o )
[17 of 81] Compiling Distribution.Package ( Distribution/Package.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Package.o )
[18 of 81] Compiling Distribution.System ( Distribution/System.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/System.o )
[19 of 81] Compiling Distribution.PackageDescription ( Distribution/PackageDescription.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/PackageDescription.o )
ghc: internal error: evacuate: strange closure type 41832616
(GHC version 7.10.3 for x86_64_apple_darwin)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
```
\[\[Image(http://i.imgur.com/T44UPg0.png)\]\]
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------- |
| Version | 7.10.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Unknown/Multiple |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"internal error: evacuate: strange closure type","status":"New","operating_system":"Unknown/Multiple","component":"Compiler","related":[],"milestone":"Research needed","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.10.3","keywords":["closuren","error,","internal","strange"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Scary error while building Liquid Haskell from source:\r\n\r\n{{{\r\n$ stack install \r\n[truncated]\r\ntext-1.2.2.1: copy/register\r\nProgress: 40/61\r\n-- While building package Cabal-1.22.8.0 using:\r\n /Users/matt/.stack/setup-exe-cache/x86_64-osx/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.5.0 build --ghc-options \" -ddump-hi -ddump-to-file\"\r\n Process exited with code: ExitFailure (-6)\r\n Logs have been written to: /Users/matt/liquid/liquidhaskell/.stack-work/logs/Cabal-1.22.8.0.log\r\n\r\n Configuring Cabal-1.22.8.0...\r\n Building Cabal-1.22.8.0...\r\n Preprocessing library Cabal-1.22.8.0...\r\n [ 1 of 81] Compiling Paths_Cabal ( .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen/Paths_Cabal.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Paths_Cabal.o )\r\n [ 2 of 81] Compiling Distribution.TestSuite ( Distribution/TestSuite.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/TestSuite.o )\r\n [ 3 of 81] Compiling Distribution.Simple.PreProcess.Unlit ( Distribution/Simple/PreProcess/Unlit.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Simple/PreProcess/Unlit.o )\r\n [ 4 of 81] Compiling Distribution.GetOpt ( Distribution/GetOpt.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/GetOpt.o )\r\n [ 5 of 81] Compiling Distribution.PackageDescription.Utils ( Distribution/PackageDescription/Utils.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/PackageDescription/Utils.o )\r\n [ 6 of 81] Compiling Distribution.Simple.CCompiler ( Distribution/Simple/CCompiler.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Simple/CCompiler.o )\r\n [ 7 of 81] Compiling Distribution.Compat.Binary ( Distribution/Compat/Binary.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Compat/Binary.o )\r\n [ 8 of 81] Compiling Distribution.Compat.ReadP ( Distribution/Compat/ReadP.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Compat/ReadP.o )\r\n [ 9 of 81] Compiling Distribution.Text ( Distribution/Text.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Text.o )\r\n [10 of 81] Compiling Distribution.Version ( Distribution/Version.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Version.o )\r\n [11 of 81] Compiling Language.Haskell.Extension ( Language/Haskell/Extension.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Language/Haskell/Extension.o )\r\n [12 of 81] Compiling Distribution.Compiler ( Distribution/Compiler.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Compiler.o )\r\n [13 of 81] Compiling Distribution.Simple.Compiler ( Distribution/Simple/Compiler.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Simple/Compiler.o )\r\n [14 of 81] Compiling Distribution.Simple.GHC.ImplInfo ( Distribution/Simple/GHC/ImplInfo.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Simple/GHC/ImplInfo.o )\r\n [15 of 81] Compiling Distribution.License ( Distribution/License.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/License.o )\r\n [16 of 81] Compiling Distribution.ModuleName ( Distribution/ModuleName.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/ModuleName.o )\r\n [17 of 81] Compiling Distribution.Package ( Distribution/Package.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/Package.o )\r\n [18 of 81] Compiling Distribution.System ( Distribution/System.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/System.o )\r\n [19 of 81] Compiling Distribution.PackageDescription ( Distribution/PackageDescription.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Distribution/PackageDescription.o )\r\n ghc: internal error: evacuate: strange closure type 41832616\r\n (GHC version 7.10.3 for x86_64_apple_darwin)\r\n Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n}}}\r\n\r\n\r\n[[Image(http://i.imgur.com/T44UPg0.png)]]","type_of_failure":"OtherFailure","blocking":[]} -->Research neededhttps://gitlab.haskell.org/ghc/ghc/-/issues/9198large performance regression in type checker speed in 7.82021-06-10T08:29:59ZCarter Schonwaldlarge performance regression in type checker speed in 7.8it was recently demonstrated on the haskell-cafe mailing list that the following code takes measurably longer to type check in GHC 7.8.2 than in GHC 7.6.
http://www.haskell.org/pipermail/haskell-cafe/2014-June/114562.html
the program e...it was recently demonstrated on the haskell-cafe mailing list that the following code takes measurably longer to type check in GHC 7.8.2 than in GHC 7.6.
http://www.haskell.org/pipermail/haskell-cafe/2014-June/114562.html
the program example is as follows
```hs
begin :: Monad m => (m () -> t) -> t
begin cont = cont (return ())
a :: IO a -> (IO () -> t) -> t
a m cont = cont (m >> putStrLn "a")
end :: t -> t
end m = m
main = begin a a a a a a a a a a a a a a a a a a end
```
takes about a second to type check in ghc 7.8, and is "instant" in 7.6 ()
each additional a doubles the time to type check the program
```hs
main = begin a a a a a a a a a a a a a a a a a a a a a a a a end
```
takes longer than I have the patience to wait :) (so more than 5 seconds)
the author of the email notes that a related program
```hs
main = id id id id id id id id id id id
id id id id id id id id id id id (return ())
```
has the exponential complexity in both 7.8.2 and 7.6.2
This It could very well be that some of the type checker changes between 7.8 and 7.6 enlarged the space of programs that trip up exponential worst case behavior, but one way or another understanding \*why\* this happenedResearch neededSimon JakobiSimon Jakobihttps://gitlab.haskell.org/ghc/ghc/-/issues/11528Representation of value set abstractions as trees causes performance issues2020-07-08T09:06:43ZGeorgios KarachaliasRepresentation of value set abstractions as trees causes performance issuesThe new exhaustiveness checker has been originally designed to use a prefix tree representation of value set abstractions. Unfortunately, this resulted in huge performance problems (see for example #11160, #11161, #11162, #11163, #11195,...The new exhaustiveness checker has been originally designed to use a prefix tree representation of value set abstractions. Unfortunately, this resulted in huge performance problems (see for example #11160, #11161, #11162, #11163, #11195, #11276, #11303, #11374, #11302) and we had to switch to a representation of value set abstractions as a list of value vector abstractions.
It would be nice to switch back to the prefix tree representation but the performance problems with it are yet to be characterized so I have created a branch using this representation (`wip/gadtpm-prefix-tree`) to further investigate this approach.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | lowest |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | simonpj |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Representation of value set abstractions as trees causes performance issues","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"Research needed","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"gkaracha"},"version":"","keywords":["PatternMatchWarnings"],"differentials":[],"test_case":"","architecture":"","cc":["simonpj"],"type":"Task","description":"The new exhaustiveness checker has been originally designed to use a prefix tree representation of value set abstractions. Unfortunately, this resulted in huge performance problems (see for example #11160, #11161, #11162, #11163, #11195, #11276, #11303, #11374, #11302) and we had to switch to a representation of value set abstractions as a list of value vector abstractions.\r\n\r\nIt would be nice to switch back to the prefix tree representation but the performance problems with it are yet to be characterized so I have created a branch using this representation (`wip/gadtpm-prefix-tree`) to further investigate this approach.\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->Research needed