Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The gdiff test-suite doesn't compile. #22

Open
philderbeast opened this issue Jun 22, 2020 · 0 comments
Open

The gdiff test-suite doesn't compile. #22

philderbeast opened this issue Jun 22, 2020 · 0 comments

Comments

@philderbeast
Copy link
Contributor

The gdiff test-suite doesn't compile.

% stack repl chromar:gdiff
Using main module: 1. Package `chromar' component chromar:test:gdiff with main-is file: /.../models/gdiff.hs
chromar> configure (lib)
Configuring chromar-0.1.0.0...
chromar> initial-build-steps (lib)
The following GHC options are incompatible with GHCi and have not been passed to it: -Werror
Configuring GHCi with the following packages: chromar
[1 of 1] Compiling Main

/.../models/gdiff.hs:41:10: error:
    • Couldn't match expected type ‘Double’
                  with actual type ‘Er a0 (Er Agent Double)’
    • In the second argument of ‘(-)’, namely ‘mean’
      In the first argument of ‘(^^)’, namely ‘(x - mean)’
      In the second argument of ‘(+)’, namely ‘(x - mean) ^^ 2’
   |
41 | sd = [er| select C{cid=i, nextTo=k, x=x};
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

/.../models/gdiff.hs:60:11: error:
    • Couldn't match expected type ‘Double’
                  with actual type ‘Er a2 Double’
    • In the first argument of ‘g’, namely ‘sf’
      In the expression: g sf
      In the first argument of ‘mkEr’, namely ‘(\ _ _ -> g sf)’
   |
60 |     [rule|
   |           ^...
Failed, no modules loaded.

Chromar/models/gdiff.hs

Lines 41 to 42 in 523a033

sd = [er| select C{cid=i, nextTo=k, x=x};
aggregate (acc . 'acc + (x - $mean$)^^2') '0' |]

Chromar/models/gdiff.hs

Lines 59 to 64 in 523a033

growth =
[rule|
C{nextTo=p, x=x} -->
C{nextTo='round $n$+1', x='f (x/2.0)'}, C{cid='round $n$+1', nextTo='p', x='c (x/2.0)'}
@'g $sf$'
|]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant