Skip to content

Commit

Permalink
Increment the version of definitive-parser, due to the massive change…
Browse files Browse the repository at this point in the history
… that occurred; correct the build for curly-gateway
  • Loading branch information
Marc Coiffier committed Oct 15, 2018
1 parent 681c948 commit 236e195
Show file tree
Hide file tree
Showing 14 changed files with 52 additions and 52 deletions.
12 changes: 6 additions & 6 deletions capricon/capricon.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- see http://haskell.org/cabal/users-guide/

name: capricon
version: 0.7.1
version: 0.7.1.1
-- synopsis:
-- description:
license: GPL-3
Expand All @@ -20,7 +20,7 @@ data-files: prelude
library
exposed-modules: Algebra.Monad.Concatenative Data.CaPriCon CaPriCon.Run
default-extensions: RebindableSyntax, ViewPatterns, TupleSections, FlexibleInstances, FlexibleContexts, MultiParamTypeClasses, FunctionalDependencies, LambdaCase, TypeOperators, RankNTypes, GeneralizedNewtypeDeriving, TypeFamilies
build-depends: base,definitive-base, definitive-parser
build-depends: base >=4.8 && <4.10,definitive-base >=2.6 && <2.7,definitive-parser >=3.0 && <3.1
if !impl(haste)
ghc-options: -Wincomplete-patterns -Wname-shadowing -W -Werror
hs-source-dirs: src
Expand All @@ -30,12 +30,12 @@ executable capricon
if impl(haste)
buildable: False
else
build-depends: hreadline, directory, filepath
build-depends: directory >=1.3 && <1.4,filepath >=1.4 && <1.5,hreadline >=0.2 && <0.3
main-is: CaPriCon.hs
default-extensions: RebindableSyntax, ViewPatterns, TupleSections, FlexibleInstances, FlexibleContexts, MultiParamTypeClasses, FunctionalDependencies, LambdaCase, TypeOperators, RankNTypes, GeneralizedNewtypeDeriving, TypeFamilies
-- other-modules:
-- other-extensions:
build-depends: base,definitive-base, definitive-parser, capricon
build-depends: base >=4.8 && <4.10,capricon >=0.7 && <0.8,definitive-base >=2.6 && <2.7,definitive-parser >=3.0 && <3.1
ghc-options: -Wincomplete-patterns -Wname-shadowing -W -Werror
hs-source-dirs: exe
default-language: Haskell2010
Expand All @@ -47,15 +47,15 @@ executable WiQEE.js
-- other-modules:
-- other-extensions:
haste-options: --opt-all
build-depends: base,definitive-base, definitive-parser, capricon, haste-lib, filepath
build-depends: base >=4.8 && <4.10,capricon >=0.7 && <0.8,definitive-base >=2.6 && <2.7,definitive-parser >=3.0 && <3.1,filepath >=1.4 && <1.5,haste-lib
hs-source-dirs: exe
default-language: Haskell2010
-- executable coinche
-- main-is: Coinche.hs
-- default-extensions: RebindableSyntax
-- -- other-modules:
-- -- other-extensions:
-- build-depends: base >=4.9 && <4.10,definitive-base >=2.6 && <2.7, definitive-parser, misc, random, random-shuffle
-- build-depends: base >=4.9 && <4.10,definitive-base >=2.6 && <2.7,definitive-parser >=3.0 && <3.1,misc >=. && <.1,random >=1.1 && <1.2,random-shuffle >=. && <.1
-- ghc-options: -Wincomplete-patterns -Wname-shadowing -Werror
-- hs-source-dirs: exe
-- default-language: Haskell2010
2 changes: 1 addition & 1 deletion capricon/exe/WiQEE.hs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ instance MonadSubIO JS.CIO JS.CIO where liftSubIO = id
runComment c = unit

