Skip to content

variables: Display of single field datatype is wrong #51

@alt-romes

Description

@alt-romes

For the given program:

newtype MyInt = MyInt Int
    deriving Show

data X = X MyInt
    deriving Show

main :: IO ()
main = do
    putStrLn $ "Success...: " ++ f (X (MyInt 35))

f s = case s of
        X str -> show str

Setting a breakpoint on f and inspecting s should display X (MyInt 35). Instead, it shows:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    MuniHac 25Tasks worked on or created during MuniHac25high ⭐️

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions