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

"RefType.refAppTyToFun" error #2381

Open
gergoerdi opened this issue Oct 11, 2024 · 1 comment
Open

"RefType.refAppTyToFun" error #2381

gergoerdi opened this issue Oct 11, 2024 · 1 comment
Assignees

Comments

@gergoerdi
Copy link
Contributor

gergoerdi commented Oct 11, 2024

I'm getting an "Uh oh" error on the following standalone input file on 5595507:

{-# LANGUAGE NoImplicitPrelude #-}
module Arrow where

infixr 3 >>>
infixr 3 ***
infixr 3 &&&

class Arrow a where
    (>>>) :: a b c -> a c d -> a b d

    arr :: (b -> c) -> a b c

    (***) :: a b c -> a b' c' -> a (b,b') (c,c')

    (&&&) :: a b c -> a b c' -> a b (c,c')
    f &&& g = arr (\b -> (b,b)) >>> f *** g

instance Arrow (->) where
    f >>> g = \x -> g (f x)
    arr f = f
    (f *** g) (x,y) = (f x, g y)

The exact output of LH is:

[1 of 1] Compiling Arrow            ( input/Arrow.hs, input/Arrow.o )
<no location info>: error: Uh oh.
    RefType.refAppTyToFun
@gergoerdi
Copy link
Contributor Author

I have stumbled upon a much simpler reproducer:

{-# LANGUAGE NoImplicitPrelude #-}
module Exceptions (main) where

mustThrow :: forall p exc. p exc -> ()
mustThrow _ = ()

main :: ()
main = mustThrow (\x -> ())

@nikivazou nikivazou self-assigned this Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants