-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from azardilis/latest-compiler-versions
Revert
- Loading branch information
Showing
24 changed files
with
548 additions
and
993 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,166 +1,33 @@ | ||
cabal-version: 1.12 | ||
|
||
-- This file has been generated from package.dhall by hpack version 0.31.0. | ||
-- | ||
-- see: https://github.com/sol/hpack | ||
-- | ||
-- hash: 462ba9eb4531d9fe5b7fbcac0a62eddf10bbdad1a4cdb31bd77764cf90085bd5 | ||
|
||
name: chromar | ||
version: 0.1.0.0 | ||
synopsis: none | ||
homepage: none | ||
author: none | ||
maintainer: none | ||
build-type: Simple | ||
cabal-version: >=1.8 | ||
|
||
library | ||
build-depends: | ||
base, | ||
containers, | ||
haskell-src-meta, | ||
multiset, | ||
parsec, | ||
random, | ||
template-haskell | ||
if impl(ghc >= 8.10.0) | ||
other-modules: | ||
Internal.RuleQuotes | ||
hs-source-dirs: | ||
src-ghc-8.10 | ||
if impl(ghc >= 8.8.0) && impl(ghc < 8.10.0) | ||
other-modules: | ||
Internal.RuleQuotes | ||
hs-source-dirs: | ||
src-ghc-8.8 | ||
if impl(ghc >= 8.6.0) && impl(ghc < 8.8.0) | ||
other-modules: | ||
Internal.RuleQuotes | ||
hs-source-dirs: | ||
src-ghc-8.6 | ||
hs-source-dirs: | ||
src | ||
other-extensions: BangPatterns | ||
ghc-options: -Wall -Werror -Wincomplete-uni-patterns -Wcompat -Widentities -Wredundant-constraints -fhide-source-paths | ||
exposed-modules: | ||
Chromar.Core | ||
Chromar.RuleQuotesE | ||
Chromar.Multiset | ||
Chromar.MAttrs | ||
Chromar.MRuleParser | ||
Chromar.RExprs | ||
Chromar.Experiment | ||
Chromar | ||
other-modules: | ||
Paths_chromar | ||
default-language: Haskell2010 | ||
|
||
test-suite gdiff | ||
type: exitcode-stdio-1.0 | ||
main-is: gdiff.hs | ||
hs-source-dirs: | ||
models | ||
other-extensions: BangPatterns | ||
ghc-options: -Wall -Werror -Wincomplete-uni-patterns -Wcompat -Widentities -Wredundant-constraints -fhide-source-paths | ||
build-depends: | ||
base, | ||
chromar, | ||
containers | ||
buildable: False | ||
default-language: Haskell2010 | ||
|
||
test-suite germ | ||
type: exitcode-stdio-1.0 | ||
main-is: germ.hs | ||
other-modules: | ||
SeedsModel.Env | ||
SeedsModel.Germ | ||
hs-source-dirs: | ||
models/seedsModel | ||
other-extensions: BangPatterns | ||
ghc-options: -Wall -Werror -Wincomplete-uni-patterns -Wcompat -Widentities -Wredundant-constraints -fhide-source-paths | ||
build-depends: | ||
base, | ||
chromar, | ||
containers, | ||
normaldistribution, | ||
random, | ||
text | ||
buildable: False | ||
default-language: Haskell2010 | ||
|
||
test-suite market | ||
type: exitcode-stdio-1.0 | ||
main-is: Market.hs | ||
hs-source-dirs: | ||
models/market | ||
other-extensions: BangPatterns | ||
ghc-options: -Wall -Werror -Wincomplete-uni-patterns -Wcompat -Widentities -Wredundant-constraints -fhide-source-paths | ||
build-depends: | ||
base, | ||
chromar, | ||
containers, | ||
normaldistribution, | ||
random | ||
buildable: False | ||
default-language: Haskell2010 | ||
|
||
test-suite model | ||
type: exitcode-stdio-1.0 | ||
main-is: model.hs | ||
hs-source-dirs: | ||
models | ||
other-extensions: BangPatterns | ||
ghc-options: -Wall -Werror -Wincomplete-uni-patterns -Wcompat -Widentities -Wredundant-constraints -fhide-source-paths | ||
build-depends: | ||
base, | ||
chromar, | ||
containers | ||
buildable: False | ||
default-language: Haskell2010 | ||
|
||
test-suite plant | ||
type: exitcode-stdio-1.0 | ||
main-is: plant.hs | ||
hs-source-dirs: | ||
models | ||
other-extensions: BangPatterns | ||
ghc-options: -Wall -Werror -Wincomplete-uni-patterns -Wcompat -Widentities -Wredundant-constraints -fhide-source-paths | ||
build-depends: | ||
base, | ||
chromar, | ||
containers | ||
default-language: Haskell2010 | ||
|
||
test-suite simple | ||
type: exitcode-stdio-1.0 | ||
main-is: simple.hs | ||
hs-source-dirs: | ||
models | ||
other-extensions: BangPatterns | ||
ghc-options: -Wall -Werror -Wincomplete-uni-patterns -Wcompat -Widentities -Wredundant-constraints -fhide-source-paths | ||
build-depends: | ||
base, | ||
chromar, | ||
containers | ||
default-language: Haskell2010 | ||
|
||
test-suite utils | ||
type: exitcode-stdio-1.0 | ||
main-is: utils.hs | ||
other-modules: | ||
SeedsModel.Env | ||
SeedsModel.Utils | ||
hs-source-dirs: | ||
models | ||
other-extensions: BangPatterns | ||
ghc-options: -Wall -Werror -Wincomplete-uni-patterns -Wcompat -Widentities -Wredundant-constraints -fhide-source-paths | ||
build-depends: | ||
base, | ||
chromar, | ||
containers, | ||
normaldistribution, | ||
random, | ||
text | ||
buildable: False | ||
default-language: Haskell2010 | ||
build-depends: base, | ||
random >=1.1 && <1.2, | ||
parsec >=3.1 && <3.2, | ||
template-haskell >=2.10 && <2.12, | ||
haskell-src-meta >= 0.6, | ||
containers >=0.5, | ||
multiset >= 0.3 | ||
ghc-options: -O2 | ||
|
||
hs-source-dirs: src | ||
|
||
exposed-modules: Chromar.Core | ||
Chromar.RuleQuotesE | ||
Chromar.Multiset | ||
Chromar.MAttrs | ||
Chromar.MRuleParser | ||
Chromar.RExprs | ||
Chromar.Experiment | ||
Chromar | ||
|
||
other-extensions: BangPatterns | ||
|
||
default-language: Haskell2010 |
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 |
---|---|---|
@@ -1,29 +1,29 @@ | ||
{-# LANGUAGE QuasiQuotes #-} | ||
{-# LANGUAGE QuasiQuotes #-} | ||
{-# LANGUAGE TemplateHaskell #-} | ||
{-# OPTIONS_GHC -fno-warn-name-shadowing #-} | ||
{-# OPTIONS_GHC -fno-warn-unused-matches #-} | ||
|
||
import Chromar | ||
import Chromar | ||
|
||
-- Agent declarations | ||
data Agent = A { x :: Int } deriving (Eq, Show) | ||
data Agent = A { x :: Int } | ||
deriving (Eq, Show) | ||
|
||
$(return []) | ||
|
||
-- Rules | ||
r1, r2 :: [(Agent, Int)] -> Time -> [Rxn Agent] | ||
r1 = [rule| A{x=x}, A{x=y} --> A{x='x+1'}, A{x='y-1'} @'1.0' ['y > 0'] |] | ||
r2 = [rule| A{x=x} --> A{x='x'}, A{x='0'} @'1.0' |] | ||
|
||
na, nx :: Er Agent Int | ||
na = [er| select A{x=x}; aggregate (count . 'count + 1') '0' |] | ||
nx = [er| select A{x=x}; aggregate (count . 'count + x') '0' |] | ||
|
||
s :: Multiset Agent | ||
s = ms [A{x=5}, A{x=5}] | ||
|
||
model :: Model Agent | ||
model = Model{ rules = [r1, r2], initState = s } | ||
model = | ||
Model | ||
{ rules = [r1, r2] | ||
, initState = s | ||
} | ||
|
||
main :: IO () | ||
main = let nsteps = 100 in run model nsteps (zipEr2 na nx) | ||
main = | ||
let nsteps = 100 | ||
in run model nsteps (zipEr2 na nx) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.