Code Monkey home page Code Monkey logo

Comments (4)

opqdonut avatar opqdonut commented on May 27, 2024

I think you've accidentally edited the file. Perhaps your IDE suggests tuple sections? The code in the exercise template doesn't use tuple sections:

msgSL :: String -> SL ()
msgSL msg = SL (\s -> ((),s,[msg]))

from haskell-mooc.

asarkar avatar asarkar commented on May 27, 2024

@opqdonut

The code in the exercise template doesn't use tuple sections

It does.

https://github.com/moocfi/haskell-mooc/blob/ghc-9/exercises/Set13b.hs#L301

It is standard practice to wait for OP to respond to a question before closing the ticket. Please reopen.

from haskell-mooc.

opqdonut avatar opqdonut commented on May 27, 2024

From your original message

Set13b.hs:337:16: error: Illegal tuple section: use TupleSections
    |
337 | msgSL msg = SL ((),,[msg])
    |                ^^^^^^^^^^^

From the source we both linked to:

msgSL msg = SL (\s -> ((),s,[msg])) 

Note the difference: ((),,[msg]) vs (\s -> ((),s,[msg])).

Sorry about closing the ticket, I didn't realise it was important to you to keep it open. Reopened.

from haskell-mooc.

asarkar avatar asarkar commented on May 27, 2024

@opqdonut Weird, I don’t remember changing the given code. I run hlint and ormolu on the code base, and am guessing the change came from one of those.
Sorry for the confusion and thank you for supporting this excellent course.

from haskell-mooc.

Related Issues (20)

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.