hasteDict :: COCDict JS.CIO String
hasteDict = cocDict ("0.7.1-js" :: String) get (\_ _ -> return ())
hasteDict = cocDict ("0.7.1.1-js" :: String) get (\_ _ -> return ())
where get file = do
mres <- liftIO $ JS.getItem (fromString file)
case mres of
Expand Down
4 changes: 2 additions & 2 deletions curly-core/curly-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- documentation, see http://haskell.org/cabal/users-guide/

name: curly-core
version: 0.7.1
version: 0.7.2
synopsis: The core libraries for the Curly compiler.
-- description:
license: GPL-3
Expand Down Expand Up @@ -48,7 +48,7 @@ library
AllowAmbiguousTypes
LambdaCase
other-extensions: UndecidableInstances, ScopedTypeVariables, StandaloneDeriving, PatternSynonyms, ViewPatterns, TypeFamilies, CPP, RecursiveDo, GADTs, DeriveGeneric, OverloadedStrings, NoMonomorphismRestriction, DeriveDataTypeable, ExistentialQuantification, BangPatterns
build-depends: AES >=0.2 && <0.3,base >=4.9 && <4.10,base64-bytestring >=1.0 && <1.1,bytestring >=0.10 && <0.11,containers >=0.5 && <0.6,deepseq >=1.4 && <1.5,definitive-base >=2.6 && <2.7,definitive-filesystem >=2.1 && <2.2,definitive-network >=1.4 && <1.5,definitive-parser >=2.5 && <2.6,directory >=1.3 && <1.4,entropy >=0.3 && <0.4,fsnotify,network >=2.6 && <2.7,process >=1.4 && <1.5,zlib >=0.6 && <0.7
build-depends: AES >=0.2 && <0.3,base >=4.9 && <4.10,base64-bytestring >=1.0 && <1.1,bytestring >=0.10 && <0.11,containers >=0.5 && <0.6,deepseq >=1.4 && <1.5,definitive-base >=2.6 && <2.7,definitive-filesystem >=2.1 && <2.2,definitive-network >=1.4 && <1.5,definitive-parser >=3.0 && <3.1,directory >=1.3 && <1.4,entropy >=0.3 && <0.4,fsnotify >=0.2 && <0.3,network >=2.6 && <2.7,process >=1.4 && <1.5,zlib >=0.6 && <0.7
if flag(paranoid)
ghc-options: -Wall -Werror
hs-source-dirs: src
Expand Down
4 changes: 2 additions & 2 deletions curly-gateway/curly-gateway.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- documentation, see http://haskell.org/cabal/users-guide/

