[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / compiler / tests / typecheck / should_fail / tcfail046.hs
1 --!! function types in deriving Eq things
2 -- From a bug report by Dave Harrison <D.A.Harrison@newcastle.ac.uk>
3
4 module Simulation(Process(..),
5                   Status,
6                   Pid(..),
7                   Time(..),
8                   Continuation,
9                   Message,
10                   MessList(..) ) where
11
12 type    Process a = Pid -> Time -> Message a -> ( MessList a, 
13                                                   Continuation a)
14
15 data    Continuation a = Do (Process a) deriving Eq
16
17
18 type    ProcList a = [ (Pid, Status, Process a) ]
19 data    Status     = Active | Passive | Busy Integer | Terminated
20                      deriving Eq
21
22
23 data Message a = Create (Process a) | Created Pid   | Activate Pid  | 
24                  Passivate Pid      | Terminate Pid | Wait Pid Time | 
25                  Query Pid a        | Data Pid a    | Event         |
26                  Output Pid String
27                  deriving Eq
28
29 type    MessList a = [ Message a ]
30
31 type    Pid  = Integer
32 type    Time = Integer