Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"permissions": {
"allow": [
"Bash(ghc:*)",
"Bash(git stash:*)"
]
}
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": []
}
50 changes: 50 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

{
// Automatically created by phoityne-vscode extension.

"version": "2.0.0",
"presentation": {
"reveal": "always",
"panel": "new"
},
"tasks": [
{
// F7
"group": {
"kind": "build",
"isDefault": true
},
"label": "haskell build",
"type": "shell",
//"command": "cabal configure && cabal build"
"command": "stack build"
},
{
// F6
"group": "build",
"type": "shell",
"label": "haskell clean & build",
//"command": "cabal clean && cabal configure && cabal build"
"command": "stack clean && stack build"
//"command": "stack clean ; stack build" // for powershell
},
{
// F8
"group": {
"kind": "test",
"isDefault": true
},
"type": "shell",
"label": "haskell test",
//"command": "cabal test"
"command": "stack test"
},
{
// F6
"isBackground": true,
"type": "shell",
"label": "haskell watch",
"command": "stack build --test --no-run-tests --file-watch"
}
]
}
15 changes: 8 additions & 7 deletions beam-core/Database/Beam/Backend/SQL/Row.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import Control.Applicative
import Control.Exception (Exception)
import Control.Monad.Free.Church
import Control.Monad.Identity
import Control.Monad (replicateM_)
import Data.Tagged
import Data.Typeable
import Data.Vector.Sized (Vector)
Expand Down Expand Up @@ -277,13 +278,13 @@ instance ( BeamBackend be, Generic (tbl (Nullable Identity)), Generic (tbl (Null
valuesNeeded be _ = gValuesNeeded be (Proxy @(Rep (tbl (Nullable Exposed)))) (Proxy @(Rep (tbl (Nullable Identity))))

instance (FromBackendRow be x, FromBackendRow be SqlNull) => FromBackendRow be (Maybe x) where
fromBackendRow =
(Just <$> fromBackendRow) <|>
(Nothing <$
replicateM_ (valuesNeeded (Proxy @be) (Proxy @(Maybe x)))
(do SqlNull <- fromBackendRow
pure ()))
valuesNeeded be _ = valuesNeeded be (Proxy @x)
fromBackendRow =
(Just <$> fromBackendRow) <|>
(Nothing <$
replicateM_ (valuesNeeded (Proxy @be) (Proxy @(Maybe x)))
(do SqlNull <- fromBackendRow
pure ()))
valuesNeeded be _ = valuesNeeded be (Proxy @x)

instance (BeamBackend be, FromBackendRow be t) => FromBackendRow be (Tagged tag t) where
fromBackendRow = Tagged <$> fromBackendRow
Expand Down
1 change: 0 additions & 1 deletion beam-core/Database/Beam/Backend/SQL/SQL92.hs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ class ( IsSql92ExpressionSyntax (Sql92SelectTableExpressionSyntax select)
, IsSql92FromSyntax (Sql92SelectTableFromSyntax select)
, IsSql92GroupingSyntax (Sql92SelectTableGroupingSyntax select)
, IsSql92AggregationSetQuantifierSyntax (Sql92SelectTableSetQuantifierSyntax select)
, IsSql92AggregationIndexHintsSyntax (Sql92SelectTableSetIndexHintsSyntax select)

, Sql92GroupingExpressionSyntax (Sql92SelectTableGroupingSyntax select) ~ Sql92SelectTableExpressionSyntax select
, Sql92FromExpressionSyntax (Sql92SelectTableFromSyntax select) ~ Sql92SelectTableExpressionSyntax select
Expand Down
2 changes: 2 additions & 0 deletions beam-core/Database/Beam/Query/CTE.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import Database.Beam.Query.Internal
import Database.Beam.Query.Types

import Control.Monad.Free.Church
import Control.Monad.Fix (MonadFix(..))

import Control.Monad.Writer hiding ((<>))
import Control.Monad.State.Strict

Expand Down
1 change: 1 addition & 0 deletions beam-core/Database/Beam/Schema/Lenses.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Database.Beam.Schema.Tables
import Control.Monad.Identity

import Data.Proxy
import Data.Function (fix)

import GHC.Generics
import GHC.Types (Type)
Expand Down
77 changes: 77 additions & 0 deletions beam-core/flake.lock

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

33 changes: 33 additions & 0 deletions beam-core/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/89c2b2330e733d6cdb5eae7b899326930c2c0648";
flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
};

outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } ({ withSystem, ... }: {
systems = nixpkgs.lib.systems.flakeExposed;
imports = [
inputs.haskell-flake.flakeModule
];
perSystem = { self', pkgs, lib, config, ... }: {
haskellProjects.default = {
projectFlakeName = "beam";
basePackages = pkgs.haskell.packages.ghc98;
autoWire = ["packages" "checks" "devShells" "apps"];
devShell.tools = hp: {
"haskell-language-server" = null;
};
packages ={
pqueue.source = "1.5.0.0";
};
settings = {
pretty-simple = {
check = false;
};
};
};
};
});
}
2 changes: 1 addition & 1 deletion beam-migrate-cli/Database/Beam/Migrate/Tool/Registry.hs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ lookupUserInfo _ = do
let fullName = username
#else
userId <- getEffectiveUserID
UserEntry { userName = username, userGecos = fullName } <- getUserEntryForID userId
UserEntry username _ _ _ fullName _ _ <- getUserEntryForID userId
#endif
hostname <- getHostName

Expand Down
Loading
Loading