1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +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 :: Diff a -> Integer
cost f = iter c $ fmap g f where cost f = iter c $ fmap g f where
c (Leaf _) = 0 c (Leaf _) = 0
c (Keyed xs) = sum $ snd <$> toList xs c (Keyed xs) = sum $ snd <$> toList xs
c (Indexed xs) = sum xs c (Indexed xs) = sum xs
c (Fixed xs) = sum xs c (Fixed xs) = sum xs
g _ = 1 g _ = 1
-- interpret :: Algorithm a b -> b -- interpret :: Algorithm a b -> b
-- interpret (Pure b) = b -- interpret (Pure b) = b

View File

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