[GHC] #9649: symbols should/might be type level lists of chars

#9649: symbols should/might be type level lists of chars -------------------------------------+------------------------------------- Reporter: ibotty | Owner: ibotty Type: feature request | Status: new Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- I thought I had seen that feature request in trac but did not find it. Sorry if I am wrong. A simple use case might be a type safe routing framework, e.g. {{{ get :: Route "/a/:id" $ do idA <- param :: Param "idA" ... }}} I spoke with pedro at hacberlin last weekend and he told me simonp and iavor might tell me where to start looking. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9649 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9649: symbols should/might be type level lists of chars -------------------------------------+------------------------------------- Reporter: ibotty | Owner: ibotty Type: feature | Status: new request | Milestone: 7.10.1 Priority: normal | Version: Component: Compiler | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by goldfire): I agree in that I find the impedance mismatch between term-level `String`s and type-level `Symbol`s a little annoying. But, there's a fairly sensible workaround: use lists of one-character symbols. A little quasi-quoting to ease the syntactic pain and you can get fairly far. I would still rather, of course, built-in support. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9649#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9649: symbols should/might be type level lists of chars -------------------------------------+------------------------------------- Reporter: ibotty | Owner: ibotty Type: feature | Status: new request | Milestone: 7.10.1 Priority: normal | Version: Component: Compiler | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by dreixel): * cc: simonpj@…, diatchki@… (added) Comment: Richard: I didn't think of that workaround you propose, but it might just work, yes. Still, if ibotty would want to work on this, could simonpj and/or iavor provide some guidance? I too have found this problem annoying, as right now you can't really do much with `Symbol`s. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9649#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC