diff --git a/src/Data/Query.hs b/src/Data/Query.hs index ad121a6..4ccd18b 100644 --- a/src/Data/Query.hs +++ b/src/Data/Query.hs @@ -29,18 +29,18 @@ data Field a where Title :: Field String data QueryF f where - StartsWith :: Field a -> a -> QueryF f - EndsWith :: Field a -> a -> QueryF f + StartsWith :: Field String -> String -> QueryF f + EndsWith :: Field String -> String -> QueryF f And :: f -> f -> QueryF f deriving instance Functor QueryF type Query = Fix QueryF -startsWith :: Field a -> a -> Query +startsWith :: Field String -> String -> Query startsWith field x = Fix (StartsWith field x) -endsWith :: Field a -> a -> Query +endsWith :: Field String -> String -> Query endsWith field x = Fix (EndsWith field x) (.&&.) :: Query -> Query -> Query