From aee374d4822cea41302c553c0fb517ed59b3dbd7 Mon Sep 17 00:00:00 2001 From: Cameron Samak Date: Tue, 26 Nov 2024 10:49:04 -0800 Subject: [PATCH] Do not error on any AppT in sqlMaybeSelectProcessRowDec No need to be this restrictive in deriveEsqueletoRecord For example, AppT ListT _ and AppT (ConT _) _ are both fine but would throw an error here before this change. --- src/Database/Esqueleto/Record.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Database/Esqueleto/Record.hs b/src/Database/Esqueleto/Record.hs index cdc9913be..34a29eafd 100644 --- a/src/Database/Esqueleto/Record.hs +++ b/src/Database/Esqueleto/Record.hs @@ -935,9 +935,9 @@ sqlMaybeSelectProcessRowDec RecordInfo {..} = do ] where wrapJust x = case x of - AppT (ConT ((==) ''Entity -> True)) _innerType -> id ((ConT ((==) ''Maybe -> True)) `AppT` _inner) -> AppE (ConE 'Just) (ConT _) -> id + (AppT _ _) -> id _ -> error $ show x -- | Generates the `sqlSelectColCount` declaration for an `SqlSelect` instance.