Copyright | (c) 2020 Yann Herklotz |
---|---|
License | GPL-3 |
Maintainer | yann [at] yannherklotz [dot] com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Verismith.Verilog.Distance
Description
Define the distance function for the abstract syntax tree, so that different Verilog files can be compared. This allows us to define a metric on how different two pieces of Verilog are. Currently, differences in expressions are ignored, as these are not that interesting.
Documentation
Constructors
Pair a b |
eqDistance :: Eq a => a -> a -> Int Source #
emptyDistance :: a -> a -> Int Source #
class Distance a where Source #
Minimal complete definition
Instances
Distance Text Source # | |
Distance ConstExpr Source # | |
Distance Identifier Source # | |
Defined in Verismith.Verilog.Distance Methods distance :: Identifier -> Identifier -> Int Source # udistance :: Identifier -> Identifier -> Int Source # dempty :: Identifier -> Int Source # | |
Distance Parameter Source # | |
Distance Port Source # | |
Distance PortDir Source # | |
Distance PortType Source # | |
Distance Range Source # | |
Distance Integer Source # | |
Distance Bool Source # | |
Distance Char Source # | |
Distance (ModDecl a) Source # | |
Distance (ModItem a) Source # | |
Distance (SourceInfo a) Source # | |
Defined in Verismith.Verilog.Distance Methods distance :: SourceInfo a -> SourceInfo a -> Int Source # udistance :: SourceInfo a -> SourceInfo a -> Int Source # dempty :: SourceInfo a -> Int Source # | |
Distance (Statement a) Source # | |
Distance (Verilog a) Source # | |
Distance a => Distance (Maybe a) Source # | |
Distance a => Distance [a] Source # | |