parent
8df56ecaa1
commit
3640d75c99
@ -18,7 +18,7 @@ import Language.Haskell.TH.Quote
|
|||||||
import qualified System.IO as SIO
|
import qualified System.IO as SIO
|
||||||
import Yesod.Routes.TH
|
import Yesod.Routes.TH
|
||||||
import Yesod.Routes.Overlap (findOverlapNames)
|
import Yesod.Routes.Overlap (findOverlapNames)
|
||||||
import Data.List (foldl')
|
import Data.List (foldl', isPrefixOf)
|
||||||
import Data.Maybe (mapMaybe)
|
import Data.Maybe (mapMaybe)
|
||||||
import qualified Data.Set as Set
|
import qualified Data.Set as Set
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ resourcesFromString =
|
|||||||
spaces = takeWhile (== ' ') thisLine
|
spaces = takeWhile (== ' ') thisLine
|
||||||
(others, remainder) = parse indent otherLines'
|
(others, remainder) = parse indent otherLines'
|
||||||
(this, otherLines') =
|
(this, otherLines') =
|
||||||
case takeWhile (/= "--") $ words thisLine of
|
case takeWhile (not . isPrefixOf "--") $ words thisLine of
|
||||||
(pattern:rest0)
|
(pattern:rest0)
|
||||||
| Just (constr:rest) <- stripColonLast rest0
|
| Just (constr:rest) <- stripColonLast rest0
|
||||||
, Just attrs <- mapM parseAttr rest ->
|
, Just attrs <- mapM parseAttr rest ->
|
||||||
|
|||||||
@ -78,6 +78,8 @@ do
|
|||||||
let resources = [parseRoutes|
|
let resources = [parseRoutes|
|
||||||
/ HomeR GET
|
/ HomeR GET
|
||||||
|
|
||||||
|
----------------------------------------
|
||||||
|
|
||||||
/!#Int BackwardsR GET
|
/!#Int BackwardsR GET
|
||||||
|
|
||||||
/admin/#Int AdminR:
|
/admin/#Int AdminR:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user