Statistics
| Branch: | Tag: | Revision:

root / src / Ganeti @ 78209a84

Name Size
  Confd
  Cpu
  Curl
  DataCollectors
  HTools
  Hs2Py
  Hypervisor
  Monitoring
  Query
  Storage
  THH
BasicTypes.hs 9.5 kB
Common.hs 14.4 kB
Compat.hs 1.4 kB
Config.hs 14.8 kB
ConfigReader.hs 10.8 kB
ConstantUtils.hs 5.3 kB
Constants.hs 118.8 kB
Daemon.hs 15.6 kB
Errors.hs 6.5 kB
Hash.hs 1.8 kB
JQScheduler.hs 11.9 kB
JQueue.hs 17.2 kB
JSON.hs 11.6 kB
Jobs.hs 3.3 kB
Kvmd.hs 11.5 kB
Logging.hs 4.9 kB
Luxi.hs 11.9 kB
Network.hs 3.5 kB
Objects.hs 25.2 kB
OpCodes.hs 26.9 kB
OpParams.hs 46.2 kB
Parsers.hs 1.7 kB
Path.hs 3.9 kB
PyValue.hs 2.9 kB
Rpc.hs 21.5 kB
Runtime.hs 7.3 kB
Ssconf.hs 5.2 kB
THH.hs 49.8 kB
Types.hs 28.2 kB
UDSServer.hs 12.1 kB
Utils.hs 22.3 kB
Version.hs.in 246 Bytes

Latest revisions

# Date Author Comment
78209a84 01/16/2014 05:11 pm Petr Pudlak

Add Alternative instances for GenericResult and ResultT

This allows to use Alternative specific combinators, namely `optional`.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

74b3f734 01/16/2014 05:11 pm Petr Pudlak

Use ClockTime instead of Double in fields in Objects.hs

This affects "mtime" and "ctime" fields in all data types.

This also forces explicit declaration of how the fields are serialized
in Query.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

836ccf52 01/16/2014 05:11 pm Petr Pudlak

A function for creating time fields that serialize as Double

The function creates fields with custom read/show methods based on
TimeAsDoubleJSON, with the default value of 0 seconds since the epoch.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

6879dfd2 01/16/2014 05:11 pm Petr Pudlak

Also fix MaybeForJSON parsing and add unit tests

Its readJSON was mistakenly implemented as an infinite loop.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

5ea9f6cb 01/16/2014 05:11 pm Petr Pudlak

Add a newtype wrapper that saves ClockTime as JSON double

This allows to convert ClockTime to JSON and back.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

d8adc255 01/16/2014 05:11 pm Petr Pudlak

Document Field data type used in TH code generation

Describe what types of fields are currently possible and allowed and
what what are the types of their "Q Exp" expressions.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

596d7b4f 01/16/2014 05:10 pm Petr Pudlak

Prohibit fields that are optional with a default value

For fields marked optional we need to keep the information that a value
isn't available. Therefore having a default value for an optional field
would not work.

Signed-off-by: Petr Pudlak <>...

ee7caf27 01/16/2014 05:10 pm Petr Pudlak

A workaround for GHC linking problem "unknown symbol ..."

GHC 7.4 on Debian Wheezy fails to compile after some TH related changes,
reporting

ghc: src/Ganeti/JSON.o: unknown symbol
`attoparseczm0zi11zi1zi0_DataziAttoparsecziText_zdwf_info`

This doesn't happen on Squeeze. Explicitly importing attoparsec in THH...

eb577716 01/16/2014 05:10 pm Petr Pudlak

Fix saveObjectField to work properly with custom fieldShow

Before it only worked for non-optional fields. For optional fields
with custom fieldShow functions, the generated code didn't use it.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

0b7bf465 01/16/2014 05:10 pm Petr Pudlak

Fix typing problems in TH that generates field code

See #677: The code generated by TH had different types depending on if
a field had a default value and/or custom reader. Simple cases worked by
accident, but more complex ones failed.

This patch distinguishes properly between optional fields and mandatory...

View revisions

Also available in: Atom