[GHC] #9843: Add flag to infer undefined for variables with only types
GHC
ghc-devs at haskell.org
Fri Nov 28 02:24:20 UTC 2014
#9843: Add flag to infer undefined for variables with only types
-------------------------------------+-------------------------------------
Reporter: tempay | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Keywords: | Operating System:
Architecture: Unknown/Multiple | Unknown/Multiple
Difficulty: Unknown | Type of failure:
Blocked By: | None/Unknown
Related Tickets: | Test Case:
| Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
It would be convenient to be able to write only type declarations for some
or all variables and have the compiler assume that the definitions of
those variables are 'undefined'.
For example:
{{{#!hs
functionOne :: x -> y
functionTwo :: y -> z
functionThree :: x -> y
functionThree = functionOne . functionTwo
}}}
would be equivalent to
{{{#!hs
functionOne :: x -> y
functionOne = undefined
functionTwo :: y -> z
functionTwo = undefined
functionThree :: x -> y
functionThree = functionOne . functionTwo
}}}
I feel this would make type-driven development significantly more
convenient/clean.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9843>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list