mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +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 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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user