ginger 0.10.5.2 → 0.10.6.0
raw patch · 4 files changed
+23/−10 lines, 4 filesdep ~optparse-applicativedep ~timenew-uploaderPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: optparse-applicative, time
API changes (from Hackage documentation)
- Text.Ginger.GVal: instance Data.Default.Class.Default (Text.Ginger.GVal.GVal m)
- Text.Ginger.GVal: instance Text.Ginger.GVal.FromGVal m Data.ByteString.Internal.ByteString
- Text.Ginger.GVal: instance Text.Ginger.GVal.ToGVal m Data.ByteString.Internal.ByteString
- Text.Ginger.Run.Type: instance Data.Default.Class.Default (Text.Ginger.Run.Type.RuntimeError p)
+ Text.Ginger.GVal: instance Data.Default.Internal.Default (Text.Ginger.GVal.GVal m)
+ Text.Ginger.GVal: instance Text.Ginger.GVal.FromGVal m Data.ByteString.Internal.Type.ByteString
+ Text.Ginger.GVal: instance Text.Ginger.GVal.ToGVal m Data.ByteString.Internal.Type.ByteString
+ Text.Ginger.Run.Builtins: gfnReverse :: forall p (m :: Type -> Type) h. Monad m => Function (Run p m h)
+ Text.Ginger.Run.Type: instance Data.Default.Internal.Default (Text.Ginger.Run.Type.RuntimeError p)
- Text.Ginger.AST: class Annotated f
+ Text.Ginger.AST: class Annotated (f :: Type -> Type)
- Text.Ginger.GVal: (~!) :: FromGVal m v => GVal m -> GVal m -> Maybe v
+ Text.Ginger.GVal: (~!) :: forall (m :: Type -> Type) v. FromGVal m v => GVal m -> GVal m -> Maybe v
- Text.Ginger.GVal: (~:) :: ToGVal m a => a -> Cons m -> Cons m
+ Text.Ginger.GVal: (~:) :: forall (m :: Type -> Type) a. ToGVal m a => a -> Cons m -> Cons m
- Text.Ginger.GVal: (~>) :: ToGVal m a => Text -> a -> Pair m
+ Text.Ginger.GVal: (~>) :: forall (m :: Type -> Type) a. ToGVal m a => Text -> a -> Pair m
- Text.Ginger.GVal: GVal :: Maybe [GVal m] -> Maybe [(Text, GVal m)] -> Maybe (Text -> Maybe (GVal m)) -> Html -> Text -> Bool -> Maybe Scientific -> Maybe (Function m) -> Maybe ByteString -> Maybe Int -> Bool -> Maybe Value -> GVal m
+ Text.Ginger.GVal: GVal :: Maybe [GVal m] -> Maybe [(Text, GVal m)] -> Maybe (Text -> Maybe (GVal m)) -> Html -> Text -> Bool -> Maybe Scientific -> Maybe (Function m) -> Maybe ByteString -> Maybe Int -> Bool -> Maybe Value -> GVal (m :: Type -> Type)
- Text.Ginger.GVal: [asBoolean] :: GVal m -> Bool
+ Text.Ginger.GVal: [asBoolean] :: GVal (m :: Type -> Type) -> Bool
- Text.Ginger.GVal: [asBytes] :: GVal m -> Maybe ByteString
+ Text.Ginger.GVal: [asBytes] :: GVal (m :: Type -> Type) -> Maybe ByteString
- Text.Ginger.GVal: [asDictItems] :: GVal m -> Maybe [(Text, GVal m)]
+ Text.Ginger.GVal: [asDictItems] :: GVal (m :: Type -> Type) -> Maybe [(Text, GVal m)]
- Text.Ginger.GVal: [asFunction] :: GVal m -> Maybe (Function m)
+ Text.Ginger.GVal: [asFunction] :: GVal (m :: Type -> Type) -> Maybe (Function m)
- Text.Ginger.GVal: [asHtml] :: GVal m -> Html
+ Text.Ginger.GVal: [asHtml] :: GVal (m :: Type -> Type) -> Html
- Text.Ginger.GVal: [asJSON] :: GVal m -> Maybe Value
+ Text.Ginger.GVal: [asJSON] :: GVal (m :: Type -> Type) -> Maybe Value
- Text.Ginger.GVal: [asList] :: GVal m -> Maybe [GVal m]
+ Text.Ginger.GVal: [asList] :: GVal (m :: Type -> Type) -> Maybe [GVal m]
- Text.Ginger.GVal: [asLookup] :: GVal m -> Maybe (Text -> Maybe (GVal m))
+ Text.Ginger.GVal: [asLookup] :: GVal (m :: Type -> Type) -> Maybe (Text -> Maybe (GVal m))
- Text.Ginger.GVal: [asNumber] :: GVal m -> Maybe Scientific
+ Text.Ginger.GVal: [asNumber] :: GVal (m :: Type -> Type) -> Maybe Scientific
- Text.Ginger.GVal: [asText] :: GVal m -> Text
+ Text.Ginger.GVal: [asText] :: GVal (m :: Type -> Type) -> Text
- Text.Ginger.GVal: [isNull] :: GVal m -> Bool
+ Text.Ginger.GVal: [isNull] :: GVal (m :: Type -> Type) -> Bool
- Text.Ginger.GVal: [length] :: GVal m -> Maybe Int
+ Text.Ginger.GVal: [length] :: GVal (m :: Type -> Type) -> Maybe Int
- Text.Ginger.GVal: asHashMap :: GVal m -> Maybe (HashMap Text (GVal m))
+ Text.Ginger.GVal: asHashMap :: forall (m :: Type -> Type). GVal m -> Maybe (HashMap Text (GVal m))
- Text.Ginger.GVal: class FromGVal m a
+ Text.Ginger.GVal: class FromGVal (m :: Type -> Type) a
- Text.Ginger.GVal: class ToGVal m a
+ Text.Ginger.GVal: class ToGVal (m :: Type -> Type) a
- Text.Ginger.GVal: data GVal m
+ Text.Ginger.GVal: data GVal (m :: Type -> Type)
- Text.Ginger.GVal: dayToDict :: Day -> [(Text, GVal m)]
+ Text.Ginger.GVal: dayToDict :: forall (m :: Type -> Type). Day -> [(Text, GVal m)]
- Text.Ginger.GVal: dict :: [Pair m] -> GVal m
+ Text.Ginger.GVal: dict :: forall (m :: Type -> Type). [Pair m] -> GVal m
- Text.Ginger.GVal: gappend :: GVal m -> GVal m -> GVal m
+ Text.Ginger.GVal: gappend :: forall (m :: Type -> Type). GVal m -> GVal m -> GVal m
- Text.Ginger.GVal: gcons :: ToGVal m a => a -> Cons m -> Cons m
+ Text.Ginger.GVal: gcons :: forall (m :: Type -> Type) a. ToGVal m a => a -> Cons m -> Cons m
- Text.Ginger.GVal: isDict :: GVal m -> Bool
+ Text.Ginger.GVal: isDict :: forall (m :: Type -> Type). GVal m -> Bool
- Text.Ginger.GVal: isList :: GVal m -> Bool
+ Text.Ginger.GVal: isList :: forall (m :: Type -> Type). GVal m -> Bool
- Text.Ginger.GVal: keys :: GVal m -> Maybe [Text]
+ Text.Ginger.GVal: keys :: forall (m :: Type -> Type). GVal m -> Maybe [Text]
- Text.Ginger.GVal: list :: Cons m -> GVal m
+ Text.Ginger.GVal: list :: forall (m :: Type -> Type). Cons m -> GVal m
- Text.Ginger.GVal: localTimeToDict :: LocalTime -> [(Text, GVal m)]
+ Text.Ginger.GVal: localTimeToDict :: forall (m :: Type -> Type). LocalTime -> [(Text, GVal m)]
- Text.Ginger.GVal: lookupIndex :: Int -> GVal m -> Maybe (GVal m)
+ Text.Ginger.GVal: lookupIndex :: forall (m :: Type -> Type). Int -> GVal m -> Maybe (GVal m)
- Text.Ginger.GVal: lookupIndexMay :: Maybe Int -> GVal m -> Maybe (GVal m)
+ Text.Ginger.GVal: lookupIndexMay :: forall (m :: Type -> Type). Maybe Int -> GVal m -> Maybe (GVal m)
- Text.Ginger.GVal: lookupKey :: Text -> GVal m -> Maybe (GVal m)
+ Text.Ginger.GVal: lookupKey :: forall (m :: Type -> Type). Text -> GVal m -> Maybe (GVal m)
- Text.Ginger.GVal: lookupLoose :: GVal m -> GVal m -> Maybe (GVal m)
+ Text.Ginger.GVal: lookupLoose :: forall (m :: Type -> Type). GVal m -> GVal m -> Maybe (GVal m)
- Text.Ginger.GVal: lookupLooseDef :: GVal m -> GVal m -> GVal m -> GVal m
+ Text.Ginger.GVal: lookupLooseDef :: forall (m :: Type -> Type). GVal m -> GVal m -> GVal m -> GVal m
- Text.Ginger.GVal: marshalFunction :: (Functor m, Functor n) => (forall a. m a -> n a) -> (forall a. n a -> m a) -> Function m -> Function n
+ Text.Ginger.GVal: marshalFunction :: (Functor m, Functor n) => (forall a. () => m a -> n a) -> (forall a. () => n a -> m a) -> Function m -> Function n
- Text.Ginger.GVal: marshalGVal :: GVal m -> GVal n
+ Text.Ginger.GVal: marshalGVal :: forall (m :: Type -> Type) (n :: Type -> Type). GVal m -> GVal n
- Text.Ginger.GVal: marshalGValEx :: (Functor m, Functor n) => (forall a. m a -> n a) -> (forall a. n a -> m a) -> GVal m -> GVal n
+ Text.Ginger.GVal: marshalGValEx :: (Functor m, Functor n) => (forall a. () => m a -> n a) -> (forall a. () => n a -> m a) -> GVal m -> GVal n
- Text.Ginger.GVal: matchFuncArgs :: [Text] -> [(Maybe Text, GVal m)] -> (HashMap Text (GVal m), [GVal m], HashMap Text (GVal m))
+ Text.Ginger.GVal: matchFuncArgs :: forall (m :: Type -> Type). [Text] -> [(Maybe Text, GVal m)] -> (HashMap Text (GVal m), [GVal m], HashMap Text (GVal m))
- Text.Ginger.GVal: orderedDict :: [Pair m] -> GVal m
+ Text.Ginger.GVal: orderedDict :: forall (m :: Type -> Type). [Pair m] -> GVal m
- Text.Ginger.GVal: rawJSONToGVal :: Value -> GVal m
+ Text.Ginger.GVal: rawJSONToGVal :: forall (m :: Type -> Type). Value -> GVal m
- Text.Ginger.GVal: timeLocaleToDict :: TimeLocale -> [(Text, GVal m)]
+ Text.Ginger.GVal: timeLocaleToDict :: forall (m :: Type -> Type). TimeLocale -> [(Text, GVal m)]
- Text.Ginger.GVal: timeToDict :: TimeOfDay -> [(Text, GVal m)]
+ Text.Ginger.GVal: timeToDict :: forall (m :: Type -> Type). TimeOfDay -> [(Text, GVal m)]
- Text.Ginger.GVal: timeZoneToDict :: TimeZone -> [(Text, GVal m)]
+ Text.Ginger.GVal: timeZoneToDict :: forall (m :: Type -> Type). TimeZone -> [(Text, GVal m)]
- Text.Ginger.GVal: toBoolean :: GVal m -> Bool
+ Text.Ginger.GVal: toBoolean :: forall (m :: Type -> Type). GVal m -> Bool
- Text.Ginger.GVal: toInt :: GVal m -> Maybe Int
+ Text.Ginger.GVal: toInt :: forall (m :: Type -> Type). GVal m -> Maybe Int
- Text.Ginger.GVal: toInt0 :: GVal m -> Int
+ Text.Ginger.GVal: toInt0 :: forall (m :: Type -> Type). GVal m -> Int
- Text.Ginger.GVal: toIntDef :: Int -> GVal m -> Int
+ Text.Ginger.GVal: toIntDef :: forall (m :: Type -> Type). Int -> GVal m -> Int
- Text.Ginger.GVal: toInteger :: GVal m -> Maybe Integer
+ Text.Ginger.GVal: toInteger :: forall (m :: Type -> Type). GVal m -> Maybe Integer
- Text.Ginger.GVal: toNumber :: GVal m -> Maybe Scientific
+ Text.Ginger.GVal: toNumber :: forall (m :: Type -> Type). GVal m -> Maybe Scientific
- Text.Ginger.GVal: type Cons m = [GVal m]
+ Text.Ginger.GVal: type Cons (m :: Type -> Type) = [GVal m]
- Text.Ginger.GVal: type Function m = [(Maybe Text, GVal m)] -> m (GVal m)
+ Text.Ginger.GVal: type Function (m :: Type -> Type) = [(Maybe Text, GVal m)] -> m GVal m
- Text.Ginger.GVal: type Pair m = (Text, GVal m)
+ Text.Ginger.GVal: type Pair (m :: Type -> Type) = (Text, GVal m)
- Text.Ginger.GVal: zonedTimeToDict :: ZonedTime -> [(Text, GVal m)]
+ Text.Ginger.GVal: zonedTimeToDict :: forall (m :: Type -> Type). ZonedTime -> [(Text, GVal m)]
- Text.Ginger.Parse: ParserOptions :: IncludeResolver m -> Maybe SourceName -> Bool -> Bool -> Bool -> Delimiters -> ParserOptions m
+ Text.Ginger.Parse: ParserOptions :: IncludeResolver m -> Maybe SourceName -> Bool -> Bool -> Bool -> Delimiters -> ParserOptions (m :: Type -> Type)
- Text.Ginger.Parse: [poDelimiters] :: ParserOptions m -> Delimiters
+ Text.Ginger.Parse: [poDelimiters] :: ParserOptions (m :: Type -> Type) -> Delimiters
- Text.Ginger.Parse: [poIncludeResolver] :: ParserOptions m -> IncludeResolver m
+ Text.Ginger.Parse: [poIncludeResolver] :: ParserOptions (m :: Type -> Type) -> IncludeResolver m
- Text.Ginger.Parse: [poKeepTrailingNewline] :: ParserOptions m -> Bool
+ Text.Ginger.Parse: [poKeepTrailingNewline] :: ParserOptions (m :: Type -> Type) -> Bool
- Text.Ginger.Parse: [poLStripBlocks] :: ParserOptions m -> Bool
+ Text.Ginger.Parse: [poLStripBlocks] :: ParserOptions (m :: Type -> Type) -> Bool
- Text.Ginger.Parse: [poSourceName] :: ParserOptions m -> Maybe SourceName
+ Text.Ginger.Parse: [poSourceName] :: ParserOptions (m :: Type -> Type) -> Maybe SourceName
- Text.Ginger.Parse: [poTrimBlocks] :: ParserOptions m -> Bool
+ Text.Ginger.Parse: [poTrimBlocks] :: ParserOptions (m :: Type -> Type) -> Bool
- Text.Ginger.Parse: data ParserOptions m
+ Text.Ginger.Parse: data ParserOptions (m :: Type -> Type)
- Text.Ginger.Parse: parseGinger :: forall m. Monad m => IncludeResolver m -> Maybe SourceName -> Source -> m (Either ParserError (Template SourcePos))
+ Text.Ginger.Parse: parseGinger :: Monad m => IncludeResolver m -> Maybe SourceName -> Source -> m (Either ParserError (Template SourcePos))
- Text.Ginger.Parse: parseGingerFile :: forall m. Monad m => IncludeResolver m -> SourceName -> m (Either ParserError (Template SourcePos))
+ Text.Ginger.Parse: parseGingerFile :: Monad m => IncludeResolver m -> SourceName -> m (Either ParserError (Template SourcePos))
- Text.Ginger.Parse: type IncludeResolver m = SourceName -> m (Maybe Source)
+ Text.Ginger.Parse: type IncludeResolver (m :: Type -> Type) = SourceName -> m Maybe Source
- Text.Ginger.Run: data GingerContext p m h
+ Text.Ginger.Run: data GingerContext p (m :: Type -> Type) h
- Text.Ginger.Run: hoistContext :: Monad m => (h -> t) -> (t -> h) -> GingerContext p m h -> GingerContext p m t
+ Text.Ginger.Run: hoistContext :: forall (m :: Type -> Type) h t p. Monad m => (h -> t) -> (t -> h) -> GingerContext p m h -> GingerContext p m t
- Text.Ginger.Run: hoistRun :: Monad m => (h -> t) -> (t -> h) -> Run p m h a -> Run p m t a
+ Text.Ginger.Run: hoistRun :: forall (m :: Type -> Type) h t p a. Monad m => (h -> t) -> (t -> h) -> Run p m h a -> Run p m t a
- Text.Ginger.Run: hoistRunState :: Monad m => (h -> t) -> (t -> h) -> RunState p m h -> RunState p m t
+ Text.Ginger.Run: hoistRunState :: forall (m :: Type -> Type) h t p. Monad m => (h -> t) -> (t -> h) -> RunState p m h -> RunState p m t
- Text.Ginger.Run: type Run p m h = ExceptT (RuntimeError p) (StateT (RunState p m h) (ReaderT (GingerContext p m h) m))
+ Text.Ginger.Run: type Run p (m :: Type -> Type) h = ExceptT RuntimeError p StateT RunState p m h ReaderT GingerContext p m h m
- Text.Ginger.Run.Builtins: getTimeLocale :: Monad m => GVal (Run p m h) -> Run p m h TimeLocale
+ Text.Ginger.Run.Builtins: getTimeLocale :: forall (m :: Type -> Type) p h. Monad m => GVal (Run p m h) -> Run p m h TimeLocale
- Text.Ginger.Run.Builtins: gfnApply :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnApply :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnCompose :: forall m p h. Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnCompose :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnContains :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnContains :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnDateFormat :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnDateFormat :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnDictsort :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnDictsort :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnDivisibleBy :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnDivisibleBy :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnEven :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnEven :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnFilter :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnFilter :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnJSON :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnJSON :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnLength :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnLength :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnOdd :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnOdd :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnPartial :: forall m p h. Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnPartial :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnPrintf :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnPrintf :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnRawHtml :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnRawHtml :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnReMatch :: forall p m h. Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnReMatch :: forall p (m :: Type -> Type) h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnReMatchOne :: forall p m h. Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnReMatchOne :: forall p (m :: Type -> Type) h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnReTest :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnReTest :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnReplace :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnReplace :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnSlice :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnSlice :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnSort :: forall p m h. Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnSort :: forall p (m :: Type -> Type) h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnSplit :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnSplit :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnUrlEncode :: Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnUrlEncode :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnZip :: forall m p h. Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnZip :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfnZipWith :: forall m p h. Monad m => Function (Run p m h)
+ Text.Ginger.Run.Builtins: gfnZipWith :: forall (m :: Type -> Type) p h. Monad m => Function (Run p m h)
- Text.Ginger.Run.Builtins: gfoRegex :: Monad m => GVal (Run p m h)
+ Text.Ginger.Run.Builtins: gfoRegex :: forall (m :: Type -> Type) p h. Monad m => GVal (Run p m h)
- Text.Ginger.Run.Builtins: greater :: Monad m => GVal m -> GVal m -> Maybe Bool
+ Text.Ginger.Run.Builtins: greater :: forall (m :: Type -> Type). Monad m => GVal m -> GVal m -> Maybe Bool
- Text.Ginger.Run.Builtins: greaterEq :: Monad m => GVal m -> GVal m -> Maybe Bool
+ Text.Ginger.Run.Builtins: greaterEq :: forall (m :: Type -> Type). Monad m => GVal m -> GVal m -> Maybe Bool
- Text.Ginger.Run.Builtins: gvalAutoParseDate :: TimeZone -> GVal m -> Maybe ZonedTime
+ Text.Ginger.Run.Builtins: gvalAutoParseDate :: forall (m :: Type -> Type). TimeZone -> GVal m -> Maybe ZonedTime
- Text.Ginger.Run.Builtins: gvalDictToDate :: TimeZone -> GVal m -> Maybe ZonedTime
+ Text.Ginger.Run.Builtins: gvalDictToDate :: forall (m :: Type -> Type). TimeZone -> GVal m -> Maybe ZonedTime
- Text.Ginger.Run.Builtins: gvalListToDate :: TimeZone -> GVal m -> Maybe ZonedTime
+ Text.Ginger.Run.Builtins: gvalListToDate :: forall (m :: Type -> Type). TimeZone -> GVal m -> Maybe ZonedTime
- Text.Ginger.Run.Builtins: gvalToDate :: TimeZone -> GVal m -> Maybe ZonedTime
+ Text.Ginger.Run.Builtins: gvalToDate :: forall (m :: Type -> Type). TimeZone -> GVal m -> Maybe ZonedTime
- Text.Ginger.Run.Builtins: gvalToTZ :: GVal m -> Maybe TimeZone
+ Text.Ginger.Run.Builtins: gvalToTZ :: forall (m :: Type -> Type). GVal m -> Maybe TimeZone
- Text.Ginger.Run.Builtins: inDict :: GVal m -> GVal m -> Bool
+ Text.Ginger.Run.Builtins: inDict :: forall (m :: Type -> Type). GVal m -> GVal m -> Bool
- Text.Ginger.Run.Builtins: inList :: GVal m -> GVal m -> Bool
+ Text.Ginger.Run.Builtins: inList :: forall (m :: Type -> Type). GVal m -> GVal m -> Bool
- Text.Ginger.Run.Builtins: less :: Monad m => GVal m -> GVal m -> Maybe Bool
+ Text.Ginger.Run.Builtins: less :: forall (m :: Type -> Type). Monad m => GVal m -> GVal m -> Maybe Bool
- Text.Ginger.Run.Builtins: lessEq :: Monad m => GVal m -> GVal m -> Maybe Bool
+ Text.Ginger.Run.Builtins: lessEq :: forall (m :: Type -> Type). Monad m => GVal m -> GVal m -> Maybe Bool
- Text.Ginger.Run.Builtins: looseEquals :: GVal m -> GVal m -> Bool
+ Text.Ginger.Run.Builtins: looseEquals :: forall (m :: Type -> Type). GVal m -> GVal m -> Bool
- Text.Ginger.Run.Builtins: matchTextToGVal :: Monad m => MatchText String -> GVal m
+ Text.Ginger.Run.Builtins: matchTextToGVal :: forall (m :: Type -> Type). Monad m => MatchText String -> GVal m
- Text.Ginger.Run.Builtins: parseCompOpts :: Monad m => GVal (Run p m h) -> Run p m h CompOption
+ Text.Ginger.Run.Builtins: parseCompOpts :: forall (m :: Type -> Type) p h. Monad m => GVal (Run p m h) -> Run p m h CompOption
- Text.Ginger.Run.Builtins: printfG :: String -> [GVal m] -> String
+ Text.Ginger.Run.Builtins: printfG :: forall (m :: Type -> Type). String -> [GVal m] -> String
- Text.Ginger.Run.FuncUtils: binaryFunc :: forall m h p. Monad m => (GVal (Run p m h) -> GVal (Run p m h) -> GVal (Run p m h)) -> Function (Run p m h)
+ Text.Ginger.Run.FuncUtils: binaryFunc :: forall (m :: Type -> Type) h p. Monad m => (GVal (Run p m h) -> GVal (Run p m h) -> GVal (Run p m h)) -> Function (Run p m h)
- Text.Ginger.Run.FuncUtils: unaryFunc :: forall m h p. Monad m => (GVal (Run p m h) -> GVal (Run p m h)) -> Function (Run p m h)
+ Text.Ginger.Run.FuncUtils: unaryFunc :: forall (m :: Type -> Type) h p. Monad m => (GVal (Run p m h) -> GVal (Run p m h)) -> Function (Run p m h)
- Text.Ginger.Run.FuncUtils: unaryNumericFunc :: Monad m => Scientific -> (Scientific -> Scientific) -> [(Maybe Text, GVal (Run p m h))] -> Run p m h (GVal (Run p m h))
+ Text.Ginger.Run.FuncUtils: unaryNumericFunc :: forall (m :: Type -> Type) p h. Monad m => Scientific -> (Scientific -> Scientific) -> [(Maybe Text, GVal (Run p m h))] -> Run p m h (GVal (Run p m h))
- Text.Ginger.Run.FuncUtils: variadicNumericFunc :: Monad m => Scientific -> ([Scientific] -> Scientific) -> [(Maybe Text, GVal (Run p m h))] -> Run p m h (GVal (Run p m h))
+ Text.Ginger.Run.FuncUtils: variadicNumericFunc :: forall (m :: Type -> Type) p h. Monad m => Scientific -> ([Scientific] -> Scientific) -> [(Maybe Text, GVal (Run p m h))] -> Run p m h (GVal (Run p m h))
- Text.Ginger.Run.FuncUtils: variadicStringFunc :: Monad m => ([Text] -> Text) -> [(Maybe Text, GVal (Run p m h))] -> Run p m h (GVal (Run p m h))
+ Text.Ginger.Run.FuncUtils: variadicStringFunc :: forall (m :: Type -> Type) p h. Monad m => ([Text] -> Text) -> [(Maybe Text, GVal (Run p m h))] -> Run p m h (GVal (Run p m h))
- Text.Ginger.Run.Type: GingerContext :: (VarName -> Run p m h (GVal (Run p m h))) -> (h -> Run p m h ()) -> (RuntimeError p -> Run p m h ()) -> (GVal (Run p m h) -> h) -> Maybe (Newlines h) -> GingerContext p m h
+ Text.Ginger.Run.Type: GingerContext :: (VarName -> Run p m h (GVal (Run p m h))) -> (h -> Run p m h ()) -> (RuntimeError p -> Run p m h ()) -> (GVal (Run p m h) -> h) -> Maybe (Newlines h) -> GingerContext p (m :: Type -> Type) h
- Text.Ginger.Run.Type: RunState :: HashMap VarName (GVal (Run p m h)) -> h -> Template p -> Maybe Text -> Maybe [h] -> Bool -> p -> RunState p m h
+ Text.Ginger.Run.Type: RunState :: HashMap VarName (GVal (Run p m h)) -> h -> Template p -> Maybe Text -> Maybe [h] -> Bool -> p -> RunState p (m :: Type -> Type) h
- Text.Ginger.Run.Type: [contextEncode] :: GingerContext p m h -> GVal (Run p m h) -> h
+ Text.Ginger.Run.Type: [contextEncode] :: GingerContext p (m :: Type -> Type) h -> GVal (Run p m h) -> h
- Text.Ginger.Run.Type: [contextLookup] :: GingerContext p m h -> VarName -> Run p m h (GVal (Run p m h))
+ Text.Ginger.Run.Type: [contextLookup] :: GingerContext p (m :: Type -> Type) h -> VarName -> Run p m h (GVal (Run p m h))
- Text.Ginger.Run.Type: [contextNewlines] :: GingerContext p m h -> Maybe (Newlines h)
+ Text.Ginger.Run.Type: [contextNewlines] :: GingerContext p (m :: Type -> Type) h -> Maybe (Newlines h)
- Text.Ginger.Run.Type: [contextWarn] :: GingerContext p m h -> RuntimeError p -> Run p m h ()
+ Text.Ginger.Run.Type: [contextWarn] :: GingerContext p (m :: Type -> Type) h -> RuntimeError p -> Run p m h ()
- Text.Ginger.Run.Type: [contextWrite] :: GingerContext p m h -> h -> Run p m h ()
+ Text.Ginger.Run.Type: [contextWrite] :: GingerContext p (m :: Type -> Type) h -> h -> Run p m h ()
- Text.Ginger.Run.Type: [rsAtLineStart] :: RunState p m h -> Bool
+ Text.Ginger.Run.Type: [rsAtLineStart] :: RunState p (m :: Type -> Type) h -> Bool
- Text.Ginger.Run.Type: [rsCapture] :: RunState p m h -> h
+ Text.Ginger.Run.Type: [rsCapture] :: RunState p (m :: Type -> Type) h -> h
- Text.Ginger.Run.Type: [rsCurrentBlockName] :: RunState p m h -> Maybe Text
+ Text.Ginger.Run.Type: [rsCurrentBlockName] :: RunState p (m :: Type -> Type) h -> Maybe Text
- Text.Ginger.Run.Type: [rsCurrentSourcePos] :: RunState p m h -> p
+ Text.Ginger.Run.Type: [rsCurrentSourcePos] :: RunState p (m :: Type -> Type) h -> p
- Text.Ginger.Run.Type: [rsCurrentTemplate] :: RunState p m h -> Template p
+ Text.Ginger.Run.Type: [rsCurrentTemplate] :: RunState p (m :: Type -> Type) h -> Template p
- Text.Ginger.Run.Type: [rsIndentation] :: RunState p m h -> Maybe [h]
+ Text.Ginger.Run.Type: [rsIndentation] :: RunState p (m :: Type -> Type) h -> Maybe [h]
- Text.Ginger.Run.Type: [rsScope] :: RunState p m h -> HashMap VarName (GVal (Run p m h))
+ Text.Ginger.Run.Type: [rsScope] :: RunState p (m :: Type -> Type) h -> HashMap VarName (GVal (Run p m h))
- Text.Ginger.Run.Type: data GingerContext p m h
+ Text.Ginger.Run.Type: data GingerContext p (m :: Type -> Type) h
- Text.Ginger.Run.Type: data RunState p m h
+ Text.Ginger.Run.Type: data RunState p (m :: Type -> Type) h
- Text.Ginger.Run.Type: encode :: forall m. ContextEncodable h => GVal m -> h
+ Text.Ginger.Run.Type: encode :: forall (m :: Type -> Type). ContextEncodable h => GVal m -> h
- Text.Ginger.Run.Type: getSourcePos :: Monad m => Run p m h p
+ Text.Ginger.Run.Type: getSourcePos :: forall (m :: Type -> Type) p h. Monad m => Run p m h p
- Text.Ginger.Run.Type: hoistContext :: Monad m => (h -> t) -> (t -> h) -> GingerContext p m h -> GingerContext p m t
+ Text.Ginger.Run.Type: hoistContext :: forall (m :: Type -> Type) h t p. Monad m => (h -> t) -> (t -> h) -> GingerContext p m h -> GingerContext p m t
- Text.Ginger.Run.Type: hoistRun :: Monad m => (h -> t) -> (t -> h) -> Run p m h a -> Run p m t a
+ Text.Ginger.Run.Type: hoistRun :: forall (m :: Type -> Type) h t p a. Monad m => (h -> t) -> (t -> h) -> Run p m h a -> Run p m t a
- Text.Ginger.Run.Type: hoistRunState :: Monad m => (h -> t) -> (t -> h) -> RunState p m h -> RunState p m t
+ Text.Ginger.Run.Type: hoistRunState :: forall (m :: Type -> Type) h t p. Monad m => (h -> t) -> (t -> h) -> RunState p m h -> RunState p m t
- Text.Ginger.Run.Type: throwHere :: Monad m => RuntimeError p -> Run p m h a
+ Text.Ginger.Run.Type: throwHere :: forall (m :: Type -> Type) p h a. Monad m => RuntimeError p -> Run p m h a
- Text.Ginger.Run.Type: type Run p m h = ExceptT (RuntimeError p) (StateT (RunState p m h) (ReaderT (GingerContext p m h) m))
+ Text.Ginger.Run.Type: type Run p (m :: Type -> Type) h = ExceptT RuntimeError p StateT RunState p m h ReaderT GingerContext p m h m
- Text.Ginger.Run.Type: warn :: Monad m => RuntimeError p -> Run p m h ()
+ Text.Ginger.Run.Type: warn :: forall (m :: Type -> Type) p h. Monad m => RuntimeError p -> Run p m h ()
- Text.Ginger.Run.Type: warnFromMaybe :: Monad m => RuntimeError p -> a -> Maybe a -> Run p m h a
+ Text.Ginger.Run.Type: warnFromMaybe :: forall (m :: Type -> Type) p a h. Monad m => RuntimeError p -> a -> Maybe a -> Run p m h a
- Text.Ginger.Run.Type: withSourcePos :: Monad m => p -> Run p m h a -> Run p m h a
+ Text.Ginger.Run.Type: withSourcePos :: forall (m :: Type -> Type) p h a. Monad m => p -> Run p m h a -> Run p m h a
- Text.Ginger.Run.VM: appendCapture :: (Monoid h, Monad m) => h -> Run p m h ()
+ Text.Ginger.Run.VM: appendCapture :: forall h (m :: Type -> Type) p. (Monoid h, Monad m) => h -> Run p m h ()
- Text.Ginger.Run.VM: clearCapture :: (Monoid h, Monad m) => Run p m h ()
+ Text.Ginger.Run.VM: clearCapture :: forall h (m :: Type -> Type) p. (Monoid h, Monad m) => Run p m h ()
- Text.Ginger.Run.VM: fetchCapture :: Monad m => Run p m h h
+ Text.Ginger.Run.VM: fetchCapture :: forall (m :: Type -> Type) p h. Monad m => Run p m h h
- Text.Ginger.Run.VM: getVar :: Monad m => VarName -> Run p m h (GVal (Run p m h))
+ Text.Ginger.Run.VM: getVar :: forall (m :: Type -> Type) p h. Monad m => VarName -> Run p m h (GVal (Run p m h))
- Text.Ginger.Run.VM: setVar :: Monad m => VarName -> GVal (Run p m h) -> Run p m h ()
+ Text.Ginger.Run.VM: setVar :: forall (m :: Type -> Type) p h. Monad m => VarName -> GVal (Run p m h) -> Run p m h ()
- Text.Ginger.Run.VM: withEncoder :: (ContextEncodable h, Monad m) => (GVal (Run p m h) -> h) -> Run p m h a -> Run p m h a
+ Text.Ginger.Run.VM: withEncoder :: forall h (m :: Type -> Type) p a. (ContextEncodable h, Monad m) => (GVal (Run p m h) -> h) -> Run p m h a -> Run p m h a
- Text.Ginger.Run.VM: withLocalScope :: Monad m => Run p m h a -> Run p m h a
+ Text.Ginger.Run.VM: withLocalScope :: forall (m :: Type -> Type) p h a. Monad m => Run p m h a -> Run p m h a
Files
- cli/GingerCLI.hs +2/−1
- ginger.cabal +9/−9
- src/Text/Ginger/Run.hs +1/−0
- src/Text/Ginger/Run/Builtins.hs +11/−0
cli/GingerCLI.hs view
@@ -8,7 +8,8 @@ import Text.Ginger import Text.Ginger.Html-import Data.Text as Text+import Data.Text (Text)+import qualified Data.Text as Text import qualified Data.Aeson as JSON import qualified Data.Yaml as YAML import Data.Maybe
ginger.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: ginger-version: 0.10.5.2+version: 0.10.6.0 synopsis: An implementation of the Jinja2 template language in Haskell description: Ginger is Jinja, minus the most blatant pythonisms. Wants to be feature complete, but isn't quite there yet.@@ -24,11 +24,11 @@ common deps build-depends: base >=4.8 && <5 , aeson >=1.4.2.0 && <2.3- , bytestring >=0.10.8.2 && <0.12- , data-default >= 0.5 && <0.8+ , bytestring >=0.10.8.2 && <0.13+ , data-default >= 0.5 && <0.9 , mtl >= 2.2 && <2.4- , text >=1.2.3.1 && <2.1- , time >= 0.1.6.0 && <1.13+ , text >=1.2.3.1 && <2.2+ , time >= 0.1.6.0 && <1.15 , transformers >= 0.3 && <0.7 , unordered-containers >= 0.2.5 && <0.3 , utf8-string >=1.0.1.1 && <1.1@@ -50,8 +50,8 @@ -- other-modules: -- other-extensions: build-depends: aeson-pretty >=0.8.7 && <0.9- , containers >=0.6.4 && <0.7- , filepath >= 1.3 && <1.5+ , containers >=0.6.4 && <0.8+ , filepath >= 1.3 && <1.6 , http-types >= 0.8 && (< 0.11 || >= 0.12) && <0.13 , parsec >= 3.0 && <3.2 , regex-tdfa >=1.2.3 && <=1.4@@ -85,6 +85,6 @@ hs-source-dirs: test default-language: Haskell2010 build-depends: ginger- , tasty >=1.2 && <1.5+ , tasty >=1.2 && <1.6 , tasty-hunit >=0.10.0.1 && <0.11- , tasty-quickcheck >=0.10 && <0.11+ , tasty-quickcheck >=0.10 && <0.12
src/Text/Ginger/Run.hs view
@@ -186,6 +186,7 @@ , ("product", fromFunction . variadicNumericFunc 1 $ Prelude.product) , ("ratio", fromFunction . variadicNumericFunc 1 $ Scientific.fromFloatDigits . ratio . Prelude.map Scientific.toRealFloat) , ("replace", fromFunction gfnReplace)+ , ("reverse", fromFunction gfnReverse) , ("round", fromFunction . unaryNumericFunc 0 $ Prelude.fromIntegral . Prelude.round) , ("show", fromFunction . unaryFunc $ fromString . show) , ("slice", fromFunction gfnSlice)
src/Text/Ginger/Run/Builtins.hs view
@@ -453,6 +453,17 @@ (Nothing, Nothing) -> return def +gfnReverse :: forall p m h. Monad m => Function (Run p m h)+gfnReverse args = do+ let parsedArgs = extractArgsDefL+ [ ("reversee", def)+ ]+ args+ reversee <- case parsedArgs of+ Right [reversee] -> return reversee+ _ -> throwHere $ ArgumentsError (Just "reverse") "expected: (reversee)"+ return . toGVal $ List.reverse <$> asList reversee+ gfnSort :: forall p m h. Monad m => Function (Run p m h) gfnSort args = do