X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=Flatten.hs;h=f7ab86ce107ed770e6bbc46e3d67186e83eccdb9;hb=72a84356f5507b73d4d5f84844aac9334ee17795;hp=cd515859f0879755d9d7f6e704bfb241271d9fbc;hpb=20fbdf46508998bd11da03f3abd6e8725508b0a1;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/Flatten.hs b/Flatten.hs index cd51585..f7ab86c 100644 --- a/Flatten.hs +++ b/Flatten.hs @@ -28,21 +28,22 @@ genSignals :: -> FlattenState (SignalMap UnnamedSignal) genSignals ty = do - typeMapToUseMap tymap + typeMapToUseMap SigInternal tymap where -- First generate a map with the right structure containing the types tymap = mkHsValueMap ty typeMapToUseMap :: - HsValueMap Type.Type + SigUse + -> HsValueMap Type.Type -> FlattenState (SignalMap UnnamedSignal) -typeMapToUseMap (Single ty) = do - id <- genSignalId ty +typeMapToUseMap use (Single ty) = do + id <- genSignalId use ty return $ Single id -typeMapToUseMap (Tuple tymaps) = do - usemaps <- State.mapM typeMapToUseMap tymaps +typeMapToUseMap use (Tuple tymaps) = do + usemaps <- State.mapM (typeMapToUseMap use) tymaps return $ Tuple usemaps -- | Flatten a haskell function