Skip to content

Instantly share code, notes, and snippets.

@fendor
fendor / Info.md
Last active February 20, 2022 16:04

Cabal Status Command Specification

Describes how we expect the command cabal status to behave from a high-level perspective.

CompilerInfo

> cabal status --output-format=json --compiler | jq
{
  "cabal-version": "3.7.0.0",
@fendor
fendor / A.hs
Created September 5, 2020 19:09
{-# LANGUAGE TemplateHaskell #-}
module A (template) where
import Language.Haskell.TH
template :: DecsQ
template = do
consA <- newName "A"
consA' <- newName "A"
@fendor
fendor / README.md
Created August 31, 2020 10:31
Final submission for Fendor's Google Summer of Code Project "Multiple Home Units For GHC"

GSoC Submission

The goal of my Google Summer of Code project was to introduce support of multiple home units for GHC. The main motivation for this proposal is to help IDEs provide a seamless developer experience. Currently, two of the bigger IDE projects in Haskell are ghcide and Haskell IDE Engine. Both of these projects aim to support a workflow where developers can work on multiple packages, such as a package's library and executable at the same time. The work-force behind it is GHC itself, which is responsible for actually compiling a user's source files. While we succeeded to create a fork that implements the proposal, nothing has been merged into upstream yet. This is to be expected, since it is a huge change that will impact a considerable number of the GHC API's consumers. Therefore this feature needs to be designed with care and code changes verified to have no unintended sid

GHC/Foo.hs:6:12: error:
• Overlapping instances for MyEq Bool arising from a use of ‘==’
Matching instances:
instance MyEq Bool -- Defined in ‘GHC.Base’
instance MyEq Bool -- Defined in ‘GHC.Base’
• In the expression: True == True
In an equation for ‘foo’: foo = True == True
app/Main.hs:3:1: error:
Bad interface file: /home/baldr/Documents/haskell/fprog/dist-newstyle/build/x86_64-linux/ghc-8.11.0.20200817/fprog-0.1.0.0/build/Paths_fprog.hi
/home/baldr/Documents/haskell/fprog/dist-newstyle/build/x86_64-linux/ghc-8.11.0.20200817/fprog-0.1.0.0/build/Paths_fprog.hi: openBinaryFile: does not exist (No such file or directory)
|
3 | import Paths_fprog
| ^^^^^^^^^^^^^^^^^^
Failed,
simple-bios-shell: OK (0.55s)
Finding Cradle for: C:\Users\runneradmin\AppData\Local\Temp\hie-bios-test-bd77a1b14cf6e038\B.hs
Loading Cradle: Just "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\hie-bios-test-bd77a1b14cf6e038\\hie.yaml"
Get runtime GHC library directory (0.06s)
Get runtime GHC version (0.03s)
Initialise Flags (0.16s)
Initial module load
comp opts: ComponentOptions {componentOptions = [], componentRoot = "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\hie-bios-test-bd77a1b14cf6e038", componentDependencies = []} (0.24s)
(1,2) (0.05s)
ghcide: Couldn't find a target code interpreter. Try with -fexternal-interpreter
let
workRun :: (IO ([()], [IO ()]) -> IO ([()], [IO ()])) -> IO (IO ())
workRun restore = do
let systemActs' = pumpAction : map getAction systemActs
res <- try @SomeException
(restore $ (shakeRunDatabase shakeDb systemActs' :: IO ([()], [IO ()])))
let res' = case res of
Left e -> "exception: " <> displayException e
Right _ -> "completed"
-- Wrap up in a thread to avoid calling interruptible
esolving dependencies...
Build profile: -w ghc-8.11.0.20200810 -O1
In order, the following will be built (use -v for more details):
- comonad-5.0.6 (lib:comonad) (requires build)
- ghc-api-compat-8.6 (lib) (first run)
- bifunctors-5.5.7 (lib) (requires build)
- ghc-check-0.5.0.1 (lib) (first run)
- semigroupoids-5.3.4 (lib:semigroupoids) (requires build)
- profunctors-5.5.2 (lib) (requires build)
- assoc-1.0.2 (lib) (requires build)
includes/stg/MiscClosures.h:378:14: error:
note: previous declaration of ‘stg_copyArray_barrier’ was here
378 | RTS_FUN_DECL(stg_copyArray_barrier);
| ^~~~~~~~~~~~~~~~~~~~~
|
378 | RTS_FUN_DECL(stg_copyArray_barrier);
| ^
includes/stg/MiscClosures.h:35:61: error:
note: in definition of macro ‘RTS_FUN_DECL’