1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

Indentation stuff.

This commit is contained in:
Rob Rix 2015-11-17 16:17:42 -08:00
parent 4028c50c84
commit a71385b22e
2 changed files with 10 additions and 10 deletions

View File

@ -37,11 +37,11 @@ d = Free $ Keyed $ fromList [
cost :: Diff a -> Integer
cost f = iter c $ fmap g f where
c (Leaf _) = 0
c (Keyed xs) = sum $ snd <$> toList xs
c (Indexed xs) = sum xs
c (Fixed xs) = sum xs
g _ = 1
c (Leaf _) = 0
c (Keyed xs) = sum $ snd <$> toList xs
c (Indexed xs) = sum xs
c (Fixed xs) = sum xs
g _ = 1
-- interpret :: Algorithm a b -> b
-- interpret (Pure b) = b

View File

@ -3,8 +3,8 @@ module Syntax where
import Data.Map
data Syntax a f =
Leaf a
| Indexed [f]
| Fixed [f]
| Keyed (Map String f)
deriving (Functor, Show, Eq)
Leaf a
| Indexed [f]
| Fixed [f]
| Keyed (Map String f)
deriving (Functor, Show, Eq)