-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move all haskell projects to toplevel
The whole project is an experiment so no need to have another level. It simplifies IDE configuration
- Loading branch information
1 parent
7ccdc00
commit 5c06c07
Showing
27 changed files
with
92 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{-# LANGUAGE DeriveGeneric #-} | ||
{-# LANGUAGE TypeFamilies #-} | ||
{-# LANGUAGE GADTs #-} | ||
module Peras.Model where | ||
|
||
import Test.QuickCheck.StateModel(StateModel(..), Var) | ||
import GHC.Generics (Generic) | ||
import Data.ByteString (ByteString) | ||
|
||
-- | We model a network of nodes interconnected through a diffusion layer. | ||
data Network = Network | ||
deriving (Show, Generic) | ||
|
||
newtype BlockId = BlockId { unBlockId :: ByteString } | ||
deriving (Eq, Show) | ||
|
||
newtype NodeId = NodeId { unNodeId :: ByteString } | ||
deriving (Eq, Show) | ||
|
||
newtype Block = Block { blockId :: BlockId } | ||
deriving (Eq, Show) | ||
|
||
data Chain = Genesis | ||
| Chain Block Chain | ||
deriving (Eq, Show) | ||
|
||
instance StateModel Network where | ||
|
||
data Action Network a where | ||
DispatchBlock :: Action Network (Maybe (Var Block )) | ||
|
||
ObserveNode :: NodeId -> Action Network Chain |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.