makefile fix and table with results so far added to ex3
[tt2015.git] / a3 / code / Generics / GenFMap.dcl
1 definition module GenFMap
2
3 import StdGeneric, StdMaybe
4
5 :: FMap v
6 derive bimap FMap
7
8 emptyFMap :: .FMap .v
9
10 generic gLookupFMap key :: key (FMap value) -> FMap value
11 derive gLookupFMap UNIT, PAIR, EITHER, CONS, FIELD, OBJECT, Char, Int, Bool, Real, String, [], {}, {!}
12 derive gLookupFMap (,), (,,), (,,,), (,,,,), (,,,,,), (,,,,,,), (,,,,,,,)
13
14 generic gInsertFMap key :: key (FMap value, FMap value) -> (FMap value, FMap value)
15 derive gInsertFMap UNIT, PAIR, EITHER, CONS, FIELD, OBJECT, Char, Int, Bool, Real, String, [], {}, {!}
16 derive gInsertFMap (,), (,,), (,,,), (,,,,), (,,,,,), (,,,,,,), (,,,,,,,)
17
18 lookupFMap :: !k .(FMap v) -> .(Maybe v) | gLookupFMap{|*|} k & bimap{|*|} v
19 (<<=) infixl 1 :: .(FMap v) !.(k,v) -> FMap v | gInsertFMap{|*|} k & bimap{|*|} v