name: curly-gateway
version: 0.1.1
version: 0.2
synopsis: A DHT-backed implementation of the Curly VCS protocol
-- description:
license: GPL-3
Expand All @@ -29,6 +29,6 @@ executable curly-gateway
GeneralizedNewtypeDeriving
RankNTypes
other-extensions: DeriveGeneric, TypeFamilies, ScopedTypeVariables, PatternSynonyms, ViewPatterns
build-depends: base >=4.9 && <4.10,curly-core >=0.7 && <0.8,curly-kademlia >=1.1 && <1.2,definitive-base >=2.6 && <2.7,definitive-network >=1.4 && <1.5,definitive-parser >=2.5 && <2.6
build-depends: base >=4.9 && <4.10,curly-core >=0.7 && <0.8,curly-kademlia >=1.1 && <1.2,definitive-base >=2.6 && <2.7,definitive-network >=1.4 && <1.5,definitive-parser >=3.0 && <3.1
hs-source-dirs: src
default-language: Haskell2010
14 changes: 7 additions & 7 deletions curly-gateway/src/Curly/DHT/Kademlia.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# LANGUAGE DeriveGeneric, TypeFamilies, ScopedTypeVariables, PatternSynonyms #-}
{-# LANGUAGE DeriveGeneric, TypeFamilies, ScopedTypeVariables, PatternSynonyms, UndecidableInstances #-}
module Curly.DHT.Kademlia (
DHTIndex,DHTValue,
DHTInstance,DHTNode,pattern DHTNode,
Expand All @@ -12,18 +12,18 @@ import Network.Kademlia (JoinResult(..))

newtype K a = K { getK :: a }
deriving (Eq,Ord)
instance K.Serialize a => Serializable (K a) where
encode (K a) = encode (K.toBS a^..chunk)
instance K.Serialize a => Format (K a) where
instance K.Serialize a => Serializable Word8 Builder Bytes (K a) where
encode p (K a) = encode p (K.toBS a^..chunk)
instance K.Serialize a => Format Word8 Builder Bytes (K a) where
datum = datum >>= (const zero <|> return) . map (K . fst) . K.fromBS . by chunk
instance Format a => K.Serialize (K a) where
instance Format Word8 Builder Bytes a => K.Serialize (K a) where
fromBS b = case (datum^..parser) (b^..chunk) of
(s,a):_ -> Right (K a,s^.chunk)
[] -> Left "Parse error"
toBS (K a) = serialize a^.chunk

class (Ord a,Format a) => DHTIndex a
class (Eq a,Format a) => DHTValue a
class (Ord a,Format Word8 Builder Bytes a) => DHTIndex a
class (Eq a,Format Word8 Builder Bytes a) => DHTValue a
newtype DHTInstance i a = DHTInstance { _getDHTInstance :: K.KademliaInstance (K i) (K a) }
newtype DHTNode i = DHTNodeImpl { _getDHTNode :: K.Node (K i) }
pattern DHTNode h p i = DHTNodeImpl (K.Node (K.Peer h p) (K i))
Expand Down
40 changes: 20 additions & 20 deletions curly-gateway/src/Curly/Gateway.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ instance DHTIndex (VCKey DHTKey)
data DHTKey = DataKey ValID
| NodeKey String
deriving (Eq,Ord,Generic)
instance Serializable DHTKey ; instance Format DHTKey
instance Serializable Word8 Builder Bytes DHTKey ; instance Format Word8 Builder Bytes DHTKey
type Key = VCKey DHTKey

newtype ValID = ValID Hash
deriving (Eq,Ord,Show,Generic)
instance Serializable ValID; instance Format ValID
instance Serializable Word8 Builder Bytes ValID; instance Format Word8 Builder Bytes ValID

data Val = PartialVal [ValID]
| DataVal Bytes
deriving (Show,Generic)
instance Serializable Val ; instance Format Val
instance Serializable Word8 Builder Bytes Val ; instance Format Word8 Builder Bytes Val
instance Eq Val where a==b = compare a b==EQ
instance Ord Val where compare = comparing serialize
instance Ord Val where compare = comparing (serialize :: Val -> Bytes)
instance DHTValue Val

newtype DHT_VC a = DHT_VC { runDHT_VC :: IO a }
Expand Down Expand Up @@ -75,10 +75,10 @@ lookupMPBytes dht k = do
return (fold <$> sequence parts)
Nothing -> return Nothing

lookupMP :: (Format a,MonadIO m) => DHTInstance Key Val -> (WithResponse a -> Key) -> m (Maybe a)
lookupMP dht fk = liftIO $ lookupMPBytes dht (fk WithResponse) <&> (>>= matches Just datum)
insertMP :: (Serializable a,MonadIO m) => DHTInstance Key Val -> (WithResponse a -> Key) -> a -> m ()
insertMP dht fk a = liftIO $ insertMPBytes dht (serialize a) >>= \cid -> insertDHT dht (fk WithResponse) (PartialVal [cid])
lookupMP :: (Format Word8 Builder Bytes a,MonadIO m) => DHTInstance Key Val -> (Proxy a -> Key) -> m (Maybe a)
lookupMP dht fk = liftIO $ lookupMPBytes dht (fk Proxy) <&> (>>= matches Just datum)
insertMP :: (Serializable Word8 Builder Bytes a,MonadIO m) => DHTInstance Key Val -> (Proxy a -> Key) -> a -> m ()
insertMP dht fk a = liftIO $ insertMPBytes dht (serialize a) >>= \cid -> insertDHT dht (fk Proxy) (PartialVal [cid])

isValidAssoc (OtherKey (DataKey h)) v = valID v == h
isValidAssoc _ _ = True
Expand Down Expand Up @@ -135,11 +135,11 @@ data HTTPMessage = HTTPMessage {
messageBody :: Bytes
}
deriving Show
instance Serializable HTTPMessageType where
encode (GET uri) = foldMap encode ("GET " + uri + " HTTP/1.1\r\n")
encode (PUT uri) = foldMap encode ("PUT " + uri + " HTTP/1.1\r\n")
encode Response = foldMap encode ("HTTP/1.1 200 OK\r\n")
instance Format HTTPMessageType where
instance Serializable Word8 Builder Bytes HTTPMessageType where
encode p (GET uri) = foldMap (encode p) ("GET " + uri + " HTTP/1.1\r\n")
encode p (PUT uri) = foldMap (encode p) ("PUT " + uri + " HTTP/1.1\r\n")
encode p Response = foldMap (encode p) ("HTTP/1.1 200 OK\r\n")
instance Format Word8 Builder Bytes HTTPMessageType where
datum = req <+? resp
where req = do
t <- (GET <$ kw "GET") <+? (PUT <$ kw "PUT")
Expand All @@ -149,13 +149,13 @@ instance Format HTTPMessageType where
return (t uri)
resp = kw "HTTP/1.1" >> skipMany' (charOut "\r\n") >> kw "\r\n" >> return Response

instance Serializable HTTPMessage where
encode (HTTPMessage t hdrs body) =
encode t
+ foldMap (\(n,v) -> foldMap encode (n+": "+v+"\r\n")) (hdrs^.ascList)
+ foldMap encode "\r\n"
instance Serializable Word8 Builder Bytes HTTPMessage where
encode p (HTTPMessage t hdrs body) =
encode p t
+ foldMap (\(n,v) -> foldMap (encode p) (n+": "+v+"\r\n")) (hdrs^.ascList)
+ foldMap (encode p) "\r\n"
+ body^.bytesBuilder
instance Format HTTPMessage where
instance Format Word8 Builder Bytes HTTPMessage where
datum = do
t <- datum
hdrs <- map fromAList $ many' $ do
Expand Down Expand Up @@ -194,7 +194,7 @@ main = do
let msgKeyName = select (/='/') msgURI
msgKey :: Maybe (VCKey ())
msgKey = matches Just ((readable <&> \(B64Chunk b) -> b^..chunk) >*> datum) msgKeyName
getKey, putKey :: Format a => (WithResponse a -> VCKey ()) -> ParserT Bytes IO ()
getKey, putKey :: Format Word8 Builder Bytes a => (Proxy a -> VCKey ()) -> ParserT Bytes IO ()
getKey k = vcbLoad backend k >>= \res -> do
case res of
Just body -> send (HTTPMessage Response (fromAList [("connection","close")]) (serialize body))
Expand Down
4 changes: 2 additions & 2 deletions curly-system/curly-system.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- documentation, see http://haskell.org/cabal/users-guide/

name: curly-system
version: 0.3.2
version: 0.3.3
synopsis: System-specific code generation libraries for the Curly compiler
-- description:
license: GPL-3
Expand Down Expand Up @@ -33,7 +33,7 @@ library
GeneralizedNewtypeDeriving
RankNTypes
other-extensions: UndecidableInstances, RecursiveDo, ScopedTypeVariables, NoMonomorphismRestriction, PatternSynonyms, CPP, TypeFamilies, StandaloneDeriving
build-depends: base >=4.9 && <4.10,curly-core >=0.7 && <0.8,definitive-base >=2.6 && <2.7,definitive-filesystem >=2.1 && <2.2,definitive-parser >=2.5 && <2.6
build-depends: base >=4.9 && <4.10,curly-core >=0.7 && <0.8,definitive-base >=2.6 && <2.7,definitive-filesystem >=2.1 && <2.2,definitive-parser >=3.0 && <3.1
hs-source-dirs: src
if flag(paranoid)
ghc-options: -Werror
Expand Down
6 changes: 3 additions & 3 deletions curly/curly.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- see http://haskell.org/cabal/users-guide/

name: curly
version: 0.59.4.1
version: 0.59.4.2
synopsis: A minimal cross-compiler for the simply-typed lambda-calculus
-- description:
license: GPL-3
Expand Down Expand Up @@ -57,7 +57,7 @@ library
TypeFamilies
LambdaCase
other-extensions: CPP, ExistentialQuantification, ViewPatterns, TypeFamilies, ScopedTypeVariables, RecursiveDo, DeriveGeneric, NoMonomorphismRestriction, QuasiQuotes, TemplateHaskell
build-depends: base >=4.9 && <4.10,curly-core >=0.7 && <0.8,curly-system >=0.3 && <0.4,deepseq >=1.4 && <1.5,definitive-base >=2.6 && <2.7,definitive-filesystem >=2.1 && <2.2,definitive-network >=1.4 && <1.5,definitive-parser >=2.5 && <2.6,directory >=1.3 && <1.4,filepath >=1.4 && <1.5,process >=1.4 && <1.5,terminal-size >=0.3 && <0.4,unix >=2.7 && <2.8, hreadline, template-haskell
build-depends: base >=4.9 && <4.10,curly-core >=0.7 && <0.8,curly-system >=0.3 && <0.4,deepseq >=1.4 && <1.5,definitive-base >=2.6 && <2.7,definitive-filesystem >=2.1 && <2.2,definitive-network >=1.4 && <1.5,definitive-parser >=3.0 && <3.1,directory >=1.3 && <1.4,filepath >=1.4 && <1.5,hreadline >=0.2 && <0.3,process >=1.4 && <1.5,template-haskell >=2.11 && <2.12,terminal-size >=0.3 && <0.4,unix >=2.7 && <2.8
hs-source-dirs: src

executable curly
Expand All @@ -77,5 +77,5 @@ executable curly
GeneralizedNewtypeDeriving
RankNTypes
TypeFamilies
build-depends: base >=4.9 && <4.10,curly >=0.59 && <0.60,curly-core >=0.7 && <0.8,curly-system >=0.3 && <0.4,deepseq >=1.4 && <1.5,definitive-base >=2.6 && <2.7,definitive-filesystem >=2.1 && <2.2,definitive-network >=1.4 && <1.5,definitive-parser >=2.5 && <2.6,directory >=1.3 && <1.4,filepath >=1.4 && <1.5,process >=1.4 && <1.5,unix >=2.7 && <2.8, hreadline
build-depends: base >=4.9 && <4.10,curly >=0.59 && <0.60,curly-core >=0.7 && <0.8,curly-system >=0.3 && <0.4,deepseq >=1.4 && <1.5,definitive-base >=2.6 && <2.7,definitive-filesystem >=2.1 && <2.2,definitive-network >=1.4 && <1.5,definitive-parser >=3.0 && <3.1,directory >=1.3 && <1.4,filepath >=1.4 && <1.5,hreadline >=0.2 && <0.3,process >=1.4 && <1.5,unix >=2.7 && <2.8

2 changes: 1 addition & 1 deletion definitive-network/definitive-network.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ library
MultiParamTypeClasses
Rank2Types
-- other-extensions:
build-depends: base >=4.9 && <4.10,definitive-base >=2.6 && <2.7,definitive-parser >=2.5 && <2.6,network >=2.6 && <2.7
build-depends: base >=4.9 && <4.10,definitive-base >=2.6 && <2.7,definitive-parser >=3.0 && <3.1,network >=2.6 && <2.7
hs-source-dirs: src
default-language: Haskell2010
4 changes: 2 additions & 2 deletions definitive-parser/definitive-parser.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- documentation, see http://haskell.org/cabal/users-guide/

name: definitive-parser
version: 2.5.1
version: 3.0
synopsis: General LogicT-based parser combinator library compatible with the definitive-base Prelude
-- description:
license: GPL-3
Expand Down Expand Up @@ -31,6 +31,6 @@ library
MultiParamTypeClasses
Rank2Types
other-extensions: UndecidableInstances, TypeFamilies, ScopedTypeVariables, ExistentialQuantification, ImplicitParams, DefaultSignatures
build-depends: base,bytestring,deepseq,definitive-base,utf8-string
build-depends: base >=4.8 && <4.10,bytestring >=0.10 && <0.11,deepseq >=1.4 && <1.5,definitive-base >=2.6 && <2.7,utf8-string >=1.0 && <1.1
hs-source-dirs: src
default-language: Haskell2010
2 changes: 1 addition & 1 deletion grow/grow.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ executable grow
main-is: Grow.hs
hs-source-dirs: exe
default-extensions: RebindableSyntax, TypeOperators, GeneralizedNewtypeDeriving, TupleSections, FlexibleContexts, DefaultSignatures
build-depends: base >=4.9 && <4.10,definitive-base >=2.6 && <2.7,definitive-parser >=2.5 && <2.6,directory >=1.3 && <1.4,time >=1.6 && <1.7,unix >=2.7 && <2.8
build-depends: base >=4.9 && <4.10,definitive-base >=2.6 && <2.7,definitive-parser >=3.0 && <3.1,directory >=1.3 && <1.4,time >=1.6 && <1.7,unix >=2.7 && <2.8
2 changes: 1 addition & 1 deletion hreadline/hreadline.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ library
RankNTypes
TypeFamilies
LambdaCase
build-depends: base >=4.9 && <4.10,deepseq,definitive-base,definitive-parser,terminal-size,template-haskell
build-depends: base >=4.9 && <4.10,deepseq >=1.4 && <1.5,definitive-base >=2.6 && <2.7,definitive-parser >=3.0 && <3.1,template-haskell >=2.11 && <2.12,terminal-size >=0.3 && <0.4
hs-source-dirs: src
6 changes: 3 additions & 3 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ packages: []
# Dependency packages to be pulled from upstream that are not in the resolver
# (e.g., acme-missiles-0.3)
extra-deps:
- AES-0.2.9
- kademlia-1.1.0.0
- ./curly
- ./capricon
- ./curly-gateway
- AES-0.2.9
- kademlia-1.1.0.0
- ./definitive-base
- ./definitive-parser
- ./definitive-network
Expand All @@ -51,7 +52,6 @@ extra-deps:
- ./curly-kademlia
- ./curly-core
- ./curly-system
- ./curly-gateway

# Override default flag values for local packages and extra-deps
# flags: {}
Expand Down
2 changes: 1 addition & 1 deletion woosh/woosh.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ executable woosh
AllowAmbiguousTypes,
RoleAnnotations
other-extensions: ImplicitParams, StandaloneDeriving, MultiParamTypeClasses, RankNTypes, DefaultSignatures, TupleSections, Rank2Types, FunctionalDependencies, ViewPatterns, LiberalTypeSynonyms, NoRebindableSyntax, EmptyDataDecls, CPP, ScopedTypeVariables, UndecidableInstances, DeriveGeneric, ExistentialQuantification, RecursiveDo, DeriveDataTypeable
build-depends: base >=4.9 && <4.10,definitive-base,definitive-parser, utf8-string
build-depends: base >=4.9 && <4.10,definitive-base >=2.6 && <2.7,definitive-parser >=3.0 && <3.1,utf8-string >=1.0 && <1.1
hs-source-dirs: exe
default-language: Haskell2010

0 comments on commit 236e195

Please sign in to comment.