Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Make Ident a Functor #90

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/ComputeSize.hs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ defineComp ty = CDeclExt (CDecl (map CTypeSpec (exportCompType $ derefTypeDefs t
replaceEnum dty = dty

defineTyDef :: (CompTypeRef, Ident) -> CExtDecl
defineTyDef (ctr,tydef) = CDeclExt (CDecl specs [(Just$ CDeclr (Just tydef) [] Nothing [] undefNode, Nothing, Nothing)] undefNode)
defineTyDef (ctr,tydef) = CDeclExt (CDecl specs [CDeclI $ CDeclr (Just tydef) [] Nothing [] undefNode] undefNode)
where
specs = [CStorageSpec (CTypedef undefNode)] ++ map CTypeSpec (exportCompTypeDecl ctr)

Expand Down
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 58 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable;
flake-utils.url = github:numtide/flake-utils;
};
outputs = {
self,
nixpkgs,
flake-utils,
...
} @ inputs: let
packages = final: p: {
"language-c" =
final.haskell.lib.overrideCabal
(p.callCabal2nixWithOptions "language-c" "${self}" "" {}) {
doCheck = false;
};
};
overlays = final: prev: {
haskellPackages = prev.haskellPackages.extend (p: _: packages final p);
};
in
{
overlays.default = overlays;
}
// flake-utils.lib.eachDefaultSystem
(system: let
hpkgs =
(import nixpkgs {
inherit system;
overlays = [overlays];
})
.haskellPackages;
in rec {
packages = {
default = hpkgs.language-c;
language-c = hpkgs.language-c;
};
devShells = let
buildInputs = with hpkgs; [
cabal-install
ghcid
haskell-language-server
hpack
fourmolu
];
withHoogle = true;
in {
default =
hpkgs.shellFor
{
name = "language-c-shell";
packages = p: [p.language-c];
inherit buildInputs withHoogle;
};
};
});
}
2 changes: 1 addition & 1 deletion language-c.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: language-c
Version: 0.9.1
Version: 1.9.1
Cabal-Version: >= 1.10
Build-Type: Simple
License: BSD3
Expand Down
Loading