[GHC] #13480: GHCi display visible type application
GHC
ghc-devs at haskell.org
Sat Mar 25 15:24:46 UTC 2017
#13480: GHCi display visible type application
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: feature | Status: new
request |
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets: #8751
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Similar to #8751, have a way to get GHCi to dump which types an expression
is applied to:
{{{
ghci> :tyapp length [1,2,3]
length @[] @Integer [1,2,3]
}}}
It could also function as the [https://downloads.haskell.org/~ghc/master
/users-guide/ghci.html#ghci-cmd-:all-types :all-types],
[https://downloads.haskell.org/~ghc/master/users-guide/ghci.html#ghci-cmd
-:type-at :type-at] commands where we can specify a region of code (from
[https://www.researchgate.net/publication
/282487445_Combining_Deep_and_Shallow_Embedding_of_Domain-
Specific_Languages?ev=pubitem-pub_cit_inc Combining Deep and Shallow
Embedding of Domain-Specific Languages])
{{{#!hs
fromFunC :: FunC (m (Internal a)) -> Mon m a
fromFunC m = M $ \k -> fromFunC Bind m k
}}}
displays
{{{#!hs
fromFunC :: FunC (m (Internal a)) -> Mon m a
fromFunC m = M @m @a $ \(k :: a -> FunC (m b)) -> fromFunC @(FunC (m
(Internal a)) -> (a -> FunC (m b)) -> FunC (m b)) (Bind @m @(Internal a)
@b) m k
}}}
Would be great to get this feature as an IDE support.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13480>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list