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,264
    • Issues 5,264
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 568
    • Merge requests 568
  • 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
  • #11641
Closed
Open
Issue created Feb 25, 2016 by Icelandjack@IcelandjackReporter

Allow wildcards for parameters functionally determined (also type synonyms)

class F a b | a -> b where
  foo :: a
  -- ...

myFoo :: F a b => a
myFoo = foo

Since b is not used and fully determined by a could the restriction on wildcards in constraints be lifted?

myFoo :: F a _ => a
myFoo = foo

and eventually hiding it behind a type synonym:

type F' a = F a _

myFoo' :: F' a => a
myFoo' = foo

I raised this issue at ICFP 2014, I haven't looked into whether dominique's response to my comment applies.


I could achieve similar things with a type family but not quite.


Or CPP :)

Edited Mar 10, 2019 by Icelandjack
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking