Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,268
    • Issues 4,268
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 412
    • Merge Requests 412
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #18542

Closed
Open
Opened Aug 05, 2020 by lennart@augustsson.net@trac-lennart

Kind error when using partial type signatures

Summary

When using a partial type signature I get a kind error, which is surprising.

Steps to reproduce

Compile the following module. The function bar type checks, whereas baz gets a kind error

{-# LANGUAGE RankNTypes #-}
module Bug where

foo :: (Functor g) =>
       (forall aa . Num aa => f aa -> g aa) ->
       f a -> g (f a)
foo f x = undefined

bar :: (forall aa . Num aa => f aa -> Int -> aa) ->
       f a -> Int -> f a
bar f = foo f

baz :: (forall aa . Num aa => f aa -> Int -> aa) ->
       f a -> _ -> f a
baz f = foo f

Environment

  • GHC version used:

The Glorious Glasgow Haskell Compilation System, version 8.10.1

Assignee
Assign to
9.2.1
Milestone
9.2.1
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#18542