Skip to content

Commit

Permalink
parse type variables in routes
Browse files Browse the repository at this point in the history
  • Loading branch information
jprider63 committed Mar 24, 2017
1 parent 80622c2 commit deb72b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion yesod-core/Yesod/Routes/Parse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module Yesod.Routes.Parse
) where

import Language.Haskell.TH.Syntax
import Data.Char (isUpper, isSpace)
import Data.Char (isUpper, isLower, isSpace)
import Language.Haskell.TH.Quote
import qualified System.IO as SIO
import Yesod.Routes.TH
Expand Down Expand Up @@ -252,6 +252,7 @@ toTypeTree orig = do
gos' (front . (t:)) xs'

ttToType :: TypeTree -> Type
ttToType (TTTerm s@(h:_)) | isLower h = VarT $ mkName s
ttToType (TTTerm s) = ConT $ mkName s
ttToType (TTApp x y) = ttToType x `AppT` ttToType y
ttToType (TTList t) = ListT `AppT` ttToType t
Expand Down

0 comments on commit deb72b3

Please sign in to comment.