colorless 2.2.2 → 2.2.3
raw patch · 4 files changed
+21/−2 lines, 4 files
Files
- colorless.cabal +1/−1
- library/Colorless/Ast.hs +11/−0
- library/Colorless/Types.hs +8/−0
- package.yaml +1/−1
colorless.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack name: colorless-version: 2.2.2+version: 2.2.3 synopsis: Colorless description: Colorless category: Web
library/Colorless/Ast.hs view
@@ -102,6 +102,17 @@ Number a -> Ast'Const (Const'Number a) _ -> error "should never reach here" +instance ToAst a => ToAst [a] where+ toAst xs = Ast'List $ List $ map toAst xs++instance ToAst a => ToAst (Maybe a) where+ toAst Nothing = Ast'Const Const'Null+ toAst (Just x) = toAst x++instance (ToAst a, ToAst b) => ToAst (Either a b) where+ toAst (Left a) = Ast'Enumeral $ Enumeral "Left" $ Just $ Map.fromList [("left", toAst a)]+ toAst (Right a) = Ast'Enumeral $ Enumeral "Right" $ Just $ Map.fromList [("right", toAst a)]+ -- instance (ToAst t1, ToAst t2) => ToAst (t1, t2) where
library/Colorless/Types.hs view
@@ -3,6 +3,7 @@ ( Version(..) , Major(..) , Minor(..)+ , Pull(..) , Request(..) , Response(..) , ResponseError(..)@@ -42,6 +43,13 @@ instance FromJSON Minor instance ToJSON Minor++data Pull = Pull+ { protocol :: Text+ , address :: Text+ , path :: Text+ , port :: Int+ } deriving (Show, Eq) data Version = Version { major :: Major
package.yaml view
@@ -1,5 +1,5 @@ name: colorless-version: '2.2.2'+version: '2.2.3' category: Web synopsis: Colorless description: Colorless