mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Indentation stuff.
This commit is contained in:
parent
4028c50c84
commit
a71385b22e
10
src/Diff.hs
10
src/Diff.hs
@ -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
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user