Fixed the monomorphism restriction warnings in GenerateCTest
This commit is contained in:
parent
7e7625385d
commit
e0d6c5eb08
|
@ -181,6 +181,8 @@ tcall3 = call
|
||||||
tcall4 = call
|
tcall4 = call
|
||||||
tcall5 = call
|
tcall5 = call
|
||||||
|
|
||||||
|
type Override = CGen () -> CGen ()
|
||||||
|
|
||||||
-- | Overrides a specified function in GenOps to return the given value
|
-- | Overrides a specified function in GenOps to return the given value
|
||||||
override1 ::
|
override1 ::
|
||||||
b -- ^ The value to return for the overridden function
|
b -- ^ The value to return for the overridden function
|
||||||
|
@ -969,6 +971,7 @@ testInput = TestList
|
||||||
-- state = do defineName chan $ simpleDefDecl "c" (A.Chan A.DirUnknown (A.ChanAttributes False False) $ A.UserProtocol foo)
|
-- state = do defineName chan $ simpleDefDecl "c" (A.Chan A.DirUnknown (A.ChanAttributes False False) $ A.UserProtocol foo)
|
||||||
-- defineName chanOut $ simpleDefDecl "cIn" (A.Chan A.DirInput (A.ChanAttributes False False) $ A.UserProtocol foo)
|
-- defineName chanOut $ simpleDefDecl "cIn" (A.Chan A.DirInput (A.ChanAttributes False False) $ A.UserProtocol foo)
|
||||||
|
|
||||||
|
overInputItemCase, over :: Override
|
||||||
overInputItemCase = local $ \ops -> ops {genInputItem = override2 caret}
|
overInputItemCase = local $ \ops -> ops {genInputItem = override2 caret}
|
||||||
over = local $ \ops -> ops {genBytesIn = (\_ t _ -> tell ["^(",show t,")"]) , genArraySubscript = override3 dollar}
|
over = local $ \ops -> ops {genBytesIn = (\_ t _ -> tell ["^(",show t,")"]) , genArraySubscript = override3 dollar}
|
||||||
|
|
||||||
|
@ -1053,6 +1056,7 @@ testOutput = TestList
|
||||||
state :: CSM m => m ()
|
state :: CSM m => m ()
|
||||||
state = do defineName chan $ simpleDefDecl "c" (A.Chan A.DirUnknown (A.ChanAttributes False False) $ A.UserProtocol foo)
|
state = do defineName chan $ simpleDefDecl "c" (A.Chan A.DirUnknown (A.ChanAttributes False False) $ A.UserProtocol foo)
|
||||||
defineName chanOut $ simpleDefDecl "cOut" (A.Chan A.DirOutput (A.ChanAttributes False False) $ A.UserProtocol foo)
|
defineName chanOut $ simpleDefDecl "cOut" (A.Chan A.DirOutput (A.ChanAttributes False False) $ A.UserProtocol foo)
|
||||||
|
overOutput, overOutputItem, over :: Override
|
||||||
overOutput = local $ \ops -> ops {genOutput = override2 caret}
|
overOutput = local $ \ops -> ops {genOutput = override2 caret}
|
||||||
overOutputItem = local $ \ops -> ops {genOutputItem = override2 caret}
|
overOutputItem = local $ \ops -> ops {genOutputItem = override2 caret}
|
||||||
over = local $ \ops -> ops {genBytesIn = override3 caret}
|
over = local $ \ops -> ops {genBytesIn = override3 caret}
|
||||||
|
@ -1085,6 +1089,7 @@ testBytesIn = TestList
|
||||||
|
|
||||||
]
|
]
|
||||||
where
|
where
|
||||||
|
over :: Override
|
||||||
over = local $ \ops -> ops {genVariable = override1 dollar, genSizeSuffix = (\n -> tell["(@",n,")"])}
|
over = local $ \ops -> ops {genVariable = override1 dollar, genSizeSuffix = (\n -> tell["(@",n,")"])}
|
||||||
|
|
||||||
testMobile :: Test
|
testMobile :: Test
|
||||||
|
|
Loading…
Reference in New Issue
Block a user