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

Fully support strictness flags in data declarations #290

Closed
mabre opened this issue Jul 10, 2016 · 1 comment
Closed

Fully support strictness flags in data declarations #290

mabre opened this issue Jul 10, 2016 · 1 comment

Comments

@mabre
Copy link

mabre commented Jul 10, 2016

The following program works (ie. results in java.lang.ArithmeticException: / by zero) with Frege:

data S = S {
    !a :: Int,
     b :: Int
}

main :: IO Int
main = return $ r f
    where
        f = S (1 `div` 0) 2
        r (S _ b) = b

(Note that differing from the Haskell standard !a :: Int is used and not a :: !Int).
But Frege does not support strictness flags without fields, ie. data S = S !Int Int does not work.

@Ingo60
Copy link
Member

Ingo60 commented Apr 1, 2018

Strictly speaking, bang patterns are not standard. However, it'd be good if frege would accept that syntax, too.

@Ingo60 Ingo60 closed this as completed in 4f8c242 Apr 2, 2018
catull pushed a commit to catull/frege that referenced this issue Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants