Skip to content

Commit

Permalink
change arguments to have coherent names
Browse files Browse the repository at this point in the history
  • Loading branch information
lemastero committed May 5, 2024
1 parent c868641 commit f1e086c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/adts.agda
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ idRgb theArg = theArg
-- const function with one named argument

rgbConstTrue1 : (rgb : Rgb) Bool
rgbConstTrue1 foo = True
rgbConstTrue1 rgb = True -- TODO produce function body
{-# COMPILE AGDA2SCALA rgbConstTrue1 #-}

-- function with multiple named arguments

and0 : (rgbPairArg : RgbPair) -> (rgbArg : Rgb) -> Bool
and0 a b = False
and0 rgbPairArg rgbArg = False
{-# COMPILE AGDA2SCALA and0 #-}
4 changes: 2 additions & 2 deletions examples/adts.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final case class RgbPair(snd: Bool, fst: Rgb)

def idRgb(theArg: Rgb): Rgb = theArg

def rgbConstTrue1(rgb: Rgb): Bool = foo
def rgbConstTrue1(rgb: Rgb): Bool = rgb

def and0(rgbArg: Rgb, rgbPairArg: RgbPair): Bool = a
def and0(rgbArg: Rgb, rgbPairArg: RgbPair): Bool = rgbPairArg
}

0 comments on commit f1e086c

Please sign in to comment.