Giter Club home page Giter Club logo

invalid-monoid's Introduction

invalid-monoid

Invalid Monoid example from the book "Haskell Programming From First Principles", by Allen & Moronuki (page 609).

The code compiles with stack resolver lts-10.7, and the monoidal properties are tested as invalid by QuickCheck.

However, with lts-12.7, the code fails to compile altogether.

This is the error generated:

Building all executables for `invalid-monoid' once. After a successful build of all of them, only specified executables will be rebuilt.
invalid-monoid-0.1.0.0: configure (lib + exe)
Configuring invalid-monoid-0.1.0.0...
invalid-monoid-0.1.0.0: build (lib + exe)
Preprocessing library for invalid-monoid-0.1.0.0..
Building library for invalid-monoid-0.1.0.0..
[1 of 2] Compiling Lib              ( src\Lib.hs, .stack-work\dist\7d103d30\build\Lib.o )

src\Lib.hs:8:14:
    * No instance for (Semigroup Bull)
        arising from the superclasses of an instance declaration
    * In the instance declaration for `Monoid Bull'
    |
    |     instance Monoid Bull where
    |              ^^^^^^^^^^^


--  While building custom Setup.hs for package invalid-monoid-0.1.0.0 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.2.0.1_ghc-8.4.3.exe --builddir=.stack-work\dist\7d103d30 build lib:invalid-monoid exe:invalid-monoid-exe --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

Any ideas on what's going on?

invalid-monoid's People

Contributors

haleemur avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.