Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

+ Computing size of expressions

  • Loading branch information...
commit ddd5fcac0f787fa490c6f6838c1d20d508bcbc69 1 parent 9106906
Krzysztof Sakwerda authored

Showing 1 changed file with 13 additions and 0 deletions. Show diff stats Hide diff stats

  1. +13 0 Inline/Size.hs
13 Inline/Size.hs
... ... @@ -0,0 +1,13 @@
  1 +module Inline.Size where
  2 + import KNormal.KSyntax
  3 +
  4 + size :: KExpr -> Integer
  5 + size (KEifEq _ _ e1 e2) = 1 + size e1 + size e2
  6 + size (KEifLE _ _ e1 e2) = 1 + size e1 + size e2
  7 + size (KElet _ e1 e2) = 1 + size e1 + size e2
  8 + size (KEletRec fd e) = 1 + size e + size (body fd)
  9 + size (KEletPair _ _ _ e) = 1 + size e
  10 + size (KEletList _ _ _ e) = 1 + size e
  11 + size (KEhandle e1 e2) = size e1 + size e2
  12 + size (KEseq e1 e2) = size e1 + size e2
  13 + size _ = 1

0 comments on commit ddd5fca

Please sign in to comment.
Something went wrong with that request. Please try again.