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

TupleSections with two commas #18

Open
ysangkok opened this issue Jan 15, 2024 · 1 comment
Open

TupleSections with two commas #18

ysangkok opened this issue Jan 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ysangkok
Copy link

ysangkok commented Jan 15, 2024

Seems like MicroHs doesn't like this, I am not sure whether this is a GHC extension to the TupleSections extension that isn't supposed to be supported, or whether it is a genuine bug.

module Example2(main) where

import Prelude

f :: Bool -> Int -> (Bool, String, Int)
f = (,"Hello World",)

main :: IO ()
main = pure ()

This fails on MicroHs:

 % ./bin/mhs Example2
ERR: mhs: "./Example2.hs": line 6, col 20:
  found:    ,
  expected: { select LQIdent ( UQIdent [ literal primitive :: )

But works on GHC 9.8:

 % ghc -XTupleSections Example2.hs
# Succeeds

Taken from tcrun024.hs.

@augustss
Copy link
Owner

Yeah, MicroHs only supports pair sections at the moment. I might add general tuple sections.

@augustss augustss added the enhancement New feature or request label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants