*** setup configure Configuring hasim-0.1... Flags chosen: splitbase=True Dependency base >=3: using base-4.2.0.0 Dependency containers -any: using containers-0.3.0.0 Dependency mtl >=1.0: using mtl-1.1.0.2 Using Cabal-1.8.0.2 compiled by ghc-6.12 Using compiler: ghc-6.12.1 Using install prefix: /usr/local/tmp/archive/install Binaries installed in: /usr/local/tmp/archive/install/bin Libraries installed in: /usr/local/tmp/archive/install/lib/hasim-0.1/ghc-6.12.1 Private binaries installed in: /usr/local/tmp/archive/install/libexec Data files installed in: /usr/local/tmp/archive/install/share/hasim-0.1 Documentation installed in: /usr/local/tmp/archive/install/share/doc/hasim-0.1 Using alex version 2.3.1 found on system at: /usr/bin/alex Using ar found on system at: /usr/bin/ar Using c2hs version 0.16.0 found on system at: /usr/local/bin/c2hs Using cpphs version 1.11 found on system at: /usr/local/bin/cpphs Using ffihugs found on system at: /usr/local/bin/ffihugs Using gcc version 4.4.3 found on system at: /usr/bin/gcc Using ghc version 6.12.1 found on system at: /usr/local/bin/ghc Using ghc-pkg version 6.12.1 found on system at: /usr/local/bin/ghc-pkg Using greencard found on system at: /usr/local/tmp/archive/install/bin/greencard Using haddock version 2.7.2 found on system at: /usr/local/bin/haddock Using happy version 1.17 found on system at: /usr/local/bin/happy No hmake found Using hsc2hs version 0.67 found on system at: /usr/local/bin/hsc2hs Using hscolour version 1.16 found on system at: /usr/local/bin/HsColour Using hugs found on system at: /usr/local/bin/hugs No jhc found Using ld found on system at: /usr/bin/ld No lhc found No lhc-pkg found No nhc98 found Using pkg-config version 0.22 found on system at: /usr/bin/pkg-config Using ranlib found on system at: /usr/bin/ranlib Using strip found on system at: /usr/bin/strip Using tar found on system at: /bin/tar *** setup haddock Running Haddock for hasim-0.1... /usr/local/bin/haddock --use-contents=/package/hasim-0.1 --ghc-version Creating dist/build (and its parents) Creating dist/build/autogen (and its parents) Preprocessing library hasim-0.1... Running hscolour for hasim-0.1... Creating dist/doc/html/hasim (and its parents) Creating dist/doc/html/hasim/src (and its parents) /usr/local/bin/HsColour -print-css -odist/doc/html/hasim/src/hscolour.css /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim.html src/Control/Hasim.hs /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim-Action.html src/Control/Hasim/Action.hs /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim-DES.html src/Control/Hasim/DES.hs /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim-Process.html src/Control/Hasim/Process.hs /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim-SimRun.html src/Control/Hasim/SimRun.hs /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim-Simulation.html src/Control/Hasim/Simulation.hs /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim-Types.html src/Control/Hasim/Types.hs /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim-WatchMap.html src/Control/Hasim/WatchMap.hs Warning: The documentation for the following packages are not installed. No links will be generated to these packages: ffi-1.0, rts-1.0 /usr/local/bin/ghc --print-libdir copy src/Control/Hasim.hs to dist/build/tmp15238/src/Control/Hasim.hs copy src/Control/Hasim/Action.hs to dist/build/tmp15238/src/Control/Hasim/Action.hs copy src/Control/Hasim/DES.hs to dist/build/tmp15238/src/Control/Hasim/DES.hs copy src/Control/Hasim/Process.hs to dist/build/tmp15238/src/Control/Hasim/Process.hs copy src/Control/Hasim/SimRun.hs to dist/build/tmp15238/src/Control/Hasim/SimRun.hs copy src/Control/Hasim/Simulation.hs to dist/build/tmp15238/src/Control/Hasim/Simulation.hs copy src/Control/Hasim/Types.hs to dist/build/tmp15238/src/Control/Hasim/Types.hs copy src/Control/Hasim/WatchMap.hs to dist/build/tmp15238/src/Control/Hasim/WatchMap.hs Creating dist/doc/html/hasim/ (and its parents) /usr/local/bin/haddock --use-contents=/package/hasim-0.1 --prologue=dist/doc/html/hasim/haddock-prolog15238.txt --dump-interface=dist/doc/html/hasim/hasim.haddock --optghc=-package-name --optghc=hasim-0.1 --source-module=src/%{MODULE/./-}.html --source-entity=src/%{MODULE/./-}.html#%{NAME} --verbosity=1 --html --read-interface=/packages/archive/array/0.3.0.0/doc/html,/usr/local/share/doc/ghc/html/libraries/array-0.3.0.0/array.haddock --read-interface=/packages/archive/base/4.2.0.0/doc/html,/usr/local/share/doc/ghc/html/libraries/base-4.2.0.0/base.haddock --read-interface=/packages/archive/containers/0.3.0.0/doc/html,/usr/local/share/doc/ghc/html/libraries/containers-0.3.0.0/containers.haddock --read-interface=/packages/archive/ghc-prim/0.2.0.0/doc/html,/usr/local/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/ghc-prim.haddock --read-interface=/packages/archive/integer-gmp/0.2.0.0/doc/html,/usr/local/share/doc/ghc/html/libraries/integer-gmp-0.2.0.0/integer-gmp.haddock --read-interface=/packages/archive/mtl/1.1.0.2/doc/html,/usr/local/tmp/archive/install/share/doc/mtl-1.1.0.2/html/mtl.haddock --odir=dist/doc/html/hasim/ --title=hasim-0.1: Process-Based Discrete Event Simulation library --optghc=-hide-all-packages --optghc=-fbuilding-cabal-package --optghc=-i --optghc=-idist/build --optghc=-isrc --optghc=-idist/build/autogen --optghc=-Idist/build/autogen --optghc=-Idist/build --optghc=-optP-include --optghc=-optPdist/build/autogen/cabal_macros.h --optghc=-odir --optghc=dist/build --optghc=-hidir --optghc=dist/build --optghc=-stubdir --optghc=dist/build --optghc=-package-id --optghc=base-4.2.0.0-c9182baf5cf44f2e72b2298fa160086c --optghc=-package-id --optghc=containers-0.3.0.0-409fe3b8f0dda25b98e03716d26be411 --optghc=-package-id --optghc=mtl-1.1.0.2-23ca4de7c573fd4df309067199a40634 --optghc=-O --optghc=-Wall -B/usr/local/lib/ghc-6.12.1 dist/build/tmp15238/src/Control/Hasim.hs dist/build/tmp15238/src/Control/Hasim/Action.hs dist/build/tmp15238/src/Control/Hasim/DES.hs dist/build/tmp15238/src/Control/Hasim/Process.hs dist/build/tmp15238/src/Control/Hasim/SimRun.hs dist/build/tmp15238/src/Control/Hasim/Simulation.hs dist/build/tmp15238/src/Control/Hasim/Types.hs dist/build/tmp15238/src/Control/Hasim/WatchMap.hs dist/build/tmp15238/src/Control/Hasim/SimRun.hs:291:13: GADT pattern match with non-rigid result type `StateT SimRunSt IO a' Solution: add a type signature for the entire case expression In a case alternative: Wait t -> do { let next = ...; curTime <- getTime; maybeReschedule (curTime + t) next } In a stmt of a 'do' expression: case prim of { Ret x -> do { let ...; maybeRescheduleNow next } Wait t -> do { let ...; curTime <- getTime; .... } Send pkt recv timeout -> do { execSend proc pkt recv timeout rest } Unwatch rcv -> do { execUnwatch proc rcv; let ...; .... } WithAcceptor acc c -> do { let ...; execWithAcceptor proc acc c next } PopAcceptor -> do { execPopAcceptor proc; let ...; .... } PerformIO io -> do { r <- lift io; let ...; .... } ObserveTime -> do { t <- getTime; let ...; .... } GetState -> do { st <- lift $ readIORef (currentState proc); let ...; .... } PutState st -> do { lift $ currentState proc `writeIORef` st; let ...; .... } WaitForever -> do { return () } } In the expression: do { case prim of { Ret x -> do { ... } Wait t -> do { ... } Send pkt recv timeout -> do { ... } Unwatch rcv -> do { ... } WithAcceptor acc c -> do { ... } PopAcceptor -> do { ... } PerformIO io -> do { ... } ObserveTime -> do { ... } GetState -> do { ... } PutState st -> do { ... } WaitForever -> do { ... } }; when (wake (Atom prim)) $ do { wm <- getWatchmap; forM_ (watchers wm (Process proc)) (\ (Process p') -> ...) } } *** Trying again with preferred-versions *** setup configure Configuring hasim-0.1... Flags chosen: splitbase=True Dependency base ==3.*: using base-3.0.3.2 Dependency containers -any: using containers-0.3.0.0 Dependency mtl >=1.0: using mtl-1.1.0.2 Using Cabal-1.8.0.2 compiled by ghc-6.12 Using compiler: ghc-6.12.1 Using install prefix: /usr/local/tmp/archive/install Binaries installed in: /usr/local/tmp/archive/install/bin Libraries installed in: /usr/local/tmp/archive/install/lib/hasim-0.1/ghc-6.12.1 Private binaries installed in: /usr/local/tmp/archive/install/libexec Data files installed in: /usr/local/tmp/archive/install/share/hasim-0.1 Documentation installed in: /usr/local/tmp/archive/install/share/doc/hasim-0.1 Using alex version 2.3.1 found on system at: /usr/bin/alex Using ar found on system at: /usr/bin/ar Using c2hs version 0.16.0 found on system at: /usr/local/bin/c2hs Using cpphs version 1.11 found on system at: /usr/local/bin/cpphs Using ffihugs found on system at: /usr/local/bin/ffihugs Using gcc version 4.4.3 found on system at: /usr/bin/gcc Using ghc version 6.12.1 found on system at: /usr/local/bin/ghc Using ghc-pkg version 6.12.1 found on system at: /usr/local/bin/ghc-pkg Using greencard found on system at: /usr/local/tmp/archive/install/bin/greencard Using haddock version 2.7.2 found on system at: /usr/local/bin/haddock Using happy version 1.17 found on system at: /usr/local/bin/happy No hmake found Using hsc2hs version 0.67 found on system at: /usr/local/bin/hsc2hs Using hscolour version 1.16 found on system at: /usr/local/bin/HsColour Using hugs found on system at: /usr/local/bin/hugs No jhc found Using ld found on system at: /usr/bin/ld No lhc found No lhc-pkg found No nhc98 found Using pkg-config version 0.22 found on system at: /usr/bin/pkg-config Using ranlib found on system at: /usr/bin/ranlib Using strip found on system at: /usr/bin/strip Using tar found on system at: /bin/tar *** setup haddock Running Haddock for hasim-0.1... /usr/local/bin/haddock --use-contents=/package/hasim-0.1 --ghc-version Creating dist/build (and its parents) Creating dist/build/autogen (and its parents) Preprocessing library hasim-0.1... Running hscolour for hasim-0.1... Creating dist/doc/html/hasim (and its parents) Creating dist/doc/html/hasim/src (and its parents) /usr/local/bin/HsColour -print-css -odist/doc/html/hasim/src/hscolour.css /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim.html src/Control/Hasim.hs /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim-Action.html src/Control/Hasim/Action.hs /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim-DES.html src/Control/Hasim/DES.hs /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim-Process.html src/Control/Hasim/Process.hs /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim-SimRun.html src/Control/Hasim/SimRun.hs /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim-Simulation.html src/Control/Hasim/Simulation.hs /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim-Types.html src/Control/Hasim/Types.hs /usr/local/bin/HsColour -css -anchor -odist/doc/html/hasim/src/Control-Hasim-WatchMap.html src/Control/Hasim/WatchMap.hs Warning: The documentation for the following packages are not installed. No links will be generated to these packages: base-3.0.3.2, ffi-1.0, rts-1.0 /usr/local/bin/ghc --print-libdir copy src/Control/Hasim.hs to dist/build/tmp15288/src/Control/Hasim.hs copy src/Control/Hasim/Action.hs to dist/build/tmp15288/src/Control/Hasim/Action.hs copy src/Control/Hasim/DES.hs to dist/build/tmp15288/src/Control/Hasim/DES.hs copy src/Control/Hasim/Process.hs to dist/build/tmp15288/src/Control/Hasim/Process.hs copy src/Control/Hasim/SimRun.hs to dist/build/tmp15288/src/Control/Hasim/SimRun.hs copy src/Control/Hasim/Simulation.hs to dist/build/tmp15288/src/Control/Hasim/Simulation.hs copy src/Control/Hasim/Types.hs to dist/build/tmp15288/src/Control/Hasim/Types.hs copy src/Control/Hasim/WatchMap.hs to dist/build/tmp15288/src/Control/Hasim/WatchMap.hs Creating dist/doc/html/hasim/ (and its parents) /usr/local/bin/haddock --use-contents=/package/hasim-0.1 --prologue=dist/doc/html/hasim/haddock-prolog15288.txt --dump-interface=dist/doc/html/hasim/hasim.haddock --optghc=-package-name --optghc=hasim-0.1 --source-module=src/%{MODULE/./-}.html --source-entity=src/%{MODULE/./-}.html#%{NAME} --verbosity=1 --html --read-interface=/packages/archive/array/0.3.0.0/doc/html,/usr/local/share/doc/ghc/html/libraries/array-0.3.0.0/array.haddock --read-interface=/packages/archive/base/4.2.0.0/doc/html,/usr/local/share/doc/ghc/html/libraries/base-4.2.0.0/base.haddock --read-interface=/packages/archive/containers/0.3.0.0/doc/html,/usr/local/share/doc/ghc/html/libraries/containers-0.3.0.0/containers.haddock --read-interface=/packages/archive/ghc-prim/0.2.0.0/doc/html,/usr/local/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/ghc-prim.haddock --read-interface=/packages/archive/integer-gmp/0.2.0.0/doc/html,/usr/local/share/doc/ghc/html/libraries/integer-gmp-0.2.0.0/integer-gmp.haddock --read-interface=/packages/archive/mtl/1.1.0.2/doc/html,/usr/local/tmp/archive/install/share/doc/mtl-1.1.0.2/html/mtl.haddock --read-interface=/packages/archive/syb/0.1.0.2/doc/html,/usr/local/share/doc/ghc/html/libraries/syb-0.1.0.2/syb.haddock --odir=dist/doc/html/hasim/ --title=hasim-0.1: Process-Based Discrete Event Simulation library --optghc=-hide-all-packages --optghc=-fbuilding-cabal-package --optghc=-i --optghc=-idist/build --optghc=-isrc --optghc=-idist/build/autogen --optghc=-Idist/build/autogen --optghc=-Idist/build --optghc=-optP-include --optghc=-optPdist/build/autogen/cabal_macros.h --optghc=-odir --optghc=dist/build --optghc=-hidir --optghc=dist/build --optghc=-stubdir --optghc=dist/build --optghc=-package-id --optghc=base-3.0.3.2-52acef427378232ec569bca0486ee48f --optghc=-package-id --optghc=containers-0.3.0.0-409fe3b8f0dda25b98e03716d26be411 --optghc=-package-id --optghc=mtl-1.1.0.2-23ca4de7c573fd4df309067199a40634 --optghc=-O --optghc=-Wall -B/usr/local/lib/ghc-6.12.1 dist/build/tmp15288/src/Control/Hasim.hs dist/build/tmp15288/src/Control/Hasim/Action.hs dist/build/tmp15288/src/Control/Hasim/DES.hs dist/build/tmp15288/src/Control/Hasim/Process.hs dist/build/tmp15288/src/Control/Hasim/SimRun.hs dist/build/tmp15288/src/Control/Hasim/Simulation.hs dist/build/tmp15288/src/Control/Hasim/Types.hs dist/build/tmp15288/src/Control/Hasim/WatchMap.hs dist/build/tmp15288/src/Control/Hasim/SimRun.hs:291:13: GADT pattern match with non-rigid result type `StateT SimRunSt IO a' Solution: add a type signature for the entire case expression In a case alternative: Wait t -> do { let next = ...; curTime <- getTime; maybeReschedule (curTime + t) next } In a stmt of a 'do' expression: case prim of { Ret x -> do { let ...; maybeRescheduleNow next } Wait t -> do { let ...; curTime <- getTime; .... } Send pkt recv timeout -> do { execSend proc pkt recv timeout rest } Unwatch rcv -> do { execUnwatch proc rcv; let ...; .... } WithAcceptor acc c -> do { let ...; execWithAcceptor proc acc c next } PopAcceptor -> do { execPopAcceptor proc; let ...; .... } PerformIO io -> do { r <- lift io; let ...; .... } ObserveTime -> do { t <- getTime; let ...; .... } GetState -> do { st <- lift $ readIORef (currentState proc); let ...; .... } PutState st -> do { lift $ currentState proc `writeIORef` st; let ...; .... } WaitForever -> do { return () } } In the expression: do { case prim of { Ret x -> do { ... } Wait t -> do { ... } Send pkt recv timeout -> do { ... } Unwatch rcv -> do { ... } WithAcceptor acc c -> do { ... } PopAcceptor -> do { ... } PerformIO io -> do { ... } ObserveTime -> do { ... } GetState -> do { ... } PutState st -> do { ... } WaitForever -> do { ... } }; when (wake (Atom prim)) $ do { wm <- getWatchmap; forM_ (watchers wm (Process proc)) (\ (Process p') -> ...) } }