Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,396
    • Issues 5,396
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 589
    • Merge requests 589
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #4356
Closed
Open
Issue created Sep 30, 2010 by Sjoerd Visscher@trac-sjoerd_visscher

type instance doesn't work when the type is (->)

This doesn't work in 7.0.0.20100924. It works fine in 6.12.3.

{-# LANGUAGE TypeFamilies #-}
type family T t :: * -> * -> *
type instance T Bool = (->)
f :: T Bool Bool Bool
f = not

This is the error:

    Couldn't match type `T Bool' with `(->)'
    Expected type: T Bool Bool Bool
      Actual type: Bool -> Bool
    In the expression: not
    In an equation for `f': f = not
Edited Mar 09, 2019 by Ian Lynagh <igloo@earth.li>
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking