Skip to content

Set is not a valid Haskell type #449

@jespercockx

Description

@jespercockx

Discovered during my presentation at AIM XLI:

foo : Set  Int
foo _ = 42
{-# COMPILE AGDA2HS foo #-}

goo :  {a : Set₁}  (a  Int)  Bool
goo _ = True
{-# COMPILE AGDA2HS goo #-}

test = goo foo
{-# COMPILE AGDA2HS test #-}

This produces the following invalid Haskell:

foo :: Int
foo = 42

goo :: (a -> Int) -> Bool
goo _ = True

test :: Bool
test = goo foo

It should reject the definition of test instead, since the type parameter a should only be instantiated with a valid Haskell type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions