Skip to content

Commit 5d61750

Browse files
committed
Improve a few error messages
1 parent ac758f2 commit 5d61750

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Data/Aeson/TypeScript/Lookup.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ deriveTypeScriptLookupType name declNameStr = do
3030
interfaceDecl <- getClosedTypeFamilyInterfaceDecl name eqns
3131
return [FunD (mkName declNameStr) [Clause [] (NormalB (ListE [interfaceDecl])) []]]
3232

33-
_ -> fail [i|Expected a close type family; got #{info}|]
33+
_ -> fail [i|Expected a closed type family; got #{info}|]
3434

3535
getClosedTypeFamilyInterfaceDecl :: Name -> [TySynEqn] -> Q Exp
3636
getClosedTypeFamilyInterfaceDecl name eqns = do
@@ -44,7 +44,7 @@ getClosedTypeFamilyInterfaceDecl name eqns = do
4444
TySynEqn [ConT arg] result -> do
4545
[| TSField False (getTypeScriptType (Proxy :: Proxy $(conT arg))) (getTypeScriptType (Proxy :: Proxy $(return result))) Nothing |]
4646
#endif
47-
x -> fail [i|aeson-typescript doesn't know yet how to handle this type family equation: '#{x}'|]
47+
x -> fail [i|aeson-typescript doesn't know yet how to handle this type family equation when generating interface declaration: '#{x}'|]
4848

4949
[| TSInterfaceDeclaration $(TH.stringE $ nameBase name) [] (L.sortBy (compare `on` fieldName) $(listE $ fmap return fields)) Nothing |]
5050

@@ -56,4 +56,4 @@ getClosedTypeFamilyImage eqns = do
5656
#else
5757
TySynEqn [ConT _] result -> return result
5858
#endif
59-
x -> fail [i|aeson-typescript doesn't know yet how to handle this type family equation: '#{x}'|]
59+
x -> fail [i|aeson-typescript doesn't know yet how to handle this type family equation when calculating closed type family image: '#{x}'|]

0 commit comments

Comments
 (0)